GSignal stubs? (Re: GObject adaptor comments (GEP 5).)



hey michael,

read into this email mostly by accident, and felt like commenting ;)

On 3 Oct 2002, Michael Meeks wrote:

> > > 	Making things like GSignal is no advantage; fixing GSignal so it works
> > > more pleasantly would be better ;-) Indeed, having IDL generated signal
> > > stuff for gtk+ would be rather nice in an ideal world IMHO.
> >
> > 	Oh, you'll like gob then ... :-)
>
> 	Haha :-) but really, I'm talking about a more pleasant and generic and
> re-usable, and accurate setup than gmarshal.list, and hundreds of lines
> of dodgy, type-unsafe:
>
>   widget_signals[SHOW] =
>     gtk_signal_new ("show",
> 		    GTK_RUN_FIRST,
> 		    GTK_CLASS_TYPE (object_class),
> 		    GTK_SIGNAL_OFFSET (GtkWidgetClass, show),
> 		    _gtk_marshal_VOID__VOID,
> 		    GTK_TYPE_NONE, 0);
>
> 	etc. which I think can only be a positive direction.

right, but what exactly are you envisioning? specially with regards
"fixing" GSignal. as things stand, GSignal supports most any feature
you'd want for signal emissions, so you're probably more aiming at
convenience and/or type-safety. but those issues can be fixed on top
of what GSignal provides, i.e. it's a matter of someone implementing
additional code.
in fact, stefan is currently working on something like this in a BEAST
specifc IDL parser, i.e. generate stubs which ensure typesafety upon
signal creation and emission in statically typed languages (C/C++). but
that only works in an GOB-like environment where you have:
1) object code generation utilities
2) custom IDL or a similar thing being the primary source for your object
   and signal interface descriptions, rather than hand crufted C code
   like in the above quote.

IIUC, the only generated code (1) used in bonobo is produced by ORBit (modulo
minor things like mkenums, or genmarshal), which implements CORBA IDL, which
in turn doesn't provide means to describe GSignals in the IDL files.
so what is your idea for approaching (2) for bonobo or user code then?

>
> 	How's that ?
>
> 	Regards,
>
> 		Michael.
>

---
ciaoTJ




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