Re: Presentation & Question

Answering myself :-) I've found in Havoc Pennington's book this piece:

Can I move the mouse pointer myself?

There is an Xlib routine called XWarpPointer() that does this, but GDK
does not wrap it. It is almost certainly a bad idea to use this feature
(in fact it is intended for window managers only); you might consider
writing to one of the GTK+ or Gnome mailing lists to ask for another way
to achieve whatever you are trying to achieve. However, you can always
use Xlib routines (such as XWarpPointer()) by including gdk/gdkx.h and
gdk/gdkprivate.h, then manipulating the private parts of the GDK data
structures. If that sounds unsavory, it probably should.

It doesn't sound healthy to use XWarpPointer(), anyone with other idea?
If only I could move the GnomeCanvas to where the mouse pointer is, it
could be a solution.

El vie, 08-03-2002 a las 19:51, Lucas Di Pentima escribió:
> Hi people!
> I'm starting to learn GNOME development so I started to write a client
> of VGA Planets strategy game (anyone knows it?).
> This client will be heavily based on GnomeCanvas, because the main
> display will be a starchart where the user can click on planets, ships,
> and make marks with messages on it, and so on.
> Already I have working a very basic starchart with planets and ships,
> when the user clicks on a planet, appear data on a sidebar describing
> the planet.
> Now I'm stuck in some issue that although it seems not too important,
> this feature will make the client more usable.
> Well, let me explain it: in the GnomeCanvas I have CanvasItems being the
> planets (as ellipses), when a user click with the mouse on the canvas,
> the mouse pointer have to go to the nearest planet and select it, so
> that the user wouldn't have to "aim" to that little circle called planet
> :-). The idea is doing the same with ships, so button1 is for planets,
> and button3 for ships.
> Can anyone give me a tip where to read to do this?
> Thanks in advance.
> -- 
> Lucas Di Pentima - Santa Fe - Argentina
> GnuPG Public Key:
> ICQ UIN: 6782045

Lucas Di Pentima - Santa Fe - Argentina
GnuPG Public Key:
ICQ UIN: 6782045

Attachment: signature.asc
Description: This is a digitally signed message part

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