Re: Getting a Widget's screen coordinates
- From: Olexiy Avramchenko <ath beast stu cn ua>
- To: "j.m.maurer" <j m maurer student utwente nl>
- Cc: GTK Mailing List <gtk-app-devel-list gnome org>
- Subject: Re: Getting a Widget's screen coordinates
- Date: Wed, 21 Aug 2002 14:11:57 +0300
j.m.maurer wrote:
Is there a way to get the actual screen coordinates of a Widget?
Widget->allocation.{x,y} only gives relative coordinates AFAICT.
Any help would be greatly appreciated!
Marc
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Hello,
---
int x,y;
gdk_window_get_origin(widget->window, &x,&y);
x += widget->allocation.x;
y += widget->allocation.y;
/* x,y contain screen coordinates */
---
Olexiy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]