Re: GtkWidget->window



On Fri, 2003-08-08 at 01:55, Russell Shaw wrote:
Hi,
I've been studying the drawing example:
   http://www.gtk.org/tutorial/sec-scribble.html#AEN2945

In the function below, GtkWidget has a member "window".
I can't find this member anywhere in the online help:
   http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html

Do developers regularly search the gtk sources for this kind
of thing, or is the online help supposed to be enough?

Most fields in widget structures are private, but there are
a few fields that get accessed so frequently that 
we encourage direct access.

If you find problems like this where the docs show access
to struct fields which aren't in the documentation, please
file a bug in bugzilla about this.

Each structure in GTK+ is supposed to be marked up
with magic comments showing which fields are public, and
which private, but sometimes these are missing.

Regards,
                                        Owen

-----------------------------------------------------------
/* Create a new backing pixmap of the appropriate size */
static gboolean configure_event( GtkWidget         *widget,
                                  GdkEventConfigure *event )
{
   if (pixmap)
     g_object_unref (pixmap);

   pixmap = gdk_pixmap_new (widget->window,
                         widget->allocation.width,
                         widget->allocation.height,
                         -1);
   gdk_draw_rectangle (pixmap,
                    widget->style->white_gc,
                    TRUE,
                    0, 0,
                    widget->allocation.width,
                    widget->allocation.height);

   return TRUE;
}

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list






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