Laxkit  0.0.7.1
Public Member Functions | Public Attributes
Laxkit::LaxKeyboard Class Reference

LaxDevice subclass for keyboards. More...

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

List of all members.

Public Member Functions

virtual int SetFocus (anXWindow *w, clock_t time, int notifyonly)
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 char * DeviceName ()
 Default is just to return name.
virtual const char * DeviceType ()
 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 usesX ()
 Return nonzero if the device gets messages through X.
virtual int fd ()
virtual EventData * getEvents ()
 Return an event stream if any events pending.
virtual int eventFilter (EventData **events_ret, XEvent *xev, anXWindow *target, int &isinput)
 Turn an XEvent into EventData object(s).
virtual int selectForWindow (anXWindow *win, unsigned long)
 Called after anXWindow::xlib_window exists, this sets up anything specific so the window gets related events.
virtual ~LaxDevice ()
 Empty virtual destructor.
virtual const char * Name (const char *nname)
 Name the device.

Public Attributes

LaxMouse * paired_mouse
anXWindow * current_focus
clock_t focus_time
- Public Attributes inherited from Laxkit::LaxDevice
int id
int subid
XID xid
char * name
int active
int screen
int input_head
int input_group
int input_source

Detailed Description

LaxDevice subclass for keyboards.

Todo:
*** XIM: x input context stuff is crazy! need either a good explanation with working examples, or some simpler system.

Member Function Documentation

int Laxkit::LaxKeyboard::SetFocus ( anXWindow *  w,
clock_t  time,
int  notifyonly 
)
virtual

Remember that keyboard stores time as returned by times(), not Xlib time. If notifyonly, then this has been called in response to an event, not as a request to grab the focus.

Return 0 for focus changed. 1 for not changed, an error occured perhaps.

Reimplemented in Laxkit::CoreXlibKeyboard.

References Laxkit::anObject::dec_count(), and Laxkit::anObject::inc_count().

Referenced by Laxkit::DeviceManager::clearReceiver(), and Laxkit::DeviceManager::SetFocus().


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

Mon Feb 17 2014 11:52:59, Laxkit