Widget.connectEvent

Connect to Event signal.

The GTK+ main loop will emit three signals for each GDK event delivered to a widget: one generic ::event signal, another, more specific, signal that matches the type of event delivered (e.g. #GtkWidget::key-press-event) and finally a generic #GtkWidget::event-after signal.

class Widget
gulong
connectEvent
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == bool)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] == gdk.event.Event)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] : gtk.widget.Widget)
)
)
&&
Parameters!T.length < 3
)

Parameters

callback T

signal callback delegate or function to connect

bool callback(gdk.event.Event event, gtk.widget.Widget widget)

event the #GdkEvent which triggered this signal (optional)

widget the instance the signal is connected to (optional)

Returns true to stop other handlers from being invoked for the event and to cancel the emission of the second specific ::event signal. false to propagate the event further and to allow the emission of the second signal. The ::event-after signal is emitted regardless of the return value.

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: gulong

Signal ID