Class EventControllerFocus

All Implemented Interfaces:
PointerInterface

public class EventControllerFocus extends EventController
`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.

https://docs.gtk.org/gtk4/class.EventControllerFocus.html

  • Field Details

  • Constructor Details

    • EventControllerFocus

      public EventControllerFocus(PointerContainer pointer)
    • EventControllerFocus

      public EventControllerFocus()
      Creates a new event controller that will handle focus events.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • containsFocus

      public boolean containsFocus()
      Returns %TRUE if focus is within @self or one of its children.
      Returns:
      %TRUE if focus is within @self or one of its children
    • isFocus

      public boolean isFocus()
      Returns %TRUE if focus is within @self, but not one of its children.
      Returns:
      %TRUE if focus is within @self, but not one of its children
    • onEnter

      Connect to signal "enter".
      See EventControllerFocus.OnEnter.onEnter() for signal description.
      Field SIGNAL_ON_ENTER contains original signal name and can be used as resource reference.
      Parameters:
      signal - callback function (lambda).
      Returns:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • onLeave

      Connect to signal "leave".
      See EventControllerFocus.OnLeave.onLeave() for signal description.
      Field SIGNAL_ON_LEAVE contains original signal name and can be used as resource reference.
      Parameters:
      signal - callback function (lambda).
      Returns:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()