/**
* SECTION:gaction
* @title: GAction
- * @short_description: an action
+ * @short_description: An action
*
* #GAction represents a single named action.
*
* The name of the action. This is mostly meaningful for identifying
* the action once it has been added to a #GActionGroup.
*
- * Since: 2.26
+ * Since: 2.28
**/
g_object_interface_install_property (iface,
g_param_spec_string ("name",
P_("Action Name"),
P_("The name used to invoke the action"),
NULL,
- G_PARAM_READABLE |
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
/**
* The type of the parameter that must be given when activating the
* action.
*
- * Since: 2.26
+ * Since: 2.28
**/
g_object_interface_install_property (iface,
g_param_spec_boxed ("parameter-type",
P_("Parameter Type"),
P_("The type of GVariant passed to activate()"),
G_TYPE_VARIANT_TYPE,
- G_PARAM_READABLE |
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
/**
* If the action is disabled then calls to g_action_activate() and
* g_action_set_state() have no effect.
*
- * Since: 2.26
+ * Since: 2.28
**/
g_object_interface_install_property (iface,
g_param_spec_boolean ("enabled",
P_("Enabled"),
P_("If the action can be activated"),
TRUE,
- G_PARAM_READABLE |
+ G_PARAM_CONSTRUCT |
+ G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
/**
* The #GVariantType of the state that the action has, or %NULL if the
* action is stateless.
*
- * Since: 2.26
+ * Since: 2.28
**/
g_object_interface_install_property (iface,
g_param_spec_boxed ("state-type",
*
* The state of the action, or %NULL if the action is stateless.
*
- * Since: 2.26
+ * Since: 2.28
**/
g_object_interface_install_property (iface,
g_param_spec_variant ("state",
*
* If the @value GVariant is floating, it is consumed.
*
- * Since: 2.26
+ * Since: 2.28
**/
void
g_action_set_state (GAction *action,
*
* Returns: (transfer full): the current state of the action
*
- * Since: 2.26
+ * Since: 2.28
**/
GVariant *
g_action_get_state (GAction *action)
*
* Returns: the name of the action
*
- * Since: 2.26
+ * Since: 2.28
**/
const gchar *
g_action_get_name (GAction *action)
*
* Returns: (allow-none): the parameter type
*
- * Since: 2.26
+ * Since: 2.28
**/
const GVariantType *
g_action_get_parameter_type (GAction *action)
*
* Returns: (allow-none): the state type, if the action is stateful
*
- * Since: 2.26
+ * Since: 2.28
**/
const GVariantType *
g_action_get_state_type (GAction *action)
*
* Returns: (transfer full): the state range hint
*
- * Since: 2.26
+ * Since: 2.28
**/
GVariant *
g_action_get_state_hint (GAction *action)
*
* Returns: whether the action is enabled
*
- * Since: 2.26
+ * Since: 2.28
**/
gboolean
g_action_get_enabled (GAction *action)
* the parameter type given at construction time). If the parameter
* type was %NULL then @parameter must also be %NULL.
*
- * Since: 2.26
+ * Since: 2.28
**/
void
g_action_activate (GAction *action,