/usr/include/gwyddion/libgwyddion/gwycontainer.h is in libgwyddion20-dev 2.50-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | /*
* $Id: gwycontainer.h 20678 2017-12-18 18:26:55Z yeti-dn $
* Copyright (C) 2003,2004,2014 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GWY_CONTAINER_H__
#define __GWY_CONTAINER_H__
#include <glib-object.h>
#include <libgwyddion/gwyserializable.h>
G_BEGIN_DECLS
#define GWY_TYPE_CONTAINER (gwy_container_get_type())
#define GWY_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GWY_TYPE_CONTAINER, GwyContainer))
#define GWY_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GWY_TYPE_CONTAINER, GwyContainerClass))
#define GWY_IS_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GWY_TYPE_CONTAINER))
#define GWY_IS_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GWY_TYPE_CONTAINER))
#define GWY_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GWY_TYPE_CONTAINER, GwyContainerClass))
#define GWY_CONTAINER_PATHSEP '/'
#define GWY_CONTAINER_PATHSEP_STR "/"
typedef struct _GwyContainer GwyContainer;
typedef struct _GwyContainerClass GwyContainerClass;
struct _GwyContainer {
GObject parent_instance;
GHashTable *values;
gboolean in_construction;
gpointer reserved1;
gpointer reserved2;
gint int1;
gint int2;
};
struct _GwyContainerClass {
GObjectClass parent_class;
void (*item_changed)(GwyContainer *container, const gchar *key);
/*< private >*/
void (*reserved1)(void);
};
#define gwy_container_duplicate(container) \
(GWY_CONTAINER(gwy_serializable_duplicate(G_OBJECT(container))))
GType gwy_container_get_type (void) G_GNUC_CONST;
GwyContainer* gwy_container_new (void);
guint gwy_container_get_n_items (GwyContainer *container);
GType gwy_container_value_type (GwyContainer *container,
GQuark key);
gboolean gwy_container_contains (GwyContainer *container,
GQuark key);
GValue gwy_container_get_value (GwyContainer *container,
GQuark key);
gboolean gwy_container_gis_value (GwyContainer *container,
GQuark key,
GValue *value);
void gwy_container_set_value (GwyContainer *container,
...);
void gwy_container_set_value_by_name (GwyContainer *container,
...) G_GNUC_NULL_TERMINATED;
gboolean gwy_container_remove (GwyContainer *container,
GQuark key);
guint gwy_container_remove_by_prefix (GwyContainer *container,
const gchar *prefix);
GwyContainer* gwy_container_duplicate_by_prefix (GwyContainer *container,
...);
GwyContainer* gwy_container_duplicate_by_prefixv (GwyContainer *container,
guint n,
const gchar **prefixes);
gint gwy_container_transfer (GwyContainer *source,
GwyContainer *dest,
const gchar *source_prefix,
const gchar *dest_prefix,
gboolean force);
gboolean gwy_container_rename (GwyContainer *container,
GQuark key,
GQuark newkey,
gboolean force);
guint gwy_container_foreach (GwyContainer *container,
const gchar *prefix,
GHFunc function,
gpointer user_data);
GQuark* gwy_container_keys (GwyContainer *container);
const gchar** gwy_container_keys_by_name (GwyContainer *container);
GQuark* gwy_container_keys_with_prefix (GwyContainer *container,
const gchar *prefix,
guint *n);
const gchar** gwy_container_keys_with_prefix_by_name(GwyContainer *container,
const gchar *prefix,
guint *n);
void gwy_container_set_boolean (GwyContainer *container,
GQuark key,
gboolean value);
gboolean gwy_container_get_boolean (GwyContainer *container,
GQuark key);
gboolean gwy_container_gis_boolean (GwyContainer *container,
GQuark key,
gboolean *value);
void gwy_container_set_uchar (GwyContainer *container,
GQuark key,
guchar value);
guchar gwy_container_get_uchar (GwyContainer *container,
GQuark key);
gboolean gwy_container_gis_uchar (GwyContainer *container,
GQuark key,
guchar *value);
void gwy_container_set_int32 (GwyContainer *container,
GQuark key,
gint32 value);
gint32 gwy_container_get_int32 (GwyContainer *container,
GQuark key);
gboolean gwy_container_gis_int32 (GwyContainer *container,
GQuark key,
gint32 *value);
void gwy_container_set_enum (GwyContainer *container,
GQuark key,
guint value);
guint gwy_container_get_enum (GwyContainer *container,
GQuark key);
gboolean gwy_container_gis_enum (GwyContainer *container,
GQuark key,
guint *value);
void gwy_container_set_int64 (GwyContainer *container,
GQuark key,
gint64 value);
gint64 gwy_container_get_int64 (GwyContainer *container,
GQuark key);
gboolean gwy_container_gis_int64 (GwyContainer *container,
GQuark key,
gint64 *value);
void gwy_container_set_double (GwyContainer *container,
GQuark key,
gdouble value);
gdouble gwy_container_get_double (GwyContainer *container,
GQuark key);
gboolean gwy_container_gis_double (GwyContainer *container,
GQuark key,
gdouble *value);
void gwy_container_set_string (GwyContainer *container,
GQuark key,
const guchar *value);
void gwy_container_set_const_string (GwyContainer *container,
GQuark key,
const guchar *value);
const guchar* gwy_container_get_string (GwyContainer *container,
GQuark key);
gboolean gwy_container_gis_string (GwyContainer *container,
GQuark key,
const guchar **value);
void gwy_container_set_object (GwyContainer *container,
GQuark key,
gpointer value);
gpointer gwy_container_get_object (GwyContainer *container,
GQuark key);
gboolean gwy_container_gis_object (GwyContainer *container,
GQuark key,
gpointer value);
GPtrArray* gwy_container_serialize_to_text (GwyContainer *container);
GwyContainer* gwy_container_deserialize_from_text (const gchar *text);
#define gwy_container_value_type_by_name(c,n) gwy_container_value_type(c,g_quark_try_string(n))
#define gwy_container_contains_by_name(c,n) gwy_container_contains(c,g_quark_try_string(n))
#define gwy_container_get_value_by_name(c,n) gwy_container_get_value(c,g_quark_try_string(n))
#define gwy_container_gis_value_by_name(c,n,v) gwy_container_gis_value(c,g_quark_from_string(n),v)
#define gwy_container_remove_by_name(c,n) gwy_container_remove(c,g_quark_try_string(n))
#define gwy_container_rename_by_name(c,n,nn,f) gwy_container_rename(c,g_quark_try_string(n),g_quark_from_string(nn),f)
#define gwy_container_set_boolean_by_name(c,n,v) gwy_container_set_boolean(c,g_quark_from_string(n),v)
#define gwy_container_get_boolean_by_name(c,n) gwy_container_get_boolean(c,g_quark_try_string(n))
#define gwy_container_gis_boolean_by_name(c,n,v) gwy_container_gis_boolean(c,g_quark_from_string(n),v)
#define gwy_container_set_uchar_by_name(c,n,v) gwy_container_set_uchar(c,g_quark_from_string(n),v)
#define gwy_container_get_uchar_by_name(c,n) gwy_container_get_uchar(c,g_quark_try_string(n))
#define gwy_container_gis_uchar_by_name(c,n,v) gwy_container_gis_uchar(c,g_quark_from_string(n),v)
#define gwy_container_set_int32_by_name(c,n,v) gwy_container_set_int32(c,g_quark_from_string(n),v)
#define gwy_container_get_int32_by_name(c,n) gwy_container_get_int32(c,g_quark_try_string(n))
#define gwy_container_gis_int32_by_name(c,n,v) gwy_container_gis_int32(c,g_quark_from_string(n),v)
#define gwy_container_set_enum_by_name(c,n,v) gwy_container_set_enum(c,g_quark_from_string(n),v)
#define gwy_container_get_enum_by_name(c,n) gwy_container_get_enum(c,g_quark_try_string(n))
#define gwy_container_gis_enum_by_name(c,n,v) gwy_container_gis_enum(c,g_quark_from_string(n),v)
#define gwy_container_set_int64_by_name(c,n,v) gwy_container_set_int64(c,g_quark_from_string(n),v)
#define gwy_container_get_int64_by_name(c,n) gwy_container_get_int64(c,g_quark_try_string(n))
#define gwy_container_gis_int64_by_name(c,n,v) gwy_container_gis_int64(c,g_quark_from_string(n),v)
#define gwy_container_set_double_by_name(c,n,v) gwy_container_set_double(c,g_quark_from_string(n),v)
#define gwy_container_get_double_by_name(c,n) gwy_container_get_double(c,g_quark_try_string(n))
#define gwy_container_gis_double_by_name(c,n,v) gwy_container_gis_double(c,g_quark_from_string(n),v)
#define gwy_container_set_string_by_name(c,n,v) gwy_container_set_string(c,g_quark_from_string(n),v)
#define gwy_container_set_const_string_by_name(c,n,v) gwy_container_set_const_string(c,g_quark_from_string(n),v)
#define gwy_container_get_string_by_name(c,n) gwy_container_get_string(c,g_quark_try_string(n))
#define gwy_container_gis_string_by_name(c,n,v) gwy_container_gis_string(c,g_quark_from_string(n),v)
#define gwy_container_set_object_by_name(c,n,v) gwy_container_set_object(c,g_quark_from_string(n),v)
#define gwy_container_get_object_by_name(c,n) gwy_container_get_object(c,g_quark_try_string(n))
#define gwy_container_gis_object_by_name(c,n,v) gwy_container_gis_object(c,g_quark_from_string(n),v)
G_END_DECLS
#endif /* __GWY_CONTAINER_H__ */
/* vim: set cin et ts=4 sw=4 cino=>1s,e0,n0,f0,{0,}0,^0,\:1s,=0,g1s,h0,t0,+1s,c3,(0,u0 : */
|