Re: GTK_FLOATING broken in 2.9?



> GFloatingObject, derived from GObject:
> - created with ref_count=1
> - initial reference is floating
> 
> GtkObject, derived from GFloating object:
> - created with ref_count=1
> - initial reference is floating
> - floating flag is implemented as GtkObject.flags&GTK_FLOATING
>   via a compat hook, i.e. g_object_ref_sink() will work on this
>   and GTK_OBJECT_SET_FLAGS() will as well.

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)


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)...
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())

- dave



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