Re: [gtk-list] Re: Interface declarations



Kenneth Albanowski <kjahds@kjahds.com> writes:

> Agreed, yes, this sort of information would be very useful, although it
> might make sense to go a little bit further, to the item of specifying if
> a function can be used to modify the data, maybe something like this:

Before this gets out of hand and I'd like to suggest to first come up
with a robust and extensible syntax, like the GCC __attribute__
mechanism.  Of course, I'm thinking primarily about LISP here:

    #define GTK_ATTRIBUTE(x)

    struct _GtkLabel
    {
      GtkMisc misc;

      char *label GTK_ATTRIBUTE ((public)
                                 (mode read-write)
                                 (set gtk_label_set_text));
      GSList *row;
      guint jtype : 2;
      gint  needs_clear : 1;
    };

> Ideally, this information should come from (or go into) the .defs files.

My original plan was of course that it comes *from* the .defs file.
But I now see the adavantages of maintaining that information in the C
sources itself.  People will be more aware of it and are more likely
to keep it correct.  Hmm...



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