1 /* clutter-json-1.0.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "ClutterJson", lower_case_cprefix = "clutter_json_", gir_namespace = "ClutterJson", gir_version = "1.0")]
4 namespace ClutterJson {
5 [CCode (cname = "JsonGenerator", cheader_filename = "clutter/json/json-glib.h")]
6 public class JsonGenerator : GLib.Object {
7 public weak GLib.Object parent_instance;
8 public ClutterJson.JsonGeneratorPrivate priv;
9 [CCode (has_construct_function = false)]
10 public JsonGenerator ();
11 public void set_root (ClutterJson.JsonNode node);
12 public string to_data (out size_t length);
13 public bool to_file (string filename) throws GLib.Error;
14 public uint indent { get; set; }
15 public bool pretty { get; set; }
17 [CCode (cname = "JsonParser", cheader_filename = "clutter/json/json-glib.h")]
18 public class JsonParser : GLib.Object {
19 public weak GLib.Object parent_instance;
20 public ClutterJson.JsonParserPrivate priv;
21 public uint get_current_line ();
22 public uint get_current_pos ();
23 public ClutterJson.JsonNode get_root ();
24 public bool load_from_data (string data, ssize_t length) throws GLib.Error;
25 public bool load_from_file (string filename) throws GLib.Error;
26 [CCode (has_construct_function = false)]
28 public virtual signal void array_element (ClutterJson.JsonArray array, int index_);
29 public virtual signal void array_end (ClutterJson.JsonArray array);
30 public virtual signal void array_start ();
31 public virtual signal void error (void* error);
32 public virtual signal void object_end (ClutterJson.JsonObject object);
33 public virtual signal void object_member (ClutterJson.JsonObject object, string member_name);
34 public virtual signal void object_start ();
35 public virtual signal void parse_end ();
36 public virtual signal void parse_start ();
38 [CCode (type_id = "CLUTTER_JSON_TYPE_JSON_ARRAY", cheader_filename = "clutter/json/json-glib.h")]
39 public struct JsonArray {
40 public void add_array_element (ClutterJson.JsonArray value);
41 public void add_boolean_element (bool value);
42 public void add_double_element (double value);
43 public void add_element (ClutterJson.JsonNode node);
44 public void add_int_element (int value);
45 public void add_null_element ();
46 public void add_object_element (ClutterJson.JsonObject value);
47 public void add_string_element (string value);
48 public ClutterJson.JsonNode dup_element (uint index_);
49 public void foreach_element ([CCode (delegate_target_pos = 0)] ClutterJson.JsonArrayForeach func);
50 public ClutterJson.JsonArray get_array_element (uint index_);
51 public bool get_boolean_element (uint index_);
52 public double get_double_element (uint index_);
53 public ClutterJson.JsonNode get_element (uint index_);
54 public GLib.List get_elements ();
55 public int get_int_element (uint index_);
56 public uint get_length ();
57 public bool get_null_element (uint index_);
58 public ClutterJson.JsonObject get_object_element (uint index_);
59 public unowned string get_string_element (uint index_);
60 public ClutterJson.JsonArray @ref ();
61 public void remove_element (uint index_);
64 [CCode (type_id = "CLUTTER_JSON_TYPE_JSON_GENERATOR_PRIVATE", cheader_filename = "clutter/json/json-glib.h")]
65 public struct JsonGeneratorPrivate {
67 [CCode (type_id = "CLUTTER_JSON_TYPE_JSON_NODE", cheader_filename = "clutter/json/json-glib.h")]
68 public struct JsonNode {
69 public ClutterJson.JsonNode copy ();
70 public ClutterJson.JsonArray dup_array ();
71 public ClutterJson.JsonObject dup_object ();
72 public string dup_string ();
74 public ClutterJson.JsonArray get_array ();
75 public bool get_boolean ();
76 public double get_double ();
77 public int get_int ();
78 public ClutterJson.JsonNodeType get_node_type ();
79 public ClutterJson.JsonObject get_object ();
80 public ClutterJson.JsonNode get_parent ();
81 public unowned string get_string ();
82 public void get_value (GLib.Value value);
83 public GLib.Type get_value_type ();
84 public bool is_null ();
85 public void set_array (ClutterJson.JsonArray array);
86 public void set_boolean (bool value);
87 public void set_double (double value);
88 public void set_int (int value);
89 public void set_object (ClutterJson.JsonObject object);
90 public void set_string (string value);
91 public void set_value (GLib.Value value);
92 public void take_array (ClutterJson.JsonArray array);
93 public void take_object (ClutterJson.JsonObject object);
94 public unowned string type_name ();
96 [CCode (type_id = "CLUTTER_JSON_TYPE_JSON_OBJECT", cheader_filename = "clutter/json/json-glib.h")]
97 public struct JsonObject {
98 public void add_member (string member_name, ClutterJson.JsonNode node);
99 public ClutterJson.JsonNode dup_member (string member_name);
100 public void foreach_member ([CCode (delegate_target_pos = 0)] ClutterJson.JsonObjectForeach func);
101 public ClutterJson.JsonArray get_array_member (string member_name);
102 public bool get_boolean_member (string member_name);
103 public double get_double_member (string member_name);
104 public int get_int_member (string member_name);
105 public ClutterJson.JsonNode get_member (string member_name);
106 public GLib.List get_members ();
107 public bool get_null_member (string member_name);
108 public ClutterJson.JsonObject get_object_member (string member_name);
109 public uint get_size ();
110 public unowned string get_string_member (string member_name);
111 public GLib.List get_values ();
112 public bool has_member (string member_name);
113 public ClutterJson.JsonObject @ref ();
114 public void remove_member (string member_name);
115 public void set_array_member (string member_name, ClutterJson.JsonArray value);
116 public void set_boolean_member (string member_name, bool value);
117 public void set_double_member (string member_name, double value);
118 public void set_int_member (string member_name, int value);
119 public void set_member (string member_name, ClutterJson.JsonNode node);
120 public void set_null_member (string member_name);
121 public void set_object_member (string member_name, ClutterJson.JsonObject value);
122 public void set_string_member (string member_name, string value);
123 public void unref ();
125 [CCode (type_id = "CLUTTER_JSON_TYPE_JSON_PARSER_PRIVATE", cheader_filename = "clutter/json/json-glib.h")]
126 public struct JsonParserPrivate {
128 [CCode (cprefix = "JSON_NODE_", cheader_filename = "clutter/json/json-glib.h")]
129 public enum JsonNodeType {
135 [CCode (cprefix = "JSON_PARSER_ERROR_", cheader_filename = "clutter/json/json-glib.h")]
136 public enum JsonParserError {
140 [CCode (cprefix = "JSON_TOKEN_", cheader_filename = "clutter/json/json-glib.h")]
141 public enum JsonTokenType {
148 [CCode (cheader_filename = "clutter/json/json-glib.h", has_target = false)]
149 public delegate void JsonArrayForeach (ClutterJson.JsonArray array, uint index_, ClutterJson.JsonNode element_node, void* user_data);
150 [CCode (cheader_filename = "clutter/json/json-glib.h", has_target = false)]
151 public delegate void JsonObjectForeach (ClutterJson.JsonObject object, string member_name, ClutterJson.JsonNode member_node, void* user_data);
152 [CCode (cheader_filename = "clutter/json/json-glib.h")]
153 public static ClutterJson.JsonArray json_array_sized_new (uint n_elements);