Signals

Description

Actions represent operations that the user can be perform, along with
some information how it should be presented in the interface. Each action
provides methods to create icons, menu items and toolbar items representing
itself.

As well as the callback that is called when the action gets activated, the
following also gets associated with the action:

a name (not translated, for path lookup)

a label (translated, for display)

an accelerator

whether label indicates a stock id

a tooltip (optional, translated)

a toolbar label (optional, shorter than label)

The action will also have some state information:

visible (shown/hidden)

sensitive (enabled/disabled)

Apart from regular actions, there are toggle
actions, which can be toggled between two states and radio actions, of which only one in a group
can be in the "active" state. Other actions can be implemented as GtkAction
subclasses.

Each action can have one or more proxy menu item, toolbar button or
other proxy widgets. Proxies mirror the state of the action (text
label, tooltip, icon, visible, sensitive, etc), and should change when
the action's state changes. When the proxy is activated, it should
activate its action.

Details

GtkAction

typedef struct _GtkAction GtkAction;

The GtkAction struct contains only private members
and should not be accessed directly.

Warning

Connects a widget to an action object as a proxy. Synchronises
various properties of the action with the widget (such as label
text, icon, tooltip, etc), and attaches a callback so that the
action gets activated when the proxy widget does.

If the widget is already connected to an action, it is disconnected
first.

gtk_action_connect_accelerator ()

Since multiple proxies may independently trigger the installation
of the accelerator, the action counts the number of times this
function has been called and doesn't remove the accelerator until
gtk_action_disconnect_accelerator() has been called as many times.

gtk_action_block_activate ()

This is needed when updating the state of your proxy
GtkActivatable widget could result in calling gtk_action_activate(),
this is a convenience function to avoid recursing in those
cases (updating toggle state for instance).

gtk_action_block_activate_from ()

Warning

gtk_action_block_activate_from has been deprecated since version 2.16 and should not be used in newly-written code. activatables are now responsible for activating the
action directly so this doesnt apply anymore.

Disables calls to the gtk_action_activate()
function by signals on the given proxy widget. This is used to
break notification loops for things like check or radio actions.

This function is intended for use by action implementations.

action :

the action object

proxy :

a proxy widget

Since 2.4

gtk_action_unblock_activate_from ()

Warning

gtk_action_unblock_activate_from has been deprecated since version 2.16 and should not be used in newly-written code. activatables are now responsible for activating the
action directly so this doesnt apply anymore.