|
Laxkit
0.0.7.1
|
Class to hold info about various input devices. More...

Public Member Functions | |
| 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 int | clearReceiver (EventReceiver *receiver) |
| Remove all reference to receiver. | |
| virtual | ~LaxDevice () |
| Empty virtual destructor. | |
| virtual const char * | Name (const char *nname) |
| Name the device. | |
Public Attributes | |
| int | id |
| int | subid |
| XID | xid |
| char * | name |
| int | active |
| int | screen |
| int | input_head |
| int | input_group |
| int | input_source |
Class to hold info about various input devices.
These might be knobs, midi devices, or perhaps wiimotes.
|
virtual |
Remove all reference to receiver.
Return 0 for successful clearing, or nonzero for error or not found.
Reimplemented in Laxkit::LaxKeyboard, and Laxkit::LaxMouse.
|
virtual |
Turn an XEvent into EventData object(s).
Return 1 if event is absorbed, and nothing else should try to parse it. Use the returned EventDatas instead. Return 0 if event is ignored.
Reimplemented in Laxkit::CoreXlibKeyboard, and Laxkit::CoreXlibPointer.
Referenced by Laxkit::DeviceManager::eventFilter().
|
virtual |
Retrieve device field info.
nme is a name describing the field, such as "Keys", "Buttons", or "Pressure".
Type can be 0 for key, 1 for button, 2 for value.
For keys, min and max are the min and max keycodes.*** really? For buttons, min is 0, and max is the number of buttons available. For values, returns the minimum value, maximum value, and resolution of the value.
Return 0 for successful return of info, else 1 for info not available.
-1 returns number of valuators. Otherwise check information of that valuator.
w=0,1,2=value, min, max
|
virtual |
Return -2 if unititialized, -1 field type info not available
Called after anXWindow::xlib_window exists, this sets up anything specific so the window gets related events.
Return 0 for successful selection, nonzero for nothing done.
Reimplemented in Laxkit::CoreXlibKeyboard, and Laxkit::CoreXlibPointer.
Referenced by Laxkit::DeviceManager::selectForWindow().