install_action


Description:

[ CCode ( cname = "gtk_widget_class_install_action" ) ]
public class void install_action (string action_name, string? parameter_type, WidgetActionActivateFunc activate)

Adds an action for all instances of a widget class.

This function should be called at class initialization time.

Actions installed by this function are stateless. The only state they have is whether they are enabled or not (which can be changed with [ method@Gtk.Widget.action_set_enabled]).

Parameters:

this

a widget class

action_name

a prefixed action name, such as "clipboard.paste"

parameter_type

the parameter type

activate

callback to use when the action is activated