Mouse position in a GtkGlArea

"Fabrice Depaulis" <[email protected]> Fri, 23 Aug 2002 09:26:38 +0200
Newsgroups gmane.comp.gnome.gtkglarea
Message-ID <002a01c24a76$6b8fd5a0$70a337c1@gromit>
This is a multi-part message in MIME format.

------=_NextPart_000_0027_01C24A87.2F001490
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

I would like to get the position of the mouse when I click on a =
GtkGlArea.
The problem is that when I use the common way (creating a callback =
function on the "button press event"), I can only get the position of =
the mouse relatively to the WINDOW. But these coordonnates don't =
correspond to the position of the mouse in the reference of the GlArea =
creation object (that ones depend of the view of the scene) ... I'm not =
sure to be very comprehensible ... it's not easy to explain without an =
image.

If you understand and if you have an answer to this question ...
Thanks,

Fabrice.

------=_NextPart_000_0027_01C24A87.2F001490
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I would like to get the position of the =
mouse when=20
I click on a GtkGlArea.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The problem is that when I use the =
common way=20
(creating a callback function on the "button press event"), I can only =
get the=20
position of the mouse relatively to&nbsp;the WINDOW. But these =
coordonnates=20
don't correspond to the position of the mouse in the reference of the =
GlArea=20
creation object (that ones depend of the view&nbsp;of the =
scene)&nbsp;... I'm=20
not sure to be very comprehensible ... it's not easy to explain without =
an=20
image.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>If you understand and if you have an =
answer to this=20
question ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Fabrice.</FONT></DIV></BODY></HTML>

------=_NextPart_000_0027_01C24A87.2F001490--