Re: How to get Widgets absolute X/Y co-ordinates.
- From: John Cupitt <jcupitt gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How to get Widgets absolute X/Y co-ordinates.
- Date: Thu, 4 Nov 2004 12:03:52 +0000
On Thu, 04 Nov 2004 14:26:02 +0200, Olexiy Avramchenko
<olexiy ctech cn ua> wrote:
Tapan Satpathy Ansuman-A19108 wrote:
I want to know if there is anyway how to get the absolute co-ordinates/geometry of any GtkWidget.
Absolute screen coordinates is much harder. Here's what we have:
Good technique ... also, I've often found that I need screen-relative
coordinates when I'm parsing mouse movements.
In this case it's very simple: mouse events have x_root and y_root
fields which give the mouse position in absolute screen coordinates.
By subtracting the x, y fields, you can get the enclosing window
position.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]