Re: Interfaces and properties, signals
- From: Tim Janik <timj gtk org>
- To: Bill Haneman <bill haneman ireland sun com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Interfaces and properties, signals
- Date: Thu, 22 Mar 2001 17:26:32 +0100 (CET)
On Mon, 12 Mar 2001, Bill Haneman wrote:
> Hi Tim:
> I've come across a use case with GTypeInterface that I can't seem to
> find an example of, and wonder if you could answer a couple of
> We have two properties ("accessible_text" and "caret") and a signal
> ("caret_moved") that we'd like to associate with implementors of a
> particular interface (AtkTextIface).
> Two questions come to mind:
> 1) Is it possible to register properties and signals on interface
> 2) Is there a clean way of doing it ;-)
yes and no ;)
as owen already outlined, we decided against per-interface properties,
at least for 2.0, because it isn't at all obvious how to do that.
for signals, yes, they should run fine on interfaces, you basically
do the the same way you do them on a normal class (i believe jonathan
even uses interface signals already in his tree backends).
> Perhaps we should be registering the properties and signal somewhere
> else, but I don't think we should register them on a base class of the
> implementors since implementors of AtkTextIface are not guaranteed to
> have a common base class (other than GObject, I guess).
> gtkoldeditable.c seems to do this, but using the old-style args.
> (The reason we are not using an existing property is that we don't know
> that all implementors of this interface will support a given
> pre-existing property, like "text_position". We will of course end up
> connecting our property notification to that of legacy widget
> properties, inside the implementation(s) of AtkTextIface).
] [Thread Prev