Re: GtkWidget->window



On Fri, 2003-08-08 at 10:24, Russell Shaw wrote:
Owen Taylor wrote:
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.

In the online docs, there is only:

   struct GtkWidget;

No members are shown.

http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#GtkWidget-struct

I know that. That's why I asked you to file a bug. :-)

In gtkwidget.h, there is:

typedef struct _GtkWidget      GtkWidget;
...
struct _GtkWidget
{
...
}

Maybe the documentation system can't follow typedefs. Don't know
if that is a bug or not. I'll just use ctags in the sources then.

That's not the problem. The problem is simply that widget classes
are assumed to be private, not public, so some magic comments

 /*< public >*/
 
 /*< private >*/

Need to be added around window/style/allocation/requisition in
order for the documentation to display them.

Regards,
                                        Owen





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