192
192
<!-- ##### FUNCTION gconf_client_get_default ##### -->
194
Creates a new #GConfClient using the default #GConfEngine. Normally this is the
195
engine you want. If someone else is already using the default
196
#GConfClient, this function returns the same one they're using, but
197
with the reference count incremented. So you have to unref either way.
201
It's important to call g_type_init() before using this GObject, to initialize the type system.
205
@Returns: a new #GConfClient. g_object_unref() when you're done.
208
201
<!-- ##### FUNCTION gconf_client_get_for_engine ##### -->
210
Creates a new #GConfClient with a specific #GConfEngine. Only specialized
211
configuration-related programs should need to call this function. The
212
returned #GConfClient should be unref'd when you're done with g_object_unref().
213
Remember to avoid using the #GConfEngine directly once you have a #GConfClient
217
@engine: the #GConfEngine to use.
218
@Returns: a new #GConfClient.
221
210
<!-- ##### FUNCTION gconf_client_add_dir ##### -->
457
445
<!-- ##### FUNCTION gconf_client_all_entries ##### -->
459
Lists the key-value pairs in @dir. Does not list subdirectories; for
460
that use gconf_client_all_dirs(). The returned list contains #GConfEntry
461
objects. A #GConfEntry contains an <emphasis>absolute</emphasis> key
462
and a value. The list is not recursive, it contains only the immediate
463
children of @dir. To free the returned list, gconf_entry_free()
464
each list element, then g_slist_free() the list itself.
465
Just like gconf_engine_all_entries (), but uses #GConfClient caching and error-handling features.
468
@client: a #GConfClient.
469
@dir: directory to list.
470
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
471
@Returns: List of #GConfEntry.
474
456
<!-- ##### FUNCTION gconf_client_all_dirs ##### -->
476
Lists the subdirectories in @dir. The returned list contains allocated
477
strings. Each string is the absolute path of a subdirectory. You should g_free() each string in the list, then g_slist_free() the list itself.
478
Just like gconf_engine_all_dirs (), but uses #GConfClient caching and error-handling features.
481
@client: a #GConfClient.
482
@dir: directory to get subdirectories from.
483
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
484
@Returns: List of allocated subdirectory names.
487
467
<!-- ##### FUNCTION gconf_client_suggest_sync ##### -->
602
582
<!-- ##### FUNCTION gconf_client_get_list ##### -->
604
Requests the list (%GCONF_VALUE_LIST) stored at @key. Automatically
605
performs type-checking, so if a non-list is stored at @key, or the
606
list does not contain elements of type @list_type, an error is
607
returned. If no value is set or an error occurs, <symbol>NULL</symbol>
608
is returned. Note that <symbol>NULL</symbol> is also the empty list,
609
so if you need to distinguish the empty list from an unset value, you
610
must use gconf_client_get () to obtain a raw #GConfValue.
614
<emphasis>Remember that GConf lists can only store primitive types:
615
%GCONF_VALUE_FLOAT, %GCONF_VALUE_INT, %GCONF_VALUE_BOOL,
616
%GCONF_VALUE_STRING, %GCONF_VALUE_SCHEMA.</emphasis> Also remember
617
that lists must be uniform, you may not mix types in the same list.
621
The type of the list elements depends on @list_type. A #GConfValue
622
with type %GCONF_VALUE_LIST normally stores a list of more #GConfValue
623
objects. gconf_client_get_list() automatically converts to primitive C
624
types. Thus, the list->data fields in the returned list
627
<informaltable pgwide="1" frame="none">
628
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
632
<entry>%GCONF_VALUE_INT</entry>
633
<entry>The integer itself, converted with GINT_TO_POINTER()</entry>
637
<entry>%GCONF_VALUE_BOOL</entry>
638
<entry>The bool itself, converted with GINT_TO_POINTER()</entry>
642
<entry>%GCONF_VALUE_FLOAT</entry>
643
<entry>A pointer to #gdouble, which should be freed with g_free()</entry>
647
<entry>%GCONF_VALUE_STRING</entry>
648
<entry>A pointer to #gchar, which should be freed with g_free()</entry>
652
<entry>%GCONF_VALUE_SCHEMA</entry>
653
<entry>A pointer to #GConfSchema, which should be freed with gconf_schema_free()</entry>
656
</tbody></tgroup></informaltable>
658
In the %GCONF_VALUE_FLOAT and %GCONF_VALUE_STRING cases, you must
659
g_free() each list element. In the %GCONF_VALUE_SCHEMA case you must
660
gconf_schema_free() each element. In all cases you must free the
661
list itself with g_slist_free().
663
Just like gconf_engine_get_list (), but uses #GConfClient caching and error-handling features.
666
@client: a #GConfClient.
667
@key: key you want the value of.
668
@list_type: type of each list element.
669
@err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors.
670
@Returns: an allocated list, with elements as described above.
673
594
<!-- ##### FUNCTION gconf_client_get_pair ##### -->