-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJavaScriptCore-4.0.gir
3388 lines (3366 loc) · 160 KB
/
JavaScriptCore-4.0.gir
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?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 version="1.2"
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">
<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">
<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="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>
</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="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>
</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"
scope="async">
<doc xml:space="preserve">a #GCallback to be called to get the property value</doc>
<type name="GObject.Callback" c:type="GCallback"/>
</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="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 @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">
</record>
<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">