1
/* $Id: xfce-rc.h 21064 2006-04-18 19:35:58Z benny $ */
1
/* $Id: xfce-rc.h 24694 2007-01-22 14:12:39Z benny $ */
3
* Copyright (c) 2003-2006 Benedikt Meurer <benny@xfce.org>
3
* Copyright (c) 2003-2007 Benedikt Meurer <benny@xfce.org>
4
4
* All rights reserved.
6
6
* This library is free software; you can redistribute it and/or
29
29
#include <libxfce4util/xfce-resource.h>
31
33
typedef struct _XfceRc XfceRc;
33
35
#define XFCE_RC(obj) ((XfceRc *) (obj))
34
36
#define XFCE_RC_CONST(obj) ((const XfceRc *) (obj))
36
38
XfceRc* xfce_rc_simple_open (const gchar *filename,
37
gboolean readonly) G_GNUC_MALLOC;
39
gboolean readonly) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
39
41
XfceRc* xfce_rc_config_open (XfceResourceType type,
40
42
const gchar *resource,
41
gboolean readonly) G_GNUC_MALLOC;
43
gboolean readonly) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
43
45
void xfce_rc_close (XfceRc *rc);
44
46
void xfce_rc_flush (XfceRc *rc);
45
47
void xfce_rc_rollback (XfceRc *rc);
47
gboolean xfce_rc_is_dirty (const XfceRc *rc);
48
gboolean xfce_rc_is_readonly (const XfceRc *rc);
50
const gchar* xfce_rc_get_locale (const XfceRc *rc);
52
gchar** xfce_rc_get_groups (const XfceRc *rc);
49
gboolean xfce_rc_is_dirty (const XfceRc *rc) G_GNUC_WARN_UNUSED_RESULT;
50
gboolean xfce_rc_is_readonly (const XfceRc *rc) G_GNUC_WARN_UNUSED_RESULT;
52
const gchar* xfce_rc_get_locale (const XfceRc *rc) G_GNUC_WARN_UNUSED_RESULT;
54
gchar** xfce_rc_get_groups (const XfceRc *rc) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
53
55
gchar** xfce_rc_get_entries (const XfceRc *rc,
56
const gchar *group) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
56
58
void xfce_rc_delete_group (XfceRc *rc,
57
59
const gchar *group,
59
const gchar* xfce_rc_get_group (const XfceRc *rc);
61
const gchar* xfce_rc_get_group (const XfceRc *rc) G_GNUC_WARN_UNUSED_RESULT;
60
62
gboolean xfce_rc_has_group (const XfceRc *rc,
63
const gchar *group) G_GNUC_WARN_UNUSED_RESULT;
62
64
void xfce_rc_set_group (XfceRc *rc,
63
65
const gchar *group);
68
70
gboolean xfce_rc_has_entry (const XfceRc *rc,
71
const gchar *key) G_GNUC_WARN_UNUSED_RESULT;
71
73
const gchar* xfce_rc_read_entry (const XfceRc *rc,
73
const gchar *fallback);
75
const gchar *fallback) G_GNUC_WARN_UNUSED_RESULT;
74
76
const gchar* xfce_rc_read_entry_untranslated (const XfceRc *rc,
76
const gchar *fallback);
78
const gchar *fallback) G_GNUC_WARN_UNUSED_RESULT;
77
79
gboolean xfce_rc_read_bool_entry (const XfceRc *rc,
81
gboolean fallback) G_GNUC_WARN_UNUSED_RESULT;
80
82
gint xfce_rc_read_int_entry (const XfceRc *rc,
84
gint fallback) G_GNUC_WARN_UNUSED_RESULT;
83
85
gchar** xfce_rc_read_list_entry (const XfceRc *rc,
85
const gchar *delimiter) G_GNUC_MALLOC;
87
const gchar *delimiter) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
86
88
void xfce_rc_write_entry (XfceRc *rc,
88
90
const gchar *value);