javascriptcore_rs_sys/
lib.rs

1// Generated by gir (https://github.com/gtk-rs/gir @ 73df75128d55)
2// from ../gir-files (@ 8be196040235)
3// DO NOT EDIT
4
5#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
6#![allow(
7  clippy::approx_constant,
8  clippy::type_complexity,
9  clippy::unreadable_literal,
10  clippy::upper_case_acronyms
11)]
12#![cfg_attr(docsrs, feature(doc_cfg))]
13
14#[allow(unused_imports)]
15use libc::{
16  c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
17  intptr_t, size_t, ssize_t, uintptr_t, FILE,
18};
19
20#[allow(unused_imports)]
21use glib::{gboolean, gconstpointer, gpointer, GType};
22
23// Enums
24pub type JSCCheckSyntaxMode = c_int;
25pub const JSC_CHECK_SYNTAX_MODE_SCRIPT: JSCCheckSyntaxMode = 0;
26pub const JSC_CHECK_SYNTAX_MODE_MODULE: JSCCheckSyntaxMode = 1;
27
28pub type JSCCheckSyntaxResult = c_int;
29pub const JSC_CHECK_SYNTAX_RESULT_SUCCESS: JSCCheckSyntaxResult = 0;
30pub const JSC_CHECK_SYNTAX_RESULT_RECOVERABLE_ERROR: JSCCheckSyntaxResult = 1;
31pub const JSC_CHECK_SYNTAX_RESULT_IRRECOVERABLE_ERROR: JSCCheckSyntaxResult = 2;
32pub const JSC_CHECK_SYNTAX_RESULT_UNTERMINATED_LITERAL_ERROR: JSCCheckSyntaxResult = 3;
33pub const JSC_CHECK_SYNTAX_RESULT_OUT_OF_MEMORY_ERROR: JSCCheckSyntaxResult = 4;
34pub const JSC_CHECK_SYNTAX_RESULT_STACK_OVERFLOW_ERROR: JSCCheckSyntaxResult = 5;
35
36pub type JSCOptionType = c_int;
37pub const JSC_OPTION_BOOLEAN: JSCOptionType = 0;
38pub const JSC_OPTION_INT: JSCOptionType = 1;
39pub const JSC_OPTION_UINT: JSCOptionType = 2;
40pub const JSC_OPTION_SIZE: JSCOptionType = 3;
41pub const JSC_OPTION_DOUBLE: JSCOptionType = 4;
42pub const JSC_OPTION_STRING: JSCOptionType = 5;
43pub const JSC_OPTION_RANGE_STRING: JSCOptionType = 6;
44
45pub type JSCTypedArrayType = c_int;
46pub const JSC_TYPED_ARRAY_NONE: JSCTypedArrayType = 0;
47pub const JSC_TYPED_ARRAY_INT8: JSCTypedArrayType = 1;
48pub const JSC_TYPED_ARRAY_INT16: JSCTypedArrayType = 2;
49pub const JSC_TYPED_ARRAY_INT32: JSCTypedArrayType = 3;
50pub const JSC_TYPED_ARRAY_INT64: JSCTypedArrayType = 4;
51pub const JSC_TYPED_ARRAY_UINT8: JSCTypedArrayType = 5;
52pub const JSC_TYPED_ARRAY_UINT8_CLAMPED: JSCTypedArrayType = 6;
53pub const JSC_TYPED_ARRAY_UINT16: JSCTypedArrayType = 7;
54pub const JSC_TYPED_ARRAY_UINT32: JSCTypedArrayType = 8;
55pub const JSC_TYPED_ARRAY_UINT64: JSCTypedArrayType = 9;
56pub const JSC_TYPED_ARRAY_FLOAT32: JSCTypedArrayType = 10;
57pub const JSC_TYPED_ARRAY_FLOAT64: JSCTypedArrayType = 11;
58
59// Constants
60pub const JSC_MAJOR_VERSION: c_int = 2;
61pub const JSC_MICRO_VERSION: c_int = 1;
62pub const JSC_MINOR_VERSION: c_int = 38;
63pub const JSC_OPTIONS_USE_DFG: &[u8] = b"useDFGJIT\0";
64pub const JSC_OPTIONS_USE_FTL: &[u8] = b"useFTLJIT\0";
65pub const JSC_OPTIONS_USE_JIT: &[u8] = b"useJIT\0";
66pub const JSC_OPTIONS_USE_LLINT: &[u8] = b"useLLInt\0";
67
68// Flags
69pub type JSCValuePropertyFlags = c_uint;
70pub const JSC_VALUE_PROPERTY_CONFIGURABLE: JSCValuePropertyFlags = 1;
71pub const JSC_VALUE_PROPERTY_ENUMERABLE: JSCValuePropertyFlags = 2;
72pub const JSC_VALUE_PROPERTY_WRITABLE: JSCValuePropertyFlags = 4;
73
74// Callbacks
75pub type JSCClassDeletePropertyFunction =
76  Option<unsafe extern "C" fn(*mut JSCClass, *mut JSCContext, gpointer, *const c_char) -> gboolean>;
77pub type JSCClassEnumeratePropertiesFunction =
78  Option<unsafe extern "C" fn(*mut JSCClass, *mut JSCContext, gpointer) -> *mut *mut c_char>;
79pub type JSCClassGetPropertyFunction = Option<
80  unsafe extern "C" fn(*mut JSCClass, *mut JSCContext, gpointer, *const c_char) -> *mut JSCValue,
81>;
82pub type JSCClassHasPropertyFunction =
83  Option<unsafe extern "C" fn(*mut JSCClass, *mut JSCContext, gpointer, *const c_char) -> gboolean>;
84pub type JSCClassSetPropertyFunction = Option<
85  unsafe extern "C" fn(
86    *mut JSCClass,
87    *mut JSCContext,
88    gpointer,
89    *const c_char,
90    *mut JSCValue,
91  ) -> gboolean,
92>;
93pub type JSCExceptionHandler =
94  Option<unsafe extern "C" fn(*mut JSCContext, *mut JSCException, gpointer)>;
95pub type JSCOptionsFunc =
96  Option<unsafe extern "C" fn(*const c_char, JSCOptionType, *const c_char, gpointer) -> gboolean>;
97
98// Records
99#[repr(C)]
100pub struct _JSCClassClass {
101  _data: [u8; 0],
102  _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
103}
104
105pub type JSCClassClass = *mut _JSCClassClass;
106
107#[derive(Copy, Clone)]
108#[repr(C)]
109pub struct JSCClassVTable {
110  pub get_property: JSCClassGetPropertyFunction,
111  pub set_property: JSCClassSetPropertyFunction,
112  pub has_property: JSCClassHasPropertyFunction,
113  pub delete_property: JSCClassDeletePropertyFunction,
114  pub enumerate_properties: JSCClassEnumeratePropertiesFunction,
115  pub _jsc_reserved0: Option<unsafe extern "C" fn()>,
116  pub _jsc_reserved1: Option<unsafe extern "C" fn()>,
117  pub _jsc_reserved2: Option<unsafe extern "C" fn()>,
118  pub _jsc_reserved3: Option<unsafe extern "C" fn()>,
119}
120
121impl ::std::fmt::Debug for JSCClassVTable {
122  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
123    f.debug_struct(&format!("JSCClassVTable @ {self:p}"))
124      .field("get_property", &self.get_property)
125      .field("set_property", &self.set_property)
126      .field("has_property", &self.has_property)
127      .field("delete_property", &self.delete_property)
128      .field("enumerate_properties", &self.enumerate_properties)
129      .field("_jsc_reserved0", &self._jsc_reserved0)
130      .field("_jsc_reserved1", &self._jsc_reserved1)
131      .field("_jsc_reserved2", &self._jsc_reserved2)
132      .field("_jsc_reserved3", &self._jsc_reserved3)
133      .finish()
134  }
135}
136
137#[derive(Copy, Clone)]
138#[repr(C)]
139pub struct JSCContextClass {
140  pub parent_class: gobject::GObjectClass,
141  pub _jsc_reserved0: Option<unsafe extern "C" fn()>,
142  pub _jsc_reserved1: Option<unsafe extern "C" fn()>,
143  pub _jsc_reserved2: Option<unsafe extern "C" fn()>,
144  pub _jsc_reserved3: Option<unsafe extern "C" fn()>,
145}
146
147impl ::std::fmt::Debug for JSCContextClass {
148  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
149    f.debug_struct(&format!("JSCContextClass @ {self:p}"))
150      .field("parent_class", &self.parent_class)
151      .field("_jsc_reserved0", &self._jsc_reserved0)
152      .field("_jsc_reserved1", &self._jsc_reserved1)
153      .field("_jsc_reserved2", &self._jsc_reserved2)
154      .field("_jsc_reserved3", &self._jsc_reserved3)
155      .finish()
156  }
157}
158
159#[repr(C)]
160pub struct _JSCContextPrivate {
161  _data: [u8; 0],
162  _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
163}
164
165pub type JSCContextPrivate = *mut _JSCContextPrivate;
166
167#[derive(Copy, Clone)]
168#[repr(C)]
169pub struct JSCExceptionClass {
170  pub parent_class: gobject::GObjectClass,
171  pub _jsc_reserved0: Option<unsafe extern "C" fn()>,
172  pub _jsc_reserved1: Option<unsafe extern "C" fn()>,
173  pub _jsc_reserved2: Option<unsafe extern "C" fn()>,
174  pub _jsc_reserved3: Option<unsafe extern "C" fn()>,
175}
176
177impl ::std::fmt::Debug for JSCExceptionClass {
178  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
179    f.debug_struct(&format!("JSCExceptionClass @ {self:p}"))
180      .field("parent_class", &self.parent_class)
181      .field("_jsc_reserved0", &self._jsc_reserved0)
182      .field("_jsc_reserved1", &self._jsc_reserved1)
183      .field("_jsc_reserved2", &self._jsc_reserved2)
184      .field("_jsc_reserved3", &self._jsc_reserved3)
185      .finish()
186  }
187}
188
189#[repr(C)]
190pub struct _JSCExceptionPrivate {
191  _data: [u8; 0],
192  _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
193}
194
195pub type JSCExceptionPrivate = *mut _JSCExceptionPrivate;
196
197#[derive(Copy, Clone)]
198#[repr(C)]
199pub struct JSCValueClass {
200  pub parent_class: gobject::GObjectClass,
201  pub _jsc_reserved0: Option<unsafe extern "C" fn()>,
202  pub _jsc_reserved1: Option<unsafe extern "C" fn()>,
203  pub _jsc_reserved2: Option<unsafe extern "C" fn()>,
204  pub _jsc_reserved3: Option<unsafe extern "C" fn()>,
205}
206
207impl ::std::fmt::Debug for JSCValueClass {
208  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
209    f.debug_struct(&format!("JSCValueClass @ {self:p}"))
210      .field("parent_class", &self.parent_class)
211      .field("_jsc_reserved0", &self._jsc_reserved0)
212      .field("_jsc_reserved1", &self._jsc_reserved1)
213      .field("_jsc_reserved2", &self._jsc_reserved2)
214      .field("_jsc_reserved3", &self._jsc_reserved3)
215      .finish()
216  }
217}
218
219#[repr(C)]
220pub struct _JSCValuePrivate {
221  _data: [u8; 0],
222  _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
223}
224
225pub type JSCValuePrivate = *mut _JSCValuePrivate;
226
227#[derive(Copy, Clone)]
228#[repr(C)]
229pub struct JSCVirtualMachineClass {
230  pub parent_class: gobject::GObjectClass,
231  pub _jsc_reserved0: Option<unsafe extern "C" fn()>,
232  pub _jsc_reserved1: Option<unsafe extern "C" fn()>,
233  pub _jsc_reserved2: Option<unsafe extern "C" fn()>,
234  pub _jsc_reserved3: Option<unsafe extern "C" fn()>,
235}
236
237impl ::std::fmt::Debug for JSCVirtualMachineClass {
238  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
239    f.debug_struct(&format!("JSCVirtualMachineClass @ {self:p}"))
240      .field("parent_class", &self.parent_class)
241      .field("_jsc_reserved0", &self._jsc_reserved0)
242      .field("_jsc_reserved1", &self._jsc_reserved1)
243      .field("_jsc_reserved2", &self._jsc_reserved2)
244      .field("_jsc_reserved3", &self._jsc_reserved3)
245      .finish()
246  }
247}
248
249#[repr(C)]
250pub struct _JSCVirtualMachinePrivate {
251  _data: [u8; 0],
252  _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
253}
254
255pub type JSCVirtualMachinePrivate = *mut _JSCVirtualMachinePrivate;
256
257#[derive(Copy, Clone)]
258#[repr(C)]
259pub struct JSCWeakValueClass {
260  pub parent_class: gobject::GObjectClass,
261  pub _jsc_reserved0: Option<unsafe extern "C" fn()>,
262  pub _jsc_reserved1: Option<unsafe extern "C" fn()>,
263  pub _jsc_reserved2: Option<unsafe extern "C" fn()>,
264  pub _jsc_reserved3: Option<unsafe extern "C" fn()>,
265}
266
267impl ::std::fmt::Debug for JSCWeakValueClass {
268  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
269    f.debug_struct(&format!("JSCWeakValueClass @ {self:p}"))
270      .field("parent_class", &self.parent_class)
271      .field("_jsc_reserved0", &self._jsc_reserved0)
272      .field("_jsc_reserved1", &self._jsc_reserved1)
273      .field("_jsc_reserved2", &self._jsc_reserved2)
274      .field("_jsc_reserved3", &self._jsc_reserved3)
275      .finish()
276  }
277}
278
279#[repr(C)]
280pub struct _JSCWeakValuePrivate {
281  _data: [u8; 0],
282  _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
283}
284
285pub type JSCWeakValuePrivate = *mut _JSCWeakValuePrivate;
286
287// Classes
288#[repr(C)]
289pub struct JSCClass {
290  _data: [u8; 0],
291  _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
292}
293
294impl ::std::fmt::Debug for JSCClass {
295  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
296    f.debug_struct(&format!("JSCClass @ {self:p}")).finish()
297  }
298}
299
300#[derive(Copy, Clone)]
301#[repr(C)]
302pub struct JSCContext {
303  pub parent: gobject::GObject,
304  pub priv_: *mut JSCContextPrivate,
305}
306
307impl ::std::fmt::Debug for JSCContext {
308  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
309    f.debug_struct(&format!("JSCContext @ {self:p}"))
310      .field("parent", &self.parent)
311      .finish()
312  }
313}
314
315#[derive(Copy, Clone)]
316#[repr(C)]
317pub struct JSCException {
318  pub parent: gobject::GObject,
319  pub priv_: *mut JSCExceptionPrivate,
320}
321
322impl ::std::fmt::Debug for JSCException {
323  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
324    f.debug_struct(&format!("JSCException @ {self:p}"))
325      .field("parent", &self.parent)
326      .finish()
327  }
328}
329
330#[derive(Copy, Clone)]
331#[repr(C)]
332pub struct JSCValue {
333  pub parent: gobject::GObject,
334  pub priv_: *mut JSCValuePrivate,
335}
336
337impl ::std::fmt::Debug for JSCValue {
338  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
339    f.debug_struct(&format!("JSCValue @ {self:p}"))
340      .field("parent", &self.parent)
341      .finish()
342  }
343}
344
345#[derive(Copy, Clone)]
346#[repr(C)]
347pub struct JSCVirtualMachine {
348  pub parent: gobject::GObject,
349  pub priv_: *mut JSCVirtualMachinePrivate,
350}
351
352impl ::std::fmt::Debug for JSCVirtualMachine {
353  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
354    f.debug_struct(&format!("JSCVirtualMachine @ {self:p}"))
355      .field("parent", &self.parent)
356      .finish()
357  }
358}
359
360#[derive(Copy, Clone)]
361#[repr(C)]
362pub struct JSCWeakValue {
363  pub parent: gobject::GObject,
364  pub priv_: *mut JSCWeakValuePrivate,
365}
366
367impl ::std::fmt::Debug for JSCWeakValue {
368  fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
369    f.debug_struct(&format!("JSCWeakValue @ {self:p}"))
370      .field("parent", &self.parent)
371      .finish()
372  }
373}
374
375#[link(name = "javascriptcoregtk-4.1")]
376extern "C" {
377
378  //=========================================================================
379  // JSCClass
380  //=========================================================================
381  pub fn jsc_class_get_type() -> GType;
382  pub fn jsc_class_add_constructor(
383    jsc_class: *mut JSCClass,
384    name: *const c_char,
385    callback: gobject::GCallback,
386    user_data: gpointer,
387    destroy_notify: glib::GDestroyNotify,
388    return_type: GType,
389    n_params: c_uint,
390    ...
391  ) -> *mut JSCValue;
392  pub fn jsc_class_add_constructor_variadic(
393    jsc_class: *mut JSCClass,
394    name: *const c_char,
395    callback: gobject::GCallback,
396    user_data: gpointer,
397    destroy_notify: glib::GDestroyNotify,
398    return_type: GType,
399  ) -> *mut JSCValue;
400  pub fn jsc_class_add_constructorv(
401    jsc_class: *mut JSCClass,
402    name: *const c_char,
403    callback: gobject::GCallback,
404    user_data: gpointer,
405    destroy_notify: glib::GDestroyNotify,
406    return_type: GType,
407    n_parameters: c_uint,
408    parameter_types: *mut GType,
409  ) -> *mut JSCValue;
410  pub fn jsc_class_add_method(
411    jsc_class: *mut JSCClass,
412    name: *const c_char,
413    callback: gobject::GCallback,
414    user_data: gpointer,
415    destroy_notify: glib::GDestroyNotify,
416    return_type: GType,
417    n_params: c_uint,
418    ...
419  );
420  pub fn jsc_class_add_method_variadic(
421    jsc_class: *mut JSCClass,
422    name: *const c_char,
423    callback: gobject::GCallback,
424    user_data: gpointer,
425    destroy_notify: glib::GDestroyNotify,
426    return_type: GType,
427  );
428  pub fn jsc_class_add_methodv(
429    jsc_class: *mut JSCClass,
430    name: *const c_char,
431    callback: gobject::GCallback,
432    user_data: gpointer,
433    destroy_notify: glib::GDestroyNotify,
434    return_type: GType,
435    n_parameters: c_uint,
436    parameter_types: *mut GType,
437  );
438  pub fn jsc_class_add_property(
439    jsc_class: *mut JSCClass,
440    name: *const c_char,
441    property_type: GType,
442    getter: gobject::GCallback,
443    setter: gobject::GCallback,
444    user_data: gpointer,
445    destroy_notify: glib::GDestroyNotify,
446  );
447  pub fn jsc_class_get_name(jsc_class: *mut JSCClass) -> *const c_char;
448  pub fn jsc_class_get_parent(jsc_class: *mut JSCClass) -> *mut JSCClass;
449
450  //=========================================================================
451  // JSCContext
452  //=========================================================================
453  pub fn jsc_context_get_type() -> GType;
454  pub fn jsc_context_new() -> *mut JSCContext;
455  pub fn jsc_context_new_with_virtual_machine(vm: *mut JSCVirtualMachine) -> *mut JSCContext;
456  pub fn jsc_context_get_current() -> *mut JSCContext;
457  pub fn jsc_context_check_syntax(
458    context: *mut JSCContext,
459    code: *const c_char,
460    length: ssize_t,
461    mode: JSCCheckSyntaxMode,
462    uri: *const c_char,
463    line_number: c_uint,
464    exception: *mut *mut JSCException,
465  ) -> JSCCheckSyntaxResult;
466  pub fn jsc_context_clear_exception(context: *mut JSCContext);
467  pub fn jsc_context_evaluate(
468    context: *mut JSCContext,
469    code: *const c_char,
470    length: ssize_t,
471  ) -> *mut JSCValue;
472  pub fn jsc_context_evaluate_in_object(
473    context: *mut JSCContext,
474    code: *const c_char,
475    length: ssize_t,
476    object_instance: gpointer,
477    object_class: *mut JSCClass,
478    uri: *const c_char,
479    line_number: c_uint,
480    object: *mut *mut JSCValue,
481  ) -> *mut JSCValue;
482  pub fn jsc_context_evaluate_with_source_uri(
483    context: *mut JSCContext,
484    code: *const c_char,
485    length: ssize_t,
486    uri: *const c_char,
487    line_number: c_uint,
488  ) -> *mut JSCValue;
489  pub fn jsc_context_get_exception(context: *mut JSCContext) -> *mut JSCException;
490  pub fn jsc_context_get_global_object(context: *mut JSCContext) -> *mut JSCValue;
491  pub fn jsc_context_get_value(context: *mut JSCContext, name: *const c_char) -> *mut JSCValue;
492  pub fn jsc_context_get_virtual_machine(context: *mut JSCContext) -> *mut JSCVirtualMachine;
493  pub fn jsc_context_pop_exception_handler(context: *mut JSCContext);
494  pub fn jsc_context_push_exception_handler(
495    context: *mut JSCContext,
496    handler: JSCExceptionHandler,
497    user_data: gpointer,
498    destroy_notify: glib::GDestroyNotify,
499  );
500  pub fn jsc_context_register_class(
501    context: *mut JSCContext,
502    name: *const c_char,
503    parent_class: *mut JSCClass,
504    vtable: *mut JSCClassVTable,
505    destroy_notify: glib::GDestroyNotify,
506  ) -> *mut JSCClass;
507  pub fn jsc_context_set_value(context: *mut JSCContext, name: *const c_char, value: *mut JSCValue);
508  pub fn jsc_context_throw(context: *mut JSCContext, error_message: *const c_char);
509  pub fn jsc_context_throw_exception(context: *mut JSCContext, exception: *mut JSCException);
510  pub fn jsc_context_throw_printf(context: *mut JSCContext, format: *const c_char, ...);
511  pub fn jsc_context_throw_with_name(
512    context: *mut JSCContext,
513    error_name: *const c_char,
514    error_message: *const c_char,
515  );
516  pub fn jsc_context_throw_with_name_printf(
517    context: *mut JSCContext,
518    error_name: *const c_char,
519    format: *const c_char,
520    ...
521  );
522
523  //=========================================================================
524  // JSCException
525  //=========================================================================
526  pub fn jsc_exception_get_type() -> GType;
527  pub fn jsc_exception_new(context: *mut JSCContext, message: *const c_char) -> *mut JSCException;
528  pub fn jsc_exception_new_printf(
529    context: *mut JSCContext,
530    format: *const c_char,
531    ...
532  ) -> *mut JSCException;
533  //pub fn jsc_exception_new_vprintf(context: *mut JSCContext, format: *const c_char, args: /*Unimplemented*/va_list) -> *mut JSCException;
534  pub fn jsc_exception_new_with_name(
535    context: *mut JSCContext,
536    name: *const c_char,
537    message: *const c_char,
538  ) -> *mut JSCException;
539  pub fn jsc_exception_new_with_name_printf(
540    context: *mut JSCContext,
541    name: *const c_char,
542    format: *const c_char,
543    ...
544  ) -> *mut JSCException;
545  //pub fn jsc_exception_new_with_name_vprintf(context: *mut JSCContext, name: *const c_char, format: *const c_char, args: /*Unimplemented*/va_list) -> *mut JSCException;
546  pub fn jsc_exception_get_backtrace_string(exception: *mut JSCException) -> *const c_char;
547  pub fn jsc_exception_get_column_number(exception: *mut JSCException) -> c_uint;
548  pub fn jsc_exception_get_line_number(exception: *mut JSCException) -> c_uint;
549  pub fn jsc_exception_get_message(exception: *mut JSCException) -> *const c_char;
550  pub fn jsc_exception_get_name(exception: *mut JSCException) -> *const c_char;
551  pub fn jsc_exception_get_source_uri(exception: *mut JSCException) -> *const c_char;
552  pub fn jsc_exception_report(exception: *mut JSCException) -> *mut c_char;
553  pub fn jsc_exception_to_string(exception: *mut JSCException) -> *mut c_char;
554
555  //=========================================================================
556  // JSCValue
557  //=========================================================================
558  pub fn jsc_value_get_type() -> GType;
559  pub fn jsc_value_new_array(
560    context: *mut JSCContext,
561    first_item_type: GType,
562    ...
563  ) -> *mut JSCValue;
564  #[cfg(feature = "v2_38")]
565  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
566  pub fn jsc_value_new_array_buffer(
567    context: *mut JSCContext,
568    data: gpointer,
569    size: size_t,
570    destroy_notify: glib::GDestroyNotify,
571    user_data: gpointer,
572  ) -> *mut JSCValue;
573  pub fn jsc_value_new_array_from_garray(
574    context: *mut JSCContext,
575    array: *mut glib::GPtrArray,
576  ) -> *mut JSCValue;
577  pub fn jsc_value_new_array_from_strv(
578    context: *mut JSCContext,
579    strv: *const *const c_char,
580  ) -> *mut JSCValue;
581  pub fn jsc_value_new_boolean(context: *mut JSCContext, value: gboolean) -> *mut JSCValue;
582  #[cfg(feature = "v2_28")]
583  #[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
584  pub fn jsc_value_new_from_json(context: *mut JSCContext, json: *const c_char) -> *mut JSCValue;
585  pub fn jsc_value_new_function(
586    context: *mut JSCContext,
587    name: *const c_char,
588    callback: gobject::GCallback,
589    user_data: gpointer,
590    destroy_notify: glib::GDestroyNotify,
591    return_type: GType,
592    n_params: c_uint,
593    ...
594  ) -> *mut JSCValue;
595  pub fn jsc_value_new_function_variadic(
596    context: *mut JSCContext,
597    name: *const c_char,
598    callback: gobject::GCallback,
599    user_data: gpointer,
600    destroy_notify: glib::GDestroyNotify,
601    return_type: GType,
602  ) -> *mut JSCValue;
603  pub fn jsc_value_new_functionv(
604    context: *mut JSCContext,
605    name: *const c_char,
606    callback: gobject::GCallback,
607    user_data: gpointer,
608    destroy_notify: glib::GDestroyNotify,
609    return_type: GType,
610    n_parameters: c_uint,
611    parameter_types: *mut GType,
612  ) -> *mut JSCValue;
613  pub fn jsc_value_new_null(context: *mut JSCContext) -> *mut JSCValue;
614  pub fn jsc_value_new_number(context: *mut JSCContext, number: c_double) -> *mut JSCValue;
615  pub fn jsc_value_new_object(
616    context: *mut JSCContext,
617    instance: gpointer,
618    jsc_class: *mut JSCClass,
619  ) -> *mut JSCValue;
620  pub fn jsc_value_new_string(context: *mut JSCContext, string: *const c_char) -> *mut JSCValue;
621  pub fn jsc_value_new_string_from_bytes(
622    context: *mut JSCContext,
623    bytes: *mut glib::GBytes,
624  ) -> *mut JSCValue;
625  #[cfg(feature = "v2_38")]
626  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
627  pub fn jsc_value_new_typed_array(
628    context: *mut JSCContext,
629    type_: JSCTypedArrayType,
630    length: size_t,
631  ) -> *mut JSCValue;
632  pub fn jsc_value_new_undefined(context: *mut JSCContext) -> *mut JSCValue;
633  #[cfg(feature = "v2_38")]
634  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
635  pub fn jsc_value_array_buffer_get_data(value: *mut JSCValue, size: *mut size_t) -> gpointer;
636  #[cfg(feature = "v2_38")]
637  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
638  pub fn jsc_value_array_buffer_get_size(value: *mut JSCValue) -> size_t;
639  pub fn jsc_value_constructor_call(
640    value: *mut JSCValue,
641    first_parameter_type: GType,
642    ...
643  ) -> *mut JSCValue;
644  pub fn jsc_value_constructor_callv(
645    value: *mut JSCValue,
646    n_parameters: c_uint,
647    parameters: *mut *mut JSCValue,
648  ) -> *mut JSCValue;
649  pub fn jsc_value_function_call(
650    value: *mut JSCValue,
651    first_parameter_type: GType,
652    ...
653  ) -> *mut JSCValue;
654  pub fn jsc_value_function_callv(
655    value: *mut JSCValue,
656    n_parameters: c_uint,
657    parameters: *mut *mut JSCValue,
658  ) -> *mut JSCValue;
659  pub fn jsc_value_get_context(value: *mut JSCValue) -> *mut JSCContext;
660  pub fn jsc_value_is_array(value: *mut JSCValue) -> gboolean;
661  #[cfg(feature = "v2_38")]
662  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
663  pub fn jsc_value_is_array_buffer(value: *mut JSCValue) -> gboolean;
664  pub fn jsc_value_is_boolean(value: *mut JSCValue) -> gboolean;
665  pub fn jsc_value_is_constructor(value: *mut JSCValue) -> gboolean;
666  pub fn jsc_value_is_function(value: *mut JSCValue) -> gboolean;
667  pub fn jsc_value_is_null(value: *mut JSCValue) -> gboolean;
668  pub fn jsc_value_is_number(value: *mut JSCValue) -> gboolean;
669  pub fn jsc_value_is_object(value: *mut JSCValue) -> gboolean;
670  pub fn jsc_value_is_string(value: *mut JSCValue) -> gboolean;
671  #[cfg(feature = "v2_38")]
672  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
673  pub fn jsc_value_is_typed_array(value: *mut JSCValue) -> gboolean;
674  pub fn jsc_value_is_undefined(value: *mut JSCValue) -> gboolean;
675  #[cfg(feature = "v2_38")]
676  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
677  pub fn jsc_value_new_typed_array_with_buffer(
678    array_buffer: *mut JSCValue,
679    type_: JSCTypedArrayType,
680    offset: size_t,
681    length: ssize_t,
682  ) -> *mut JSCValue;
683  pub fn jsc_value_object_define_property_accessor(
684    value: *mut JSCValue,
685    property_name: *const c_char,
686    flags: JSCValuePropertyFlags,
687    property_type: GType,
688    getter: gobject::GCallback,
689    setter: gobject::GCallback,
690    user_data: gpointer,
691    destroy_notify: glib::GDestroyNotify,
692  );
693  pub fn jsc_value_object_define_property_data(
694    value: *mut JSCValue,
695    property_name: *const c_char,
696    flags: JSCValuePropertyFlags,
697    property_value: *mut JSCValue,
698  );
699  pub fn jsc_value_object_delete_property(value: *mut JSCValue, name: *const c_char) -> gboolean;
700  pub fn jsc_value_object_enumerate_properties(value: *mut JSCValue) -> *mut *mut c_char;
701  pub fn jsc_value_object_get_property(value: *mut JSCValue, name: *const c_char) -> *mut JSCValue;
702  pub fn jsc_value_object_get_property_at_index(
703    value: *mut JSCValue,
704    index: c_uint,
705  ) -> *mut JSCValue;
706  pub fn jsc_value_object_has_property(value: *mut JSCValue, name: *const c_char) -> gboolean;
707  pub fn jsc_value_object_invoke_method(
708    value: *mut JSCValue,
709    name: *const c_char,
710    first_parameter_type: GType,
711    ...
712  ) -> *mut JSCValue;
713  pub fn jsc_value_object_invoke_methodv(
714    value: *mut JSCValue,
715    name: *const c_char,
716    n_parameters: c_uint,
717    parameters: *mut *mut JSCValue,
718  ) -> *mut JSCValue;
719  pub fn jsc_value_object_is_instance_of(value: *mut JSCValue, name: *const c_char) -> gboolean;
720  pub fn jsc_value_object_set_property(
721    value: *mut JSCValue,
722    name: *const c_char,
723    property: *mut JSCValue,
724  );
725  pub fn jsc_value_object_set_property_at_index(
726    value: *mut JSCValue,
727    index: c_uint,
728    property: *mut JSCValue,
729  );
730  pub fn jsc_value_to_boolean(value: *mut JSCValue) -> gboolean;
731  pub fn jsc_value_to_double(value: *mut JSCValue) -> c_double;
732  pub fn jsc_value_to_int32(value: *mut JSCValue) -> i32;
733  #[cfg(feature = "v2_28")]
734  #[cfg_attr(docsrs, doc(cfg(feature = "v2_28")))]
735  pub fn jsc_value_to_json(value: *mut JSCValue, indent: c_uint) -> *mut c_char;
736  pub fn jsc_value_to_string(value: *mut JSCValue) -> *mut c_char;
737  pub fn jsc_value_to_string_as_bytes(value: *mut JSCValue) -> *mut glib::GBytes;
738  #[cfg(feature = "v2_38")]
739  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
740  pub fn jsc_value_typed_array_get_buffer(value: *mut JSCValue) -> *mut JSCValue;
741  #[cfg(feature = "v2_38")]
742  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
743  pub fn jsc_value_typed_array_get_data(value: *mut JSCValue, length: *mut size_t) -> gpointer;
744  #[cfg(feature = "v2_38")]
745  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
746  pub fn jsc_value_typed_array_get_length(value: *mut JSCValue) -> size_t;
747  #[cfg(feature = "v2_38")]
748  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
749  pub fn jsc_value_typed_array_get_offset(value: *mut JSCValue) -> size_t;
750  #[cfg(feature = "v2_38")]
751  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
752  pub fn jsc_value_typed_array_get_size(value: *mut JSCValue) -> size_t;
753  #[cfg(feature = "v2_38")]
754  #[cfg_attr(docsrs, doc(cfg(feature = "v2_38")))]
755  pub fn jsc_value_typed_array_get_type(value: *mut JSCValue) -> JSCTypedArrayType;
756
757  //=========================================================================
758  // JSCVirtualMachine
759  //=========================================================================
760  pub fn jsc_virtual_machine_get_type() -> GType;
761  pub fn jsc_virtual_machine_new() -> *mut JSCVirtualMachine;
762
763  //=========================================================================
764  // JSCWeakValue
765  //=========================================================================
766  pub fn jsc_weak_value_get_type() -> GType;
767  pub fn jsc_weak_value_new(value: *mut JSCValue) -> *mut JSCWeakValue;
768  pub fn jsc_weak_value_get_value(weak_value: *mut JSCWeakValue) -> *mut JSCValue;
769
770  //=========================================================================
771  // Other functions
772  //=========================================================================
773  pub fn jsc_get_major_version() -> c_uint;
774  pub fn jsc_get_micro_version() -> c_uint;
775  pub fn jsc_get_minor_version() -> c_uint;
776  pub fn jsc_options_foreach(function: JSCOptionsFunc, user_data: gpointer);
777  pub fn jsc_options_get_boolean(option: *const c_char, value: *mut gboolean) -> gboolean;
778  pub fn jsc_options_get_double(option: *const c_char, value: *mut c_double) -> gboolean;
779  pub fn jsc_options_get_int(option: *const c_char, value: *mut c_int) -> gboolean;
780  pub fn jsc_options_get_option_group() -> *mut glib::GOptionGroup;
781  pub fn jsc_options_get_range_string(option: *const c_char, value: *mut *mut c_char) -> gboolean;
782  pub fn jsc_options_get_size(option: *const c_char, value: *mut size_t) -> gboolean;
783  pub fn jsc_options_get_string(option: *const c_char, value: *mut *mut c_char) -> gboolean;
784  pub fn jsc_options_get_uint(option: *const c_char, value: *mut c_uint) -> gboolean;
785  pub fn jsc_options_set_boolean(option: *const c_char, value: gboolean) -> gboolean;
786  pub fn jsc_options_set_double(option: *const c_char, value: c_double) -> gboolean;
787  pub fn jsc_options_set_int(option: *const c_char, value: c_int) -> gboolean;
788  pub fn jsc_options_set_range_string(option: *const c_char, value: *const c_char) -> gboolean;
789  pub fn jsc_options_set_size(option: *const c_char, value: size_t) -> gboolean;
790  pub fn jsc_options_set_string(option: *const c_char, value: *const c_char) -> gboolean;
791  pub fn jsc_options_set_uint(option: *const c_char, value: c_uint) -> gboolean;
792
793}