Re: Subclassing question



On Sun, Nov 28, 2004 at 19:56:03 +0100, Murray Cumming wrote:
> On Sat, 2004-11-27 at 17:14 +0100, Jan Hudec wrote:
> > Hello All,
> > 
> > For use in configuration interface, I need to create Gtkmm objects, that
> > will have new signals and new properties registered with the GObject
> > type system, so I can use the by-name system from a configuration
> > module.
> 
> What API is this?

It will be a scripting language. Most likely Lua. But generaly I need
by-name property accessors and by-name signal connect (I'll likely need
custom marshallers for signals).

The API does not exist yet -- I am trying to design it.

> > The objects will be derived either from Glib::Object or from some
> > Gtk::Widget subclass. They won't need any extern "C" stuff except what
> > their ancestor does.
> > 
> > Obviously I want to get my hands dirty with the C interface as little as
> > possible. So I'd like to ask what functions from Glib::Class and perhaps
> > other classes and whether (and how) I could use the gmmproc
> > preprocessor.
> 
> Adding a PropertyProxy<> member to your C++ class will register a new

Sounds nice.

> property with the underlying GObject. But we have no C++ API to register
> new GObject signals. But you can use the C API for that.

Hm. If I understand it right, I need to add pointer to the C object. Or
could I do without? I was thinking about genrating a bit of code with
some M4 or perl stuff, that would do the registration. But perhaps it'd
be possible with just the C preprocessor.

... if just adding a PropertyProxy<> registers a property, could just
adding a SigC::slot<> register a signal anywhere? I don't necessarily
have to use the GObject interface for signals. Any interface would do --
perhaps the SigC library could give me some? Could it?

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature



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