Re: GTK_FLOATING broken in 2.9?
- From: Havoc Pennington <hp redhat com>
- To: Dave Benson <daveb idealab com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>, Tim Janik <timj imendio com>, Morten Welinder <mortenw gnome org>
- Subject: Re: GTK_FLOATING broken in 2.9?
- Date: Tue, 20 Dec 2005 12:43:46 -0500
On Tue, 2005-12-20 at 09:37 -0800, Dave Benson wrote:
>
> why does one want GFloatingObject?
> it seems like calling g_object_force_floating()
> isn't too hard... and derivation is a somewhat
> inflexible way to set flags (for example, it
> can't be done in a subsubclass of object;
> and to support N flags this way would require 2^N object types)
What I meant to propose is that there's a force_floating(), and
GFloatingObject is just a subclass that calls it on construct, and
GtkObject also calls it on construct. The only purpose of
GFloatingObject is to call force_floating for you so you don't have to
put that in the constructor of your own class.
> it seems like the principal merit would be to do
> G_IS_FLOATING_OBJECT() (which is confusingly named to
> begin with, since it has rather different meaning than
> g_object_is_floating() but that's a different issue)...
GFloatableObject is probably a better name
> one way to achieve that is to support floating-ness on
> a per-class basis, so that G_IS_FLOATING_OBJECT()
> replaced by
> g_object_class_are_instances_initially_floating(G_OBJECT_GET_CLASS(objcet))
> (g_object_force_floating() would be used only in g_object_init() and binding hacks
> instead g_object_class_make_instances_float() or something
> would be in class_init())
Some kind of class flag would work too, sure
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]