Re: [gtk-list] Re: position of widget / widget at position



  Hello,


========================================================================
>   I looked into the doc, and found no way of doing the following :
> 
> - What is the x,y position (absolute screen coordinates, or relative
>   to the "toplevel" gtk window) of a widget?

gdk_window_get_position(GdkWindow *window, gint *x, gint *y);

=======================================================================

  Yes, but where is the GdkWindow * ? I only have GtkXYZ's ...

  Etienne

ps: As you might guess, I'm rather new to gtk (or widgets, in general).


pps: For the problem of finding the widget at screen coordinate x,y,

    I found this in gdkprivate.h :

=====================================================================
/* Please see gdkwindow.c for comments on how to use */ 
Window gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y, GList *excludes, gbo
olean excl_child);
Window gdk_window_xid_at_coords(gint x, gint y, GList *excludes, gboolean excl_child);
=====================================================================

  Where Window is defined in X.h (its a typedef XID Window, and XID in turn
is typedef unsigned long XID). 

  But that doesn't help me to get a GtkXYZ from a Window.



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