no_marshall signals and GtkTypeInfo



hi marius,

some hours before you committed:

1998-12-06  Marius Vollmer  <mvo@zagadka.ping.de>

        * gtk/gtksignal.c (gtk_signal_newv): Allow a NULL marshaller.
        (gtk_signal_connect_by_type): Allow only no_marshal handlers to
        connect to signals with a NULL marshaller.

        * gtk/gtktypeutils.c (gtk_type_get_info): New.
        gtk/gtktypeutils.h (gtk_type_get_info): New prototype.

could you tell us what your reasons are to expose the GtkTypeInfo structure
to the user? there are a variety of reasons to not expose this structure
through the API. for one we keep internal private data in there that no one
needs to mess with or should rely on to have a certain meaning. for two,
these structures are allocated through a dynamic array, so they may become
invalidated at any point.
regarding your signal changes, please take into account that there may
exists third party code that will eventuall want to conect to any signal
of an object. so marshallers are a must to be provided.
apart from that, allowing one to pass NULL into gtk_signal_new() can not
be integreated well with an automatic marshaller lookup that we may want
to implement at a later point.

i'm sorry i had to revert your changes, but the above mentioned reasons
are actually important enough to not let this stuff stay there:

Mon Dec  7 03:08:39 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.h:
        * gtk/gtktypeutils.c: reverted marius change to expose the type systems
        internal type info data to the user. if such functionality is required
        we should provide wrapped accessors, ala gtk_signal_query().

        * gtk/gtksignal.c (gtk_signal_connect_by_type): reverted marius change,
        since it destroys the possibility to implement automatic marshaller
        lookups some day, and it also disables third party code's ability to
        connect to any signal. also the GtkTypeInfo structures are dynamically
        allocated memory portions, so only the type system is really allowed
        to access that stuff.


i'm certainly willing in helping you out with better ways to achive what you
actually intended, e.g. supplying a GtkTypeQuery mechanism or something similar.

---
ciaoTJ



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