|
grim@8
|
1 |
/* |
|
grim@394
|
2 |
* Copyright (C) 2007-2010 Gary Kramlich <grim@reaperworld.com> |
|
grim@8
|
3 |
* |
|
grim@394
|
4 |
* This program is free software: you can redistribute it and/or modify |
|
grim@394
|
5 |
* it under the terms of the GNU General Public License as published by |
|
grim@394
|
6 |
* the Free Software Foundation, either version 3 of the License, or |
|
grim@394
|
7 |
* (at your option) any later version. |
|
grim@8
|
8 |
* |
|
grim@394
|
9 |
* This program is distributed in the hope that it will be useful, |
|
grim@394
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
grim@394
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
grim@394
|
12 |
* GNU General Public License for more details. |
|
grim@394
|
13 |
* |
|
grim@394
|
14 |
* You should have received a copy of the GNU General Public License |
|
grim@394
|
15 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
grim@8
|
16 |
*/ |
|
grim@8
|
17 |
#ifndef GPLATE_VARIABLE_H |
|
grim@8
|
18 |
#define GPLATE_VARIABLE_H |
|
grim@8
|
19 |
|
|
grim@8
|
20 |
#include <glib.h> |
|
grim@8
|
21 |
#include <glib-object.h> |
|
grim@8
|
22 |
|
|
grim@8
|
23 |
#define GPLATE_TYPE_VARIABLE (gplate_variable_get_gtype()) |
|
grim@8
|
24 |
#define GPLATE_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLATE_TYPE_VARIABLE, GPlateVariable)) |
|
grim@8
|
25 |
#define GPLATE_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GPLATE_TYPE_VARIABLE, GPlateVariableClass)) |
|
grim@8
|
26 |
#define GPLATE_IS_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLATE_TYPE_VARIABLE)) |
|
grim@8
|
27 |
#define GPLATE_IS_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GPLATE_TYPE_VARIABLE)) |
|
grim@8
|
28 |
#define GPLATE_VARIABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GPLATE_TYPE_VARIABLE, GPlateVariableClass)) |
|
grim@8
|
29 |
|
|
grim@8
|
30 |
typedef struct _GPlateVariable GPlateVariable; |
|
grim@8
|
31 |
typedef struct _GPlateVariableClass GPlateVariableClass; |
|
grim@8
|
32 |
|
|
grim@8
|
33 |
struct _GPlateVariable { |
|
grim@8
|
34 |
GObject gparent; |
|
grim@8
|
35 |
|
|
grim@8
|
36 |
void (*_gplate_reserved1)(void); |
|
grim@8
|
37 |
void (*_gplate_reserved2)(void); |
|
grim@8
|
38 |
void (*_gplate_reserved3)(void); |
|
grim@8
|
39 |
void (*_gplate_reserved4)(void); |
|
grim@8
|
40 |
}; |
|
grim@8
|
41 |
|
|
grim@8
|
42 |
struct _GPlateVariableClass { |
|
grim@8
|
43 |
GObjectClass parent; |
|
grim@8
|
44 |
|
|
grim@8
|
45 |
const gchar *(*get_name)(const GPlateVariable *variable); |
|
grim@261
|
46 |
|
|
grim@8
|
47 |
const gchar *(*get_value)(const GPlateVariable *variable); |
|
grim@261
|
48 |
void (*set_value)(GPlateVariable *variable, const gchar *value); |
|
grim@8
|
49 |
|
|
grim@8
|
50 |
void (*_gplate_reserved1)(void); |
|
grim@8
|
51 |
void (*_gplate_reserved2)(void); |
|
grim@8
|
52 |
void (*_gplate_reserved3)(void); |
|
grim@8
|
53 |
void (*_gplate_reserved4)(void); |
|
grim@8
|
54 |
}; |
|
grim@8
|
55 |
|
|
grim@8
|
56 |
G_BEGIN_DECLS |
|
grim@8
|
57 |
|
|
grim@8
|
58 |
GType gplate_variable_get_gtype(void); |
|
grim@8
|
59 |
|
|
grim@104
|
60 |
GPlateVariable *gplate_variable_new_from_string(const gchar *name, const gchar *value); |
|
grim@104
|
61 |
GPlateVariable *gplate_variable_new_from_boolean(const gchar *name, gboolean value); |
|
grim@104
|
62 |
GPlateVariable *gplate_variable_new_from_integer(const gchar *name, gint value); |
|
grim@104
|
63 |
GPlateVariable *gplate_variable_new_from_float(const gchar *name, gfloat value); |
|
grim@104
|
64 |
GPlateVariable *gplate_variable_new_from_double(const gchar *name, gdouble value); |
|
grim@17
|
65 |
|
|
grim@8
|
66 |
const gchar *gplate_variable_get_name(const GPlateVariable *variable); |
|
grim@261
|
67 |
|
|
grim@8
|
68 |
const gchar *gplate_variable_get_value(const GPlateVariable *variable); |
|
grim@261
|
69 |
void gplate_variable_set_value(GPlateVariable *variable, const gchar *value); |
|
grim@8
|
70 |
|
|
grim@8
|
71 |
G_END_DECLS |
|
grim@8
|
72 |
|
|
grim@8
|
73 |
#endif /* GPLATE_VARIABLE_H */ |