Re: Replacing GTypeInterface instances.
- From: murrayc t-online de (Murray Cumming)
- To: Havoc Pennington <hp redhat com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Replacing GTypeInterface instances.
- Date: 04 Nov 2001 00:25:13 +0100
On Fri, 2001-11-02 at 16:31, Havoc Pennington wrote:
>
> murrayc t-online de (Murray Cumming) writes:
> > On Fri, 2001-11-02 at 01:05, Havoc Pennington wrote:
> > >
> > > murrayc t-online de (Murray Cumming) writes:
> > > > Can you give me a clue about how to do this? See above.
> > >
> > > Just add the interface again. g_type_add_interface_static().
> >
> > Excellent. Does this completely replace the GTypeInterface instance, or
> > does any strange chaining occur? I know I should explore the source but
> > it only seems to confuse me more.
>
> You pass in the interface init function, which will get a copy of the
> parent class's interface implementation, which you can override as
> desired.
So after using
g_type_add_interface_static(
derivedtreestore_type,
derivedtreemodel_type,
&iface_info
);
I should be able to get the original TreeModelIFace by doing this?:
GtkTreeModelIFace* iface = g_type_interface_peek_parent(
g_type_interface_peek(G_OBJECT_GET_CLASS(derivedtreestore_instance),
derivedtreemodel_type
)
)
If so, then I think I have the framework done.
--
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]