Re: ABI and API for g_object_ref_sink() (Re: GTK_FLOATI




On Dec 15, 2005, at 7:07 PM, ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN wrote:

2) If it was decided to wait until 3.0, can GtkObject be removed entirely? (Or
can we work to eliminate GtkObject if there are any other remaining
functionality?)

GtkObject adds various things to GObject:

1. a flags field
2. the floating reference (stored in the flags field, incidentally)
3. the destroy signal
4. a user-data property (this one is far surpassed by GObject's arbitrary data keys, but is there to ease porting from 1.x) 5. the compat layer for GtkArgs (which were replaced by GObject properties, but that's not so important and will probably be removed entirely in 3.x)

I have heard it said on this list before that GObject is meant to be small and every attempt will be made to keep it small, so adding a flags field is likely not going to happen. It can't happen in 2.x because that would change the size of the GObject instance and break ABI.

The destroy signal is actually very useful, and i'd like to have one in GObject. From a language binding it's not very easy to hook into GObject destruction without subclassing, but GtkObject's destroy makes this easy. However, adding this would change the size of the GObjectClass structure and therefore cannot happen in 2.x.


--
elysse (in labor): is the head the biggest part?
midwife: yes.
elysse: oh, good.




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