![]() |
![]()
| ![]() |
![]()
NAME"Tickit::Event" - event information structures DESCRIPTIONWhen 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. ACCESSORSThe following methods are shared between "Tickit::Event::Key" and "Tickit::Event::Mouse" instances. mod_is_altmod_is_ctrlmod_is_shiftConvenient shortcuts to tests on the "mod" bitmask to test if each of the modifiers is set. Tickit::Event::ExposerbThe Tickit::RenderBuffer instance containing the buffer for this redraw cycle. rectA Tickit::Rect instance containing the region of the window that needs repainting. Tickit::Event::FocustypeThis 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. winThe child Tickit::Window instance for child-focus notify events. Tickit::Event::KeytypeA dualvar giving the key event type as an integer or string event name ("text" or "key"). strA string containing the key event string. Printing keys besides Space (letters, numbers, symbols) are encoded as a single-character string. Numbered function keys are named "F1", "F2", etc... Other non-printing keys such as arrows, cursor control, and Space use a multi-character name taken from a list of known names, which includes: Backspace Tab Enter Escape Space Up Down Left Right Insert Delete PageUp PageDown Home End Modifiers are prefixed onto this string with a hyphen each; "M-" for Meta (or Alt), "C-" for Control and "S-" for Shift. Printing keys will never include a Shift modifier; non-printing keys might. For example, a Space C-b C-Enter M-S-Left S-Backspace modAn integer bitmask indicating the modifier state. Tickit::Event::MousetypeA dualvar giving the mouse event type as an integer or string event name ("press", "drag", "release" or "wheel"). buttonAn integer for non-wheel events or a dualvar for wheel events giving the wheel direction ("up" or "down"). linecolIntegers giving the mouse position. modAn integer bitmask indicating the modifier state. Tickit::Event::ResizelinescolsIntegers giving the new size. AUTHORPaul Evans <leonerd@leonerd.org.uk>
|