Laxkit  0.0.7.1
Public Member Functions
Laxkit::CoreXlibPointer Class Reference

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

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

List of all members.

Public Member Functions

 CoreXlibPointer (CoreXlibKeyboard *kb)
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 setMouseShape (anXWindow *win, int shape)
virtual int grabDevice (anXWindow *win)
virtual int ungrabDevice ()
virtual int getInfo (anXWindow *win, int *screen, anXWindow **child, int *x, int *y, unsigned int *mods, double *pressure, double *tiltx, double *tilty)
 Get information about the mouse state.
- Public Member Functions inherited from Laxkit::LaxMouse
virtual int clearReceiver (EventReceiver *receiver)
 Clear ttwindow if necessary.
virtual void buttonReleased (int button, anXWindow *ww)
 Resets buttoncount, which helps keep track of double, triple, etc clicks.
virtual void buttonPressed (Time time, int button, unsigned long windowid)
 Update buttoncount, which helps keep track of double, triple, etc clicks.
virtual int Pressure ()
virtual int TiltX ()
virtual int TiltY ()
- 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::LaxMouse
int buttoncount
 The running count of a button being pressed rapidly.
int button_for_count
 Index of button, tracked to update buttoncount.
Time last_button_time
 Time of the last button press of the same type for the same window.
unsigned long buttonwindow
 The object_id of the last window the button was clicked down in.
unsigned long last_leave_window
clock_t ttendlimit
 Clock time that must be passed without movement for there to be a tooltip.
clock_t ttthreshhold
 Clock time after entering to allow movement, before considering tooltips.
anXWindowttwindow
 A window under consideration for a tooltip.
LaxKeyboardpaired_keyboard
- 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 mouse events.


Member Function Documentation

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

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::LaxMouse::buttoncount, Laxkit::LaxMouse::buttonPressed(), and Laxkit::LaxMouse::buttonReleased().

int Laxkit::CoreXlibPointer::getInfo ( anXWindow win,
int screen,
anXWindow **  child,
int x,
int y,
unsigned int mods,
double *  pressure,
double *  tiltx,
double *  tilty 
)
virtual

Get information about the mouse state.

If you pass NULL for any field, then that field is ignored.

If win!=NULL, then return coordinates in win space. If the window is not on the same screen as the mouse, then return 1, and only screen gets set.

Otherwise return screen coordinates. The screen the mouse is actually in gets set.

Return 0 for success, or 1 for mouse not on same screen, or other number for mouse info not available for some reason.

Implements Laxkit::LaxMouse.

References Laxkit::anXApp::app.

int Laxkit::CoreXlibPointer::grabDevice ( anXWindow win)
virtual

Return 0 for success, 1 for failure.

Reimplemented from Laxkit::LaxMouse.

References Laxkit::anXApp::app.

int Laxkit::CoreXlibPointer::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::CoreXlibPointer::setMouseShape ( anXWindow win,
int  shape 
)
virtual

Return 0 for success, nonzero for error.

Reimplemented from Laxkit::LaxMouse.

References Laxkit::anXApp::app.

int Laxkit::CoreXlibPointer::ungrabDevice ( )
virtual

Return 0 for success, 1 for failure.

Todo:
what on earth does XUngrabPointer() actually return??

Reimplemented from Laxkit::LaxMouse.

References Laxkit::anXApp::app.


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

Mon Feb 17 2014 11:52:59, Laxkit