File: c-wrapper-refe.html

package info (click to toggle)
gauche-c-wrapper 0.6.1-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,440 kB
  • sloc: ansic: 17,899; sh: 14,025; asm: 6,456; lisp: 5,485; yacc: 2,109; makefile: 520; exp: 194; cpp: 157; objc: 144; perl: 2
file content (1175 lines) | stat: -rw-r--r-- 54,807 bytes parent folder | download | duplicates (8)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on December, 26 2006 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<head>
<title>c-wrapper reference manual: Top</title>

<meta name="description" content="c-wrapper reference manual: Top">
<meta name="keywords" content="c-wrapper reference manual: Top">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Top"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="settitle">c-wrapper reference manual
</h1>

<p>This is a reference manual of c-wrapper.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC1">1. c-wrapper</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">                   
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC5">2. objc-wrapper</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">                
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC9">A. Function and Syntax Index</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">   
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC10">B. Class Index</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">                 
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC11">C. Variable Index</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">              
</td></tr>
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
 --- The Detailed Node Listing ---

c-wrapper

</pre></th></tr><tr><td align="left" valign="top"><a href="#SEC2">1.1 Load a shared library</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">       
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC3">1.2 Load a header file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">          
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
objc-wrapper

</pre></th></tr><tr><td align="left" valign="top"><a href="#SEC6">2.1 Load a framework library</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">    
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC7">2.2 Load an Objective-C header file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC8">2.3 Functions about Objective-C objects</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
</pre></th></tr></table>

<hr size="1">
<a name="c_002dwrapper"></a>
<a name="SEC1"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Top" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC2" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[ &lt;&lt; ]</td>
<td valign="middle" align="left">[<a href="#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC5" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 1. c-wrapper </h1>

<p><code>c-wrapper</code> is the module which enables to use C libraries.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC2">1.1 Load a shared library</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">       
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC3">1.2 Load a header file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">          
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
</table>

<hr size="6">
<a name="Load-a-shared-library"></a>
<a name="SEC2"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC1" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC3" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC1" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC5" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 1.1 Load a shared library </h2>

<dl>
<dt><u>Function:</u> <b>c-load-library</b><i> file-or-list &amp;keyword</i>
<a name="IDX1"></a>
</dt>
<dd><p>Load one or more shared libraries. If you omit the extension, c-wrapper add
a extension (.so, .dylib, and so on) automatically.
</p>
<p>Keyword arguments are:
</p><dl compact="compact">
<dt> <code>:option option-string</code></dt>
<dd><p>Specify library names and library load paths with ld like option.
</p><dl compact="compact">
<dt> <code>-llibrary</code>       </dt>
<dd><p>Load the library named <var>library</var>. For example, -lc means to load 'libc'.
</p></dd>
<dt> <code>-Ldir</code></dt>
<dd><p>Add directory <var>dir</var> to the library search paths.
</p></dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>c-ld</b><i> option-string</i>
<a name="IDX2"></a>
</dt>
<dd><p>This function is the same (c-load-library '() :option option-string). and is designed to use with a command returning linker flags like pkg-config.
</p><table><tr><td>&nbsp;</td><td><pre class="example">(c-ld (process-output-&gt;string &quot;pkg-config Wand --libs&quot;))
</pre></td></tr></table></dd></dl>

<hr size="6">
<a name="Load-a-header-file"></a>
<a name="SEC3"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC2" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC4" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC1" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC5" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 1.2 Load a header file </h2>

<dl>
<dt><u>Macro:</u> <b>c-include</b><i> file-or-list &amp;keyword</i>
<a name="IDX3"></a>
</dt>
<dd><p>Load one or more header files and define functions, global variables, constants
, type definitions and macros in the current module. 
Keyword arguments are:
</p><dl compact="compact">
<dt> <code>:include-dirs</code></dt>
<dd><p>Sets up include directories. You can specify either a string file name or a list of string file names.
</p></dd>
<dt> <code>:option</code></dt>
<dd><p>Sets up C preprocessor options.
</p></dd>
<dt> <code>:import</code></dt>
<dd><p>Sets up symbols which you want to define. You can specify a symbol, a string, a regexp, a procedure or a list of them.
If you put a procedure, it is called with two arguments, a header file name and a symbol. When the procedure returns <code>#f</code>, the symbol is ignored, and the symbol is defined otherwise.
</p></dd>
<dt> <code>:export?</code></dt>
<dd><p>Specifies whether symbols in header files are exported or not. If you put <code>#t</code>, the symbols are exported automatically, and otherwise they are not exported.
</p></dd>
<dt> <code>:compiled-lib</code> </dt>
<dd><p>Sets up a shared library file name which cwcompile command generates.
At runtime, if the library is exists, loads it instead of parsing the header files. Otherwise, parses the header files.
</p></dd>
</dl>

<p>In loading header files, <code>c-include</code> gets these information and defines symbols.
</p><dl compact="compact">
<dt> Function prototype</dt>
<dd><p>Defines a function with the same name. It applies <code>cast</code> to its arguments and <code>scm-cast</code> to its return value.
</p></dd>
<dt> External variable</dt>
<dd><p>Defines an object with the same name.
</p></dd>
<dt> <code>enum</code></dt>
<dd><p>Defines a constant value with the same name.
</p></dd>
<dt> <code>struct</code></dt>
<dd><p>Defines a struct class. You can use it with <code>(c-struct tagname)</code>.
</p></dd>
<dt> <code>union</code></dt>
<dd><p>Defines a union class. You can use it with <code>(c-union tagname)</code>.
</p></dd>
<dt> <code>typedef</code></dt>
<dd><p>Defines a class with the name <code>&lt;typename&gt;</code>.
</p></dd>
<dt> Objectlike macro</dt>
<dd><p>Defines a value with the same name if the macro body is an expression, all identifiers in the body have been defined and the expression has no side-effect.
</p>
<p>You have to be careful to use the value because it is the header-load-time value, not macro-use-time value. It may be different from one you expected.
</p></dd>
<dt> Functionlike macro</dt>
<dd><p>Defines a macro with the same name if the macro body is an expression or statements and all identifiers in the body have been defined.
</p></dd>
</dl>

</dd></dl>

<dl>
<dt><u>Macro:</u> <b>c-load</b><i> file-or-list &amp;keyword</i>
<a name="IDX4"></a>
</dt>
<dd><p>Loads libraries, parses header files and defines functions, global variables, constants, type definitions and macros in current module.
This macro does <code>c-load-library</code> and <code>c-include</code> at once.
</p>
<p>Keyword arguments are:
</p><dl compact="compact">
<dt> <code>:cflags</code></dt>
<dt> <code>:cppflags</code></dt>
<dt> <code>:ldflags</code></dt>
<dt> <code>:libs</code></dt>
<dd><p>Sets up flags for parsing header files and loading libraries, <code>:cppflags</code> is passed to the preprocessor and <code>:ldflags</code> and <code>:libs</code> are used for loading libraries. cwcompile uses these flags, too.
</p></dd>
<dt> <code>:cflags-cmd</code></dt>
<dt> <code>:cppflags-cmd</code></dt>
<dt> <code>:ldflags-cmd</code></dt>
<dt> <code>:libs-cmd</code></dt>
<dd><p>Sets up commands which returns the flags. For example, if you want to parse gtk's header file, you can do the following:
</p><table><tr><td>&nbsp;</td><td><pre class="example">(c-load &quot;gtk/gtk/h&quot;
        :cppflags-cmd &quot;pkg-config gtk+-2.0 --cflags-only-I&quot;
        :cflags-cmd   &quot;pkg-config gtk+-2.0 --cflags-only-other&quot;
        :libs-cmd     &quot;pkg-config gtk+-2.0 --libs&quot;
        :compiled-lib &quot;gtklib&quot;)
</pre></td></tr></table>
</dd>
<dt> <code>:import</code></dt>
<dd><p>Sets up symbols which you want to define. You can specify a symbol, a string, a regexp, a procedure or a list of them.
If you put a procedure, it is called with two arguments, a header file name and a symbol. When the procedure returns <code>#f</code>, the symbol is ignored, and the symbol is defined otherwise.
</p></dd>
<dt> <code>:export?</code></dt>
<dd><p>Specifies whether symbols in header files are exported or not. If you put <code>#t</code>, the symbols are exported automatically, and otherwise they are not exported.
</p></dd>
<dt> <code>:compiled-lib</code> </dt>
<dd><p>Sets up a shared library file name which cwcompile command generates.
At runtime, if the library is exists, loads it instead of parsing the header files. Otherwise, parses the header files.
</p></dd>
</dl>

</dd></dl>

<hr size="6">
<a name="Classes-and-function-about-C-types-and-values"></a>
<a name="SEC4"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC3" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC5" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC1" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC5" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 1.3 Classes and functions about C types </h2>

<dl>
<dt><u>Class:</u> <b>&lt;c-type&gt;</b>
<a name="IDX5"></a>
</dt>
<dd><p>This is a basic class for the classes related with C types.
</p></dd></dl>

<dl>
<dt><u>Class:</u> <b>&lt;c-type-meta&gt;</b>
<a name="IDX6"></a>
</dt>
<dd><p>This is a meta class for the classes related with C types. All the classes are instances of <code>&lt;c-type-meta&gt;</code>.
</p></dd></dl>

<dl>
<dt><u>Class:</u> <b>&lt;c-char&gt;</b>
<a name="IDX7"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-uchar&gt;</b>
<a name="IDX8"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-short&gt;</b>
<a name="IDX9"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-ushort&gt;</b>
<a name="IDX10"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-int&gt;</b>
<a name="IDX11"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-uint&gt;</b>
<a name="IDX12"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-long&gt;</b>
<a name="IDX13"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-ulong&gt;</b>
<a name="IDX14"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-longlong&gt;</b>
<a name="IDX15"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-ulonglong&gt;</b>
<a name="IDX16"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-float&gt;</b>
<a name="IDX17"></a>
</dt>
<dt><u>Class:</u> <b>&lt;c-double&gt;</b>
<a name="IDX18"></a>
</dt>
<dd><a name="IDX19"></a>
<a name="IDX20"></a>
<a name="IDX21"></a>
<a name="IDX22"></a>
<a name="IDX23"></a>
<a name="IDX24"></a>
<a name="IDX25"></a>
<a name="IDX26"></a>
<a name="IDX27"></a>
<a name="IDX28"></a>
<a name="IDX29"></a>
<a name="IDX30"></a>
<p>These are classes for arithmetic types in C. you can use <code>make</code> to make an instance of the class.
</p></dd></dl>

<dl>
<dt><u>Class:</u> <b>&lt;c-value-meta&gt;</b>
<a name="IDX31"></a>
</dt>
<dd><a name="IDX32"></a>
<p>This is a meta class for the classes related with C arithmetic types.
</p></dd></dl>

<dl>
<dt><u>Method:</u> <b>ref</b><i> (obj &lt;c-value-meta&gt;)</i>
<a name="IDX33"></a>
</dt>
<dd><p>Returns the value of <var>obj</var>.
</p></dd></dl>

<dl>
<dt><u>Method:</u> <b>(setter</b><i> ref) (obj &lt;c-value-meta&gt;) value</i>
<a name="IDX34"></a>
</dt>
<dd><p>Sets <var>value</var> to <var>obj</var>.
</p></dd></dl>

<dl>
<dt><u>Class:</u> <b>&lt;c-void&gt;</b>
<a name="IDX35"></a>
</dt>
<dd><p>This is a class for void type in C.
</p></dd></dl>

<dl>
<dt><u>Class:</u> <b>&lt;c-ptr&gt;</b>
<a name="IDX36"></a>
</dt>
<dd><p>This is an abstract class for pointer type in C. If you use a pointer type, make a concrete class with <code>ptr</code>.
</p></dd></dl>

<dl>
<dt><u>Method:</u> <b>ptr</b><i> (class &lt;c-type-meta&gt;)</i>
<a name="IDX37"></a>
</dt>
<dd><p>Makes a class for a pointer type of <var>class</var>, and it is a subclass of <code>&lt;c-ptr&gt;</code>. You can use <code>make</code> to make an instance of the class.
</p></dd></dl>

<dl>
<dt><u>Method:</u> <b>ptr</b><i> (obj &lt;c-type&gt;) </i>
<a name="IDX38"></a>
</dt>
<dd><p>Returns a pointer object for <var>obj</var>.
</p></dd></dl>

<dl>
<dt><u>Class:</u> <b>&lt;c-array&gt;</b>
<a name="IDX39"></a>
</dt>
<dd><p>This is an abstract class for array type in C. If you use an array type, make a concrete class with <code>c-array</code>.
</p>
<p><code>&lt;c-array&gt;</code> is a subclass of <code>&lt;sequence&gt;</code>, and you can use the operations of sequence framework (<code>gauche.sequence</code> module).
</p></dd></dl>

<dl>
<dt><u>Function:</u> <b>c-array</b><i> (class &lt;c-type-meta&gt;) size</i>
<a name="IDX40"></a>
</dt>
<dd><p>Makes a class for an array type of <var>class</var>, and it is a subclass of <code>&lt;c-array&gt;</code>. You can use <code>make</code> to make an instance of the class.
</p></dd></dl>

<dl>
<dt><u>Class:</u> <b>&lt;c-struct&gt;</b>
<a name="IDX41"></a>
</dt>
<dd><p>This is an abstract class for struct type in C. 
</p></dd></dl>

<dl>
<dt><u>Class:</u> <b>&lt;c-union&gt;</b>
<a name="IDX42"></a>
</dt>
<dd><p>This is an abstract class for union type in C. 
</p></dd></dl>

<dl>
<dt><u>Macro:</u> <b>c-struct</b><i> tagname</i>
<a name="IDX43"></a>
</dt>
<dd><p>Returns the struct class named <var>tagname</var>.
</p></dd></dl>

<dl>
<dt><u>Macro:</u> <b>c-union</b><i> tagname</i>
<a name="IDX44"></a>
</dt>
<dd><p>Returns the union class named <var>tagname</var>.
</p></dd></dl>

<dl>
<dt><u>Method:</u> <b>ref</b><i> (obj &lt;c-struct&gt;) member</i>
<a name="IDX45"></a>
</dt>
<dt><u>Method:</u> <b>ref</b><i> (obj &lt;c-union&gt;) member</i>
<a name="IDX46"></a>
</dt>
<dd><p>Returns the value of the <var>member</var> of the struct or union <var>obj</var>. If the type of the member is arithmetic type, the type of the return value is casted to <code>&lt;real&gt;</code> or <code>&lt;integer&gt;</code>.
</p></dd></dl>

<dl>
<dt><u>Method:</u> <b>(setter</b><i> ref) (obj &lt;c-struct&gt;) member value</i>
<a name="IDX47"></a>
</dt>
<dt><u>Method:</u> <b>(setter</b><i> ref) (obj &lt;c-union&gt;) member value</i>
<a name="IDX48"></a>
</dt>
<dd><p>Sets <var>value</var> to the <var>member</var> of the struct or union <var>obj</var>.
</p></dd></dl>

<dl>
<dt><u>Class:</u> <b>&lt;c-func-ptr&gt;</b>
<a name="IDX49"></a>
</dt>
<dd><p>This is an abstract class for function pointer in C.
</p></dd></dl>

<dl>
<dt><u>Method:</u> <b>deref</b><i> ptrobj</i>
<a name="IDX50"></a>
</dt>
<dd><p>Returns a deference object of <var>ptrobj</var>. ('*' operator in C)
</p></dd></dl>

<dl>
<dt><u>Method:</u> <b>c-sizeof</b><i> (class &lt;c-type-meta&gt;)</i>
<a name="IDX51"></a>
</dt>
<dt><u>Method:</u> <b>c-sizeof</b><i> (obj &lt;c-type&gt;)</i>
<a name="IDX52"></a>
</dt>
<dd><p>Returns a size of <var>class</var> or <var>obj</var>.
</p></dd></dl>

<dl>
<dt><u>Method:</u> <b>cast</b><i> class obj</i>
<a name="IDX53"></a>
</dt>
<dd><p>Makes an instance of <var>class</var> from <var>obj</var>. The following rules are applied to make an instance.
</p>
<table>
<tr><td><p> <var>class</var> </p></td><td><p> Type of <var>obj</var> </p></td><td><p> Description
</p>
</td></tr>
<tr><td><p> Subclasses of <code>&lt;c-value&gt;</code>
</p></td><td><p> <code>&lt;real&gt;</code>
</p></td><td><p> Makes an instance of <var>class</var> which is the same value of <var>obj</var>.
</p>
</td></tr>
<tr><td><p> Subclasses of <code>&lt;c-value&gt;</code>
</p></td><td><p> <code>&lt;boolean&gt;</code>
</p></td><td><p> Makes an instance of <var>class</var> which is 1 (if <var>obj</var> is <code>#t</code>) or 0 (if <var>obj</var> is <code>#f</code>).
</p>
</td></tr>
<tr><td><p> <code>&lt;c-ptr&gt;</code> or <code>&lt;c-func-ptr&gt;</code>
</p></td><td><p> <code>&lt;integer&gt;</code>
</p></td><td><p> Makes a pointer object whose address is <var>obj</var>.
</p>
</td></tr>
<tr><td><p> <code>&lt;c-ptr&gt;</code> or <code>&lt;c-func-ptr&gt;</code>
</p></td><td><p> <code>&lt;c-ptr&gt;</code> or <code>&lt;c-func-ptr&gt;</code>
</p></td><td><p> Makes a pointer object whose address is the same of <var>obj</var>.
</p>
</td></tr>
<tr><td><p> <code>&lt;c-ptr&gt;</code> or <code>&lt;c-func-ptr&gt;</code>
</p></td><td><p> <code>&lt;c-array&gt;</code>
</p></td><td><p> Makes a pointer object whose address is the same of the first address of <var>obj</var>.
</p>
</td></tr>
<tr><td><p> <code>&lt;c-ptr&gt;</code>
</p></td><td><p> <code>&lt;string&gt;</code>
</p></td><td><p> Makes a pointer object whose address points an internally-generated C string.
</p>
</td></tr>
<tr><td><p> <code>&lt;c-ptr&gt;</code>
</p></td><td><p> <code>&lt;uvector&gt;</code>
</p></td><td><p> Makes a pointer object whose address points the buffer of <code>&lt;uvector&gt;</code>.
</p>
</td></tr>
<tr><td><p> <code>&lt;c-ptr&gt;</code>
</p></td><td><p> <code>&lt;sequence&gt;</code>
</p></td><td><p> Makes a pointer object whost address points an internally-generated array which contains the same elements of <var>obj</var>.
</p>
</td></tr>
<tr><td><p> <code>&lt;c-array&gt;</code>
</p></td><td><p> <code>&lt;sequence&gt;</code>
</p></td><td><p> Makes an array which contains the same elements of <var>obj</var>.
</p>
</td></tr>
<tr><td><p> <code>&lt;c-array&gt;</code>
</p></td><td><p> <code>&lt;c-ptr&gt;</code>
</p></td><td><p> Makes an array object whose first address is <var>obj</var>.
</p>
</td></tr>
<tr><td><p> <code>&lt;c-func-ptr&gt;</code>
</p></td><td><p> <code>&lt;procedure&gt;</code>
</p></td><td><p> Makes a pointer of a function which executes calls the procedure <var>obj</var>.
</p>
</td></tr>
<tr><td><p> <code>&lt;integer&gt;</code> or <code>&lt;real&gt;</code>
</p></td><td><p> <code>&lt;c-value&gt;</code>
</p></td><td><p> Makes the value of <var>obj</var>.
</p>
</td></tr>
<tr><td><p> <code>&lt;boolean&gt;</code>
</p></td><td><p> <code>&lt;c-value&gt;</code> or <code>&lt;real&gt;</code>
</p></td><td><p> Makes #f if the value of <var>obj</var> is 0, #t otherwise.
</p>
</td></tr>
<tr><td><p> <code>&lt;integer&gt;</code>
</p></td><td><p> <code>&lt;c-ptr&gt;</code> or <code>&lt;c-func-ptr&gt;</code>
</p></td><td><p> Makes the pointer address of <var>obj</var>.
</p>
</td></tr>
<tr><td><p> <code>&lt;integer&gt;</code>
</p></td><td><p> <code>&lt;c-array&gt;</code>
</p></td><td><p> Makes the first address of the array <var>obj</var>.
</p>
</td></tr>
<tr><td><p> <code>&lt;string&gt;</code>
</p></td><td><p> <code>&lt;c-ptr&gt;</code> or <code>&lt;c-func-ptr&gt;</code>
</p></td><td><p> Makes a string from the address of <var>obj</var>. 
</p>
</td></tr>
<tr><td><p> <code>&lt;string&gt;</code>
</p></td><td><p> <code>&lt;c-array&gt;</code>
</p></td><td><p> Makes a string from the array <var>obj</var>. It must be 0 terminated string.
</p>
</td></tr>
<tr><td><p> <code>&lt;collection&gt;</code>
</p></td><td><p> <code>&lt;c-array&gt;</code>
</p></td><td><p> Makes an instance of <var>class</var> which contains the same values of <var>obj</var>, which are casted with <code>scm-cast</code>. 
</p></td></tr>
</table>

</dd></dl>

<dl>
<dt><u>Function:</u> <b>scm-cast</b><i> obj</i>
<a name="IDX54"></a>
</dt>
<dd><p>Returns the value of <var>obj</var> if <var>obj</var> is an instance of <code>&lt;c-value&gt;</code>. Otherwise, returns <var>obj</var>.
</p></dd></dl>

<dl>
<dt><u>Function:</u> <b>make-null-ptr</b>
<a name="IDX55"></a>
</dt>
<dd><p>Returns NULL pointer.
</p></dd></dl>

<dl>
<dt><u>Function:</u> <b>null-ptr?</b><i> obj</i>
<a name="IDX56"></a>
</dt>
<dd><p>Returns <code>#t</code> if <var>obj</var> is a NULL pointer, <code>#f</code> otherwise.
</p></dd></dl>

<dl>
<dt><u>Function:</u> <b>register-finalizer!</b><i> ptrobj proc</i>
<a name="IDX57"></a>
</dt>
<dd><p>Register the finalizer <var>proc</var> to <var>ptrobj</var>. It is called when <var>ptrobj</var> is GCed.
</p></dd></dl>

<dl>
<dt><u>Function:</u> <b>unregister-finalizer!</b><i> ptrobj</i>
<a name="IDX58"></a>
</dt>
<dd><p>Deletes the finalizer of <var>ptrobj</var>.
</p></dd></dl>

<dl>
<dt><u>Function:</u> <b>finalize!</b><i> ptrobj</i>
<a name="IDX59"></a>
</dt>
<dd><p>Calls the finalizer of <var>ptrobj</var>, and deletes it from <var>ptrobj</var>.
</p></dd></dl>

<hr size="6">
<a name="objc_002dwrapper"></a>
<a name="SEC5"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC4" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC6" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC1" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 2. objc-wrapper </h1>

<p><code>objc-wrapper</code> is the module which enables to use Objective-C libraries.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC6">2.1 Load a framework library</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">    
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC7">2.2 Load an Objective-C header file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC8">2.3 Functions about Objective-C objects</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
</table>

<hr size="6">
<a name="Load-a-framework-library"></a>
<a name="SEC6"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC5" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 2.1 Load a framework library </h2>

<dl>
<dt><u>Function:</u> <b>c-load-framework</b><i> framework</i>
<a name="IDX60"></a>
</dt>
<dd><p>Load a framework library <var>framework</var>.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">(c-load-framework &quot;Foundation&quot;)
</pre></td></tr></table>
</dd></dl>

<hr size="6">
<a name="Load-an-Objectice_002dC-header-file"></a>
<a name="SEC7"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC6" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC8" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 2.2 Load an Objective-C header file </h2>

<dl>
<dt><u>Function:</u> <b>Macro</b><i> c-include file-or-list &amp;keyword</i>
<a name="IDX61"></a>
</dt>
<dd><p>This extends the <code>c-include</code> in <code>c-wrapper</code> module. it defines classes and methods of Objective-C code.
</p>
<p>If Objective-C class <code>Foo</code> is defined in the header file, <code>c-include</code> defines two symbols <code>Foo</code> and <code>&lt;Foo&gt;</code>. <code>Foo</code> is an instance of <code>&lt;c-struct:objc_object&gt;</code> and indicates the Objective-C class <code>Foo</code>. <code>&lt;Foo&gt;</code> is an alias of the type <code>&lt;id&gt;</code>.
</p></dd></dl>

<hr size="6">
<a name="Functions-about-Objective_002dC-objects"></a>
<a name="SEC8"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC7" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 2.3 Functions about Objective-C objects </h2>

<dl>
<dt><u>Macro:</u> <b>define-objc-class</b><i> class-name super-class-name</i>
<a name="IDX62"></a>
</dt>
<dd><p>Defines Objective-C class <var>class-name</var> whose super class is <var>super-class-name</var>.
</p></dd></dl>

<dl>
<dt><u>Macro:</u> <b>define-objc-method</b><i> objc-class ret-type (message-keyword varspec ...) body ...</i>
<a name="IDX63"></a>
</dt>
<dd><p>Defines an Objective-C method whose message keyword is <var>message-keyword</var> and return type is <var>ret-type</var>. <var>varspec</var> is a list, (variable-name variable-type).
</p>
<p>In the body, you can use two variables <var>self</var> and <var>super</var>. <var>self</var> is the receiver object and <var>super</var> is the object which is casted to its super class.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">(define-objc-method MyFooClass &lt;id&gt; [:doSomething (v &lt;c-int&gt;)]
  [super :doSomething v]
  [self :foo v]
  (bar v) ;; The result of (bar v) is the return value of this method.
  )
</pre></td></tr></table></dd></dl>

<dl>
<dt><u>Method:</u> <b>object-apply</b><i> (obj &lt;c-struct:objc_object&gt;) selector-or-args ...</i>
<a name="IDX64"></a>
</dt>
<dd><p>Calls the method of <var>obj</var>.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">[[NSString :alloc) :init]

[[NSString :startWithCString (&nbsp;&quot;Hello, world&quot;) :encoding NSASCIIStringEncoding]]
</pre></td></tr></table>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>@</b><i> str</i>
<a name="IDX65"></a>
</dt>
<dd><p>Returns Objective-C string.
</p></dd></dl>

<dl>
<dt><u>Function:</u> <b>@selector</b><i> method-name</i>
<a name="IDX66"></a>
</dt>
<dd><p>Returns a selector of <var>method-name</var>.
</p></dd></dl>

<hr size="6">
<a name="Function-and-Syntax-Index"></a>
<a name="SEC9"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC8" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC10" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC10" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="appendix"> A. Function and Syntax Index </h1>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a href="#SEC9_0" class="summary-letter"><b>(</b></a>
 &nbsp; 
<a href="#SEC9_1" class="summary-letter"><b>@</b></a>
 &nbsp; 
<br>
<a href="#SEC9_2" class="summary-letter"><b>C</b></a>
 &nbsp; 
<a href="#SEC9_3" class="summary-letter"><b>D</b></a>
 &nbsp; 
<a href="#SEC9_4" class="summary-letter"><b>F</b></a>
 &nbsp; 
<a href="#SEC9_5" class="summary-letter"><b>M</b></a>
 &nbsp; 
<a href="#SEC9_6" class="summary-letter"><b>N</b></a>
 &nbsp; 
<a href="#SEC9_7" class="summary-letter"><b>O</b></a>
 &nbsp; 
<a href="#SEC9_8" class="summary-letter"><b>P</b></a>
 &nbsp; 
<a href="#SEC9_9" class="summary-letter"><b>R</b></a>
 &nbsp; 
<a href="#SEC9_10" class="summary-letter"><b>S</b></a>
 &nbsp; 
<a href="#SEC9_11" class="summary-letter"><b>U</b></a>
 &nbsp; 
</td></tr></table>
<table border="0" class="index-fn">
<tr><td></td><th align="left">Index Entry</th><th align="left"> Section</th></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_0">(</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX34"><code>(setter</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX47"><code>(setter</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX48"><code>(setter</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_1">@</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX65"><code>@</code></a></td><td valign="top"><a href="#SEC8">2.3 Functions about Objective-C objects</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX66"><code>@selector</code></a></td><td valign="top"><a href="#SEC8">2.3 Functions about Objective-C objects</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_2">C</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX40"><code>c-array</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX3"><code>c-include</code></a></td><td valign="top"><a href="#SEC3">1.2 Load a header file</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX2"><code>c-ld</code></a></td><td valign="top"><a href="#SEC2">1.1 Load a shared library</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX4"><code>c-load</code></a></td><td valign="top"><a href="#SEC3">1.2 Load a header file</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX60"><code>c-load-framework</code></a></td><td valign="top"><a href="#SEC6">2.1 Load a framework library</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX1"><code>c-load-library</code></a></td><td valign="top"><a href="#SEC2">1.1 Load a shared library</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX51"><code>c-sizeof</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX52"><code>c-sizeof</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX43"><code>c-struct</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX44"><code>c-union</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX53"><code>cast</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_3">D</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX62"><code>define-objc-class</code></a></td><td valign="top"><a href="#SEC8">2.3 Functions about Objective-C objects</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX63"><code>define-objc-method</code></a></td><td valign="top"><a href="#SEC8">2.3 Functions about Objective-C objects</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX50"><code>deref</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_4">F</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX59"><code>finalize!</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_5">M</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX61"><code>Macro</code></a></td><td valign="top"><a href="#SEC7">2.2 Load an Objective-C header file</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX55"><code>make-null-ptr</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_6">N</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX56"><code>null-ptr?</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_7">O</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX64"><code>object-apply</code></a></td><td valign="top"><a href="#SEC8">2.3 Functions about Objective-C objects</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_8">P</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX37"><code>ptr</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX38"><code>ptr</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_9">R</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX33"><code>ref</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX45"><code>ref</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX46"><code>ref</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX57"><code>register-finalizer!</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_10">S</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX54"><code>scm-cast</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC9_11">U</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX58"><code>unregister-finalizer!</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
</table>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a href="#SEC9_0" class="summary-letter"><b>(</b></a>
 &nbsp; 
<a href="#SEC9_1" class="summary-letter"><b>@</b></a>
 &nbsp; 
<br>
<a href="#SEC9_2" class="summary-letter"><b>C</b></a>
 &nbsp; 
<a href="#SEC9_3" class="summary-letter"><b>D</b></a>
 &nbsp; 
<a href="#SEC9_4" class="summary-letter"><b>F</b></a>
 &nbsp; 
<a href="#SEC9_5" class="summary-letter"><b>M</b></a>
 &nbsp; 
<a href="#SEC9_6" class="summary-letter"><b>N</b></a>
 &nbsp; 
<a href="#SEC9_7" class="summary-letter"><b>O</b></a>
 &nbsp; 
<a href="#SEC9_8" class="summary-letter"><b>P</b></a>
 &nbsp; 
<a href="#SEC9_9" class="summary-letter"><b>R</b></a>
 &nbsp; 
<a href="#SEC9_10" class="summary-letter"><b>S</b></a>
 &nbsp; 
<a href="#SEC9_11" class="summary-letter"><b>U</b></a>
 &nbsp; 
</td></tr></table>

<hr size="6">
<a name="Class-Index"></a>
<a name="SEC10"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC9" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC11" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC9" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC11" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="appendix"> B. Class Index </h1>
<p>For readability, the surrounding <code>&lt;</code> and <code>&gt;</code> are stripped off.
</p><table><tr><th valign="top">Jump to: &nbsp; </th><td><a href="#SEC10_0" class="summary-letter"><b>C</b></a>
 &nbsp; 
</td></tr></table>
<table border="0" class="index-cl">
<tr><td></td><th align="left">Index Entry</th><th align="left"> Section</th></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="SEC10_0">C</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#IDX19"><code>c-char</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX30"><code>c-double</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX29"><code>c-float</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX23"><code>c-int</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX25"><code>c-long</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX27"><code>c-longlong</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX21"><code>c-short</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX20"><code>c-uchar</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX24"><code>c-uint</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX26"><code>c-ulong</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX28"><code>c-ulonglong</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX22"><code>c-ushort</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td></td><td valign="top"><a href="#IDX32"><code>c-value-meta</code></a></td><td valign="top"><a href="#SEC4">1.3 Classes and functions about C types</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
</table>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a href="#SEC10_0" class="summary-letter"><b>C</b></a>
 &nbsp; 
</td></tr></table>

<hr size="6">
<a name="Variable-Index"></a>
<a name="SEC11"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC10" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[ &gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC10" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[ &gt;&gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="appendix"> C. Variable Index </h1>

<hr size="6">
<a name="SEC_Contents"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1>Table of Contents</h1>
<div class="contents">

<ul class="toc">
  <li><a name="TOC1" href="#SEC1">1. c-wrapper</a>
  <ul class="toc">
    <li><a name="TOC2" href="#SEC2">1.1 Load a shared library</a></li>
    <li><a name="TOC3" href="#SEC3">1.2 Load a header file</a></li>
    <li><a name="TOC4" href="#SEC4">1.3 Classes and functions about C types</a></li>
  </ul></li>
  <li><a name="TOC5" href="#SEC5">2. objc-wrapper</a>
  <ul class="toc">
    <li><a name="TOC6" href="#SEC6">2.1 Load a framework library</a></li>
    <li><a name="TOC7" href="#SEC7">2.2 Load an Objective-C header file</a></li>
    <li><a name="TOC8" href="#SEC8">2.3 Functions about Objective-C objects</a></li>
  </ul></li>
  <li><a name="TOC9" href="#SEC9">A. Function and Syntax Index</a></li>
  <li><a name="TOC10" href="#SEC10">B. Class Index</a></li>
  <li><a name="TOC11" href="#SEC11">C. Variable Index</a></li>
</ul>
</div>
<hr size="1">
<a name="SEC_About"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1>About This Document</h1>
<p>
  This document was generated by <em>KOGURO, Naoki</em> on <em>December, 26 2006</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
</p>
<p>
  The buttons in the navigation panels have the following meaning:
</p>
<table border="1">
  <tr>
    <th> Button </th>
    <th> Name </th>
    <th> Go to </th>
    <th> From 1.2.3 go to</th>
  </tr>
  <tr>
    <td align="center"> [ &lt; ] </td>
    <td align="center">Back</td>
    <td>previous section in reading order</td>
    <td>1.2.2</td>
  </tr>
  <tr>
    <td align="center"> [ &gt; ] </td>
    <td align="center">Forward</td>
    <td>next section in reading order</td>
    <td>1.2.4</td>
  </tr>
  <tr>
    <td align="center"> [ &lt;&lt; ] </td>
    <td align="center">FastBack</td>
    <td>beginning of this chapter or previous chapter</td>
    <td>1</td>
  </tr>
  <tr>
    <td align="center"> [ Up ] </td>
    <td align="center">Up</td>
    <td>up section</td>
    <td>1.2</td>
  </tr>
  <tr>
    <td align="center"> [ &gt;&gt; ] </td>
    <td align="center">FastForward</td>
    <td>next chapter</td>
    <td>2</td>
  </tr>
  <tr>
    <td align="center"> [Top] </td>
    <td align="center">Top</td>
    <td>cover (top) of document</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [Contents] </td>
    <td align="center">Contents</td>
    <td>table of contents</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [Index] </td>
    <td align="center">Index</td>
    <td>index</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [ ? ] </td>
    <td align="center">About</td>
    <td>about (help)</td>
    <td> &nbsp; </td>
  </tr>
</table>

<p>
  where the <strong> Example </strong> assumes that the current position is at <strong> Subsubsection One-Two-Three </strong> of a document of the following structure:
</p>

<ul>
  <li> 1. Section One
    <ul>
      <li>1.1 Subsection One-One
        <ul>
          <li>...</li>
        </ul>
      </li>
      <li>1.2 Subsection One-Two
        <ul>
          <li>1.2.1 Subsubsection One-Two-One</li>
          <li>1.2.2 Subsubsection One-Two-Two</li>
          <li>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
            <strong>&lt;== Current Position </strong></li>
          <li>1.2.4 Subsubsection One-Two-Four</li>
        </ul>
      </li>
      <li>1.3 Subsection One-Three
        <ul>
          <li>...</li>
        </ul>
      </li>
      <li>1.4 Subsection One-Four</li>
    </ul>
  </li>
</ul>

<hr size="1">
<p>
 <font size="-1">
  This document was generated by <em>KOGURO, Naoki</em> on <em>December, 26 2006</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
 </font>
 <br>

</p>
</body>
</html>