OSDN Git Service

LinGui: Work around a silly treeview formatting bug.
[handbrake-jp/handbrake-jp-git.git] / gtk / src / values.h
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  * 
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU Library General Public License for more details.
11  * 
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
15  */
16 #if !defined(_GHB_VALUES_H_)
17 #define _GHB_VALUES_H_
18
19 #include <glib.h>
20 #include <glib-object.h>
21
22 typedef struct
23 {
24         guchar *data;
25         gsize size;
26 } ghb_rawdata_t;
27
28 GType ghb_rawdata_get_type(void);
29
30 GType ghb_array_get_type(void);
31 GType ghb_dict_get_type(void);
32 GValue* ghb_array_get_nth(const GValue *array, gint ii);
33 void ghb_array_insert(GValue *gval, guint ii, GValue *val);
34 void ghb_array_append(GValue *gval, GValue *val);
35 void ghb_array_remove(GValue *gval, guint ii);
36 gint ghb_array_len(const GValue *gval);
37
38 void ghb_value_free(GValue *gval);
39 GValue* ghb_value_new(GType gtype);
40 GValue* ghb_value_dup(const GValue *val);
41 gint ghb_value_int(const GValue *val);
42 gint64 ghb_value_int64(const GValue *val);
43 gdouble ghb_value_double(const GValue *val);
44 gchar* ghb_value_string(const GValue *val);
45 gboolean ghb_value_boolean(const GValue *val);
46
47 GValue* ghb_string_value(const gchar *str);
48 GValue* ghb_int64_value(gint64 ival);
49 GValue* ghb_int_value(gint ival);
50 GValue* ghb_double_value(gdouble dval);
51 GValue* ghb_boolean_value(gboolean bval);
52
53 gint ghb_value_cmp(const GValue *vala, const GValue *valb);
54 GValue* ghb_string_value_new(const gchar *str);
55 GValue* ghb_int64_value_new(gint64 ival);
56 GValue* ghb_int_value_new(gint ival);
57 GValue* ghb_double_value_new(gdouble dval);
58 GValue* ghb_boolean_value_new(gboolean bval);
59 GValue* ghb_dict_value_new(void);
60 GValue* ghb_array_value_new(guint size);
61 void ghb_array_value_reset(GValue *gval, guint size);
62
63 GValue* ghb_date_value_new(GDate *date);
64 GValue* ghb_rawdata_value_new(ghb_rawdata_t *data);
65
66 void ghb_dict_insert(GValue *gval, gchar *key, GValue *val);
67 void ghb_dict_iter_init(GHashTableIter *iter, GValue *gval);
68 GValue* ghb_dict_lookup(GValue *gval, const gchar *key);
69 gboolean ghb_dict_remove(GValue *gval, const gchar *key);
70 void ghb_register_transforms(void);
71
72
73 #endif // _GHB_VALUES_H_