2008/9/18 Andy Wingo <[EMAIL PROTECTED]>: > On Thu 18 Sep 2008 14:38, "Ishan Arora" <[EMAIL PROTECTED]> writes: > >> Is there a procedure to get mouse position. > > No, but it's relatively easy to write a minimal set of Xlib bindings, > binding only the functions you need. Griddy has some bindings:
Its nuts to work with X11 directly. Its not meant for that ... its like trying to call the linux kernel directly using syscalls and assembly language, bypassing the C library. Among other things, X11 will give you coords relative to the upper left of the screen, which is almost surely not what you want -- you want coords relative to a window, the window in which your app will be drawing. Use gtk or gnome or kde. Open a canvas. You can get coords that way. --linas