Hi, I am programming with GTK+ in windows in the MINGW+MSYS environment.
How can I realize some mouse programming, such as controlling the mouse position on the screen, double-clicked, etc?
My confusion is that whether I should refer to mouse programming in linux or windows in this case?
If Mingw provides interface from linux to windows, so i should refer the mouse programming in linux, right?
Windows Live Photo gallery 数码相机的超级伴侣，轻松管理和编辑照片，还能制作全景美图！
From: Tor Lillqvist <tml@ik...> - 2008-05-07 11:53:24
> Hi, I am programming with GTK+ in windows in the MINGW+MSYS environment.
Then it is better to ask on the gtk-app-devel-list list. See
http://www.gtk.org/mailing-lists.html . Please post follow-up
> How can I realize some mouse programming,
I don't know why you use the term "mouse programming" which sounds
rather strange to me. If you mean very low-level access to the mouse,
then that has nothing to do with a high-level cross-platform toolkit
like GTK+. But apparently you don't mean that.
> such as controlling the mouse position on the screen,
It is generally considered a very bad idea to move the mouse pointer
programmatically. That said, there is the gdk_display_warp_pointer()
function. (But please don't use it.)
(On Windows, there is only one "display", so you can always pass in
gdk_display_set_default() for the GdkDisplay* parameter.)
> double-clicked, etc?
gdk_display_set_double_click_distance() are probably what you are
> My confusion is that whether I should refer to mouse programming in linux or
> windows in this case?
you are using GTK+, so use its APIs. Linux- or Windows-specific "mouse
programming" has nothing to do with this.
> If Mingw provides interface from linux to windows, so i should refer the
> mouse programming in linux, right?
Mingw does not provide an "interface from Linux to Windows". What made
you think that? If you found such information somewhere on the web, or
somebody told you, please tell them that they are misleading people.
Besides, GTK+ on X11 runs on all kinds of Unixes, not just Linux.
Don't confuse X11 with Linux. There are many other Unixes than Linux,
and X11 servers and clients can run on many other operating systems