How to use install_action in Vala code?

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

the method modifier flag is class, How to use install_action in Vala code?

It can be called from a static construct {}, another class method (including a class construct {}) or from an instance method.

In C GObject, static construct {} translates to class_init and class construct {} translates to base_init (the difference is that class construct {} is called once for every subclass and static construct {} is called only once).

I think the right usage is to call it from static construct {} (but hopefully someone who knows gtk better can confirm using the above explanation).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.