Laxkit  0.0.7.1
Public Member Functions
Laxkit::CoreXlibKeyboard Class Reference

Device that selects for core keyboard events. More...

Inheritance diagram for Laxkit::CoreXlibKeyboard:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CoreXlibKeyboard (CoreXlibPointer *p)
virtual int usesX ()
virtual int selectForWindow (anXWindow *win, unsigned long)
 Return 0 for success. 1 for error.
virtual int eventFilter (EventData **events_ret, XEvent *xev, anXWindow *ww, int &isinput)
virtual int SetFocus (anXWindow *win, clock_t t, int notifyonly)
 Called by anXApp when the focus needs to be set to win.
- Public Member Functions inherited from Laxkit::LaxKeyboard
virtual unsigned long QueryModifiers ()
virtual int clearReceiver (EventReceiver *receiver)
 Set current_focus to NULL if receiver->object_id==current_focus->object_id.
- Public Member Functions inherited from Laxkit::LaxDevice
virtual const charDeviceName ()
 Default is just to return name.
virtual const charDeviceType ()
 Default just returns NULL.
virtual int GetKey (int k)
 -1 returns number of buttons. Otherwise check status of that button number: return 1=on, 0=off.
virtual int GetButton (int b)
 -1 returns number of buttons. Otherwise check status of that button number: return 1=on, 0=off.
virtual double GetValue (int v, int w)
 -1 returns number of valuators. Otherwise check information of that valuator.
virtual int numFields ()
virtual int getFieldTypeInfo (int f, const char **nme, int *type, int *min, int *max, int *res)
 Retrieve device field info.
virtual int fd ()
virtual EventDatagetEvents ()
 Return an event stream if any events pending.
virtual ~LaxDevice ()
 Empty virtual destructor.
virtual const charName (const char *nname)
 Name the device.

Additional Inherited Members

- Public Attributes inherited from Laxkit::LaxKeyboard
LaxMousepaired_mouse
anXWindowcurrent_focus
clock_t focus_time
- Public Attributes inherited from Laxkit::LaxDevice
int id
int subid
XID xid
charname
int active
int screen
int input_head
int input_group
int input_source

Detailed Description

Device that selects for core keyboard events.


Member Function Documentation

int Laxkit::CoreXlibKeyboard::eventFilter ( EventData **  events_ret,
XEvent *  xev,
anXWindow ww,
int isinput 
)
virtual

This is supposed to translate any device related events to EventData objects. This also means updating any focus and tooltip checks.

Return 1 if event is absorbed, and nothing else should try to parse it. Return 0 for event ignored.

Parameters:
wwThe target window for the event
isinputSet to 1 if the processed event is input related

Reimplemented from Laxkit::LaxDevice.

References Laxkit::anXApp::app, Laxkit::filterkeysym(), SetFocus(), and Laxkit::anXWindow::win_active.

int Laxkit::CoreXlibKeyboard::selectForWindow ( anXWindow win,
unsigned  long 
)
virtual

Return 0 for success. 1 for error.

Selects for key up/down, button up/down, pointer motion, enter/leave, focus change, using core Xlib if ANXWIN_NO_INPUT is not set in win->win_style.

Reimplemented from Laxkit::LaxDevice.

References Laxkit::anXApp::app.

int Laxkit::CoreXlibKeyboard::SetFocus ( anXWindow win,
clock_t  t,
int  notifyonly 
)
virtual

Called by anXApp when the focus needs to be set to win.

Return 0 for success. nonzero for error.

For instance, when using core Xlib, XSetInputFocus() would be called from here.

Reimplemented from Laxkit::LaxKeyboard.

References Laxkit::anXApp::app.

Referenced by eventFilter().


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

Mon Feb 17 2014 11:52:59, Laxkit