~ubuntu-branches/ubuntu/oneiric/gconf/oneiric-proposed

« back to all changes in this revision

Viewing changes to gconf/gconf-schema.h

  • Committer: Bazaar Package Importer
  • Author(s): Takuo KITAME
  • Date: 2002-03-17 01:51:39 UTC
  • Revision ID: james.westby@ubuntu.com-20020317015139-z4f8fdg1hoe049g0
Tags: upstream-1.0.9
ImportĀ upstreamĀ versionĀ 1.0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/* GConf
 
3
 * Copyright (C) 1999, 2000 Red Hat Inc.
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU Library General Public
 
7
 * License as published by the Free Software Foundation; either
 
8
 * version 2 of the License, or (at your option) any later version.
 
9
 *
 
10
 * This library is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
 * Library General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Library General Public
 
16
 * License along with this library; if not, write to the
 
17
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
18
 * Boston, MA 02111-1307, USA.
 
19
 */
 
20
 
 
21
#ifndef GCONF_GCONF_SCHEMA_H
 
22
#define GCONF_GCONF_SCHEMA_H
 
23
 
 
24
#include <glib.h>
 
25
 
 
26
#include <gconf/gconf-value.h>
 
27
 
 
28
/* 
 
29
 *  A "schema" is a value that describes a key-value pair.
 
30
 *  It might include the type of the pair, documentation describing 
 
31
 *  the pair, the name of the application creating the pair, 
 
32
 *  etc.
 
33
 */
 
34
 
 
35
struct _GConfSchema {
 
36
  GConfValueType type; /* Type of the described entry */
 
37
  GConfValueType list_type; /* List type of the described entry */
 
38
  GConfValueType car_type; /* Pair car type of the described entry */
 
39
  GConfValueType cdr_type; /* Pair cdr type of the described entry */
 
40
  gchar* locale;       /* Schema locale */
 
41
  gchar* owner;        /* Name of creating application */
 
42
  gchar* short_desc;   /* 40 char or less description, no newlines */
 
43
  gchar* long_desc;    /* could be a paragraph or so */
 
44
  GConfValue* default_value; /* Default value of the key */
 
45
};
 
46
 
 
47
GConfSchema* gconf_schema_new  (void);
 
48
void         gconf_schema_free (GConfSchema *sc);
 
49
GConfSchema* gconf_schema_copy (GConfSchema *sc);
 
50
 
 
51
void gconf_schema_set_type                 (GConfSchema    *sc,
 
52
                                            GConfValueType  type);
 
53
void gconf_schema_set_list_type            (GConfSchema    *sc,
 
54
                                            GConfValueType  type);
 
55
void gconf_schema_set_car_type             (GConfSchema    *sc,
 
56
                                            GConfValueType  type);
 
57
void gconf_schema_set_cdr_type             (GConfSchema    *sc,
 
58
                                            GConfValueType  type);
 
59
void gconf_schema_set_locale               (GConfSchema    *sc,
 
60
                                            const gchar    *locale);
 
61
void gconf_schema_set_short_desc           (GConfSchema    *sc,
 
62
                                            const gchar    *desc);
 
63
void gconf_schema_set_long_desc            (GConfSchema    *sc,
 
64
                                            const gchar    *desc);
 
65
void gconf_schema_set_owner                (GConfSchema    *sc,
 
66
                                            const gchar    *owner);
 
67
void gconf_schema_set_default_value        (GConfSchema    *sc,
 
68
                                            GConfValue     *val);
 
69
void gconf_schema_set_default_value_nocopy (GConfSchema    *sc,
 
70
                                            GConfValue     *val);
 
71
 
 
72
 
 
73
 
 
74
#define       gconf_schema_get_type(x)          (x->type)
 
75
#define       gconf_schema_get_list_type(x)     (x->list_type)
 
76
#define       gconf_schema_get_car_type(x)      (x->car_type)
 
77
#define       gconf_schema_get_cdr_type(x)      (x->cdr_type)
 
78
#define       gconf_schema_get_locale(x)        ((const gchar*)(x)->locale)
 
79
#define       gconf_schema_get_short_desc(x)    ((const gchar*)(x)->short_desc)
 
80
#define       gconf_schema_get_long_desc(x)     ((const gchar*)(x)->long_desc)
 
81
#define       gconf_schema_get_owner(x)         ((const gchar*)(x)->owner)
 
82
#define       gconf_schema_get_default_value(x) ((x)->default_value)
 
83
 
 
84
#endif
 
85
 
 
86