Re: Toolbar->append_element()



Christian Borup <borup borup com> writes:

I've made my fair amount of work regarding the enum/flags issue.
People who add new features should make them enum-ok, instead of
assuming I'll do it later :).

I don't think I'm guilty of that yet... But would you post short howto?
For enums you haven't allready made macros for that is?

Hum, yes of course, there are macros :). Check all that contains
"perl_gtk2_convert_enum" in Gtk2/include/*.h, for example.

Basically, genscripts/castmacros-autogen.pl generates special
macros for enums and flags, that convert from (perl) string value
to (gtk) enum (int) value, verifying on the fly that the very
string is actually a member of the enums of the kind; and the
opposite.

A parallel approach was done with flags.


Additionally, when some enums are missing, one needs to add them
in ``%additional_enums'' in castmacros-autogen.pl, instead of
adding them by hand in the autogen header files, of course (the
same can be done for flags - just that i haven't had the use for,
yet). Basically, all gtk and gdk enums should be here thanks to
.defs files borrowed from pygtk, that's why pango and probably
atk will need to be added by hand.




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