wijjit.core.events.FocusEvent

class wijjit.core.events.FocusEvent(event_type=None, timestamp=<factory>, cancelled=False, element_id='', focus_gained=True)[source]

Focus change event.

Fired when an element gains or loses focus.

Parameters:
  • element_id (str) – ID of the element

  • focus_gained (bool) – True if element gained focus, False if lost

  • event_type (EventType | None)

  • timestamp (datetime)

  • cancelled (bool)

Variables:
  • element_id (str) – ID of the element

  • focus_gained (bool) – True if element gained focus, False if lost

__init__(event_type=None, timestamp=<factory>, cancelled=False, element_id='', focus_gained=True)
Parameters:
Return type:

None

Methods

__init__([event_type, timestamp, cancelled, ...])

cancel()

Cancel the event.

Attributes

cancelled

element_id

event_type

focus_gained

timestamp

element_id: str = ''
focus_gained: bool = True
__post_init__()[source]

Initialize event type.

Return type:

None