logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

"Tickit::Event" - event information structures

Accessors

       The following methods are shared between "Tickit::Event::Key" and "Tickit::Event::Mouse" instances.

   mod_is_altmod_is_ctrlmod_is_shift
       Convenient shortcuts to tests on the "mod" bitmask to test if each of the modifiers is set.

Author

       Paul Evans <leonerd@leonerd.org.uk>

perl v5.40.0                                       2024-10-20                                 Tickit::Event(3pm)

Description

       When event handlers bound to Tickit::Term or Tickit::Window instances are invoked they receive an object
       instance to contain information about the event. Details of the event can be accessed as via accessor
       methods on these instances.

Name

       "Tickit::Event" - event information structures

Tickit::Event::Expose

rb
       The Tickit::RenderBuffer instance containing the buffer for this redraw cycle.

   rect
       A Tickit::Rect instance containing the region of the window that needs repainting.

Tickit::Event::Focus

type
       This accessor has two forms of operation.

       The new behaviour is that it returns a dualvar giving the focus event type as an integer or a string
       event name ("in" or "out"). This behaviour is selected if the method is invoked with any true value as an
       argument.

       The legacy behaviour is that it returns a simple boolean giving the focus direction; 1 for in, 0 for out.
       This legacy behaviour will be removed in a later version.

   win
       The child Tickit::Window instance for child-focus notify events.

Tickit::Event::Key

type
       A dualvar giving the key event type as an integer or string event name ("text" or "key").

   str
       A string containing the key event string.

   mod
       An integer bitmask indicating the modifier state.

Tickit::Event::Mouse

type
       A dualvar giving the mouse event type as an integer or string event name ("press", "drag", "release" or
       "wheel").

   button
       An integer for non-wheel events or a dualvar for wheel events giving the wheel direction ("up" or
       "down").

   linecol
       Integers giving the mouse position.

   mod
       An integer bitmask indicating the modifier state.

Tickit::Event::Resize

linescols
       Integers giving the new size.

See Also