EventControllerFocus

open class EventControllerFocus(pointer: <Error class: unknown class><<Error class: unknown class>>) : 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.

Skipped during bindings generation

  • method contains-focus: Property has no getter nor setter

  • method is-focus: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor()

Creates a new event controller that will handle focus events.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gtkEventControllerFocusPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gtkEventControllerPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var name: String?

The name for this controller, typically used for debugging purposes.

Link copied to clipboard

The limit for which events this controller will handle.

Link copied to clipboard

The propagation phase at which this controller will handle events.

Link copied to clipboard
open val widget: Widget?

The widget receiving the GdkEvents that the controller will handle.

Functions

Link copied to clipboard
fun connectEnter(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

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

Link copied to clipboard
fun connectLeave(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

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

Link copied to clipboard

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

Link copied to clipboard
open fun getCurrentEvent(): <Error class: unknown class>?

Returns the event that is currently being handled by the controller.

Link copied to clipboard
open fun getCurrentEventDevice(): <Error class: unknown class>?

Returns the device of the event that is currently being handled by the controller.

Link copied to clipboard
open fun getCurrentEventState(): <Error class: unknown class>

Returns the modifier state of the event that is currently being handled by the controller.

Link copied to clipboard
open fun getCurrentEventTime(): <Error class: unknown class>

Returns the timestamp of the event that is currently being handled by the controller.

Link copied to clipboard
open fun getName(): String?

Gets the name of @controller.

Link copied to clipboard

Gets the propagation limit of the event controller.

Link copied to clipboard

Gets the propagation phase at which @controller handles events.

Link copied to clipboard
open fun getWidget(): Widget?

Returns the GtkWidget this controller relates to.

Link copied to clipboard
open fun isFocus(): Boolean

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

Link copied to clipboard
open fun reset()

Resets the @controller to a clean state.

Link copied to clipboard
open fun setName(name: String? = null)

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

Link copied to clipboard

Sets the event propagation limit on the event controller.

Link copied to clipboard

Sets the propagation phase at which a controller handles events.

Link copied to clipboard
open fun setStaticName(name: String? = null)

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