~ubuntu-branches/ubuntu/edgy/gconf/edgy

« back to all changes in this revision

Viewing changes to gconf/gconf-locale.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
/* GConf
 
2
 * Copyright (C) 1999, 2000 Red Hat Inc.
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Library General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Library General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Library General Public
 
15
 * License along with this library; if not, write to the
 
16
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
 * Boston, MA 02111-1307, USA.
 
18
 */
 
19
 
 
20
#ifndef GCONF_GCONF_LOCALE_H
 
21
#define GCONF_GCONF_LOCALE_H
 
22
 
 
23
#include <glib.h>
 
24
 
 
25
#ifdef __cplusplus
 
26
extern "C" {
 
27
#endif /* __cplusplus */
 
28
 
 
29
/*
 
30
 * This thing caches the fallback list for a locale string.
 
31
 */
 
32
typedef struct _GConfLocaleCache GConfLocaleCache;
 
33
 
 
34
GConfLocaleCache* gconf_locale_cache_new           (void);
 
35
void              gconf_locale_cache_free       (GConfLocaleCache* cache);
 
36
void              gconf_locale_cache_expire        (GConfLocaleCache* cache,
 
37
                                                    /* >= max_age is deleted */
 
38
                                                    guint max_age_exclusive_in_seconds);
 
39
 
 
40
 
 
41
/* This API is annoying, but hey it's all GConf internal. No users will see it.
 
42
   We need it for thread safety without the penalty of copying a string vector
 
43
   every time we get the fallback list.
 
44
*/
 
45
 
 
46
typedef struct _GConfLocaleList GConfLocaleList;
 
47
 
 
48
struct _GConfLocaleList {
 
49
  const gchar** list;
 
50
};
 
51
 
 
52
void              gconf_locale_list_ref            (GConfLocaleList* list);
 
53
void              gconf_locale_list_unref          (GConfLocaleList* list);
 
54
 
 
55
/* for thread safety, this is going to increment the reference count
 
56
   on the locale list. You must unref() when done. This automatically
 
57
   adds a cache entry if necessary. locale may be NULL, in which case
 
58
   it just gets converted to "C"
 
59
*/
 
60
GConfLocaleList*  gconf_locale_cache_get_list      (GConfLocaleCache* cache,
 
61
                                                    const gchar* locale);
 
62
 
 
63
/* Use this if you don't care about the locale cache */
 
64
gchar**           gconf_split_locale               (const gchar* locale);
 
65
 
 
66
#ifdef __cplusplus
 
67
}
 
68
#endif /* __cplusplus */
 
69
 
 
70
#endif
 
71
 
 
72
 
 
73