File: params.h

package info (click to toggle)
gwyddion 2.62-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 51,952 kB
  • sloc: ansic: 398,486; python: 7,877; sh: 5,492; makefile: 4,723; xml: 3,883; cpp: 1,969; pascal: 418; perl: 154; ruby: 130
file content (167 lines) | stat: -rw-r--r-- 9,433 bytes parent folder | download | duplicates (2)
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
/*
 *  $Id: params.h 24973 2022-08-31 09:25:33Z yeti-dn $
 *  Copyright (C) 2021-2022 David Necas (Yeti).
 *  E-mail: yeti@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_PARAMS_H__
#define __GWY_PARAMS_H__

#include <libgwyddion/gwyresource.h>
#include <libprocess/gwyprocessenums.h>
#include <libprocess/datafield.h>
#include <libprocess/brick.h>
#include <libprocess/surface.h>
#include <libprocess/lawn.h>
#include <libdraw/gwyrgba.h>
#include <libgwydgets/gwygraphmodel.h>
#include <app/datachooser.h>
#include <app/param-def.h>

G_BEGIN_DECLS

#define GWY_TYPE_PARAMS            (gwy_params_get_type())
#define GWY_PARAMS(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GWY_TYPE_PARAMS, GwyParams))
#define GWY_PARAMS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GWY_TYPE_PARAMS, GwyParamsClass))
#define GWY_IS_PARAMS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GWY_TYPE_PARAMS))
#define GWY_IS_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GWY_TYPE_PARAMS))
#define GWY_PARAMS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GWY_TYPE_PARAMS, GwyParamsClass))

typedef struct _GwyParams      GwyParams;
typedef struct _GwyParamsClass GwyParamsClass;

struct _GwyParams {
    GObject parent;
    struct _GwyParamsPrivate *priv;
};

struct _GwyParamsClass {
    GObjectClass parent;
};

GType                gwy_params_get_type          (void)                        G_GNUC_CONST;
GwyParams*           gwy_params_new               (void);
void                 gwy_params_set_def           (GwyParams *params,
                                                   GwyParamDef *pardef);
GwyParamDef*         gwy_params_get_def           (GwyParams *params);
GwyParams*           gwy_params_new_from_settings (GwyParamDef *pardef);
void                 gwy_params_load_from_settings(GwyParams *params);
GwyParams*           gwy_params_duplicate         (GwyParams *params);
void                 gwy_params_assign            (GwyParams *params,
                                                   GwyParams *source);
void                 gwy_params_save_to_settings  (GwyParams *params);
void                 gwy_params_reset_all         (GwyParams *params,
                                                   const gchar *prefix);
gboolean             gwy_params_reset             (GwyParams *params,
                                                   gint id);
gboolean             gwy_params_get_boolean       (GwyParams *params,
                                                   gint id);
gboolean             gwy_params_set_boolean       (GwyParams *params,
                                                   gint id,
                                                   gboolean value);
gint                 gwy_params_get_enum          (GwyParams *params,
                                                   gint id);
GwyMaskingType       gwy_params_get_masking       (GwyParams *params,
                                                   gint id,
                                                   GwyDataField **mask);
gboolean             gwy_params_set_enum          (GwyParams *params,
                                                   gint id,
                                                   gint value);
guint                gwy_params_get_flags         (GwyParams *params,
                                                   gint id);
gboolean             gwy_params_set_flags         (GwyParams *params,
                                                   gint id,
                                                   guint value);
gboolean             gwy_params_set_flag          (GwyParams *params,
                                                   gint id,
                                                   guint flag,
                                                   gboolean value);
GwyResultsReportType gwy_params_get_report_type   (GwyParams *params,
                                                   gint id);
gboolean             gwy_params_set_report_type   (GwyParams *params,
                                                   gint id,
                                                   GwyResultsReportType value);
gint                 gwy_params_get_int           (GwyParams *params,
                                                   gint id);
gboolean             gwy_params_set_int           (GwyParams *params,
                                                   gint id,
                                                   gint value);
gdouble              gwy_params_get_double        (GwyParams *params,
                                                   gint id);
gboolean             gwy_params_set_double        (GwyParams *params,
                                                   gint id,
                                                   gdouble value);
const gchar*         gwy_params_get_string        (GwyParams *params,
                                                   gint id);
gboolean             gwy_params_set_string        (GwyParams *params,
                                                   gint id,
                                                   const gchar *value);
gboolean             gwy_params_set_unit          (GwyParams *params,
                                                   gint id,
                                                   const gchar *value);
GwySIUnit*           gwy_params_get_unit          (GwyParams *params,
                                                   gint id,
                                                   gint *power10);
gboolean             gwy_params_set_resource      (GwyParams *params,
                                                   gint id,
                                                   const gchar *value);
GwyResource*         gwy_params_get_resource      (GwyParams *params,
                                                   gint id);
GwyRGBA              gwy_params_get_color         (GwyParams *params,
                                                   gint id);
gboolean             gwy_params_set_color         (GwyParams *params,
                                                   gint id,
                                                   GwyRGBA value);
GwyAppDataId         gwy_params_get_data_id       (GwyParams *params,
                                                   gint id);
gboolean             gwy_params_data_id_is_none   (GwyParams *params,
                                                   gint id);
GwyDataField*        gwy_params_get_image         (GwyParams *params,
                                                   gint id);
GwyDataField*        gwy_params_get_mask          (GwyParams *params,
                                                   gint id);
GwyGraphModel*       gwy_params_get_graph         (GwyParams *params,
                                                   gint id);
GwyBrick*            gwy_params_get_volume        (GwyParams *params,
                                                   gint id);
GwySurface*          gwy_params_get_xyz           (GwyParams *params,
                                                   gint id);
GwyLawn*             gwy_params_get_curve_map     (GwyParams *params,
                                                   gint id);
gboolean             gwy_params_set_image_id      (GwyParams *params,
                                                   gint id,
                                                   GwyAppDataId value);
gboolean             gwy_params_set_graph_id      (GwyParams *params,
                                                   gint id,
                                                   GwyAppDataId value);
gboolean             gwy_params_set_volume_id     (GwyParams *params,
                                                   gint id,
                                                   GwyAppDataId value);
gboolean             gwy_params_set_xyz_id        (GwyParams *params,
                                                   gint id,
                                                   GwyAppDataId value);
gboolean             gwy_params_set_curve_map_id  (GwyParams *params,
                                                   gint id,
                                                   GwyAppDataId value);
gboolean             gwy_params_set_curve         (GwyParams *params,
                                                   gint id,
                                                   gint value);
gint                 gwy_params_randomize_seed    (GwyParams *params,
                                                   gint id);

G_END_DECLS

#endif

/* vim: set cin columns=120 tw=118 et ts=4 sw=4 cino=>1s,e0,n0,f0,{0,}0,^0,\:1s,=0,g1s,h0,t0,+1s,c3,(0,u0 : */