gtk_widget_set_cursor (), gtk_window_get_position ()



Hi,

I think anytime people have to use widget->window for high-level
operations is sort of unfortunate; it has a low-level feel and results
in a FAQ because the interface isn't easy to find. Also, such code is
almost always broken if the widget gets unrealized and re-realized,
and it requires the user to show_now() or force-realize the widget.

Two common FAQs are how to set the cursor and how to get the window
position.

So I'd suggest these:

gtk_widget_set_cursor (): sets a cursor, stores it in object data on
the widget, the widget sets the cursor on each realization.

gtk_window_get_position (): calls one of the GdkWindow
position-getting functions (Peter's, Tim's, or Raster's, whichever
seems like the most intuitive). Prints a big fat warning if the window 
isn't mapped yet.

I'll add these to the havoc-patches branch, most of which is still
awaiting responses.

Havoc




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