Top | ![]() |
![]() |
![]() |
![]() |
MxAction * | mx_action_new () |
MxAction * | mx_action_new_with_parameter () |
MxAction * | mx_action_new_stateful () |
MxAction * | mx_action_new_full () |
const gchar * | mx_action_get_name () |
void | mx_action_set_name () |
const gchar * | mx_action_get_display_name () |
void | mx_action_set_display_name () |
const gchar * | mx_action_get_icon () |
void | mx_action_set_icon () |
gboolean | mx_action_get_active () |
void | mx_action_set_active () |
Actions represent operations that the user can perform, such as items in a menu or toolbar.
MxAction * mx_action_new_with_parameter (const gchar *name
,const GVariantType *parameter_type
);
Creates a new action with a parameter.
The created action is stateless. See mx_action_new_stateful()
.
name |
the name of the action |
|
parameter_type |
the type of parameter to the activate function. |
[allow-none] |
Since: 1.4
MxAction * mx_action_new_stateful (const gchar *name
,const GVariantType *parameter_type
,GVariant *state
);
Creates a new stateful action.
state
is the initial state of the action. All future state values
must have the same GVariantType as the initial state.
name |
the name of the action |
|
parameter_type |
the type of the parameter to the activate function. |
[allow-none] |
state |
the initial state of the action |
Since: 1.4
MxAction * mx_action_new_full (const gchar *name
,const gchar *display_name
,GCallback activated_cb
,gpointer user_data
);
Creates a new MxAction with the name and callback set
const gchar *
mx_action_get_name (MxAction *action
);
Get the name of the action
void mx_action_set_name (MxAction *action
,const gchar *name
);
Set the name of the action
const gchar *
mx_action_get_display_name (MxAction *action
);
Get the display name of the action
void mx_action_set_display_name (MxAction *action
,const gchar *name
);
Set the name of the action to display to the user
const gchar *
mx_action_get_icon (MxAction *action
);
Get the icon of the action
void mx_action_set_icon (MxAction *action
,const gchar *name
);
The icon to be used in a visual representation of an action.
gboolean
mx_action_get_active (MxAction *action
);
Get the value of the active property
struct MxAction;
The contents of this structure are private and should only be accessed through the public API.
“active”
property “active” gboolean
Whether the action is active.
MxAction:active
has been deprecated since version 1.4 and should not be used in newly-written code.
use the “enabled” property instead
Owner: MxAction
Flags: Read / Write
Default value: TRUE
“display-name”
property “display-name” char *
Localised name to use for display.
Owner: MxAction
Flags: Read / Write
Default value: NULL
“activate”
signalvoid user_function (MxAction *action, GVariant *parameter, gpointer user_data)
Indicates that the action was just activated.
parameter
will always be of the expected type. In the event that
an incorrect type was given, no signal will be emitted.
action |
the MxAction |
|
parameter |
the parameter to the activation. |
[allow-none] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 1.4
“activated”
signalvoid user_function (MxAction *action, gpointer user_data)
Emitted when the MxAction is activated.
MxAction::activated
has been deprecated since version 1.4 and should not be used in newly-written code.
Use MxAction::activate instead.
action |
the object that received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last