Gobject decorator -> How to deal with properties
- Date: Fri, 15 Sep 2017 10:54:28 +0200
- From: Gonzalo Aguilar Delgado <gaguilar@xxxxxxxxxxxxxxxxxx>
- Subject: Gobject decorator -> How to deal with properties
I'm writting a decorator pattern for a protocol in Thrift that's based on c_glib. One of the cases I found is that you can have this:
// From Thrift code:
That's a class that
implements an interface but when a method is called, it really
calls the concrete_protocol method. That's nice. It works but
when dealing with properties that's a new history.
For example you can decorate a concrete_protocol that has a property called "transport" but when the code does something like:
glib will search over
the decorator class installed properties that's not what I want.
I resolved hacking a known property install and trying to find
its values on
Something like this:
In the init class
// TODO Ugly hack, in theory we must override all
properties from underlaying
In the getter function
Is there any way to install all properties installed on the concrete_protocol? So I can override the "Getter" and "Setter" and fordward the request to the decorated instance?
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list