G_TYPE_CCALLBACK



hey,

does anyone of you know of practical use of G_TYPE_CCALLBACK (or better,
former the GTK_TYPE_CCALLBACK)?
i'd like to get rid of that and have a G_TYPE_CLOSURE.
a closure is probably not too uncommon to pass around via signals
or even to be used as object property (as for signals, i actually
have a valid use case in mind, though that's for BSE).
iirc, the scheme bindings originally meant to use ccallback for passing
around c functions as cons, but i fail to see why they shouldn't use
a GClosure instead, in case they actually made use of that.
since with G_TYPE_CCALLBACK->G_TYPE_CLOSURE the assorted parameter
specification GParamCCallback will become GParamClosure, i wonder
whether GParamClosure should contain provisions to store a signature
in form of a G_TYPE_* list. that'll have two advantages, LB code
can figure and check the required signature upon connection (not
just deferred to actuall closure invocation) and code generators
could provide apropriate typedefs (though for that again, it's
a pitty that the signal system will just take a G_TYPE_CLOSURE
as parameter, not a full GParamClosure available for code generators).

---
ciaoTJ





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