On Tuesday 05 November 2002 07:34, chenu-tournier marc wrote:
| Hello
|
| I would like to get the mouse position without wating of a action
| from the user. Is that possible?
| Thanks.
| Marc
Yes. Not easy. From xwin.c:
/*-----------------------------------------------------------------------=
---*\
* MasterEH()
*
* Master X event handler routine.
* Redirects control to routines to handle:
* - keyboard events
* - mouse events
* - expose events
* - resize events
*
* By supplying a master event handler, the user can take over all event
* processing. If events other than those trapped by PLplot need=20
handling,
* just call XSelectInput with the appropriate flags. The default=20
PLplot
* event handling can be modified arbitrarily by changing the event=20
struct.
\*-----------------------------------------------------------------------=
---*/
static void
MasterEH(PLStream *pls, XEvent *event)
{
XwDev *dev =3D (XwDev *) pls->dev;
=20
if (dev->MasterEH !=3D NULL)
(*dev->MasterEH) (pls, event); <---------- user supplied, I think.
=20
switch (event->type) {
Or, if the the Caps-Lock key is locked, then "x01c -dev xwin -locate"=20
works!
Joao
|