RSS/Atom feed Twitter
Site is read-only, email is disabled

How to connect to signal emitted by gobject properties.

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

How to connect to signal emitted by gobject properties. Akash Hiremath 29 Apr 05:49
  How to connect to signal emitted by gobject properties. Akash Hiremath 29 Apr 10:34
Akash Hiremath
2015-04-29 05:49:17 UTC (almost 9 years ago)

How to connect to signal emitted by gobject properties.

hi,
I want to hook "notify" signal emitted by GeglOperation properties. But for that I need operation's 'properties' gobject. I can easily hook for 'GeglOperation' since its a 'gobject' instance but how can I hook for a property? I tried hook by GValue by 'g_object_get'. also tried to hook by 'g_object_class_find_property()' which returns a 'GParamSpecInt' type of value. as expected it didn't work as they aren't gobjects. In short how can I get properties 'gobject' instance? I checked gonme developer site, gobject's documentation still no luck.

Akash Hiremath
2015-04-29 10:34:11 UTC (almost 9 years ago)

How to connect to signal emitted by gobject properties.

quick update for future reference : I found the solution to my problem. Its explained well in gnome docs https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-object-notify-by-pspec basically, we just have to hook 'Gegloperation' object instance for signal "notify::your_op_name".
But, again whenever we change any property value. all the values of the operation values will set not just the one which is changed. I came to know about this when i tried to hook by overriding 'set_property'. so if I understood correctly we can't hook the signal to know which property is changed. It seems logical as Gegl is separated from host program.

correct me if I'm wrong.

On Wed, Apr 29, 2015 at 11:19 AM, Akash Hiremath wrote:

hi,
I want to hook "notify" signal emitted by GeglOperation properties. But for that I need operation's 'properties' gobject. I can easily hook for 'GeglOperation' since its a 'gobject' instance but how can I hook for a property? I tried hook by GValue by 'g_object_get'. also tried to hook by 'g_object_class_find_property()' which returns a 'GParamSpecInt' type of value. as expected it didn't work as they aren't gobjects. In short how can I get properties 'gobject' instance? I checked gonme developer site, gobject's documentation still no luck.