gimpbasetypes.h 3.42 KB
Newer Older
1 2
/* LIBGIMP - The GIMP Library
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
3
 *
4
 * This library is free software: you can redistribute it and/or
5 6
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
7
 * version 3 of the License, or (at your option) any later version.
8 9 10 11
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 13 14
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
15
 * License along with this library.  If not, see
16
 * <https://www.gnu.org/licenses/>.
17 18 19 20 21
 */

#ifndef __GIMP_BASE_TYPES_H__
#define __GIMP_BASE_TYPES_H__

22 23

#include <libgimpcolor/gimpcolortypes.h>
24
#include <libgimpmath/gimpmathtypes.h>
25

26
#include <libgimpbase/gimpbaseenums.h>
27

28

29
G_BEGIN_DECLS
30 31 32 33

/* For information look into the C source or the html documentation */


34 35 36 37 38 39 40 41 42 43 44 45 46
/* XXX FIXME move these to a separate file */

#ifdef GIMP_DISABLE_DEPRECATION_WARNINGS
#define GIMP_DEPRECATED
#define GIMP_DEPRECATED_FOR(f)
#define GIMP_UNAVAILABLE(maj,min)
#else
#define GIMP_DEPRECATED G_DEPRECATED
#define GIMP_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f)
#define GIMP_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min)
#endif


47
typedef struct _GimpParasite     GimpParasite;
48 49
typedef struct _GimpEnumDesc     GimpEnumDesc;
typedef struct _GimpFlagsDesc    GimpFlagsDesc;
50
typedef struct _GimpValueArray   GimpValueArray;
51

52
typedef struct _GimpMetadata     GimpMetadata;
53

54

55 56 57 58 59 60 61 62 63
/**
 * GimpEnumDesc:
 * @value:      An enum value.
 * @value_desc: The value's description.
 * @value_help: The value's help text.
 *
 * This structure is used to register translatable descriptions and
 * help texts for enum values. See gimp_enum_set_value_descriptions().
 **/
64 65
struct _GimpEnumDesc
{
66 67 68
  gint         value;
  const gchar *value_desc;
  const gchar *value_help;
69 70
};

71 72 73 74 75 76 77 78 79
/**
 * GimpFlagsDesc:
 * @value:      A flag value.
 * @value_desc: The value's description.
 * @value_help: The value's help text.
 *
 * This structure is used to register translatable descriptions and
 * help texts for flag values. See gimp_flags_set_value_descriptions().
 **/
80 81
struct _GimpFlagsDesc
{
82 83 84
  guint        value;
  const gchar *value_desc;
  const gchar *value_help;
85 86 87 88 89 90 91
};


void                  gimp_type_set_translation_domain  (GType                type,
                                                         const gchar         *domain);
const gchar         * gimp_type_get_translation_domain  (GType                type);

92 93 94 95
void                  gimp_type_set_translation_context (GType                type,
                                                         const gchar         *context);
const gchar         * gimp_type_get_translation_context (GType                type);

96 97 98 99 100 101 102
void                  gimp_enum_set_value_descriptions  (GType                enum_type,
                                                         const GimpEnumDesc  *descriptions);
const GimpEnumDesc  * gimp_enum_get_value_descriptions  (GType                enum_type);

void                  gimp_flags_set_value_descriptions (GType                flags_type,
                                                         const GimpFlagsDesc *descriptions);
const GimpFlagsDesc * gimp_flags_get_value_descriptions (GType                flags_type);
103

104

105
G_END_DECLS
106 107

#endif  /* __GIMP_BASE_TYPES_H__ */