RE: [gtk-list] Re: types checking signal/callback functions revi




On 24-Jun-98 Steve Hosgood wrote:
> I swapped a few ideas along these lines with Owen(was it?) and some
> of the
> other gurus a month or so ago. They seemed to think that there was
> a
> problem in that everyone (except me) likes to misdeclare the
> callback
> functions to something like:
> 
>       void callback( GtkWidget *w, GtkWhatever *x )
>       {
> 
> 
> ..rather than what *should* be done, i.e:
> 
>       void callback( GtkWidget *w,  gpointer param )
>       {
>               GtkWhatever *x = param;

I am aware of this "problem", but the use of function declarations as
I described does not prevent the 'advanced user' from doing the
above, simply by the fact that they don't *have* to use the macros
(they are also backwards compatible).

And their use only requires one cast - hardly a problem.

Thanks

Tony


---
E-Mail: trog@gtk.org
You will lose an important tape file.

Go Bezerk! http://www.gtk.org/~trog



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