[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-devel
Subject:    Re: Pluggable widget types and implementations
From:       Tim Janik <timj () imendio ! com>
Date:       2006-12-08 17:36:54
Message-ID: Pine.LNX.4.62.0612081832280.27962 () master ! birnet ! private
[Download RAW message or body]

On Fri, 8 Dec 2006, Damon Chaplin wrote:

> On Fri, 2006-12-08 at 13:13 +0100, Tim Janik wrote:

>>> Applications could then use different sets of widgets for different
>>> parts of the interface, just by switching the default factory:
>>>  gtk_set_default_object_factory (factory);
>>
>> the only differences i see are that you didn't introduce the factory at
>> GLib level, and that you seem to advocate multiple factories.
>> i'm not quite sure why though, can you give more concrete examples on
>> why i would want to switch factories at all?
>
> I don't have any specific examples. I just thought using a factory was a
> more flexible approach - better than adding XXX_appoint_type() functions
> for each widget.

ok thanks for the input. upon reflection, using a factory API simplifies
the implementation and also API on the Gtk+ side, so it's probably the
better idea.

i'm still interested in hearing use cases for multiple factories though,
so if anyone has arguments for allowing multiple GFactory* handles instead
of just two "singleton" functions:

   /* craete instance conforming to prerequisite_type */
   g_factory_create (GType prerequisite_type);

   /* appoint an implementaiton_type for a prerequisite_type */
   g_factory_appoint_type (GType prerequisite_type,
                           GType implementation_type);


please speak up.

> Damon
>

---
ciaoTJ
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic