Add getter for WidgetClass.activate_signal

Just like we have a setter.
This commit is contained in:
Emmanuele Bassi 2020-12-05 00:59:55 +00:00
parent fde32c5219
commit fe9c0db603
3 changed files with 21 additions and 0 deletions

View File

@ -4368,6 +4368,7 @@ gtk_widget_class_set_layout_manager_type
gtk_widget_class_get_layout_manager_type gtk_widget_class_get_layout_manager_type
gtk_widget_class_set_activate_signal gtk_widget_class_set_activate_signal
gtk_widget_class_set_activate_signal_from_name gtk_widget_class_set_activate_signal_from_name
gtk_widget_class_get_activate_signal
gtk_widget_activate gtk_widget_activate
gtk_widget_is_focus gtk_widget_is_focus
gtk_widget_grab_focus gtk_widget_grab_focus

View File

@ -4582,6 +4582,24 @@ gtk_widget_event (GtkWidget *widget,
return return_val; return return_val;
} }
/**
* gtk_widget_class_get_activate_signal:
* @widget_class: a #GtkWidgetClass
*
* Retrieves the signal id for the activation signal set using
* gtk_widget_class_set_activate_signal().
*
* Returns: a signal id, or 0 if the widget class does not
* specify an activation signal
*/
guint
gtk_widget_class_get_activate_signal (GtkWidgetClass *widget_class)
{
g_return_val_if_fail (GTK_IS_WIDGET_CLASS (widget_class), 0);
return widget_class->activate_signal;
}
/** /**
* gtk_widget_class_set_activate_signal: * gtk_widget_class_set_activate_signal:
* @widget_class: a #GtkWidgetClass * @widget_class: a #GtkWidgetClass

View File

@ -370,6 +370,8 @@ void gtk_widget_class_set_activate_signal (GtkWidgetClass
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_widget_class_set_activate_signal_from_name (GtkWidgetClass *widget_class, void gtk_widget_class_set_activate_signal_from_name (GtkWidgetClass *widget_class,
const char *signal_name); const char *signal_name);
GDK_AVAILABLE_IN_ALL
guint gtk_widget_class_get_activate_signal (GtkWidgetClass *widget_class);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_mnemonic_activate (GtkWidget *widget, gboolean gtk_widget_mnemonic_activate (GtkWidget *widget,