Normally in gtk with bare C, you would mark a custom widget as activatable by setting the GtkWidgetClass property
activate_signal to the signal that triggers activation.
GtkSwitch does it like so:
signals[ACTIVATE] = g_signal_new (I_("activate"), G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkSwitchClass, activate), NULL, NULL, NULL, G_TYPE_NONE, 0); widget_class->activate_signal = signals[ACTIVATE];
How do you do that in Vala? I don’t think I see any special support for this feature.