Top | ![]() |
![]() |
![]() |
![]() |
gboolean gconf_init (int argc
,char **argv
,GError **err
);
gconf_init
is deprecated and should not be used in newly-written code.
void gconf_preinit (gpointer app
,gpointer mod_info
);
gconf_preinit
is deprecated and should not be used in newly-written code.
void gconf_postinit (gpointer app
,gpointer mod_info
);
gconf_postinit
is deprecated and should not be used in newly-written code.
gboolean
gconf_is_initialized (void
);
gconf_is_initialized
is deprecated and should not be used in newly-written code.
void (*GConfNotifyFunc) (GConfEngine *conf
,guint cnxn_id
,GConfEntry *entry
,gpointer user_data
);
guint gconf_engine_notify_add (GConfEngine *conf
,const gchar *namespace_section
,GConfNotifyFunc func
,gpointer user_data
,GError **err
);
[skip]
conf |
a GConfEngine to monitor for changes. |
|
namespace_section |
the directory or key to watch; you will be notified of changes at or below this point. |
|
func |
the callback to invoke when a notification is received from the server. |
|
user_data |
the data to pass to the callback. |
|
err |
the return location for an allocated GError, or NULL to ignore errors. |
an ID for the notification request, or 0 on error.
Registers a notification request with the gconfd
server. The server will notify the client when any key at or below
namespace_section
is set or unset. Try to watch the smallest possible part of
the namespace; otherwise you will slow down the server and your application with
unnecessary notifications. Note that you should prefer gconf_client_notify_add()
if you're using the GObject wrapper library, because
gconf_client_notify_add()
does not require a client-server conversation for
every callback. gconf_engine_notify_add()
requests a different server notification for
every callback. The function returns an ID you can use to remove the
notification request; 0 is an invalid ID, and is returned if an error occurs.
Returns value: an ID for the notification request, or 0 on error.
GConfValue * gconf_engine_get (GConfEngine *conf
,const gchar *key
,GError **err
);
GConfValue * gconf_engine_get_without_default (GConfEngine *conf
,const gchar *key
,GError **err
);
GConfEntry * gconf_engine_get_entry (GConfEngine *conf
,const gchar *key
,const gchar *locale
,gboolean use_schema_default
,GError **err
);
GConfValue * gconf_engine_get_with_locale (GConfEngine *conf
,const gchar *key
,const gchar *locale
,GError **err
);
GConfValue * gconf_engine_get_default_from_schema (GConfEngine *conf
,const gchar *key
,GError **err
);
gboolean gconf_engine_set (GConfEngine *conf
,const gchar *key
,const GConfValue *value
,GError **err
);
gboolean gconf_engine_unset (GConfEngine *conf
,const gchar *key
,GError **err
);
gboolean gconf_engine_associate_schema (GConfEngine *conf
,const gchar *key
,const gchar *schema_key
,GError **err
);
GSList * gconf_engine_all_entries (GConfEngine *conf
,const gchar *dir
,GError **err
);
Lists the key-value pairs in dir
. Does not list subdirectories; for
that use gconf_engine_all_dirs()
. The returned list contains GConfEntry
objects. A GConfEntry contains an absolute key
and a value. The list is not recursive, it contains only the immediate
children of dir
. To free the returned list, gconf_entry_free()
each list element, then g_slist_free()
the list itself.
Returns value: (element-type GConfEntry) (transfer full): List of GConfEntry.
conf |
a GConfEngine. |
|
dir |
Directory to list. |
|
err |
the return location for an allocated GError, or NULL to ignore errors. |
GSList * gconf_engine_all_dirs (GConfEngine *conf
,const gchar *dir
,GError **err
);
Lists the subdirectories in dir
. The returned list contains
allocated 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.
Returns value: (element-type utf8) (transfer full): List of allocated subdirectory names.
conf |
a GConfEngine. |
|
dir |
Directory to get subdirectories from. |
|
err |
the return location for an allocated GError, or NULL to ignore errors. |
gboolean gconf_engine_dir_exists (GConfEngine *conf
,const gchar *dir
,GError **err
);
void gconf_engine_remove_dir (GConfEngine *conf
,const gchar *dir
,GError **err
);
gboolean gconf_engine_key_is_writable (GConfEngine *conf
,const gchar *key
,GError **err
);
char * gconf_escape_key (const char *arbitrary_text
,int len
);
Escape arbitrary_text
such that it's a valid key element (i.e. one
part of the key path). The escaped key won't pass gconf_valid_key()
because it isn't a whole key (i.e. it doesn't have a preceding
slash), but prepending a slash to the escaped text should always
result in a valid key.
char * gconf_unescape_key (const char *escaped_key
,int len
);
Converts a string escaped with gconf_escape_key()
back into its original
form.
escaped_key |
a key created with |
|
len |
length of |
gdouble gconf_engine_get_float (GConfEngine *conf
,const gchar *key
,GError **err
);
gint gconf_engine_get_int (GConfEngine *conf
,const gchar *key
,GError **err
);
gchar * gconf_engine_get_string (GConfEngine *conf
,const gchar *key
,GError **err
);
gboolean gconf_engine_get_bool (GConfEngine *conf
,const gchar *key
,GError **err
);
GConfSchema * gconf_engine_get_schema (GConfEngine *conf
,const gchar *key
,GError **err
);
Requests the schema (GCONF_VALUE_SCHEMA
) stored at key
.
Automatically performs type-checking, so if a non-schema is stored at
key
, an error is returned. If no value is set or an error occurs,
[skip]
conf |
a GConfEngine. |
|
key |
key you want the value of. |
|
err |
the return location for an allocated GError, or NULL to ignore errors. |
GSList * gconf_engine_get_list (GConfEngine *conf
,const gchar *key
,GConfValueType list_type
,GError **err
);
Requests the list (GCONF_VALUE_LIST
) stored at key
. Automatically
performs type-checking, so if a non-list is stored at key
, or the
list does not contain elements of type list_type
, an error is
returned. If no value is set or an error occurs, NULL
is returned. Note that NULL is also the empty list,
so if you need to distinguish the empty list from an unset value, you
must use gconf_engine_get()
to obtain a raw GConfValue.
Remember that GConf lists can only store primitive types:
GCONF_VALUE_FLOAT
, GCONF_VALUE_INT
, GCONF_VALUE_BOOL
,
GCONF_VALUE_STRING
, GCONF_VALUE_SCHEMA
. Also remember
that lists must be uniform, you may not mix types in the same list.
The type of the list elements depends on list_type
. A GConfValue
with type GCONF_VALUE_LIST
normally stores a list of more GConfValue
objects. gconf_engine_get_list()
automatically converts to primitive C
types. Thus, the list->data fields in the returned list
contain:
GCONF_VALUE_INT |
The integer itself, converted with GINT_TO_POINTER()
|
GCONF_VALUE_BOOL |
The bool itself, converted with GINT_TO_POINTER()
|
GCONF_VALUE_FLOAT |
A pointer to gdouble, which should be freed with g_free()
|
GCONF_VALUE_STRING |
A pointer to gchar, which should be freed with g_free()
|
GCONF_VALUE_SCHEMA |
A pointer to GConfSchema, which should be freed with gconf_schema_free()
|
In the GCONF_VALUE_FLOAT
and GCONF_VALUE_STRING
cases, you must
g_free()
each list element. In the GCONF_VALUE_SCHEMA
case you must
gconf_schema_free()
each element. In all cases you must free the
list itself with g_slist_free()
.
[skip]
conf |
a GConfEngine. |
|
key |
key you want the value of. |
|
list_type |
type of each list element. |
|
err |
the return location for an allocated GError, or NULL to ignore errors. |
gboolean gconf_engine_get_pair (GConfEngine *conf
,const gchar *key
,GConfValueType car_type
,GConfValueType cdr_type
,gpointer car_retloc
,gpointer cdr_retloc
,GError **err
);
gboolean gconf_engine_set_float (GConfEngine *conf
,const gchar *key
,gdouble val
,GError **err
);
gboolean gconf_engine_set_int (GConfEngine *conf
,const gchar *key
,gint val
,GError **err
);
gboolean gconf_engine_set_string (GConfEngine *conf
,const gchar *key
,const gchar *val
,GError **err
);
gboolean gconf_engine_set_bool (GConfEngine *conf
,const gchar *key
,gboolean val
,GError **err
);
gboolean gconf_engine_set_schema (GConfEngine *conf
,const gchar *key
,const GConfSchema *val
,GError **err
);
gboolean gconf_engine_set_list (GConfEngine *conf
,const gchar *key
,GConfValueType list_type
,GSList *list
,GError **err
);
gboolean gconf_engine_set_pair (GConfEngine *conf
,const gchar *key
,GConfValueType car_type
,GConfValueType cdr_type
,gconstpointer address_of_car
,gconstpointer address_of_cdr
,GError **err
);
gboolean gconf_string_to_enum (GConfEnumStringPair lookup_table[]
,const gchar *str
,gint *enum_value_retloc
);
const gchar * gconf_enum_to_string (GConfEnumStringPair lookup_table[]
,gint enum_value
);
void gconf_clear_cache (GConfEngine *conf
,GError **err
);
gconf_clear_cache
is deprecated and should not be used in newly-written code.
GConfValue * gconf_engine_get_full (GConfEngine *conf
,const gchar *key
,const gchar *locale
,gboolean use_schema_default
,gboolean *is_default_p
,gboolean *is_writable_p
,GError **err
);