mirror of
https://github.com/tauri-apps/gir-files.git
synced 2026-01-31 00:45:15 +01:00
3492 lines
178 KiB
XML
3492 lines
178 KiB
XML
<?xml version="1.0"?>
|
|
<!-- This file was automatically generated from C sources - DO NOT EDIT!
|
|
To affect the contents of this file, edit the original C definitions,
|
|
and/or use gtk-doc annotations. -->
|
|
<repository xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0" version="1.2">
|
|
<include name="GObject" version="2.0"/>
|
|
<package name="javascriptcoregtk-4.0"/>
|
|
<c:include name="jsc/jsc.h"/>
|
|
<namespace name="JavaScriptCore" version="4.0" shared-library="libjavascriptcoregtk-4.0.so.18" c:identifier-prefixes="JSC" c:symbol-prefixes="jsc">
|
|
<callback name="Constructor" c:type="JSCConstructor">
|
|
<return-value transfer-ownership="full">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="args" transfer-ownership="none">
|
|
<type name="GLib.PtrArray" c:type="GPtrArray*"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<callback name="ClassVariadicFunction" c:type="JSCClassVariadicFunction">
|
|
<return-value transfer-ownership="full">
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="instance" transfer-ownership="none">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="args" transfer-ownership="none">
|
|
<type name="GLib.PtrArray" c:type="GPtrArray*"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<callback name="PropertyGetter" c:type="JSCPropertyGetter">
|
|
<return-value transfer-ownership="full">
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="instance" transfer-ownership="none">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<callback name="PropertySetter" c:type="JSCPropertySetter">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="instance" transfer-ownership="none">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<callback name="VariadicFunction" c:type="JSCVariadicFunction">
|
|
<return-value transfer-ownership="full">
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="args" transfer-ownership="none">
|
|
<type name="GLib.PtrArray" c:type="GPtrArray*"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<callback name="Getter" c:type="JSCGetter">
|
|
<return-value transfer-ownership="full">
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<callback name="Setter" c:type="JSCSetter">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<record name="GlobalContextRef" c:type="JSGlobalContextRef" deprecated="1" deprecated-version="2.22" disguised="1" foreign="1">
|
|
<method name="ref" c:identifier="JSGlobalContextRetain">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="unref" c:identifier="JSGlobalContextRelease">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
</record>
|
|
<record name="ValueRef" c:type="JSValueRef" deprecated="1" deprecated-version="2.22" disguised="1">
|
|
<function name="ValueIsArray" c:identifier="JSValueIsArray" deprecated="1" deprecated-version="2.22">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueProtect" c:type="JSValueProtect">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueUnprotect" c:type="JSValueUnprotect">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueIsBoolean" c:identifier="JSValueIsBoolean" deprecated="1" deprecated-version="2.22">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueIsDate" c:identifier="JSValueIsDate" deprecated="1" deprecated-version="2.22">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueIsObject" c:identifier="JSValueIsObject" deprecated="1" deprecated-version="2.22">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueIsNull" c:identifier="JSValueIsNull" deprecated="1" deprecated-version="2.22">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueIsNumber" c:identifier="JSValueIsNumber" deprecated="1" deprecated-version="2.22">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueIsString" c:identifier="JSValueIsString" deprecated="1" deprecated-version="2.22">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueIsUndefined" c:identifier="JSValueIsUndefined" deprecated="1" deprecated-version="2.22">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueToBoolean" c:identifier="JSValueToBoolean" deprecated="1" deprecated-version="2.22">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueToNumber" c:identifier="JSValueToNumber" deprecated="1" deprecated-version="2.22">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gdouble" c:type="gdouble"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
<parameter name="exception" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
|
|
<doc xml:space="preserve">return location for a #JSCException, or %NULL to ignore</doc>
|
|
<type name="Exception" c:type="JSCException**"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="ValueToStringCopy" c:identifier="JSValueToStringCopy">
|
|
<return-value transfer-ownership="none">
|
|
<type name="StringRef" c:type="JSStringRef"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="ctx" transfer-ownership="none">
|
|
<type name="GlobalContextRef" c:type="JSGlobalContextRef"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<type name="ValueRef" c:type="JSValueRef"/>
|
|
</parameter>
|
|
<parameter name="exception" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
|
|
<type name="ValueRef" c:type="JSValueRef*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
</record>
|
|
<record name="StringRef" c:type="JSStringRef" deprecated="1" deprecated-version="2.22" disguised="1" foreign="1">
|
|
<method name="ref" c:identifier="JSStringRetain">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="string" transfer-ownership="none">
|
|
<type name="StringRef" c:type="JSStringRef"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="unref" c:identifier="JSStringRelease">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="string" transfer-ownership="none">
|
|
<type name="StringRef" c:type="JSStringRef"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="GetMaximumUTF8CStringSize" c:identifier="JSStringGetMaximumUTF8CStringSize">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gsize" c:type="gsize"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="string" transfer-ownership="none">
|
|
<type name="StringRef" c:type="JSStringRef"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="GetUTF8CStringJSStringGetUTF8CString" c:identifier="JSStringGetUTF8CString">
|
|
<return-value transfer-ownership="none">
|
|
<type name="gsize" c:type="gsize"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="string" transfer-ownership="none">
|
|
<type name="StringRef" c:type="JSStringRef"/>
|
|
</instance-parameter>
|
|
<parameter name="buffer" direction="inout" caller-allocates="1" transfer-ownership="none">
|
|
<type name="utf8" c:type="char**"/>
|
|
</parameter>
|
|
<parameter name="buffer_size" transfer-ownership="none">
|
|
<type name="gsize" c:type="gsize"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
</record>
|
|
<function-macro name="CHECK_VERSION" c:identifier="JSC_CHECK_VERSION" introspectable="0">
|
|
<parameters>
|
|
<parameter name="major">
|
|
<doc xml:space="preserve">major version (e.g. 1 for version 1.2.5)</doc>
|
|
</parameter>
|
|
<parameter name="minor">
|
|
<doc xml:space="preserve">minor version (e.g. 2 for version 1.2.5)</doc>
|
|
</parameter>
|
|
<parameter name="micro">
|
|
<doc xml:space="preserve">micro version (e.g. 5 for version 1.2.5)</doc>
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="CLASS" c:identifier="JSC_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="CONTEXT" c:identifier="JSC_CONTEXT" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="CONTEXT_CLASS" c:identifier="JSC_CONTEXT_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="klass">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="CONTEXT_GET_CLASS" c:identifier="JSC_CONTEXT_GET_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<enumeration name="CheckSyntaxMode" c:type="JSCCheckSyntaxMode">
|
|
<doc xml:space="preserve">Enum values to specify a mode to check for syntax errors in jsc_context_check_syntax().</doc>
|
|
<member name="script" value="0" c:identifier="JSC_CHECK_SYNTAX_MODE_SCRIPT">
|
|
<doc xml:space="preserve">mode to check syntax of a script</doc>
|
|
</member>
|
|
<member name="module" value="1" c:identifier="JSC_CHECK_SYNTAX_MODE_MODULE">
|
|
<doc xml:space="preserve">mode to check syntax of a module</doc>
|
|
</member>
|
|
</enumeration>
|
|
<enumeration name="CheckSyntaxResult" c:type="JSCCheckSyntaxResult">
|
|
<doc xml:space="preserve">Enum values to specify the result of jsc_context_check_syntax().</doc>
|
|
<member name="success" value="0" c:identifier="JSC_CHECK_SYNTAX_RESULT_SUCCESS">
|
|
<doc xml:space="preserve">no errors</doc>
|
|
</member>
|
|
<member name="recoverable_error" value="1" c:identifier="JSC_CHECK_SYNTAX_RESULT_RECOVERABLE_ERROR">
|
|
<doc xml:space="preserve">recoverable syntax error</doc>
|
|
</member>
|
|
<member name="irrecoverable_error" value="2" c:identifier="JSC_CHECK_SYNTAX_RESULT_IRRECOVERABLE_ERROR">
|
|
<doc xml:space="preserve">irrecoverable syntax error</doc>
|
|
</member>
|
|
<member name="unterminated_literal_error" value="3" c:identifier="JSC_CHECK_SYNTAX_RESULT_UNTERMINATED_LITERAL_ERROR">
|
|
<doc xml:space="preserve">unterminated literal error</doc>
|
|
</member>
|
|
<member name="out_of_memory_error" value="4" c:identifier="JSC_CHECK_SYNTAX_RESULT_OUT_OF_MEMORY_ERROR">
|
|
<doc xml:space="preserve">out of memory error</doc>
|
|
</member>
|
|
<member name="stack_overflow_error" value="5" c:identifier="JSC_CHECK_SYNTAX_RESULT_STACK_OVERFLOW_ERROR">
|
|
<doc xml:space="preserve">stack overflow error</doc>
|
|
</member>
|
|
</enumeration>
|
|
<class name="Class" c:symbol-prefix="class" c:type="JSCClass" parent="GObject.Object" glib:type-name="JSCClass" glib:get-type="jsc_class_get_type" glib:type-struct="ClassClass">
|
|
<method name="add_constructor" c:identifier="jsc_class_add_constructor" shadowed-by="add_constructorv" introspectable="0">
|
|
<doc xml:space="preserve">Add a constructor to @jsc_class. If @name is %NULL, the class name will be used. When <function>new</function>
|
|
is used with the constructor or jsc_value_constructor_call() is called, @callback is invoked receiving the
|
|
parameters and @user_data as the last parameter. When the constructor object is cleared in the #JSCClass context,
|
|
@destroy_notify is called with @user_data as parameter.
|
|
|
|
This function creates the constructor, which needs to be added to an object as a property to be able to use it. Use
|
|
jsc_context_set_value() to make the constructor available in the global object.
|
|
|
|
Note that the value returned by @callback is adopted by @jsc_class, and the #GDestroyNotify passed to
|
|
jsc_context_register_class() is responsible for disposing of it.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue representing the class constructor.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the constructor name or %NULL</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="callback" transfer-ownership="none" scope="notified" closure="2" destroy="3">
|
|
<doc xml:space="preserve">a #GCallback to be called to create an instance of @jsc_class</doc>
|
|
<type name="GObject.Callback" c:type="GCallback"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @callback</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
<parameter name="return_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the constructor return value</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="n_params" transfer-ownership="none">
|
|
<doc xml:space="preserve">the number of parameter types to follow or 0 if constructor doesn't receive parameters.</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">a list of #GType<!-- -->s, one for each parameter.</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="add_constructor_variadic" c:identifier="jsc_class_add_constructor_variadic">
|
|
<doc xml:space="preserve">Add a constructor to @jsc_class. If @name is %NULL, the class name will be used. When <function>new</function>
|
|
is used with the constructor or jsc_value_constructor_call() is called, @callback is invoked receiving
|
|
a #GPtrArray of #JSCValue<!-- -->s as arguments and @user_data as the last parameter. When the constructor object
|
|
is cleared in the #JSCClass context, @destroy_notify is called with @user_data as parameter.
|
|
|
|
This function creates the constructor, which needs to be added to an object as a property to be able to use it. Use
|
|
jsc_context_set_value() to make the constructor available in the global object.
|
|
|
|
Note that the value returned by @callback is adopted by @jsc_class, and the #GDestroyNotify passed to
|
|
jsc_context_register_class() is responsible for disposing of it.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue representing the class constructor.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the constructor name or %NULL</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="callback" transfer-ownership="none" scope="notified" closure="2" destroy="3">
|
|
<doc xml:space="preserve">a #GCallback to be called to create an instance of @jsc_class</doc>
|
|
<type name="Constructor" c:type="JSCConstructor"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @callback</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
<parameter name="return_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the constructor return value</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="add_constructorv" c:identifier="jsc_class_add_constructorv" shadows="add_constructor">
|
|
<doc xml:space="preserve">Add a constructor to @jsc_class. If @name is %NULL, the class name will be used. When <function>new</function>
|
|
is used with the constructor or jsc_value_constructor_call() is called, @callback is invoked receiving the
|
|
parameters and @user_data as the last parameter. When the constructor object is cleared in the #JSCClass context,
|
|
@destroy_notify is called with @user_data as parameter.
|
|
|
|
This function creates the constructor, which needs to be added to an object as a property to be able to use it. Use
|
|
jsc_context_set_value() to make the constructor available in the global object.
|
|
|
|
Note that the value returned by @callback is adopted by @jsc_class, and the #GDestroyNotify passed to
|
|
jsc_context_register_class() is responsible for disposing of it.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue representing the class constructor.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the constructor name or %NULL</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="callback" transfer-ownership="none" scope="notified" closure="2" destroy="3">
|
|
<doc xml:space="preserve">a #GCallback to be called to create an instance of @jsc_class</doc>
|
|
<type name="GObject.Callback" c:type="GCallback"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @callback</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
<parameter name="return_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the constructor return value</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="n_parameters" transfer-ownership="none">
|
|
<doc xml:space="preserve">the number of parameters</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="parameter_types" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">a list of #GType<!-- -->s, one for each parameter, or %NULL</doc>
|
|
<array length="5" zero-terminated="0" c:type="GType*">
|
|
<type name="GType"/>
|
|
</array>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="add_method" c:identifier="jsc_class_add_method" shadowed-by="add_methodv" introspectable="0">
|
|
<doc xml:space="preserve">Add method with @name to @jsc_class. When the method is called by JavaScript or jsc_value_object_invoke_method(),
|
|
@callback is called receiving the class instance as first parameter, followed by the method parameters and then
|
|
@user_data as last parameter. When the method is cleared in the #JSCClass context, @destroy_notify is called with
|
|
@user_data as parameter.
|
|
|
|
Note that the value returned by @callback must be transfer full. In case of non-refcounted boxed types, you should use
|
|
%G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
|
|
If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
|
|
with jsc_value_new_object() that receives the copy as the instance parameter.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the method name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="callback" transfer-ownership="none" scope="notified" closure="2" destroy="3">
|
|
<doc xml:space="preserve">a #GCallback to be called to invoke method @name of @jsc_class</doc>
|
|
<type name="GObject.Callback" c:type="GCallback"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @callback</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
<parameter name="return_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the method return value, or %G_TYPE_NONE if the method is void.</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="n_params" transfer-ownership="none">
|
|
<doc xml:space="preserve">the number of parameter types to follow or 0 if the method doesn't receive parameters.</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">a list of #GType<!-- -->s, one for each parameter.</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="add_method_variadic" c:identifier="jsc_class_add_method_variadic">
|
|
<doc xml:space="preserve">Add method with @name to @jsc_class. When the method is called by JavaScript or jsc_value_object_invoke_method(),
|
|
@callback is called receiving the class instance as first parameter, followed by a #GPtrArray of #JSCValue<!-- -->s
|
|
with the method arguments and then @user_data as last parameter. When the method is cleared in the #JSCClass context,
|
|
@destroy_notify is called with @user_data as parameter.
|
|
|
|
Note that the value returned by @callback must be transfer full. In case of non-refcounted boxed types, you should use
|
|
%G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
|
|
If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
|
|
with jsc_value_new_object() that receives the copy as the instance parameter.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the method name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="callback" transfer-ownership="none" scope="notified" closure="2" destroy="3">
|
|
<doc xml:space="preserve">a #GCallback to be called to invoke method @name of @jsc_class</doc>
|
|
<type name="ClassVariadicFunction" c:type="JSCClassVariadicFunction"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @callback</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
<parameter name="return_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the method return value, or %G_TYPE_NONE if the method is void.</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="add_methodv" c:identifier="jsc_class_add_methodv" shadows="add_method">
|
|
<doc xml:space="preserve">Add method with @name to @jsc_class. When the method is called by JavaScript or jsc_value_object_invoke_method(),
|
|
@callback is called receiving the class instance as first parameter, followed by the method parameters and then
|
|
@user_data as last parameter. When the method is cleared in the #JSCClass context, @destroy_notify is called with
|
|
@user_data as parameter.
|
|
|
|
Note that the value returned by @callback must be transfer full. In case of non-refcounted boxed types, you should use
|
|
%G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
|
|
If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
|
|
with jsc_value_new_object() that receives the copy as the instance parameter.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the method name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="callback" transfer-ownership="none" scope="notified" closure="2" destroy="3">
|
|
<doc xml:space="preserve">a #GCallback to be called to invoke method @name of @jsc_class</doc>
|
|
<type name="GObject.Callback" c:type="GCallback"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @callback</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
<parameter name="return_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the method return value, or %G_TYPE_NONE if the method is void.</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="n_parameters" transfer-ownership="none">
|
|
<doc xml:space="preserve">the number of parameter types to follow or 0 if the method doesn't receive parameters.</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="parameter_types" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">a list of #GType<!-- -->s, one for each parameter, or %NULL</doc>
|
|
<array length="5" zero-terminated="0" c:type="GType*">
|
|
<type name="GType"/>
|
|
</array>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="add_property" c:identifier="jsc_class_add_property">
|
|
<doc xml:space="preserve">Add a property with @name to @jsc_class. When the property value needs to be getted, @getter is called
|
|
receiving the the class instance as first parameter and @user_data as last parameter. When the property
|
|
value needs to be set, @setter is called receiving the the class instance as first parameter, followed
|
|
by the value to be set and then @user_data as the last parameter. When the property is cleared in the
|
|
#JSCClass context, @destroy_notify is called with @user_data as parameter.
|
|
|
|
Note that the value returned by @getter must be transfer full. In case of non-refcounted boxed types, you should use
|
|
%G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
|
|
If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
|
|
with jsc_value_new_object() that receives the copy as the instance parameter.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="property_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the property value</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="getter" transfer-ownership="none" nullable="1" allow-none="1" destroy="5" scope="notified" closure="4">
|
|
<doc xml:space="preserve">a #GCallback to be called to get the property value</doc>
|
|
<type name="PropertyGetter" c:type="JSCPropertyGetter"/>
|
|
</parameter>
|
|
<parameter name="setter" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="4" destroy="5">
|
|
<doc xml:space="preserve">a #GCallback to be called to set the property value</doc>
|
|
<type name="PropertySetter" c:type="JSCPropertySetter"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @getter and @setter</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_name" c:identifier="jsc_class_get_name">
|
|
<doc xml:space="preserve">Get the class name of @jsc_class</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the name of @jsc_class</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a @JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_parent" c:identifier="jsc_class_get_parent">
|
|
<doc xml:space="preserve">Get the parent class of @jsc_class</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the parent class of @jsc_class</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a @JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<property name="context" readable="0" writable="1" construct-only="1" transfer-ownership="none">
|
|
<doc xml:space="preserve">The #JSCContext in which the class was registered.</doc>
|
|
<type name="Context"/>
|
|
</property>
|
|
<property name="name" writable="1" construct-only="1" transfer-ownership="none">
|
|
<doc xml:space="preserve">The name of the class.</doc>
|
|
<type name="utf8" c:type="gchar*"/>
|
|
</property>
|
|
<property name="parent" writable="1" construct-only="1" transfer-ownership="none">
|
|
<doc xml:space="preserve">The parent class or %NULL in case of final classes.</doc>
|
|
<type name="Class"/>
|
|
</property>
|
|
</class>
|
|
<record name="ClassClass" c:type="JSCClassClass" disguised="1" glib:is-gtype-struct-for="Class"/>
|
|
<callback name="ClassDeletePropertyFunction" c:type="JSCClassDeletePropertyFunction">
|
|
<doc xml:space="preserve">The type of delete_property in #JSCClassVTable. This is only required when you need to handle
|
|
external properties not added to the prototype.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if handled or %FALSE to to forward the request to the parent class or prototype chain.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</parameter>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="instance" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the @jsc_class instance</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<callback name="ClassEnumeratePropertiesFunction" c:type="JSCClassEnumeratePropertiesFunction">
|
|
<doc xml:space="preserve">The type of enumerate_properties in #JSCClassVTable. This is only required when you need to handle
|
|
external properties not added to the prototype.</doc>
|
|
<return-value transfer-ownership="full" nullable="1">
|
|
<doc xml:space="preserve">a %NULL-terminated array of strings
|
|
containing the property names, or %NULL if @instance doesn't have enumerable properties.</doc>
|
|
<array c:type="gchar**">
|
|
<type name="utf8"/>
|
|
</array>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</parameter>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="instance" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the @jsc_class instance</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<callback name="ClassGetPropertyFunction" c:type="JSCClassGetPropertyFunction">
|
|
<doc xml:space="preserve">The type of get_property in #JSCClassVTable. This is only required when you need to handle
|
|
external properties not added to the prototype.</doc>
|
|
<return-value transfer-ownership="full" nullable="1">
|
|
<doc xml:space="preserve">a #JSCValue or %NULL to forward the request to
|
|
the parent class or prototype chain</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</parameter>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="instance" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the @jsc_class instance</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<callback name="ClassHasPropertyFunction" c:type="JSCClassHasPropertyFunction">
|
|
<doc xml:space="preserve">The type of has_property in #JSCClassVTable. This is only required when you need to handle
|
|
external properties not added to the prototype.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if @instance has a property with @name or %FALSE to forward the request
|
|
to the parent class or prototype chain.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</parameter>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="instance" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the @jsc_class instance</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<callback name="ClassSetPropertyFunction" c:type="JSCClassSetPropertyFunction">
|
|
<doc xml:space="preserve">The type of set_property in #JSCClassVTable. This is only required when you need to handle
|
|
external properties not added to the prototype.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if handled or %FALSE to forward the request to the parent class or prototype chain.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="jsc_class" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</parameter>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="instance" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the @jsc_class instance</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #JSCValue to set</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<record name="ClassVTable" c:type="JSCClassVTable">
|
|
<doc xml:space="preserve">Virtual table for a JSCClass. This can be optionally used when registering a #JSCClass in a #JSCContext
|
|
to provide a custom implementation for the class. All virtual functions are optional and can be set to
|
|
%NULL to fallback to the default implementation.</doc>
|
|
<field name="get_property" writable="1">
|
|
<doc xml:space="preserve">a #JSCClassGetPropertyFunction for getting a property.</doc>
|
|
<type name="ClassGetPropertyFunction" c:type="JSCClassGetPropertyFunction"/>
|
|
</field>
|
|
<field name="set_property" writable="1">
|
|
<doc xml:space="preserve">a #JSCClassSetPropertyFunction for setting a property.</doc>
|
|
<type name="ClassSetPropertyFunction" c:type="JSCClassSetPropertyFunction"/>
|
|
</field>
|
|
<field name="has_property" writable="1">
|
|
<doc xml:space="preserve">a #JSCClassHasPropertyFunction for querying a property.</doc>
|
|
<type name="ClassHasPropertyFunction" c:type="JSCClassHasPropertyFunction"/>
|
|
</field>
|
|
<field name="delete_property" writable="1">
|
|
<doc xml:space="preserve">a #JSCClassDeletePropertyFunction for deleting a property.</doc>
|
|
<type name="ClassDeletePropertyFunction" c:type="JSCClassDeletePropertyFunction"/>
|
|
</field>
|
|
<field name="enumerate_properties" writable="1">
|
|
<doc xml:space="preserve">a #JSCClassEnumeratePropertiesFunction for enumerating properties.</doc>
|
|
<type name="ClassEnumeratePropertiesFunction" c:type="JSCClassEnumeratePropertiesFunction"/>
|
|
</field>
|
|
<field name="_jsc_reserved0" introspectable="0">
|
|
<callback name="_jsc_reserved0">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved1" introspectable="0">
|
|
<callback name="_jsc_reserved1">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved2" introspectable="0">
|
|
<callback name="_jsc_reserved2">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved3" introspectable="0">
|
|
<callback name="_jsc_reserved3">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
</record>
|
|
<class name="Context" c:symbol-prefix="context" c:type="JSCContext" parent="GObject.Object" glib:type-name="JSCContext" glib:get-type="jsc_context_get_type" glib:type-struct="ContextClass">
|
|
<constructor name="new" c:identifier="jsc_context_new">
|
|
<doc xml:space="preserve">Create a new #JSCContext. The context is created in a new #JSCVirtualMachine.
|
|
Use jsc_context_new_with_virtual_machine() to create a new #JSCContext in an
|
|
existing #JSCVirtualMachine.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">the newly created #JSCContext.</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</return-value>
|
|
</constructor>
|
|
<constructor name="new_with_virtual_machine" c:identifier="jsc_context_new_with_virtual_machine">
|
|
<doc xml:space="preserve">Create a new #JSCContext in @virtual_machine.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">the newly created #JSCContext.</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="vm" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCVirtualMachine</doc>
|
|
<type name="VirtualMachine" c:type="JSCVirtualMachine*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<function name="get_current" c:identifier="jsc_context_get_current">
|
|
<doc xml:space="preserve">Get the #JSCContext that is currently executing a function. This should only be
|
|
called within a function or method callback, otherwise %NULL will be returned.</doc>
|
|
<return-value transfer-ownership="none" nullable="1">
|
|
<doc xml:space="preserve">the #JSCContext that is currently executing.</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</return-value>
|
|
</function>
|
|
<method name="check_syntax" c:identifier="jsc_context_check_syntax">
|
|
<doc xml:space="preserve">Check the given @code in @context for syntax errors. The @line_number is the starting line number in @uri;
|
|
the value is one-based so the first line is 1. @uri and @line_number are only used to fill the @exception.
|
|
In case of errors @exception will be set to a new #JSCException with the details. You can pass %NULL to
|
|
@exception to ignore the error details.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCCheckSyntaxResult</doc>
|
|
<type name="CheckSyntaxResult" c:type="JSCCheckSyntaxResult"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="code" transfer-ownership="none">
|
|
<doc xml:space="preserve">a JavaScript script to check</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="length" transfer-ownership="none">
|
|
<doc xml:space="preserve">length of @code, or -1 if @code is a nul-terminated string</doc>
|
|
<type name="gssize" c:type="gssize"/>
|
|
</parameter>
|
|
<parameter name="mode" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCCheckSyntaxMode</doc>
|
|
<type name="CheckSyntaxMode" c:type="JSCCheckSyntaxMode"/>
|
|
</parameter>
|
|
<parameter name="uri" transfer-ownership="none">
|
|
<doc xml:space="preserve">the source URI</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="line_number" transfer-ownership="none">
|
|
<doc xml:space="preserve">the starting line number</doc>
|
|
<type name="guint" c:type="unsigned"/>
|
|
</parameter>
|
|
<parameter name="exception" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
|
|
<doc xml:space="preserve">return location for a #JSCException, or %NULL to ignore</doc>
|
|
<type name="Exception" c:type="JSCException**"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="clear_exception" c:identifier="jsc_context_clear_exception">
|
|
<doc xml:space="preserve">Clear the uncaught exception in @context if any.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="evaluate" c:identifier="jsc_context_evaluate">
|
|
<doc xml:space="preserve">Evaluate @code in @context.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue representing the last value generated by the script.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="code" transfer-ownership="none">
|
|
<doc xml:space="preserve">a JavaScript script to evaluate</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="length" transfer-ownership="none">
|
|
<doc xml:space="preserve">length of @code, or -1 if @code is a nul-terminated string</doc>
|
|
<type name="gssize" c:type="gssize"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="evaluate_in_object" c:identifier="jsc_context_evaluate_in_object">
|
|
<doc xml:space="preserve">Evaluate @code and create an new object where symbols defined in @code will be added as properties,
|
|
instead of being added to @context global object. The new object is returned as @object parameter.
|
|
Similar to how jsc_value_new_object() works, if @object_instance is not %NULL @object_class must be provided too.
|
|
The @line_number is the starting line number in @uri; the value is one-based so the first line is 1.
|
|
@uri and @line_number will be shown in exceptions and they don't affect the behavior of the script.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue representing the last value generated by the script.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="code" transfer-ownership="none">
|
|
<doc xml:space="preserve">a JavaScript script to evaluate</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="length" transfer-ownership="none">
|
|
<doc xml:space="preserve">length of @code, or -1 if @code is a nul-terminated string</doc>
|
|
<type name="gssize" c:type="gssize"/>
|
|
</parameter>
|
|
<parameter name="object_instance" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">an object instance</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="object_class" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">a #JSCClass or %NULL to use the default</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</parameter>
|
|
<parameter name="uri" transfer-ownership="none">
|
|
<doc xml:space="preserve">the source URI</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="line_number" transfer-ownership="none">
|
|
<doc xml:space="preserve">the starting line number</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="object" direction="out" caller-allocates="0" transfer-ownership="full">
|
|
<doc xml:space="preserve">return location for a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue**"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="evaluate_with_source_uri" c:identifier="jsc_context_evaluate_with_source_uri">
|
|
<doc xml:space="preserve">Evaluate @code in @context using @uri as the source URI. The @line_number is the starting line number
|
|
in @uri; the value is one-based so the first line is 1. @uri and @line_number will be shown in exceptions and
|
|
they don't affect the behavior of the script.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue representing the last value generated by the script.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="code" transfer-ownership="none">
|
|
<doc xml:space="preserve">a JavaScript script to evaluate</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="length" transfer-ownership="none">
|
|
<doc xml:space="preserve">length of @code, or -1 if @code is a nul-terminated string</doc>
|
|
<type name="gssize" c:type="gssize"/>
|
|
</parameter>
|
|
<parameter name="uri" transfer-ownership="none">
|
|
<doc xml:space="preserve">the source URI</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="line_number" transfer-ownership="none">
|
|
<doc xml:space="preserve">the starting line number</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_exception" c:identifier="jsc_context_get_exception">
|
|
<doc xml:space="preserve">Get the last unhandled exception thrown in @context by API functions calls.</doc>
|
|
<return-value transfer-ownership="none" nullable="1">
|
|
<doc xml:space="preserve">a #JSCException or %NULL if there isn't any
|
|
unhandled exception in the #JSCContext.</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_global_object" c:identifier="jsc_context_get_global_object">
|
|
<doc xml:space="preserve">Get a #JSCValue referencing the @context global object</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_value" c:identifier="jsc_context_get_value">
|
|
<doc xml:space="preserve">Get a property of @context global object with @name.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the value name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_virtual_machine" c:identifier="jsc_context_get_virtual_machine">
|
|
<doc xml:space="preserve">Get the #JSCVirtualMachine where @context was created.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the #JSCVirtualMachine where the #JSCContext was created.</doc>
|
|
<type name="VirtualMachine" c:type="JSCVirtualMachine*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="pop_exception_handler" c:identifier="jsc_context_pop_exception_handler">
|
|
<doc xml:space="preserve">Remove the last #JSCExceptionHandler previously pushed to @context with
|
|
jsc_context_push_exception_handler().</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="push_exception_handler" c:identifier="jsc_context_push_exception_handler">
|
|
<doc xml:space="preserve">Push an exception handler in @context. Whenever a JavaScript exception happens in
|
|
the #JSCContext, the given @handler will be called. The default #JSCExceptionHandler
|
|
simply calls jsc_context_throw_exception() to throw the exception to the #JSCContext.
|
|
If you don't want to catch the exception, but only get notified about it, call
|
|
jsc_context_throw_exception() in @handler like the default one does.
|
|
The last exception handler pushed is the only one used by the #JSCContext, use
|
|
jsc_context_pop_exception_handler() to remove it and set the previous one. When @handler
|
|
is removed from the context, @destroy_notify i called with @user_data as parameter.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="handler" transfer-ownership="none" scope="notified" closure="1" destroy="2">
|
|
<doc xml:space="preserve">a #JSCExceptionHandler</doc>
|
|
<type name="ExceptionHandler" c:type="JSCExceptionHandler"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @handler</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="register_class" c:identifier="jsc_context_register_class">
|
|
<doc xml:space="preserve">Register a custom class in @context using the given @name. If the new class inherits from
|
|
another #JSCClass, the parent should be passed as @parent_class, otherwise %NULL should be
|
|
used. The optional @vtable parameter allows to provide a custom implementation for handling
|
|
the class, for example, to handle external properties not added to the prototype.
|
|
When an instance of the #JSCClass is cleared in the context, @destroy_notify is called with
|
|
the instance as parameter.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCClass</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the class name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="parent_class" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">a #JSCClass or %NULL</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</parameter>
|
|
<parameter name="vtable" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">an optional #JSCClassVTable or %NULL</doc>
|
|
<type name="ClassVTable" c:type="JSCClassVTable*"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">a destroy notifier for class instances</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="set_value" c:identifier="jsc_context_set_value">
|
|
<doc xml:space="preserve">Set a property of @context global object with @name and @value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the value name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="throw" c:identifier="jsc_context_throw">
|
|
<doc xml:space="preserve">Throw an exception to @context using the given error message. The created #JSCException
|
|
can be retrieved with jsc_context_get_exception().</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="error_message" transfer-ownership="none">
|
|
<doc xml:space="preserve">an error message</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="throw_exception" c:identifier="jsc_context_throw_exception">
|
|
<doc xml:space="preserve">Throw @exception to @context.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="exception" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCException</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="throw_printf" c:identifier="jsc_context_throw_printf" introspectable="0">
|
|
<doc xml:space="preserve">Throw an exception to @context using the given formatted string as error message.
|
|
The created #JSCException can be retrieved with jsc_context_get_exception().</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="format" transfer-ownership="none">
|
|
<doc xml:space="preserve">the string format</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">the parameters to insert into the format string</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="throw_with_name" c:identifier="jsc_context_throw_with_name">
|
|
<doc xml:space="preserve">Throw an exception to @context using the given error name and message. The created #JSCException
|
|
can be retrieved with jsc_context_get_exception().</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="error_name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the error name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="error_message" transfer-ownership="none">
|
|
<doc xml:space="preserve">an error message</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="throw_with_name_printf" c:identifier="jsc_context_throw_with_name_printf" introspectable="0">
|
|
<doc xml:space="preserve">Throw an exception to @context using the given error name and the formatted string as error message.
|
|
The created #JSCException can be retrieved with jsc_context_get_exception().</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</instance-parameter>
|
|
<parameter name="error_name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the error name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="format" transfer-ownership="none">
|
|
<doc xml:space="preserve">the string format</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">the parameters to insert into the format string</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<property name="virtual-machine" writable="1" construct-only="1" transfer-ownership="none">
|
|
<doc xml:space="preserve">The #JSCVirtualMachine in which the context was created.</doc>
|
|
<type name="VirtualMachine"/>
|
|
</property>
|
|
<field name="parent">
|
|
<type name="GObject.Object" c:type="GObject"/>
|
|
</field>
|
|
<field name="priv" readable="0" private="1">
|
|
<type name="ContextPrivate" c:type="JSCContextPrivate*"/>
|
|
</field>
|
|
</class>
|
|
<record name="ContextClass" c:type="JSCContextClass" glib:is-gtype-struct-for="Context">
|
|
<field name="parent_class">
|
|
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
|
|
</field>
|
|
<field name="_jsc_reserved0" introspectable="0">
|
|
<callback name="_jsc_reserved0">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved1" introspectable="0">
|
|
<callback name="_jsc_reserved1">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved2" introspectable="0">
|
|
<callback name="_jsc_reserved2">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved3" introspectable="0">
|
|
<callback name="_jsc_reserved3">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
</record>
|
|
<record name="ContextPrivate" c:type="JSCContextPrivate" disguised="1"/>
|
|
<function-macro name="DEPRECATED_FOR" c:identifier="JSC_DEPRECATED_FOR" introspectable="0">
|
|
<parameters>
|
|
<parameter name="f">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="EXCEPTION" c:identifier="JSC_EXCEPTION" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="EXCEPTION_CLASS" c:identifier="JSC_EXCEPTION_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="klass">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="EXCEPTION_GET_CLASS" c:identifier="JSC_EXCEPTION_GET_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<class name="Exception" c:symbol-prefix="exception" c:type="JSCException" parent="GObject.Object" glib:type-name="JSCException" glib:get-type="jsc_exception_get_type" glib:type-struct="ExceptionClass">
|
|
<constructor name="new" c:identifier="jsc_exception_new">
|
|
<doc xml:space="preserve">Create a new #JSCException in @context with @message.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a new #JSCException.</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="message" transfer-ownership="none">
|
|
<doc xml:space="preserve">the error message</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_printf" c:identifier="jsc_exception_new_printf" introspectable="0">
|
|
<doc xml:space="preserve">Create a new #JSCException in @context using a formatted string
|
|
for the message.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a new #JSCException.</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="format" transfer-ownership="none">
|
|
<doc xml:space="preserve">the string format</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">the parameters to insert into the format string</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_vprintf" c:identifier="jsc_exception_new_vprintf" introspectable="0">
|
|
<doc xml:space="preserve">Create a new #JSCException in @context using a formatted string
|
|
for the message. This is similar to jsc_exception_new_printf()
|
|
except that the arguments to the format string are passed as a va_list.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a new #JSCException.</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="format" transfer-ownership="none">
|
|
<doc xml:space="preserve">the string format</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="args" transfer-ownership="none">
|
|
<doc xml:space="preserve">the parameters to insert into the format string</doc>
|
|
<type name="va_list" c:type="va_list"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_with_name" c:identifier="jsc_exception_new_with_name">
|
|
<doc xml:space="preserve">Create a new #JSCException in @context with @name and @message.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a new #JSCException.</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the error name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="message" transfer-ownership="none">
|
|
<doc xml:space="preserve">the error message</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_with_name_printf" c:identifier="jsc_exception_new_with_name_printf" introspectable="0">
|
|
<doc xml:space="preserve">Create a new #JSCException in @context with @name and using a formatted string
|
|
for the message.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a new #JSCException.</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the error name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="format" transfer-ownership="none">
|
|
<doc xml:space="preserve">the string format</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">the parameters to insert into the format string</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_with_name_vprintf" c:identifier="jsc_exception_new_with_name_vprintf" introspectable="0">
|
|
<doc xml:space="preserve">Create a new #JSCException in @context with @name and using a formatted string
|
|
for the message. This is similar to jsc_exception_new_with_name_printf()
|
|
except that the arguments to the format string are passed as a va_list.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a new #JSCException.</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the error name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="format" transfer-ownership="none">
|
|
<doc xml:space="preserve">the string format</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="args" transfer-ownership="none">
|
|
<doc xml:space="preserve">the parameters to insert into the format string</doc>
|
|
<type name="va_list" c:type="va_list"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<method name="get_backtrace_string" c:identifier="jsc_exception_get_backtrace_string">
|
|
<doc xml:space="preserve">Get a string with the exception backtrace.</doc>
|
|
<return-value transfer-ownership="none" nullable="1">
|
|
<doc xml:space="preserve">the exception backtrace string or %NULL.</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="exception" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCException</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_column_number" c:identifier="jsc_exception_get_column_number">
|
|
<doc xml:space="preserve">Get the column number at which @exception happened.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the column number of @exception.</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="exception" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCException</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_line_number" c:identifier="jsc_exception_get_line_number">
|
|
<doc xml:space="preserve">Get the line number at which @exception happened.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the line number of @exception.</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="exception" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCException</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_message" c:identifier="jsc_exception_get_message">
|
|
<doc xml:space="preserve">Get the error message of @exception.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the @exception error message.</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="exception" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCException</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_name" c:identifier="jsc_exception_get_name">
|
|
<doc xml:space="preserve">Get the error name of @exception</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the @exception error name.</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="exception" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCException</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_source_uri" c:identifier="jsc_exception_get_source_uri">
|
|
<doc xml:space="preserve">Get the source URI of @exception.</doc>
|
|
<return-value transfer-ownership="none" nullable="1">
|
|
<doc xml:space="preserve">the the source URI of @exception, or %NULL.</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="exception" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCException</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="report" c:identifier="jsc_exception_report">
|
|
<doc xml:space="preserve">Return a report message of @exception, containing all the possible details such us
|
|
source URI, line, column and backtrace, and formatted to be printed.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a new string with the exception report</doc>
|
|
<type name="utf8" c:type="char*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="exception" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCException</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="to_string" c:identifier="jsc_exception_to_string">
|
|
<doc xml:space="preserve">Get the string representation of @exception error.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">the string representation of @exception.</doc>
|
|
<type name="utf8" c:type="char*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="exception" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCException</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<field name="parent">
|
|
<type name="GObject.Object" c:type="GObject"/>
|
|
</field>
|
|
<field name="priv" readable="0" private="1">
|
|
<type name="ExceptionPrivate" c:type="JSCExceptionPrivate*"/>
|
|
</field>
|
|
</class>
|
|
<record name="ExceptionClass" c:type="JSCExceptionClass" glib:is-gtype-struct-for="Exception">
|
|
<field name="parent_class">
|
|
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
|
|
</field>
|
|
<field name="_jsc_reserved0" introspectable="0">
|
|
<callback name="_jsc_reserved0">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved1" introspectable="0">
|
|
<callback name="_jsc_reserved1">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved2" introspectable="0">
|
|
<callback name="_jsc_reserved2">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved3" introspectable="0">
|
|
<callback name="_jsc_reserved3">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
</record>
|
|
<callback name="ExceptionHandler" c:type="JSCExceptionHandler">
|
|
<doc xml:space="preserve">Function used to handle JavaScript exceptions in a #JSCContext.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="exception" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCException</doc>
|
|
<type name="Exception" c:type="JSCException*"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
|
|
<doc xml:space="preserve">user data</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<record name="ExceptionPrivate" c:type="JSCExceptionPrivate" disguised="1"/>
|
|
<function-macro name="IS_CLASS" c:identifier="JSC_IS_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="IS_CONTEXT" c:identifier="JSC_IS_CONTEXT" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="IS_CONTEXT_CLASS" c:identifier="JSC_IS_CONTEXT_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="klass">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="IS_EXCEPTION" c:identifier="JSC_IS_EXCEPTION" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="IS_EXCEPTION_CLASS" c:identifier="JSC_IS_EXCEPTION_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="klass">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="IS_VALUE" c:identifier="JSC_IS_VALUE" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="IS_VALUE_CLASS" c:identifier="JSC_IS_VALUE_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="klass">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="IS_VIRTUAL_MACHINE" c:identifier="JSC_IS_VIRTUAL_MACHINE" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="IS_VIRTUAL_MACHINE_CLASS" c:identifier="JSC_IS_VIRTUAL_MACHINE_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="klass">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="IS_WEAK_VALUE" c:identifier="JSC_IS_WEAK_VALUE" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="IS_WEAK_VALUE_CLASS" c:identifier="JSC_IS_WEAK_VALUE_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="klass">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<docsection name="JSCClass">
|
|
<doc xml:space="preserve">A JSSClass represents a custom JavaScript class registered by the user in a #JSCContext.
|
|
It allows to create new JavaScripts objects whose instances are created by the user using
|
|
this API.
|
|
It's possible to add constructors, properties and methods for a JSSClass by providing
|
|
#GCallback<!-- -->s to implement them.</doc>
|
|
</docsection>
|
|
<docsection name="JSCContext">
|
|
<doc xml:space="preserve">JSCContext represents a JavaScript execution context, where all operations
|
|
take place and where the values will be associated.
|
|
|
|
When a new context is created, a global object is allocated and the built-in JavaScript
|
|
objects (Object, Function, String, Array) are populated. You can execute JavaScript in
|
|
the context by using jsc_context_evaluate() or jsc_context_evaluate_with_source_uri().
|
|
It's also possible to register custom objects in the context with jsc_context_register_class().</doc>
|
|
</docsection>
|
|
<docsection name="JSCException">
|
|
<doc xml:space="preserve">JSCException represents a JavaScript exception.</doc>
|
|
</docsection>
|
|
<docsection name="JSCOptions">
|
|
<doc xml:space="preserve">JavaScript options allow changing the behavior of the JavaScript engine.
|
|
They affect the way the engine works, so the options must be set
|
|
at the very beginning of the program execution, before any other JavaScript
|
|
API call. Most of the options are only useful for testing and debugging.
|
|
Only a few of them are documented; you can use the undocumented options at
|
|
your own risk. (You can find the list of options in the WebKit source code).
|
|
|
|
The API allows to set and get any option using the types defined in #JSCOptionType.
|
|
You can also iterate all the available options using jsc_options_foreach() and
|
|
passing a #JSCOptionsFunc callback. If your application uses #GOptionContext to handle
|
|
command line arguments, you can easily integrate the JSCOptions by adding the
|
|
#GOptionGroup returned by jsc_options_get_option_group().</doc>
|
|
</docsection>
|
|
<docsection name="JSCValue">
|
|
<doc xml:space="preserve">JSCValue represents a reference to a value in a #JSCContext. The JSCValue
|
|
protects the referenced value from being garbage collected.</doc>
|
|
</docsection>
|
|
<docsection name="JSCVersion">
|
|
<doc xml:space="preserve">Provides convenience functions returning JavaScriptCore's major, minor and
|
|
micro versions of the JavaScriptCore library your code is running
|
|
against. This is not necessarily the same as the
|
|
#JSC_MAJOR_VERSION, #JSC_MINOR_VERSION or
|
|
#JSC_MICRO_VERSION, which represent the version of the JavaScriptCore
|
|
headers included when compiling the code.</doc>
|
|
</docsection>
|
|
<docsection name="JSCVirtualMachine">
|
|
<doc xml:space="preserve">JSCVirtualMachine represents a group of JSCContext<!-- -->s. It allows
|
|
concurrent JavaScript execution by creating a different instance of
|
|
JSCVirtualMachine in each thread.
|
|
|
|
To create a group of JSCContext<!-- -->s pass the same JSCVirtualMachine
|
|
instance to every JSCContext constructor.</doc>
|
|
</docsection>
|
|
<docsection name="JSCWeakValue">
|
|
<doc xml:space="preserve">JSCWeakValue represents a weak reference to a value in a #JSCContext. It can be used
|
|
to keep a reference to a JavaScript value without protecting it from being garbage
|
|
collected and without referencing the #JSCContext either.</doc>
|
|
</docsection>
|
|
<constant name="MAJOR_VERSION" value="2" c:type="JSC_MAJOR_VERSION">
|
|
<doc xml:space="preserve">Like jsc_get_major_version(), but from the headers used at
|
|
application compile time, rather than from the library linked
|
|
against at application run time.</doc>
|
|
<type name="gint" c:type="gint"/>
|
|
</constant>
|
|
<constant name="MICRO_VERSION" value="3" c:type="JSC_MICRO_VERSION">
|
|
<doc xml:space="preserve">Like jsc_get_micro_version(), but from the headers used at
|
|
application compile time, rather than from the library linked
|
|
against at application run time.</doc>
|
|
<type name="gint" c:type="gint"/>
|
|
</constant>
|
|
<constant name="MINOR_VERSION" value="30" c:type="JSC_MINOR_VERSION">
|
|
<doc xml:space="preserve">Like jsc_get_minor_version(), but from the headers used at
|
|
application compile time, rather than from the library linked
|
|
against at application run time.</doc>
|
|
<type name="gint" c:type="gint"/>
|
|
</constant>
|
|
<constant name="OPTIONS_USE_DFG" value="useDFGJIT" c:type="JSC_OPTIONS_USE_DFG" version="2.24">
|
|
<doc xml:space="preserve">Allows the DFG JIT to be used if %TRUE.
|
|
Option type: %JSC_OPTION_BOOLEAN
|
|
Default value: %TRUE.</doc>
|
|
<type name="utf8" c:type="gchar*"/>
|
|
</constant>
|
|
<constant name="OPTIONS_USE_FTL" value="useFTLJIT" c:type="JSC_OPTIONS_USE_FTL" version="2.24">
|
|
<doc xml:space="preserve">Allows the FTL JIT to be used if %TRUE.
|
|
Option type: %JSC_OPTION_BOOLEAN
|
|
Default value: %TRUE.</doc>
|
|
<type name="utf8" c:type="gchar*"/>
|
|
</constant>
|
|
<constant name="OPTIONS_USE_JIT" value="useJIT" c:type="JSC_OPTIONS_USE_JIT" version="2.24">
|
|
<doc xml:space="preserve">Allows the executable pages to be allocated for JIT and thunks if %TRUE.
|
|
Option type: %JSC_OPTION_BOOLEAN
|
|
Default value: %TRUE.</doc>
|
|
<type name="utf8" c:type="gchar*"/>
|
|
</constant>
|
|
<constant name="OPTIONS_USE_LLINT" value="useLLInt" c:type="JSC_OPTIONS_USE_LLINT" version="2.24">
|
|
<doc xml:space="preserve">Allows the LLINT to be used if %TRUE.
|
|
Option type: %JSC_OPTION_BOOLEAN
|
|
Default value: %TRUE.</doc>
|
|
<type name="utf8" c:type="gchar*"/>
|
|
</constant>
|
|
<enumeration name="OptionType" version="2.24" c:type="JSCOptionType">
|
|
<doc xml:space="preserve">Enum values for options types.</doc>
|
|
<member name="boolean" value="0" c:identifier="JSC_OPTION_BOOLEAN">
|
|
<doc xml:space="preserve">A #gboolean option type.</doc>
|
|
</member>
|
|
<member name="int" value="1" c:identifier="JSC_OPTION_INT">
|
|
<doc xml:space="preserve">A #gint option type.</doc>
|
|
</member>
|
|
<member name="uint" value="2" c:identifier="JSC_OPTION_UINT">
|
|
<doc xml:space="preserve">A #guint option type.</doc>
|
|
</member>
|
|
<member name="size" value="3" c:identifier="JSC_OPTION_SIZE">
|
|
<doc xml:space="preserve">A #gsize options type.</doc>
|
|
</member>
|
|
<member name="double" value="4" c:identifier="JSC_OPTION_DOUBLE">
|
|
<doc xml:space="preserve">A #gdouble options type.</doc>
|
|
</member>
|
|
<member name="string" value="5" c:identifier="JSC_OPTION_STRING">
|
|
<doc xml:space="preserve">A string option type.</doc>
|
|
</member>
|
|
<member name="range_string" value="6" c:identifier="JSC_OPTION_RANGE_STRING">
|
|
<doc xml:space="preserve">A range string option type.</doc>
|
|
</member>
|
|
</enumeration>
|
|
<callback name="OptionsFunc" c:type="JSCOptionsFunc" version="2.24">
|
|
<doc xml:space="preserve">Function used to iterate options.
|
|
|
|
Not that @description string is not localized.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE to stop the iteration, or %FALSE otherwise</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option #JSCOptionType</doc>
|
|
<type name="OptionType" c:type="JSCOptionType"/>
|
|
</parameter>
|
|
<parameter name="description" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the option description, or %NULL</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="3">
|
|
<doc xml:space="preserve">user data</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</callback>
|
|
<function-macro name="VALUE" c:identifier="JSC_VALUE" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="VALUE_CLASS" c:identifier="JSC_VALUE_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="klass">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="VALUE_GET_CLASS" c:identifier="JSC_VALUE_GET_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="VIRTUAL_MACHINE" c:identifier="JSC_VIRTUAL_MACHINE" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="VIRTUAL_MACHINE_CLASS" c:identifier="JSC_VIRTUAL_MACHINE_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="klass">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="VIRTUAL_MACHINE_GET_CLASS" c:identifier="JSC_VIRTUAL_MACHINE_GET_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<class name="Value" c:symbol-prefix="value" c:type="JSCValue" parent="GObject.Object" glib:type-name="JSCValue" glib:get-type="jsc_value_get_type" glib:type-struct="ValueClass">
|
|
<constructor name="new_array" c:identifier="jsc_value_new_array" introspectable="0">
|
|
<doc xml:space="preserve">Create a new #JSCValue referencing an array with the given items. If @first_item_type
|
|
is %G_TYPE_NONE an empty array is created.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="first_item_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">#GType of first item, or %G_TYPE_NONE</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">value of the first item, followed optionally by more type/value pairs, followed by %G_TYPE_NONE.</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_array_from_garray" c:identifier="jsc_value_new_array_from_garray">
|
|
<doc xml:space="preserve">Create a new #JSCValue referencing an array with the items from @array. If @array
|
|
is %NULL or empty a new empty array will be created. Elements of @array should be
|
|
pointers to a #JSCValue.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="array" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">a #GPtrArray</doc>
|
|
<array name="GLib.PtrArray" c:type="GPtrArray*">
|
|
<type name="Value"/>
|
|
</array>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_array_from_strv" c:identifier="jsc_value_new_array_from_strv">
|
|
<doc xml:space="preserve">Create a new #JSCValue referencing an array of strings with the items from @strv. If @array
|
|
is %NULL or empty a new empty array will be created.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="strv" transfer-ownership="none">
|
|
<doc xml:space="preserve">a %NULL-terminated array of strings</doc>
|
|
<array c:type="const char* const*">
|
|
<type name="utf8"/>
|
|
</array>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_boolean" c:identifier="jsc_value_new_boolean">
|
|
<doc xml:space="preserve">Create a new #JSCValue from @value</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #gboolean</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_from_json" c:identifier="jsc_value_new_from_json" version="2.28">
|
|
<doc xml:space="preserve">Create a new #JSCValue referencing a new value created by parsing @json.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="json" transfer-ownership="none">
|
|
<doc xml:space="preserve">the JSON string to be parsed</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_function" c:identifier="jsc_value_new_function" shadowed-by="new_functionv" introspectable="0">
|
|
<doc xml:space="preserve">Create a function in @context. If @name is %NULL an anonymous function will be created.
|
|
When the function is called by JavaScript or jsc_value_function_call(), @callback is called
|
|
receiving the function parameters and then @user_data as last parameter. When the function is
|
|
cleared in @context, @destroy_notify is called with @user_data as parameter.
|
|
|
|
Note that the value returned by @callback must be fully transferred. In case of boxed types, you could use
|
|
%G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
|
|
If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
|
|
with jsc_value_new_object() that receives the copy as instance parameter.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext:</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the function name or %NULL</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="callback" transfer-ownership="none" scope="notified" closure="3" destroy="4">
|
|
<doc xml:space="preserve">a #GCallback.</doc>
|
|
<type name="GObject.Callback" c:type="GCallback"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @callback.</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
<parameter name="return_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the function return value, or %G_TYPE_NONE if the function is void.</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="n_params" transfer-ownership="none">
|
|
<doc xml:space="preserve">the number of parameter types to follow or 0 if the function doesn't receive parameters.</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">a list of #GType<!-- -->s, one for each parameter.</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_function_variadic" c:identifier="jsc_value_new_function_variadic">
|
|
<doc xml:space="preserve">Create a function in @context. If @name is %NULL an anonymous function will be created.
|
|
When the function is called by JavaScript or jsc_value_function_call(), @callback is called
|
|
receiving an #GPtrArray of #JSCValue<!-- -->s with the arguments and then @user_data as last parameter.
|
|
When the function is cleared in @context, @destroy_notify is called with @user_data as parameter.
|
|
|
|
Note that the value returned by @callback must be fully transferred. In case of boxed types, you could use
|
|
%G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
|
|
If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
|
|
with jsc_value_new_object() that receives the copy as instance parameter.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the function name or %NULL</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="callback" transfer-ownership="none" scope="notified" closure="3" destroy="4">
|
|
<doc xml:space="preserve">a #GCallback.</doc>
|
|
<type name="VariadicFunction" c:type="JSCVariadicFunction"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @callback.</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
<parameter name="return_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the function return value, or %G_TYPE_NONE if the function is void.</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_functionv" c:identifier="jsc_value_new_functionv" shadows="new_function">
|
|
<doc xml:space="preserve">Create a function in @context. If @name is %NULL an anonymous function will be created.
|
|
When the function is called by JavaScript or jsc_value_function_call(), @callback is called
|
|
receiving the function parameters and then @user_data as last parameter. When the function is
|
|
cleared in @context, @destroy_notify is called with @user_data as parameter.
|
|
|
|
Note that the value returned by @callback must be fully transferred. In case of boxed types, you could use
|
|
%G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
|
|
If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
|
|
with jsc_value_new_object() that receives the copy as instance parameter.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the function name or %NULL</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="callback" transfer-ownership="none" scope="notified" closure="3" destroy="4">
|
|
<doc xml:space="preserve">a #GCallback.</doc>
|
|
<type name="GObject.Callback" c:type="GCallback"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @callback.</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
<parameter name="return_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the function return value, or %G_TYPE_NONE if the function is void.</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="n_parameters" transfer-ownership="none">
|
|
<doc xml:space="preserve">the number of parameters</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="parameter_types" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">a list of #GType<!-- -->s, one for each parameter, or %NULL</doc>
|
|
<array length="6" zero-terminated="0" c:type="GType*">
|
|
<type name="GType"/>
|
|
</array>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_null" c:identifier="jsc_value_new_null">
|
|
<doc xml:space="preserve">Create a new #JSCValue referencing <function>null</function> in @context.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_number" c:identifier="jsc_value_new_number">
|
|
<doc xml:space="preserve">Create a new #JSCValue from @number.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="number" transfer-ownership="none">
|
|
<doc xml:space="preserve">a number</doc>
|
|
<type name="gdouble" c:type="double"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_object" c:identifier="jsc_value_new_object">
|
|
<doc xml:space="preserve">Create a new #JSCValue from @instance. If @instance is %NULL a new empty object is created.
|
|
When @instance is provided, @jsc_class must be provided too. @jsc_class takes ownership of
|
|
@instance that will be freed by the #GDestroyNotify passed to jsc_context_register_class().</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="instance" transfer-ownership="full" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">an object instance or %NULL</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="jsc_class" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the #JSCClass of @instance</doc>
|
|
<type name="Class" c:type="JSCClass*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_string" c:identifier="jsc_value_new_string">
|
|
<doc xml:space="preserve">Create a new #JSCValue from @string. If you need to create a #JSCValue from a
|
|
string containing null characters, use jsc_value_new_string_from_bytes() instead.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="string" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">a null-terminated string</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_string_from_bytes" c:identifier="jsc_value_new_string_from_bytes">
|
|
<doc xml:space="preserve">Create a new #JSCValue from @bytes.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
<parameter name="bytes" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">a #GBytes</doc>
|
|
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<constructor name="new_undefined" c:identifier="jsc_value_new_undefined">
|
|
<doc xml:space="preserve">Create a new #JSCValue referencing <function>undefined</function> in @context.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="context" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCContext</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<method name="constructor_call" c:identifier="jsc_value_constructor_call" shadowed-by="constructor_callv" introspectable="0">
|
|
<doc xml:space="preserve">Invoke <function>new</function> with constructor referenced by @value. If @first_parameter_type
|
|
is %G_TYPE_NONE no parameters will be passed to the constructor.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue referencing the newly created object instance.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="first_parameter_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">#GType of first parameter, or %G_TYPE_NONE</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">value of the first parameter, followed optionally by more type/value pairs, followed by %G_TYPE_NONE</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="constructor_callv" c:identifier="jsc_value_constructor_callv" shadows="constructor_call">
|
|
<doc xml:space="preserve">Invoke <function>new</function> with constructor referenced by @value. If @n_parameters
|
|
is 0 no parameters will be passed to the constructor.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue referencing the newly created object instance.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="n_parameters" transfer-ownership="none">
|
|
<doc xml:space="preserve">the number of parameters</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="parameters" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the #JSCValue<!-- -->s to pass as parameters to the constructor, or %NULL</doc>
|
|
<array length="0" zero-terminated="0" c:type="JSCValue**">
|
|
<type name="Value"/>
|
|
</array>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="function_call" c:identifier="jsc_value_function_call" shadowed-by="function_callv" introspectable="0">
|
|
<doc xml:space="preserve">Call function referenced by @value, passing the given parameters. If @first_parameter_type
|
|
is %G_TYPE_NONE no parameters will be passed to the function.
|
|
|
|
This function always returns a #JSCValue, in case of void functions a #JSCValue referencing
|
|
<function>undefined</function> is returned</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue with the return value of the function.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="first_parameter_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">#GType of first parameter, or %G_TYPE_NONE</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">value of the first parameter, followed optionally by more type/value pairs, followed by %G_TYPE_NONE</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="function_callv" c:identifier="jsc_value_function_callv" shadows="function_call">
|
|
<doc xml:space="preserve">Call function referenced by @value, passing the given @parameters. If @n_parameters
|
|
is 0 no parameters will be passed to the function.
|
|
|
|
This function always returns a #JSCValue, in case of void functions a #JSCValue referencing
|
|
<function>undefined</function> is returned</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue with the return value of the function.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="n_parameters" transfer-ownership="none">
|
|
<doc xml:space="preserve">the number of parameters</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="parameters" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the #JSCValue<!-- -->s to pass as parameters to the function, or %NULL</doc>
|
|
<array length="0" zero-terminated="0" c:type="JSCValue**">
|
|
<type name="Value"/>
|
|
</array>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="get_context" c:identifier="jsc_value_get_context">
|
|
<doc xml:space="preserve">Get the #JSCContext in which @value was created.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the #JSCValue context.</doc>
|
|
<type name="Context" c:type="JSCContext*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="is_array" c:identifier="jsc_value_is_array">
|
|
<doc xml:space="preserve">Get whether the value referenced by @value is an array.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">whether the value is an array.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="is_boolean" c:identifier="jsc_value_is_boolean">
|
|
<doc xml:space="preserve">Get whether the value referenced by @value is a boolean.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">whether the value is a boolean.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="is_constructor" c:identifier="jsc_value_is_constructor">
|
|
<doc xml:space="preserve">Get whether the value referenced by @value is a constructor.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">whether the value is a constructor.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="is_function" c:identifier="jsc_value_is_function">
|
|
<doc xml:space="preserve">Get whether the value referenced by @value is a function</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">whether the value is a function.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="is_null" c:identifier="jsc_value_is_null">
|
|
<doc xml:space="preserve">Get whether the value referenced by @value is <function>null</function>.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">whether the value is null.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="is_number" c:identifier="jsc_value_is_number">
|
|
<doc xml:space="preserve">Get whether the value referenced by @value is a number.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">whether the value is a number.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="is_object" c:identifier="jsc_value_is_object">
|
|
<doc xml:space="preserve">Get whether the value referenced by @value is an object.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">whether the value is an object.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="is_string" c:identifier="jsc_value_is_string">
|
|
<doc xml:space="preserve">Get whether the value referenced by @value is a string</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">whether the value is a string</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="is_undefined" c:identifier="jsc_value_is_undefined">
|
|
<doc xml:space="preserve">Get whether the value referenced by @value is <function>undefined</function>.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">whether the value is undefined.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_define_property_accessor" c:identifier="jsc_value_object_define_property_accessor">
|
|
<doc xml:space="preserve">Define or modify a property with @property_name in object referenced by @value. When the
|
|
property value needs to be getted or set, @getter and @setter callbacks will be called.
|
|
When the property is cleared in the #JSCClass context, @destroy_notify is called with
|
|
@user_data as parameter. This is equivalent to JavaScript <function>Object.defineProperty()</function>
|
|
when used with an accessor descriptor.
|
|
|
|
Note that the value returned by @getter must be fully transferred. In case of boxed types, you could use
|
|
%G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
|
|
If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
|
|
with jsc_value_new_object() that receives the copy as instance parameter.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="property_name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the name of the property to define</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="flags" transfer-ownership="none">
|
|
<doc xml:space="preserve">#JSCValuePropertyFlags</doc>
|
|
<type name="ValuePropertyFlags" c:type="JSCValuePropertyFlags"/>
|
|
</parameter>
|
|
<parameter name="property_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #GType of the property</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="getter" transfer-ownership="none" nullable="1" allow-none="1" destroy="6" scope="notified" closure="5">
|
|
<doc xml:space="preserve">a #GCallback to be called to get the property value</doc>
|
|
<type name="Getter" c:type="JSCGetter"/>
|
|
</parameter>
|
|
<parameter name="setter" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="5" destroy="6">
|
|
<doc xml:space="preserve">a #GCallback to be called to set the property value</doc>
|
|
<type name="Setter" c:type="JSCSetter"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">user data to pass to @getter and @setter</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
|
|
<doc xml:space="preserve">destroy notifier for @user_data</doc>
|
|
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_define_property_data" c:identifier="jsc_value_object_define_property_data">
|
|
<doc xml:space="preserve">Define or modify a property with @property_name in object referenced by @value. This is equivalent to
|
|
JavaScript <function>Object.defineProperty()</function> when used with a data descriptor.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="property_name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the name of the property to define</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="flags" transfer-ownership="none">
|
|
<doc xml:space="preserve">#JSCValuePropertyFlags</doc>
|
|
<type name="ValuePropertyFlags" c:type="JSCValuePropertyFlags"/>
|
|
</parameter>
|
|
<parameter name="property_value" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the default property value</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_delete_property" c:identifier="jsc_value_object_delete_property">
|
|
<doc xml:space="preserve">Try to delete property with @name from @value. This function will return %FALSE if
|
|
the property was defined without %JSC_VALUE_PROPERTY_CONFIGURABLE flag.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if the property was deleted, or %FALSE otherwise.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_enumerate_properties" c:identifier="jsc_value_object_enumerate_properties">
|
|
<doc xml:space="preserve">Get the list of property names of @value. Only properties defined with %JSC_VALUE_PROPERTY_ENUMERABLE
|
|
flag will be collected.</doc>
|
|
<return-value transfer-ownership="full" nullable="1">
|
|
<doc xml:space="preserve">a %NULL-terminated array of strings containing the
|
|
property names, or %NULL if @value doesn't have enumerable properties. Use g_strfreev() to free.</doc>
|
|
<array c:type="gchar**">
|
|
<type name="utf8"/>
|
|
</array>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_get_property" c:identifier="jsc_value_object_get_property">
|
|
<doc xml:space="preserve">Get property with @name from @value.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">the property #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_get_property_at_index" c:identifier="jsc_value_object_get_property_at_index">
|
|
<doc xml:space="preserve">Get property at @index from @value.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">the property #JSCValue.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="index" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property index</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_has_property" c:identifier="jsc_value_object_has_property">
|
|
<doc xml:space="preserve">Get whether @value has property with @name.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if @value has a property with @name, or %FALSE otherwise</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_invoke_method" c:identifier="jsc_value_object_invoke_method" shadowed-by="object_invoke_methodv" introspectable="0">
|
|
<doc xml:space="preserve">Invoke method with @name on object referenced by @value, passing the given parameters. If
|
|
@first_parameter_type is %G_TYPE_NONE no parameters will be passed to the method.
|
|
The object instance will be handled automatically even when the method is a custom one
|
|
registered with jsc_class_add_method(), so it should never be passed explicitly as parameter
|
|
of this function.
|
|
|
|
This function always returns a #JSCValue, in case of void methods a #JSCValue referencing
|
|
<function>undefined</function> is returned.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue with the return value of the method.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the method name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="first_parameter_type" transfer-ownership="none">
|
|
<doc xml:space="preserve">#GType of first parameter, or %G_TYPE_NONE</doc>
|
|
<type name="GType" c:type="GType"/>
|
|
</parameter>
|
|
<parameter name="..." transfer-ownership="none">
|
|
<doc xml:space="preserve">value of the first parameter, followed optionally by more type/value pairs, followed by %G_TYPE_NONE</doc>
|
|
<varargs/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_invoke_methodv" c:identifier="jsc_value_object_invoke_methodv" shadows="object_invoke_method">
|
|
<doc xml:space="preserve">Invoke method with @name on object referenced by @value, passing the given @parameters. If
|
|
@n_parameters is 0 no parameters will be passed to the method.
|
|
The object instance will be handled automatically even when the method is a custom one
|
|
registered with jsc_class_add_method(), so it should never be passed explicitly as parameter
|
|
of this function.
|
|
|
|
This function always returns a #JSCValue, in case of void methods a #JSCValue referencing
|
|
<function>undefined</function> is returned.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #JSCValue with the return value of the method.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the method name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="n_parameters" transfer-ownership="none">
|
|
<doc xml:space="preserve">the number of parameters</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="parameters" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">the #JSCValue<!-- -->s to pass as parameters to the method, or %NULL</doc>
|
|
<array length="1" zero-terminated="0" c:type="JSCValue**">
|
|
<type name="Value"/>
|
|
</array>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_is_instance_of" c:identifier="jsc_value_object_is_instance_of">
|
|
<doc xml:space="preserve">Get whether the value referenced by @value is an instance of class @name.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">whether the value is an object instance of class @name.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">a class name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_set_property" c:identifier="jsc_value_object_set_property">
|
|
<doc xml:space="preserve">Set @property with @name on @value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="name" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property name</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="property" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #JSCValue to set</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="object_set_property_at_index" c:identifier="jsc_value_object_set_property_at_index">
|
|
<doc xml:space="preserve">Set @property at @index on @value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="index" transfer-ownership="none">
|
|
<doc xml:space="preserve">the property index</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
<parameter name="property" transfer-ownership="none">
|
|
<doc xml:space="preserve">the #JSCValue to set</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="to_boolean" c:identifier="jsc_value_to_boolean">
|
|
<doc xml:space="preserve">Convert @value to a boolean.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">a #gboolean result of the conversion.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="to_double" c:identifier="jsc_value_to_double">
|
|
<doc xml:space="preserve">Convert @value to a double.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">a #gdouble result of the conversion.</doc>
|
|
<type name="gdouble" c:type="double"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="to_int32" c:identifier="jsc_value_to_int32">
|
|
<doc xml:space="preserve">Convert @value to a #gint32.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">a #gint32 result of the conversion.</doc>
|
|
<type name="gint32" c:type="gint32"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="to_json" c:identifier="jsc_value_to_json" version="2.28">
|
|
<doc xml:space="preserve">Create a JSON string of @value serialization. If @indent is 0, the resulting JSON will
|
|
not contain newlines. The size of the indent is clamped to 10 spaces.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a null-terminated JSON string with serialization of @value</doc>
|
|
<type name="utf8" c:type="char*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
<parameter name="indent" transfer-ownership="none">
|
|
<doc xml:space="preserve">The number of spaces to indent when nesting.</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="to_string" c:identifier="jsc_value_to_string">
|
|
<doc xml:space="preserve">Convert @value to a string. Use jsc_value_to_string_as_bytes() instead, if you need to
|
|
handle strings containing null characters.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a null-terminated string result of the conversion.</doc>
|
|
<type name="utf8" c:type="char*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<method name="to_string_as_bytes" c:identifier="jsc_value_to_string_as_bytes">
|
|
<doc xml:space="preserve">Convert @value to a string and return the results as #GBytes. This is needed
|
|
to handle strings with null characters.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #GBytes with the result of the conversion.</doc>
|
|
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<property name="context" writable="1" construct-only="1" transfer-ownership="none">
|
|
<doc xml:space="preserve">The #JSCContext in which the value was created.</doc>
|
|
<type name="Context"/>
|
|
</property>
|
|
<field name="parent">
|
|
<type name="GObject.Object" c:type="GObject"/>
|
|
</field>
|
|
<field name="priv" readable="0" private="1">
|
|
<type name="ValuePrivate" c:type="JSCValuePrivate*"/>
|
|
</field>
|
|
</class>
|
|
<record name="ValueClass" c:type="JSCValueClass" glib:is-gtype-struct-for="Value">
|
|
<field name="parent_class">
|
|
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
|
|
</field>
|
|
<field name="_jsc_reserved0" introspectable="0">
|
|
<callback name="_jsc_reserved0">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved1" introspectable="0">
|
|
<callback name="_jsc_reserved1">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved2" introspectable="0">
|
|
<callback name="_jsc_reserved2">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved3" introspectable="0">
|
|
<callback name="_jsc_reserved3">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
</record>
|
|
<record name="ValuePrivate" c:type="JSCValuePrivate" disguised="1"/>
|
|
<bitfield name="ValuePropertyFlags" c:type="JSCValuePropertyFlags">
|
|
<doc xml:space="preserve">Flags used when defining properties with jsc_value_object_define_property_data() and
|
|
jsc_value_object_define_property_accessor().</doc>
|
|
<member name="configurable" value="1" c:identifier="JSC_VALUE_PROPERTY_CONFIGURABLE">
|
|
<doc xml:space="preserve">the type of the property descriptor may be changed and the
|
|
property may be deleted from the corresponding object.</doc>
|
|
</member>
|
|
<member name="enumerable" value="2" c:identifier="JSC_VALUE_PROPERTY_ENUMERABLE">
|
|
<doc xml:space="preserve">the property shows up during enumeration of the properties on
|
|
the corresponding object.</doc>
|
|
</member>
|
|
<member name="writable" value="4" c:identifier="JSC_VALUE_PROPERTY_WRITABLE">
|
|
<doc xml:space="preserve">the value associated with the property may be changed with an
|
|
assignment operator. This doesn't have any effect when passed to jsc_value_object_define_property_accessor().</doc>
|
|
</member>
|
|
</bitfield>
|
|
<class name="VirtualMachine" c:symbol-prefix="virtual_machine" c:type="JSCVirtualMachine" parent="GObject.Object" glib:type-name="JSCVirtualMachine" glib:get-type="jsc_virtual_machine_get_type" glib:type-struct="VirtualMachineClass">
|
|
<constructor name="new" c:identifier="jsc_virtual_machine_new">
|
|
<doc xml:space="preserve">Create a new #JSCVirtualMachine.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">the newly created #JSCVirtualMachine.</doc>
|
|
<type name="VirtualMachine" c:type="JSCVirtualMachine*"/>
|
|
</return-value>
|
|
</constructor>
|
|
<field name="parent">
|
|
<type name="GObject.Object" c:type="GObject"/>
|
|
</field>
|
|
<field name="priv" readable="0" private="1">
|
|
<type name="VirtualMachinePrivate" c:type="JSCVirtualMachinePrivate*"/>
|
|
</field>
|
|
</class>
|
|
<record name="VirtualMachineClass" c:type="JSCVirtualMachineClass" glib:is-gtype-struct-for="VirtualMachine">
|
|
<field name="parent_class">
|
|
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
|
|
</field>
|
|
<field name="_jsc_reserved0" introspectable="0">
|
|
<callback name="_jsc_reserved0">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved1" introspectable="0">
|
|
<callback name="_jsc_reserved1">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved2" introspectable="0">
|
|
<callback name="_jsc_reserved2">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved3" introspectable="0">
|
|
<callback name="_jsc_reserved3">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
</record>
|
|
<record name="VirtualMachinePrivate" c:type="JSCVirtualMachinePrivate" disguised="1"/>
|
|
<function-macro name="WEAK_VALUE" c:identifier="JSC_WEAK_VALUE" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="WEAK_VALUE_CLASS" c:identifier="JSC_WEAK_VALUE_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="klass">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<function-macro name="WEAK_VALUE_GET_CLASS" c:identifier="JSC_WEAK_VALUE_GET_CLASS" introspectable="0">
|
|
<parameters>
|
|
<parameter name="obj">
|
|
</parameter>
|
|
</parameters>
|
|
</function-macro>
|
|
<class name="WeakValue" c:symbol-prefix="weak_value" c:type="JSCWeakValue" parent="GObject.Object" glib:type-name="JSCWeakValue" glib:get-type="jsc_weak_value_get_type" glib:type-struct="WeakValueClass">
|
|
<constructor name="new" c:identifier="jsc_weak_value_new">
|
|
<doc xml:space="preserve">Create a new #JSCWeakValue for the JavaScript value referenced by @value.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a new #JSCWeakValue</doc>
|
|
<type name="WeakValue" c:type="JSCWeakValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCValue</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</constructor>
|
|
<method name="get_value" c:identifier="jsc_weak_value_get_value">
|
|
<doc xml:space="preserve">Get a #JSCValue referencing the JavaScript value of @weak_value.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a new #JSCValue or %NULL if @weak_value was cleared.</doc>
|
|
<type name="Value" c:type="JSCValue*"/>
|
|
</return-value>
|
|
<parameters>
|
|
<instance-parameter name="weak_value" transfer-ownership="none">
|
|
<doc xml:space="preserve">a #JSCWeakValue</doc>
|
|
<type name="WeakValue" c:type="JSCWeakValue*"/>
|
|
</instance-parameter>
|
|
</parameters>
|
|
</method>
|
|
<property name="value" readable="0" writable="1" construct-only="1" transfer-ownership="none">
|
|
<doc xml:space="preserve">The #JSCValue referencing the JavaScript value.</doc>
|
|
<type name="Value"/>
|
|
</property>
|
|
<field name="parent">
|
|
<type name="GObject.Object" c:type="GObject"/>
|
|
</field>
|
|
<field name="priv" readable="0" private="1">
|
|
<type name="WeakValuePrivate" c:type="JSCWeakValuePrivate*"/>
|
|
</field>
|
|
<glib:signal name="cleared" when="last">
|
|
<doc xml:space="preserve">This signal is emitted when the JavaScript value is destroyed.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</glib:signal>
|
|
</class>
|
|
<record name="WeakValueClass" c:type="JSCWeakValueClass" glib:is-gtype-struct-for="WeakValue">
|
|
<field name="parent_class">
|
|
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
|
|
</field>
|
|
<field name="_jsc_reserved0" introspectable="0">
|
|
<callback name="_jsc_reserved0">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved1" introspectable="0">
|
|
<callback name="_jsc_reserved1">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved2" introspectable="0">
|
|
<callback name="_jsc_reserved2">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
<field name="_jsc_reserved3" introspectable="0">
|
|
<callback name="_jsc_reserved3">
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
</callback>
|
|
</field>
|
|
</record>
|
|
<record name="WeakValuePrivate" c:type="JSCWeakValuePrivate" disguised="1"/>
|
|
<function name="get_major_version" c:identifier="jsc_get_major_version">
|
|
<doc xml:space="preserve">Returns the major version number of the JavaScriptCore library.
|
|
(e.g. in JavaScriptCore version 1.8.3 this is 1.)
|
|
|
|
This function is in the library, so it represents the JavaScriptCore library
|
|
your code is running against. Contrast with the #JSC_MAJOR_VERSION
|
|
macro, which represents the major version of the JavaScriptCore headers you
|
|
have included when compiling your code.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the major version number of the JavaScriptCore library</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</return-value>
|
|
</function>
|
|
<function name="get_micro_version" c:identifier="jsc_get_micro_version">
|
|
<doc xml:space="preserve">Returns the micro version number of the JavaScriptCore library.
|
|
(e.g. in JavaScriptCore version 1.8.3 this is 3.)
|
|
|
|
This function is in the library, so it represents the JavaScriptCore library
|
|
your code is running against. Contrast with the #JSC_MICRO_VERSION
|
|
macro, which represents the micro version of the JavaScriptCore headers you
|
|
have included when compiling your code.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the micro version number of the JavaScriptCore library</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</return-value>
|
|
</function>
|
|
<function name="get_minor_version" c:identifier="jsc_get_minor_version">
|
|
<doc xml:space="preserve">Returns the minor version number of the JavaScriptCore library.
|
|
(e.g. in JavaScriptCore version 1.8.3 this is 8.)
|
|
|
|
This function is in the library, so it represents the JavaScriptCore library
|
|
your code is running against. Contrast with the #JSC_MINOR_VERSION
|
|
macro, which represents the minor version of the JavaScriptCore headers you
|
|
have included when compiling your code.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">the minor version number of the JavaScriptCore library</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</return-value>
|
|
</function>
|
|
<function name="options_foreach" c:identifier="jsc_options_foreach" version="2.24">
|
|
<doc xml:space="preserve">Iterates all available options calling @function for each one. Iteration can
|
|
stop early if @function returns %FALSE.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<type name="none" c:type="void"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="function" transfer-ownership="none" scope="call" closure="1">
|
|
<doc xml:space="preserve">a #JSCOptionsFunc callback</doc>
|
|
<type name="OptionsFunc" c:type="JSCOptionsFunc"/>
|
|
</parameter>
|
|
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
|
|
<doc xml:space="preserve">callback user data</doc>
|
|
<type name="gpointer" c:type="gpointer"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_get_boolean" c:identifier="jsc_options_get_boolean" version="2.24">
|
|
<doc xml:space="preserve">Get @option as a #gboolean value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if @value has been set or %FALSE if the option doesn't exist</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full">
|
|
<doc xml:space="preserve">return location for the option value</doc>
|
|
<type name="gboolean" c:type="gboolean*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_get_double" c:identifier="jsc_options_get_double" version="2.24">
|
|
<doc xml:space="preserve">Get @option as a #gdouble value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if @value has been set or %FALSE if the option doesn't exist</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full">
|
|
<doc xml:space="preserve">return location for the option value</doc>
|
|
<type name="gdouble" c:type="gdouble*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_get_int" c:identifier="jsc_options_get_int" version="2.24">
|
|
<doc xml:space="preserve">Get @option as a #gint value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if @value has been set or %FALSE if the option doesn't exist</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full">
|
|
<doc xml:space="preserve">return location for the option value</doc>
|
|
<type name="gint" c:type="gint*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_get_option_group" c:identifier="jsc_options_get_option_group" version="2.24">
|
|
<doc xml:space="preserve">Create a #GOptionGroup to handle JSCOptions as command line arguments.
|
|
The options will be exposed as command line arguments with the form
|
|
<emphasis>--jsc-&lt;option&gt;=&lt;value&gt;</emphasis>.
|
|
Each entry in the returned #GOptionGroup is configured to apply the
|
|
corresponding option during command line parsing. Applications only need to
|
|
pass the returned group to g_option_context_add_group(), and the rest will
|
|
be taken care for automatically.</doc>
|
|
<return-value transfer-ownership="full">
|
|
<doc xml:space="preserve">a #GOptionGroup for the JSCOptions</doc>
|
|
<type name="GLib.OptionGroup" c:type="GOptionGroup*"/>
|
|
</return-value>
|
|
</function>
|
|
<function name="options_get_range_string" c:identifier="jsc_options_get_range_string" version="2.24">
|
|
<doc xml:space="preserve">Get @option as a range string. The string must be in the
|
|
format <emphasis>[!]&lt;low&gt;[:&lt;high&gt;]</emphasis> where low and high are #guint values.
|
|
Values between low and high (both included) will be considered in
|
|
the range, unless <emphasis>!</emphasis> is used to invert the range.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if @value has been set or %FALSE if the option doesn't exist</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full">
|
|
<doc xml:space="preserve">return location for the option value</doc>
|
|
<type name="utf8" c:type="char**"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_get_size" c:identifier="jsc_options_get_size" version="2.24">
|
|
<doc xml:space="preserve">Get @option as a #gsize value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if @value has been set or %FALSE if the option doesn't exist</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full">
|
|
<doc xml:space="preserve">return location for the option value</doc>
|
|
<type name="gsize" c:type="gsize*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_get_string" c:identifier="jsc_options_get_string" version="2.24">
|
|
<doc xml:space="preserve">Get @option as a string.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if @value has been set or %FALSE if the option doesn't exist</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full">
|
|
<doc xml:space="preserve">return location for the option value</doc>
|
|
<type name="utf8" c:type="char**"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_get_uint" c:identifier="jsc_options_get_uint" version="2.24">
|
|
<doc xml:space="preserve">Get @option as a #guint value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if @value has been set or %FALSE if the option doesn't exist</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full">
|
|
<doc xml:space="preserve">return location for the option value</doc>
|
|
<type name="guint" c:type="guint*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_set_boolean" c:identifier="jsc_options_set_boolean" version="2.24">
|
|
<doc xml:space="preserve">Set @option as a #gboolean value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if option was correctly set or %FALSE otherwise.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">the value to set</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_set_double" c:identifier="jsc_options_set_double" version="2.24">
|
|
<doc xml:space="preserve">Set @option as a #gdouble value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if option was correctly set or %FALSE otherwise.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">the value to set</doc>
|
|
<type name="gdouble" c:type="gdouble"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_set_int" c:identifier="jsc_options_set_int" version="2.24">
|
|
<doc xml:space="preserve">Set @option as a #gint value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if option was correctly set or %FALSE otherwise.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">the value to set</doc>
|
|
<type name="gint" c:type="gint"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_set_range_string" c:identifier="jsc_options_set_range_string" version="2.24">
|
|
<doc xml:space="preserve">Set @option as a range string. The string must be in the
|
|
format <emphasis>[!]&lt;low&gt;[:&lt;high&gt;]</emphasis> where low and high are #guint values.
|
|
Values between low and high (both included) will be considered in
|
|
the range, unless <emphasis>!</emphasis> is used to invert the range.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if option was correctly set or %FALSE otherwise.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">the value to set</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_set_size" c:identifier="jsc_options_set_size" version="2.24">
|
|
<doc xml:space="preserve">Set @option as a #gsize value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if option was correctly set or %FALSE otherwise.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">the value to set</doc>
|
|
<type name="gsize" c:type="gsize"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_set_string" c:identifier="jsc_options_set_string" version="2.24">
|
|
<doc xml:space="preserve">Set @option as a string.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if option was correctly set or %FALSE otherwise.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">the value to set</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
<function name="options_set_uint" c:identifier="jsc_options_set_uint" version="2.24">
|
|
<doc xml:space="preserve">Set @option as a #guint value.</doc>
|
|
<return-value transfer-ownership="none">
|
|
<doc xml:space="preserve">%TRUE if option was correctly set or %FALSE otherwise.</doc>
|
|
<type name="gboolean" c:type="gboolean"/>
|
|
</return-value>
|
|
<parameters>
|
|
<parameter name="option" transfer-ownership="none">
|
|
<doc xml:space="preserve">the option identifier</doc>
|
|
<type name="utf8" c:type="const char*"/>
|
|
</parameter>
|
|
<parameter name="value" transfer-ownership="none">
|
|
<doc xml:space="preserve">the value to set</doc>
|
|
<type name="guint" c:type="guint"/>
|
|
</parameter>
|
|
</parameters>
|
|
</function>
|
|
</namespace>
|
|
</repository>
|