Web lists-archives.org

Re: [Mingw-users] how to realize mouse programming




> 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
questions there.

> 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.)

See http://library.gnome.org/devel/gdk/stable/

(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_time() and
gdk_display_set_double_click_distance() are probably what you are
looking for?

> 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
than Linux.

--tml

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users