Re: Getting mouse cordinates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Display *dpy;
  int rx;
  int ry;
  int wx;
  int wy;
  Window root;
  Window child;
  unsigned int mask;
  Bool bo;

  dpy = XOpenDisplay(NULL);

  bo = XQueryPointer(dpy,
                     RootWindow(dpy,0),
                     &root,
                     &child,
                     &rx,
                     &ry,
                     &wx,
                     &wy,
                     &mask);


On Sun, 2005-01-16 at 20:48 -0800, Vishal Linux wrote:
> Dear all,
> 
> I am porting an application from Windows to Linux.
> In the application at some point of time i require the cordinates of
> mouse pointer.
> (Application developer of windows has achieved this by concept of
> "Mouse Hooking").
> 
> After doing some research and study i think the blow API shud serve the purpose.
> Cud any one who has een developing/workin g on XFree, gimme some
> pointers and some guidelines....
> 
> Bool XQueryPointer(Display *display, Window w, Window
>     *root_return, Window *child_return, int *root_x_return, int
> *root_y_return, int *win_x_return, int *win_y_return, unsigned int
> *mask_return);
> 
> Reference: http://www.xfree86.org/4.4.0/XQueryPointer.3.html
> 
> Regards,
> Vishal.
> _______________________________________________
> XFree86 mailing list
> XFree86@xxxxxxxxxxx
> http://XFree86.Org/mailman/listinfo/xfree86
-- 
Henrik Sandklef                             hesa@xxxxxxx     
Xnee maintainer                            http://www.gnu.org/software/xnee
Free Software Foundation Europe   http://www.fsfeurope.org  



_______________________________________________
XFree86 mailing list
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux