OSDN Git Service

Remove the set cpu count option as it doesn't do anything now
[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_replace(GValue *gval, guint ii, GValue *val);
35 void ghb_array_append(GValue *gval, GValue *val);
36 void ghb_array_remove(GValue *gval, guint ii);
37 gint ghb_array_len(const GValue *gval);
38 void ghb_array_copy(GValue *arr1, GValue *arr2, gint count);
39
40 void ghb_value_free(GValue *gval);
41 GValue* ghb_value_new(GType gtype);
42 GValue* ghb_value_dup(const GValue *val);
43 gint ghb_value_int(const GValue *val);
44 gint64 ghb_value_int64(const GValue *val);
45 gdouble ghb_value_double(const GValue *val);
46 gchar* ghb_value_string(const GValue *val);
47 gboolean ghb_value_boolean(const GValue *val);
48
49 GValue* ghb_string_value(const gchar *str);
50 GValue* ghb_int64_value(gint64 ival);
51 GValue* ghb_int_value(gint ival);
52 GValue* ghb_double_value(gdouble dval);
53 GValue* ghb_boolean_value(gboolean bval);
54
55 gint ghb_value_cmp(const GValue *vala, const GValue *valb);
56 GValue* ghb_string_value_new(const gchar *str);
57 GValue* ghb_int64_value_new(gint64 ival);
58 GValue* ghb_int_value_new(gint ival);
59 GValue* ghb_double_value_new(gdouble dval);
60 GValue* ghb_boolean_value_new(gboolean bval);
61 GValue* ghb_dict_value_new(void);
62 GValue* ghb_array_value_new(guint size);
63 void ghb_array_value_reset(GValue *gval, guint size);
64
65 GValue* ghb_date_value_new(GDate *date);
66 GValue* ghb_rawdata_value_new(ghb_rawdata_t *data);
67
68 void ghb_dict_insert(GValue *gval, gchar *key, GValue *val);
69 void ghb_dict_iter_init(GHashTableIter *iter, GValue *gval);
70 GValue* ghb_dict_lookup(const GValue *gval, const gchar *key);
71 gboolean ghb_dict_remove(GValue *gval, const gchar *key);
72 void ghb_register_transforms(void);
73
74 void debug_show_value(GValue *gval);
75 void debug_show_type(GType tp);
76
77 #endif // _GHB_VALUES_H_