just finished implementing the backbone behind g_timeout_add, g_idle_add,
g_io_add_watch, and g_source_remove.  in doing so i found that i cannot just
keep making up names for this stuff without asking other people's opinions.

in case you hadn't noticed, i decided in new-gtk2-perl to break the glib stuff
out from under the Gtk2 namespace, so show the separation of concepts from Gtk
and its base library, and so to relieve users of GObject/GLib-only-based
extensions from needing to load all of Gtk2 to get to the base functions
(enum/flag conversion, GObject/GBoxed handling, GSignal, etc etc).

i also decided that the GType integer would never be seen at the perl level,
being replaced completely with perl package names.

this brings up some sticky situations:

- it has been pointed out that G is not a neighbor-friendly namespace.  i
don't think that it stomps on anything, but it's only one letter.  then again,
i don't like GObject as a namespace because this module wraps GLib's main loop
and all other sorts of stuff.  GLib is a suggestion that sounded reasonable,
but i like G for aesthetic reasons, and the fact that it makes the names map
very very cleanly from C.  who wants to convince me to change it?  who wants
to argue to keep it?  (good arguments with examples, please)

- when creating a GtkListStore in C, you supply a list of GTypes specifying
the types of the columns.  i have changed this to a list of package names in
perl.  this means i have the G module automatically registering types to
packages such as G::String, G::Uint, G::Boolean, etc.  anybody have any better
ideas?  how about simpler names like 'string', 'uint', 'boolean' for the
fundamental types, and a package name for anything classes?

- i mapped g_timeout_add to G::Timeout->add, g_idle_add to G::Idle->add,
g_io_add_watch to G::IO->add_watch, and g_source_remove to G::Source->remove. 
any better ideas?

new snapshot tonight when i get home.

muppet <scott asofyet org>

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