~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to app/config/gimpconfig.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* The GIMP -- an image manipulation program
2
 
 * Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
3
 
 *
4
 
 * Config file serialization and deserialization interface
5
 
 * Copyright (C) 2001-2003  Sven Neumann <sven@gimp.org>
6
 
 *
7
 
 * This program is free software; you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation; either version 2 of the License, or
10
 
 * (at your option) any later version.
11
 
 *
12
 
 * This program is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program; if not, write to the Free Software
19
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
 
 */
21
 
 
22
 
#ifndef __GIMP_CONFIG_H__
23
 
#define __GIMP_CONFIG_H__
24
 
 
25
 
 
26
 
#define GIMP_TYPE_CONFIG               (gimp_config_interface_get_type ())
27
 
#define GIMP_IS_CONFIG(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CONFIG))
28
 
#define GIMP_CONFIG(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CONFIG, GimpConfig))
29
 
#define GIMP_CONFIG_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_CONFIG, GimpConfigInterface))
30
 
 
31
 
 
32
 
typedef struct _GimpConfigInterface GimpConfigInterface;
33
 
 
34
 
struct _GimpConfigInterface
35
 
{
36
 
  GTypeInterface base_iface;
37
 
 
38
 
  gboolean     (* serialize)            (GimpConfig       *config,
39
 
                                         GimpConfigWriter *writer,
40
 
                                         gpointer          data);
41
 
  gboolean     (* deserialize)          (GimpConfig       *config,
42
 
                                         GScanner         *scanner,
43
 
                                         gint              nest_level,
44
 
                                         gpointer          data);
45
 
  gboolean     (* serialize_property)   (GimpConfig       *config,
46
 
                                         guint             property_id,
47
 
                                         const GValue     *value,
48
 
                                         GParamSpec       *pspec,
49
 
                                         GimpConfigWriter *writer);
50
 
  gboolean     (* deserialize_property) (GimpConfig       *config,
51
 
                                         guint             property_id,
52
 
                                         GValue           *value,
53
 
                                         GParamSpec       *pspec,
54
 
                                         GScanner         *scanner,
55
 
                                         GTokenType       *expected);
56
 
  GimpConfig * (* duplicate)            (GimpConfig       *config);
57
 
  gboolean     (* equal)                (GimpConfig       *a,
58
 
                                         GimpConfig       *b);
59
 
  void         (* reset)                (GimpConfig       *config);
60
 
};
61
 
 
62
 
typedef void  (* GimpConfigForeachFunc) (const gchar *key,
63
 
                                         const gchar *value,
64
 
                                         gpointer     user_data);
65
 
 
66
 
 
67
 
GType         gimp_config_interface_get_type    (void) G_GNUC_CONST;
68
 
 
69
 
gboolean      gimp_config_serialize_to_file     (GimpConfig   *config,
70
 
                                                 const gchar  *filename,
71
 
                                                 const gchar  *header,
72
 
                                                 const gchar  *footer,
73
 
                                                 gpointer      data,
74
 
                                                 GError      **error);
75
 
gboolean      gimp_config_serialize_to_fd       (GimpConfig   *config,
76
 
                                                 gint          fd,
77
 
                                                 gpointer      data);
78
 
gchar       * gimp_config_serialize_to_string   (GimpConfig   *config,
79
 
                                                 gpointer      data);
80
 
gboolean      gimp_config_deserialize_file      (GimpConfig   *config,
81
 
                                                 const gchar  *filename,
82
 
                                                 gpointer      data,
83
 
                                                 GError      **error);
84
 
gboolean      gimp_config_deserialize_string    (GimpConfig   *config,
85
 
                                                 const gchar  *text,
86
 
                                                 gint          text_len,
87
 
                                                 gpointer      data,
88
 
                                                 GError      **error);
89
 
gboolean      gimp_config_deserialize_return    (GScanner     *scanner,
90
 
                                                 GTokenType    expected_token,
91
 
                                                 gint          nest_level);
92
 
 
93
 
gpointer      gimp_config_duplicate             (GimpConfig   *config);
94
 
gboolean      gimp_config_is_equal_to           (GimpConfig   *a,
95
 
                                                 GimpConfig   *b);
96
 
void          gimp_config_reset                 (GimpConfig   *config);
97
 
 
98
 
void          gimp_config_add_unknown_token     (GimpConfig   *config,
99
 
                                                 const gchar  *key,
100
 
                                                 const gchar  *value);
101
 
const gchar * gimp_config_lookup_unknown_token  (GimpConfig   *config,
102
 
                                                 const gchar  *key);
103
 
void          gimp_config_foreach_unknown_token (GimpConfig   *config,
104
 
                                                 GimpConfigForeachFunc  func,
105
 
                                                 gpointer      user_data);
106
 
 
107
 
 
108
 
#endif  /* __GIMP_CONFIG_H__ */