Skip to content

Tag: glib

Generate Gsettings schema files in linux

I am using Gsettings schema and have com.test.gschema.xml file. Now some keys inside the schema are enum and thus I require com.test.enums.xml file. Now I am using CMakeLists and thus can’t use gsettings_ENUM_NAMESPACE and gsettings_ENUM_FILES. On searching I found out that we can make use of glib-mkenu…

Extract pointer to data from GPtrArray

I’m using GPtrArray structure to hold pointers to chunks of dynamically allocated memory. As I need as simple as possible and correct freeing of memory I set callback g_ptr_array_new_with_free_func () which will free one element of pointer array. Thus when I call g_ptr_array_free() for all elements of a…