[gtk-list] Re: FAQ Addition? (was Re: position)



>>>>> "Tim" == Tim Janik writes:

Tim> On Sat, 26 Jun 1999, Daniel J. Kressin wrote:
>> Tim Janik wrote:
>> >
>> > On Sat, 26 Jun 1999, Harold Campbell wrote:
>> >
>> > > Is there a dependable way to find the physical x/y coordinates
>> > > of a widget?
>> >
>> > a widget relative to its parent?
>> > widget->allocation.x/y
>> > a widget's window relative to the root window?
>> > gdk_window_get_geometry (widget->window,...)  a window widgets
>> > window manager frame position (i.e. for --geometry option)?
>> > gdk_window_get_deskrelative_origin (widget->window,...)
>>
>> Assuming the answers are correct, I think this would be an
>> excellent addition to the faq.
>>
>> <<begin>> Q: How do I find the x/y coordinates of a widget...
>> ...relative to its parent?  A: widget->allocation.x and
>> widget->allocation.y ...relative to the root window?  A:
>> gdk_window_get_geometry (widget->window,...)

Tim> well, gdk_window_get_origin() might be more appropriate here,
Tim> since it really gives only the origin and not the size as well.

>> Q: How do I find a window widget's window manager frame position
>> (i.e.  for the --geometry commandline option)?  A:
>> gdk_window_get_deskrelative_origin (widget->window,...)  <<end>>
>>
>> -- Dan
>>

Tim> --- ciaoTJ

I want this FAQ. Is it really exist or it's a joke?

Andrew Klochkov



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