Laxkit  0.0.7.1
Public Member Functions | Public Attributes
EventFilter Class Reference

Base class for filters windows can use to transform input event streams. More...

Inheritance diagram for EventFilter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual int eventFilter (EventData **events_ret, EventData *event, anXWindow *target, int &isinput)=0

Public Attributes

EventFilternext

Detailed Description

Base class for filters windows can use to transform input event streams.

When windows get input events, these can be parsed, and absorbed as necessary. For shortcuts, they would trigger a ShortcutEvent, for instance. If there is a chained shortcut, then input is absorbed until it can be determined if there is an active shortcut for the chain. If not, then all events stored up are released.

A window would define a list of actions, and store a list of shortcuts pointing to those actions. In the window's CharInput() function, the action number is found from its (redefinable) shortcuts and something like thewindow->action(shortcut->action) is called.

 * shortcut
 *    keys   +^a,c,h,a,i,n   #reserved mods and comma are specified by putting 2 of them
 *    action 5               
 *    shift-alt-'c',h,a,i,n
 *    '+',''',','  someotheraction    # <-- a chain of '+' then apostrophe, then comma
 * 
Todo:
perhaps key chaining can be done with a little popup up in the corner of the affected window? that would greatly relieve the particular window from having a special key chain mode.. it would just respond to a shortcut-command message..

For instance, see ShortcutFilter or GestureFilter.


The documentation for this class was generated from the following file:

Mon Feb 17 2014 11:52:58, Laxkit