1 /* seed.vapi generated by vapigen, do not modify. */
4 [CCode (cheader_filename = "seed.h")]
8 [CCode (cheader_filename = "seed.h", ref_function = "seed_context_ref", unref_function = "seed_context_unref")]
10 public class Context {
11 public static void collect (Seed.GlobalContext ctx);
12 public static unowned Seed.GlobalContext create (Seed.ContextGroup group, Seed.Class global_class);
13 public unowned Seed.Object get_global_object ();
15 [CCode (cheader_filename = "seed.h")]
17 public class ContextGroup {
19 [CCode (cheader_filename = "seed.h", free_function = "seed_engine_destroy")]
22 public weak Seed.GlobalContext context;
23 public weak Seed.Value global;
24 public weak Seed.ContextGroup group;
25 public weak string search_path;
26 public unowned Seed.Value expose_gobject (string js_name, GLib.Object object, string gir_namespace, Seed.Exception exception);
27 public unowned Seed.Value expose_namespace (string namespace_name, Seed.Exception exception);
28 public unowned string get_search_path ();
29 public void set_search_path (string path);
31 [CCode (cheader_filename = "seed.h")]
33 public class Exception {
34 public static unowned string get_file (Seed.Context ctx, Seed.Exception exception);
35 public static uint get_line (Seed.Context ctx, Seed.Exception exception);
36 public static unowned string get_message (Seed.Context ctx, Seed.Exception exception);
37 public static unowned string get_name (Seed.Context ctx, Seed.Exception exception);
38 public static unowned string to_string (Seed.Context ctx, Seed.Exception exception);
40 [CCode (cheader_filename = "seed.h")]
42 public class GlobalContext {
44 [CCode (cheader_filename = "seed.h")]
47 public static unowned Seed.Value call (Seed.Context ctx, Seed.Object object, Seed.Object this_object, size_t argument_count, Seed.Value[] arguments, Seed.Exception exception);
48 public static unowned string copy_property_names (Seed.Context ctx, Seed.Object object);
49 public void* get_private ();
50 public static unowned Seed.Value get_property (Seed.Context ctx, Seed.Object object, string name);
51 public static unowned Seed.Value get_property_at_index (Seed.Context ctx, Seed.Object object, int index, Seed.Exception exception);
52 public static unowned Seed.Object get_prototype (Seed.Context ctx, Seed.Object obj);
53 public static bool is_of_class (Seed.Context ctx, Seed.Object obj, Seed.Class klass);
54 public void set_private (void* value);
55 public static bool set_property (Seed.Context ctx, Seed.Object object, string name, Seed.Value value);
56 public static void set_property_at_index (Seed.Context ctx, Seed.Object object, int index, Seed.Value value, Seed.Exception exception);
58 [CCode (cheader_filename = "seed.h", free_function = "seed_script_destroy")]
61 public unowned Seed.Exception exception ();
62 [CCode (has_construct_function = false)]
63 public Script.from_file (Seed.Context ctx, string file);
65 [CCode (cheader_filename = "seed.h", ref_function = "seed_string_ref", unref_function = "seed_string_unref")]
68 public size_t get_maximum_size ();
69 public bool is_equal (Seed.String b);
70 public bool is_equal_utf8 (string b);
71 public size_t to_utf8_buffer (string buffer, size_t buffer_size);
73 [CCode (cheader_filename = "seed.h")]
76 public static unowned Seed.Value from_binary_string (Seed.Context ctx, string[] bytes, Seed.Exception exception);
77 public static unowned Seed.Value from_boolean (Seed.Context ctx, bool val, Seed.Exception exception);
78 public static unowned Seed.Value from_char (Seed.Context ctx, char val, Seed.Exception exception);
79 public static unowned Seed.Value from_double (Seed.Context ctx, double val, Seed.Exception exception);
80 public static unowned Seed.Value from_filename (Seed.Context ctx, Seed.Value val, Seed.Value exception);
81 public static unowned Seed.Value from_float (Seed.Context ctx, float val, Seed.Exception exception);
82 public static unowned Seed.Value from_gvalue (Seed.Context ctx, GLib.Value gval, Seed.Exception exception);
83 public static unowned Seed.Value from_int (Seed.Context ctx, int val, Seed.Exception exception);
84 public static unowned Seed.Value from_int64 (Seed.Context ctx, int64 val, Seed.Exception exception);
85 public static unowned Seed.Value from_long (Seed.Context ctx, long val, Seed.Exception exception);
86 public static unowned Seed.Value from_object (Seed.Context ctx, GLib.Object val, Seed.Exception exception);
87 public static unowned Seed.Value from_string (Seed.Context ctx, string val, Seed.Exception exception);
88 public static unowned Seed.Value from_uchar (Seed.Context ctx, uchar val, Seed.Exception exception);
89 public static unowned Seed.Value from_uint (Seed.Context ctx, uint val, Seed.Exception exception);
90 public static unowned Seed.Value from_uint64 (Seed.Context ctx, uint64 val, Seed.Exception exception);
91 public static unowned Seed.Value from_ulong (Seed.Context ctx, ulong val, Seed.Exception exception);
92 public static bool is_function (Seed.Context ctx, Seed.Object value);
93 public static bool is_null (Seed.Context ctx, Seed.Value value);
94 public static bool is_number (Seed.Context ctx, Seed.Value value);
95 public static bool is_object (Seed.Context ctx, Seed.Value value);
96 public static bool is_object_of_class (Seed.Context ctx, Seed.Value value, Seed.Class klass);
97 public static bool is_string (Seed.Context ctx, Seed.Value value);
98 public static bool is_undefined (Seed.Context ctx, Seed.Value value);
99 public static void protect (Seed.Context ctx, Seed.Value value);
100 public static bool to_boolean (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
101 public static char to_char (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
102 public static double to_double (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
103 public static unowned string to_filename (Seed.Context ctx, Seed.Value val, Seed.Value exception);
104 public static float to_float (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
105 public static bool to_format (Seed.Context ctx, string format, Seed.Value values, Seed.Value exception);
106 public static bool to_gvalue (Seed.Context ctx, Seed.Value val, GLib.Type type, GLib.Value gval, Seed.Exception exception);
107 public static int to_int (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
108 public static int64 to_int64 (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
109 public static long to_long (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
110 public static unowned GLib.Object to_object (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
111 public static unowned string to_string (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
112 public static uchar to_uchar (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
113 public static uint to_uint (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
114 public static uint64 to_uint64 (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
115 public static ulong to_ulong (Seed.Context ctx, Seed.Value val, Seed.Exception exception);
116 public static void unprotect (Seed.Context ctx, Seed.Value value);
118 [CCode (cheader_filename = "seed.h")]
120 public class seed_class_definition {
121 public Seed.ClassAttributes attributes;
122 public weak Seed.ObjectCallAsConstructorCallback call_as_constructor;
123 public weak Seed.ObjectCallAsFunctionCallback call_as_function;
124 public weak string class_name;
125 public weak Seed.ObjectConvertToTypeCallback convert_to_type;
126 public weak Seed.ObjectDeletePropertyCallback delete_property;
127 public weak Seed.ObjectFinalizeCallback finalize;
128 public weak Seed.ObjectGetPropertyCallback get_property;
129 public weak Seed.ObjectGetPropertyNamesCallback get_property_names;
130 public weak Seed.ObjectHasInstanceCallback has_instance;
131 public weak Seed.ObjectHasPropertyCallback has_property;
132 public weak Seed.ObjectInitializeCallback initialize;
133 public weak Seed.Class parent_class;
134 public weak Seed.ObjectSetPropertyCallback set_property;
135 public weak Seed.seed_static_function static_functions;
136 public weak Seed.seed_static_value static_values;
139 [CCode (cheader_filename = "seed.h")]
141 public class seed_static_function {
142 public Seed.PropertyAttributes attributes;
143 public weak Seed.ObjectCallAsFunctionCallback callback;
144 public weak string name;
146 [CCode (cheader_filename = "seed.h")]
148 public class seed_static_value {
149 public Seed.PropertyAttributes attributes;
150 public weak Seed.ObjectGetPropertyCallback get_property;
151 public weak string name;
152 public weak Seed.ObjectSetPropertyCallback set_property;
154 [CCode (cheader_filename = "seed.h", cprefix = "SEED_CLASS_ATTRIBUTE_", has_type_id = false)]
155 public enum ClassAttributes {
159 [CCode (cheader_filename = "seed.h", cprefix = "SEED_PROPERTY_ATTRIBUTE_", has_type_id = false)]
160 public enum PropertyAttributes {
166 [CCode (cheader_filename = "seed.h", cprefix = "SEED_TYPE_", has_type_id = false)]
175 [CCode (cheader_filename = "seed.h", has_target = false)]
176 public delegate unowned Seed.Value FunctionCallback (Seed.Context ctx, Seed.Object function, Seed.Object this_object, size_t argument_count, Seed.Value[] arguments, Seed.Exception exception);
177 [CCode (cheader_filename = "seed.h", has_target = false)]
178 public delegate unowned Seed.Object ModuleInitCallback (Seed.Engine eng);
179 [CCode (cheader_filename = "seed.h", has_target = false)]
180 public delegate unowned Seed.Value ObjectCallAsConstructorCallback (Seed.Context ctx, Seed.Object constructor, size_t argument_count, Seed.Value[] arguments, Seed.Exception exception);
181 [CCode (cheader_filename = "seed.h", has_target = false)]
182 public delegate unowned Seed.Value ObjectCallAsFunctionCallback (Seed.Context ctx, Seed.Object function, Seed.Object this_object, size_t argument_count, Seed.Value[] arguments, Seed.Exception exception);
183 [CCode (cheader_filename = "seed.h", has_target = false)]
184 public delegate unowned Seed.Value ObjectConvertToTypeCallback (Seed.Context ctx, Seed.Object object, Seed.Type type, Seed.Exception exception);
185 [CCode (cheader_filename = "seed.h", has_target = false)]
186 public delegate bool ObjectDeletePropertyCallback (Seed.Context ctx, Seed.Object object, Seed.String property_name, Seed.Exception e);
187 [CCode (cheader_filename = "seed.h", has_target = false)]
188 public delegate void ObjectFinalizeCallback (Seed.Object object);
189 [CCode (cheader_filename = "seed.h", has_target = false)]
190 public delegate unowned Seed.Value ObjectGetPropertyCallback (Seed.Context ctx, Seed.Object object, Seed.String property_name, Seed.Exception e);
191 [CCode (cheader_filename = "seed.h", has_target = false)]
192 public delegate void ObjectGetPropertyNamesCallback ();
193 [CCode (cheader_filename = "seed.h", has_target = false)]
194 public delegate bool ObjectHasInstanceCallback (Seed.Context ctx, Seed.Object constructor, Seed.Object instance_p, Seed.Exception exception);
195 [CCode (cheader_filename = "seed.h", has_target = false)]
196 public delegate bool ObjectHasPropertyCallback (Seed.Context ctx, Seed.Object object, Seed.String str);
197 [CCode (cheader_filename = "seed.h", has_target = false)]
198 public delegate void ObjectInitializeCallback (Seed.Context ctx, Seed.Object object);
199 [CCode (cheader_filename = "seed.h", has_target = false)]
200 public delegate bool ObjectSetPropertyCallback (Seed.Context ctx, Seed.Object object, Seed.String property_name, Seed.Value value, Seed.Exception e);
201 [CCode (cheader_filename = "seed.h")]
202 public static unowned Seed.Object closure_get_callable (GLib.Closure c);
203 [CCode (cheader_filename = "seed.h")]
204 public static unowned Seed.Value closure_invoke (GLib.Closure closure, Seed.Value args, uint argc, Seed.Exception exception);
205 [CCode (cheader_filename = "seed.h")]
206 public static unowned Seed.Value closure_invoke_with_context (Seed.Context ctx, GLib.Closure closure, Seed.Value args, uint argc, Seed.Exception exception);
207 [CCode (cheader_filename = "seed.h")]
208 public static unowned GLib.Closure closure_new (Seed.Context ctx, Seed.Object function, string description);
209 [CCode (cheader_filename = "seed.h")]
210 public static void closure_warn_exception (GLib.Closure c, Seed.Context ctx, Seed.Exception exception);
211 [CCode (cheader_filename = "seed.h")]
212 public static unowned Seed.Class create_class (Seed.seed_class_definition def);
213 [CCode (cheader_filename = "seed.h")]
214 public static void create_function (Seed.Context ctx, string name, Seed.FunctionCallback func, Seed.Object obj);
215 [CCode (cheader_filename = "seed.h")]
216 public static unowned Seed.Value evaluate (Seed.Context ctx, Seed.Script s, Seed.Object this_object);
217 [CCode (cheader_filename = "seed.h")]
218 public static unowned GLib.OptionGroup get_option_group ();
219 [CCode (cheader_filename = "seed.h")]
220 public static void importer_add_global (Seed.Context ctx, string name);
221 [CCode (cheader_filename = "seed.h")]
222 public static void importer_set_search_path (Seed.Context ctx, string search_path);
223 [CCode (cheader_filename = "seed.h")]
224 public static unowned Seed.Engine init (int argc, string argv);
225 [CCode (cheader_filename = "seed.h")]
226 public static unowned Seed.Engine init_constrained (int argc, string argv);
227 [CCode (cheader_filename = "seed.h")]
228 public static unowned Seed.Engine init_constrained_with_context_and_group (int argc, string argv, Seed.GlobalContext context, Seed.ContextGroup group);
229 [CCode (cheader_filename = "seed.h")]
230 public static unowned Seed.Engine init_with_context (int argc, string? argv, Seed.GlobalContext context);
231 [CCode (cheader_filename = "seed.h")]
232 public static unowned Seed.Engine init_with_context_and_group (int argc, string argv, Seed.GlobalContext context, Seed.ContextGroup group);
233 [CCode (cheader_filename = "seed.h")]
234 public static unowned Seed.Engine init_with_context_group (int argc, string argv, Seed.ContextGroup group);
235 [CCode (cheader_filename = "seed.h")]
236 public static unowned Seed.Object make_array (Seed.Context ctx, Seed.Value elements, size_t num_elements, Seed.Exception exception);
237 [CCode (cheader_filename = "seed.h")]
238 public static unowned Seed.Object make_constructor (Seed.Context ctx, Seed.Class klass, Seed.ObjectCallAsConstructorCallback constructor);
239 [CCode (cheader_filename = "seed.h")]
240 public static void make_exception (Seed.Context ctx, Seed.Exception exception, string name, string message);
241 [CCode (cheader_filename = "seed.h")]
242 public static unowned Seed.Object make_function (Seed.Context ctx, Seed.FunctionCallback func, string name);
243 [CCode (cheader_filename = "seed.h")]
244 public static unowned Seed.Value make_null (Seed.Context ctx);
245 [CCode (cheader_filename = "seed.h")]
246 public static unowned Seed.Object make_object (Seed.Context ctx, Seed.Class klass, void* private_object);
247 [CCode (cheader_filename = "seed.h")]
248 public static unowned Seed.Value make_pointer (Seed.Context ctx, void* pointer);
249 [CCode (cheader_filename = "seed.h")]
250 public static unowned Seed.Script make_script (Seed.Context ctx, string js, string source_url, int line_number);
251 [CCode (cheader_filename = "seed.h")]
252 public static unowned Seed.Value make_undefined (Seed.Context ctx);
253 [CCode (cheader_filename = "seed.h")]
254 public static void* pointer_get_pointer (Seed.Context ctx, Seed.Value pointer);
255 [CCode (cheader_filename = "seed.h")]
256 public static void prepare_global_context (Seed.Context ctx);
257 [CCode (cheader_filename = "seed.h")]
258 public static void signal_connect (Seed.Context ctx, GLib.Object object, string @signal, string script);
259 [CCode (cheader_filename = "seed.h")]
260 public static void signal_connect_value (Seed.Context ctx, GLib.Object object, string @signal, Seed.Value function);
261 [CCode (cheader_filename = "seed.h")]
262 public static unowned Seed.Value simple_evaluate (Seed.Context ctx, string source, Seed.Exception exception);