0

I'm trying to get a GTK-3.0-based app to build and I need to modify some code so that it uses the "master" property in a struct:

https://developer.gnome.org/gdl/stable/GdlDockLayout.html#gdl-dock-layout-new

I have little experience programming with GTK, so I don't know how to access these properties. And unfortunately "property" is such an overloaded term that Google yields nothing useful.

iain
  • 5,660
  • 1
  • 30
  • 51
Paul Richter
  • 6,154
  • 2
  • 20
  • 22

2 Answers2

2

You want to use something like

GObject *master;
g_object_get (my_gdl_dock_layout_widget, "master", &master, NULL);

// Use master

// Once you've finished with master, don't forget to unref it
g_object_unref (master);

see the GObject reference documentation for details on g_object_get

iain
  • 5,660
  • 1
  • 30
  • 51
1

You use the GObject (the base class of most objects in GTK+ and related libraries) API.

The (rather sparse) documentation is here.

Essentially, I think you're after the g_object_set_property() function.

unwind
  • 391,730
  • 64
  • 469
  • 606