EventControllerFocus

GtkEventControllerFocus is an event controller to keep track of keyboard focus.

The event controller offers [signal@Gtk.EventControllerFocus::enter] and [signal@Gtk.EventControllerFocus::leave] signals, as well as [property@Gtk.EventControllerFocus:is-focus] and [property@Gtk.EventControllerFocus:contains-focus] properties which are updated to reflect focus changes inside the widget hierarchy that is rooted at the controllers widget.

Constructors

this
this(GtkEventControllerFocus* gtkEventControllerFocus, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new event controller that will handle focus events.

Members

Functions

addOnEnter
gulong addOnEnter(void delegate(EventControllerFocus) dlg, ConnectFlags connectFlags)

Emitted whenever the focus enters into the widget or one of its descendents.

addOnLeave
gulong addOnLeave(void delegate(EventControllerFocus) dlg, ConnectFlags connectFlags)

Emitted whenever the focus leaves the widget hierarchy that is rooted at the widget that the controller is attached to.

containsFocus
bool containsFocus()

Returns %TRUE if focus is within @self or one of its children.

getEventControllerFocusStruct
GtkEventControllerFocus* getEventControllerFocusStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

isFocus
bool isFocus()

Returns %TRUE if focus is within @self, but not one of its children.

Static functions

getType
GType getType()

Variables

gtkEventControllerFocus
GtkEventControllerFocus* gtkEventControllerFocus;

the main Gtk struct

Inherited Members

From EventController

gtkEventController
GtkEventController* gtkEventController;

the main Gtk struct

getEventControllerStruct
GtkEventController* getEventControllerStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getCurrentEvent
Event getCurrentEvent()

Returns the event that is currently being handled by the controller, and %NULL at other times.

getCurrentEventDevice
Device getCurrentEventDevice()

Returns the device of the event that is currently being handled by the controller, and %NULL otherwise.

getCurrentEventState
GdkModifierType getCurrentEventState()

Returns the modifier state of the event that is currently being handled by the controller, and 0 otherwise.

getCurrentEventTime
uint getCurrentEventTime()

Returns the timestamp of the event that is currently being handled by the controller, and 0 otherwise.

getName
string getName()

Gets the name of @controller.

getPropagationLimit
GtkPropagationLimit getPropagationLimit()

Gets the propagation limit of the event controller.

getPropagationPhase
GtkPropagationPhase getPropagationPhase()

Gets the propagation phase at which @controller handles events.

getWidget
Widget getWidget()

Returns the #GtkWidget this controller relates to.

reset
void reset()

Resets the @controller to a clean state.

setName
void setName(string name)

Sets a name on the controller that can be used for debugging.

setPropagationLimit
void setPropagationLimit(GtkPropagationLimit limit)

Sets the event propagation limit on the event controller.

setPropagationPhase
void setPropagationPhase(GtkPropagationPhase phase)

Sets the propagation phase at which a controller handles events.

Meta