Re: gtkmarshal.h?



Owen Taylor <otaylor redhat com> writes:

> Currently we:
>  
>  - Export the gtk_marshal_* symbols
>  - Install gtkmarshal.h
>  - Include gtkmarshal.h from gtksignal.h
> 
> If we continue to do this, then we'll need a policy of never removing
> any marshallers from gtkmarshal.list which is not so nice, since
> the set of marshallers is really an internal implementation detail.
> 
> However, since we also did this for GTK+-1.2, we can't simply
> unexport them without causing backwards-incompatibilities (though we
> may well have already caused such, since we haven't really worried
> about this before.)
> 
> Quick and dirty solution - slap a:
> 
>   #if !defined(GTK_DISABLE_DEPRECATED) || defined(BUILDING_GTK)
> 
> Around gtkmarshal.h. Harder solution, have two lists of marshallers:
> 
>  - Exported marshallers - those we exported in GTK+-1.2.
> 
>  - Unexported marshallers.
> 
> And generate one set in the public header as gtk_marshal_* and 
> put GTK_DISABLE_DEPRECATED around. And generate the
> second set in a private header as _gtk_marshal_*.
> 
> Thoughts? It isn't awful if we don't do anything here, but I'd
> like to at least deprecate use of the builtin GTK+ marshallers.

Some more thoughts:

 - We've already broken virtually all compatibility - a quick
   check reveals 12 marshaller names that are still supported
   vs. 38 that are not.

   We could recover a few of these by installing some #defines.

 - We install a completely random set of closure marshallers
   from glib.

     # standard VOID return marshallers
     VOID:VOID
     VOID:BOOLEAN
     VOID:CHAR
     VOID:UCHAR
     VOID:INT
     VOID:UINT
     VOID:LONG
     VOID:ULONG
     VOID:ENUM
     VOID:FLAGS
     VOID:FLOAT
     VOID:DOUBLE
     VOID:STRING
     VOID:PARAM
     VOID:BOXED
     VOID:POINTER
     VOID:OBJECT
     STRING:OBJECT,POINTER

     # GRuntime specific marshallers
     VOID:UINT,POINTER
     BOOL:FLAGS

   The idea of the standard marshallers is to avoid code bloat by
   having glib-genmarshal generate code using them not for direct
   use; gtk+ does use 8/17.

Regards,
                                        Owen



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