| GirToBac 0.2 Create FB Headers from GObject Introspection *.gir files

- Main Page
- Dokumentation
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Enumerations Enumerator Macros Pages
GirToBac.bas
Go to the documentation of this file.
1 /** \file GirToBac.bas
2 \brief Main source code file
3
4 This file contains the main source code. Compile this file with the
5 FreeBasic compiler \em fbc to create an executable GirToBac tool.
6
7 The main content of this file are different parsers used by the <A
8 HREF="https://developer.gnome.org/glib/stable/glib-Simple-XML-Subset-Parser.html">
9 GMarkupParser </A>. Each parser is declared as a UDT containing five
10 function adresses. Only two are used here (\em start_element and \em
11 end_element). For better readability macros are used for the
12 relapsing part of the function declarations and the UDT
13 declarations of each parser. Additionally, labels are placed in
14 front of each parser to get a mark in the IDE labels list for easy
15 jumping between the parser definitions. (The labels aren't used in
16 the source code.)
17
18 */
19
20 /** \mainpage GirToBac-0.2
21
22 GirToBac is a tool to generate FreeBASIC (FB) header files for
23 libraries based on [GOject-Introspection](https://wiki.gnome.org/GObjectIntrospection/).
24 which is a middleware layer between C libraries (using GObject) and
25 language bindings. The C library can be scanned at compile time and
26 generate a metadata file, in addition to the actual native C library.
27 GirToBac can read this metadata and automatically provide FB bindings
28 to call into the C library.
29
30 GirToBac is the first approach to connect the FreeBasic programming
31 language to this tool-chain for easy creating and up-dating
32 FreeBasic header files of GObject based libraries (ie like GTK, GDA,
33 GooCanvas, ...).
34
35 Find detailed information in the \subpage tutorial.
36
37 (This documentation is generated from FB source code by
38 [fb-doc](http://www.freebasic-portal.de/downloads/ressourcencompiler/fb-doc-229.html)
39 filtering.)
40
41
42 \section licence GirToBac licence (GPLv3)
43
44 Copyright &copy; 2013-2014 by Thomas{ DoT ]Freiherr{ at }gmx[ dOt }net
45
46 This program is free software; you can redistribute it and/or modify
47 it under the terms of the GNU General Public License as published by
48 the Free Software Foundation; either version 3 of the License, or (at
49 your option) any later version.
50
51 This program is distributed in the hope that it will be useful, but
52 WITHOUT ANY WARRANTY; without even the implied warranty of
53 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
54 General Public License for more details.
55
56 To get the licence text refer to
57 http://www.gnu.org/licenses/gpl-3.0.html or write to the Free
58 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
59 MA 02110- 1301, USA.
60
61 */
62
63
64
65
66
67
68 #include "Gir/GLib-2.0.bi"
69
70
71 const VAR OOP = 0 ;//!< a flag to generate classic (C-like) headers or OOP style (currently only classic style is supported)
72
73
74 /** \brief ENUM used to specify a type
75
76 These enums are used to specify a type. This may be an return value
77 from a function, a parameter in a parameter list or a member field
78 in a TYPE or UNION.
79
80 */
81 typedef enum TypeFlags{
82 TYPE_VAR, //!< a variable
83 TYPE_SUB, //!< a SUB (function of type 'void')
84 TYPE_FUN, //!< a FUNCTION
85 TYPE_VARARG, //!< a variadic parameter (in a parameter list)
86 TYPE_ARRAY, //!< an Array (C-like)
87 TYPE_LIST//!< a list (GLib type)
88 };
89
90 /** \brief TYPE struct used the parsers
91
92 The fields of this TYPE are used in the different parsers to exchain
93 the parsed context.
94
95 */
96 class UserUDT{ public:
97 STRING
98 FunNam,//!< The FB name of a SUB/FUNCTION/callback
99 FunTyp,//!< The type of a FUNCTION/callback ("" = SUB)
100 FunDll,//!< The function name in the dll
101 FieldNam,//!< The FB name of a field
102 FieldVal,//!< The vale of a field
103 OopDll,//!< The FB variable for OOP ???
104 Check,//!< The symbol to check for (skip binding if prersent)
105 NamSpace,//!< The namespace of the library
106 NamDll,//!< The name of the library to include
107 NextElm,//!< The name of the next element in the ordered list
108 ArrayTyp,//!< The type of an array
109 Typ,//!< The type of a field
110 TypC,//!< The type of a field in C-style
111 ParaStr;//!< A parameter list
112 gint32
113 ParaBy,//!< The parameter passing (BYVAL/BYREF)
114 ParaCnt,//!< The number of parameters in a list
115 BlockCnt,//!< The number of entries in a block (ENUM/UNION/TYPE)
116 type_flg,//!< The tye of a variable (see #TypeFlags)
117 ArrayLen,//!< The length or size of an array
118 FieldBits,//!< The number of bits (in a bitfield)
119 PropRW,//!< The PROPERTY style (read/write)
120 FnrBi,//!< The file number for output
121 SkipElem;//!< Wether to skip the current element (in ordered parsing process)
122 CONST_gchar_PTR
123 FuncSkip,//!< Used as flag to skip a function
124 GErrr;//!< Used as flag to add a GError PTR PTR in parameter lists
125
126 STRING
127 Raus[15 + 1],//!< Strings for output (0-level, current level and 14 levels of nested blocks)
128 Nams[15 + 1];//!< Names of the current block on each level (0 to 15)
129 gint32
130 Level = 1,//!< A counter for the current level
131 RausMax = 1 ;//!< The highest level of output (nested blocks)
132 };
133
134
135 /** \brief Find an attribute by its name
136 \param Nam The attribute name
137 \param AttNams The GLib array of attribute names (zero terminated)
138 \param AttVals The GLib array of attribute values
139 \returns A pointer to the attribute value (or zero)
140
141 The GLib XML parser lists all attributes found in a tag and their
142 values in the arrays AttNams and AttVals. This function finds an
143 attribute by its name and returns its value. Otherwise it returns
144 zero if the specified attribute isn't present.
145
146 */
147 FUNCTION_AS_CONST_gchar_PTR find_value (
148 BYVAL_AS_CONST_gchar_PTR Nam,
149 BYVAL_AS_CONST_gchar_PTR_PTR AttNams,
150 BYVAL_AS_CONST_gchar_PTR_PTR AttVals) {
151
152
153
154
155
156
157 };
158
159
160 //! New line character macro (for better readability)
161 #define NL /* !"\n" & */
162
163
164 /** \brief Macro to start a parser
165
166 Each parser uses the same parameter list for the start function.
167 This macro generates the code for such a procedure (SUB) and opens a
168 WITH block to support access to the #UserUDT data.
169
170 It's designed to be used in combination with the _END_PARSER() macro.
171
172 */
173 #define _START_PARSER(_N_) /* (multi line FreeBasic #MACRO)
174 SUB start_##_N_ CDECL( _
175 BYVAL ctx AS GMarkupParseContext PTR, _
176 BYVAL element_name AS CONST gchar PTR, _
177 BYVAL AttNams AS CONST gchar PTR PTR, _
178 BYVAL AttVals AS CONST gchar PTR PTR, _
179 BYVAL UserData AS gpointer, _
180 BYVAL error_ AS GError PTR PTR)
181 WITH PEEK(UserUDT, UserData)
182 #ENDMACRO */
183
184 /** \brief Macro to complete a start parser and open an end parser
185
186 Each parser uses the same code for ending a start function and the
187 same parameter list for the end function. This macro generates the
188 code to finish the start procedure (END WITH/END SUB), open an end
189 procedure (SUB with constant parameter list) and opens a WITH block
190 to support access to the #UserUDT data.
191
192 It's designed to be used after the _START_PARSER() macro and in combination
193 with the _NEW_PARSER() macro.
194
195 */
196 #define _END_PARSER(_N_) /* (multi line FreeBasic #MACRO)
197 CASE ELSE
198 'PRINT #.FnrBi, NL " ' " & __FB_FUNCTION__ & " Skipping " & *element_name _
199 ' & " """ & *find_value("name", AttNams, AttVals) & """";
200 g_markup_parse_context_push(ctx, @Skip_parser, UserData) '& skip_parser();
201 END SELECT
202 END WITH
203 END SUB
204 SUB end_##_N_ CDECL( _
205 BYVAL ctx AS GMarkupParseContext PTR, _
206 BYVAL element_name AS CONST gchar PTR, _
207 BYVAL UserData AS gpointer, _
208 BYVAL error_ AS GError PTR PTR)
209 WITH PEEK(UserUDT, UserData)
210 #ENDMACRO */
211
212
213 /** \brief Macro to complete an end parser and initialize the \GMP UDT
214
215 Each parser uses the same code for ending an end procedure. This
216 macro generates the code to finish the end procedure and generates a
217 structure (TYPE) to use the parser. This TYPE contains two
218 functions (procedures for start and end of a XML tag).
219
220 It's designed to be used after the _END_PARSER() macro.
221
222 */
223 #define _NEW_PARSER(_N_) /* (multi line FreeBasic #MACRO)
224 CASE ELSE
225 g_markup_parse_context_pop(ctx)
226 END SELECT
227 END WITH
228 END SUB
229 STATIC SHARED AS GMarkupParser _N_##_parser = TYPE(@start_##_N_, @end_##_N_, NULL, NULL, NULL)
230 #ENDMACRO */
231
232
233 //! The \GMP for skipping XML-tags
234 static GMarkupParser Skip_parser = TYPE(NULL, NULL, NULL, NULL, NULL);
235
236 #include "GirToBac_RepData.bas"
237
238
239 /** \brief Generate code to start parsing a function
240
241 This macro is used to start the function parser. The snipped is used
242 several times, so this macro makes it unique (single source).
243
244 */
245 #define _START_FUNC() /* (multi line FreeBasic #MACRO)
246 .ParaCnt = 0 : .ParaStr = "(" : .FunTyp = ""
247 .GErrr = find_value("throws", AttNams, AttVals)
248 IF OOP THEN
249 .FunNam = *FB_NAM.rep(find_value("name", AttNams, AttVals))
250 .FunDll = *find_value("c:identifier", AttNams, AttVals)
251 ELSE
252 .FunNam = *FB_NAM.rep(find_value("c:identifier", AttNams, AttVals))
253 END IF
254 g_markup_parse_context_push(ctx, @Func_parser, UserData) '& func_parser();
255 #ENDMACRO */
256
257 /** \brief Generate code to end parsing a function
258
259 This macro is used to end the function parser. The snipped is used
260 several times, so this macro makes it unique (single source).
261
262 */
263 #define _END_FUNC() /* (multi line FreeBasic #MACRO)
264 IF .GErrr THEN
265 IF .ParaCnt THEN .ParaStr &= ", "
266 .ParaStr &= "BYVAL AS GError PTR PTR" : .ParaCnt += 1
267 END IF
268 g_markup_parse_context_pop(ctx)
269 .type_flg = IIF(LEN(.FunTyp), TYPE_FUN, TYPE_SUB)
270 .ParaStr &= ")"
271 #ENDMACRO */
272
273
274 /** \brief Generate an FB type
275 \param Ud The data in the #UserUDT
276 \returns An FB type string
277
278 Type declarations may need adaptions. We have to follow the rules
279 defined in the *.GirToBac file to change some types. Also they may
280 contain '*' characters to be translated to 'PTR' strings for FB.
281
282 In seldom cases a <em>*.gir</em> declaration doesn't contain an
283 entry for a C type. Then we try repairing it by using the type used
284 in the namespace instead.
285
286 */
287 FUNCTION_AS_STRING fb_type (BYVAL_AS_ANY_PTR Ud) {
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307 RepData.rep();
308 RepData.rep();
309
310
311
312
313
314 };
315
316 //! Forward declaration (due to circular references)
317 SUB_CDECL start_type (
318 BYVAL_AS_GMarkupParseContext_PTR,
319 BYVAL_AS_CONST_gchar_PTR,
320 BYVAL_AS_CONST_gchar_PTR_PTR,
321 BYVAL_AS_CONST_gchar_PTR_PTR,
322 BYVAL_AS_gpointer,
323 BYVAL_AS_GError_PTR_PTR);
324
325 //! Forward declaration (due to circular references)
326 SUB_CDECL end_type (
327 BYVAL_AS_GMarkupParseContext_PTR,
328 BYVAL_AS_CONST_gchar_PTR,
329 BYVAL_AS_gpointer,
330 BYVAL_AS_GError_PTR_PTR);
331
332 //! The \GMP for the type XML-tags
333 static GMarkupParser
334 Type_parser = TYPE(@start_type, @end_type, NULL, NULL, NULL);
335
336
337 //! The \GMP for the parameter lists
338 SUB_CDECL para_parser(){
339
340
341
342
343
344
345
346
347
348 type_parser();
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 //! The \GMP for the functions (function, method, constructor, callback)
376 SUB_CDECL func_parser(){
377
378
379
380
381
382 type_parser();
383
384 para_parser();
385
386
387
388
389
390
391
392
393
394
395
396
397 };
398
399 //! The \GMP for the types
400 SUB_CDECL type_parser(){
401
402
403
404
405
406
407 VAR c = find_value("c:type", AttNams, AttVals) ;
408
409
410
411
412 skip_parser();
413
414
415
416
417
418
419 VAR n = find_value("name", AttNams, AttVals) ;
420 VAR t = find_value("c:type", AttNams, AttVals) ;
421
422
423
424
425 skip_parser();
426
427
428
429
430
431 type_parser();
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452 };
453
454 //! The \GMP for the interfaces, records and classes (OOP style -> ToDo)
455 SUB_CDECL class_parser(){
456
457
458
459
460
461
462
463
464 VAR bits = find_value("bits", AttNams, AttVals) ;
465
466 type_parser();
467
468
469 VAR r = find_value("readable", AttNams, AttVals) ;
470 VAR w = find_value("writable", AttNams, AttVals) ;
471
472
473 type_parser();
474
475
476
477 func_parser();
478
479
480
481
482
483
484
485
486
487
488
489 VAR dll = "__" & .BlockCnt ;
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 VAR dll = "__" & .BlockCnt;
524
525 VAR p = INSTR(.ParaStr, ", ") ;
526 VAR par = "(" ;
527
528
529 VAR parcall = UCASE(.NamSpace & "_" & .Nams(.Level)) & "(@THIS)" ;
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 //! The \GMP for the interfaces, records and classes (C-like style)
575 SUB_CDECL udt_parser(){
576
577
578
579
580
581 VAR n = find_value("name", AttNams, AttVals);
582 VAR c = find_value("c:identifier", AttNams, AttVals);
583
584 VAR bits = find_value("bits", AttNams, AttVals);
585
586 type_parser();
587
588 skip_parser();
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 //! The \GMP for the union blocks
626 SUB_CDECL unio_parser(){
627
628
629
630
631
632 VAR n = find_value("name", AttNams, AttVals) ;
633 VAR c = find_value("c:identifier", AttNams, AttVals) ;
634
635 VAR bits = find_value("bits", AttNams, AttVals) ;
636
637 type_parser();
638
639
640
641 VAR nam = *FB_NAM.rep(find_value("name", AttNams, AttVals)) ;
642
643
644
645 class_parser(); Udt_parser();
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 //! The \GMP for the enum blocks
672 SUB_CDECL enum_parser(){
673
674
675
676
677
678 VAR nam = *FB_NAM.rep(find_value(*IIF(OOP, @"name", @"c:identifier"), AttNams, AttVals)) ;
679 VAR value = find_value("value", AttNams, AttVals) ;
680
681
682
683
684
685
686
687
688
689 };
690
691 //! The \GMP for the first pass
692 SUB_CDECL pass1_parser(){
693
694
695
696
697
698 VAR n = find_value(IIF(OOP, @"name", @"c:type"), AttNams, AttVals) ;
699
700
701
702 type_parser();
703
704 VAR nam = *FB_NAM.rep(find_value(IIF(OOP, @"name", @"c:type"), AttNams, AttVals));
705
706
707
708
709
710
711 enum_parser();
712
713 VAR n = find_value(IIF(OOP, @"name", @"c:type"), AttNams, AttVals) ;
714
715
716 type_parser();
717
718 VAR n = find_value(IIF(OOP, @"name", @"c:type"), AttNams, AttVals) ;
719
720 VAR nam = *FB_NAM.rep(n) ;
721
722
723
724
725
726
727
728
729
730
731
732
733 VAR dll = find_value("shared-library", AttNams, AttVals) + 3 ;
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 //! The \GMP for the second pass
771 SUB_CDECL passX_parser(){
772
773
774
775
776
777
778 VAR n = find_value(*IIF(OOP, @"name", @"c:type"), AttNams, AttVals);
779
780
781
782
783
784
785
786 skip_parser();
787
788
789
790
791
792 skip_parser();
793
794
795
796
797
798
799
800
801 VAR g = find_value("glib:get-type", AttNams, AttVals) ;
802
803 VAR s = find_value("glib:type-struct", AttNams, AttVals)
804 , t1 = UCASE(.NamSpace) & "_"
805 , p = INSTR(*g, "_")
806 , t2 = UCASE(MID(*g, p + 1, LEN(*g) - p - 9))
807 , t3 = t1 & "TYPE_" & t2
808 , t4 = t3 & ", " & *g
809 , t5 = .NamSpace & *s ;
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827 class_parser(); Udt_parser();
828
829
830
831
832 class_parser(); Udt_parser();
833
834
835
836 unio_parser();
837
838
839
840 func_parser();
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 //! The \GMP for last pass
883 SUB_CDECL pass4_parser(){
884
885
886
887
888
889 find_value();
890
891 func_parser();
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910 };
911
912 /** \brief Macro to run a parser
913
914 This macro creates a parser context and runs the given parser once.
915
916 */
917 #define PARSE(_N_) /* (multi line FreeBasic #MACRO)
918 SCOPE
919 VAR ctx = g_markup_parse_context_new(@pass##_N_##_parser, 0, @UDat, NULL)
920 IF g_markup_parse_context_parse(ctx, buffer, length, @errr) THEN _
921 IF 0 = g_markup_parse_context_end_parse(ctx, @errr) THEN _
922 g_print(!"Cannot parse %s (invalid content)\n", filename, NULL)
923 g_markup_parse_context_free(ctx)
924 END SCOPE
925 #ENDMACRO */
926
927 int main(){
928
929
930 VAR filename = COMMAND(1)
931 , basename = MID(filename, INSTRREV(filename, ANY "\/") + 1)
932 , proto = "" ;
933
934
935
936
937
938 GError_PTR errr = NULL ;
939 UserUDT UDat;
940
941 gchar_PTR buffer;
942 gsize length;
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961 gchar_PTR buff2;
962 gsize length2;
963
964
965
966 VAR ctx = g_markup_parse_context_new(@G2b_parser, 0, @UDat, NULL);
967 g2b_parser();
968
969
970
971
972
973
974
975
976
977 pass1_parser(); // #DEFINE, ENUM, TYPE
978
979
980
981
982
983
984
985
986
987
988 VAR xx = FIRST.A ;
989 passX_parser();
990
991
992
993
994
995
996
997 passX_parser();
998
999
1000 pass4_parser();
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010 RepData.list();
1011 RepData.list();
1012
1013
1014 };
UserUDT::FieldBits
gint32 FieldBits
The number of bits (in a bitfield)
Definition: GirToBac.bas:113
FB_NAM
RepData FB_NAM
Replacements for symbols (names)
Definition: GirToBac_RepData.bas:175
UserUDT::Level
gint32 Level
A counter for the current level.
Definition: GirToBac.bas:130
UserUDT::FunNam
STRING FunNam
The FB name of a SUB/FUNCTION/callback.
Definition: GirToBac.bas:98
TYPE_SUB
a SUB (function of type 'void')
Definition: GirToBac.bas:83
enum_parser
SUB_CDECL enum_parser()
The GMarkupParser for the enum blocks.
Definition: GirToBac.bas:672
TYPE_VAR
a variable
Definition: GirToBac.bas:82
main
int main()
Definition: GirToBac.bas:927
TYPE_ARRAY
an Array (C-like)
Definition: GirToBac.bas:86
UserUDT::NextElm
STRING NextElm
The name of the next element in the ordered list.
Definition: GirToBac.bas:98
UserUDT::BlockCnt
gint32 BlockCnt
The number of entries in a block (ENUM/UNION/TYPE)
Definition: GirToBac.bas:113
UserUDT::Raus
STRING Raus[15+1]
Strings for output (0-level, current level and 14 levels of nested blocks)
Definition: GirToBac.bas:127
FIRST
Stack FIRST
FiFo stack for ordered elements (pass X))
Definition: GirToBac_RepData.bas:177
UserUDT::FieldVal
STRING FieldVal
The vale of a field.
Definition: GirToBac.bas:98
pass1_parser
SUB_CDECL pass1_parser()
The GMarkupParser for the first pass.
Definition: GirToBac.bas:692
RepData::list
SUB list(BYREF_AS_STRING Li)
Generate a list of un-used symbols.
Definition: GirToBac_RepData.bas:61
UserUDT::Check
STRING Check
The symbol to check for (skip binding if prersent)
Definition: GirToBac.bas:98
OOP
const VAR OOP
a flag to generate classic (C-like) headers or OOP style (currently only classic style is supported) ...
Definition: GirToBac.bas:71
fb_type
FUNCTION_AS_STRING fb_type(BYVAL_AS_ANY_PTR Ud)
Generate an FB type.
Definition: GirToBac.bas:287
para_parser
SUB_CDECL para_parser()
The GMarkupParser for the parameter lists.
Definition: GirToBac.bas:338
UserUDT::type_flg
gint32 type_flg
The tye of a variable (see TypeFlags)
Definition: GirToBac.bas:113
pass4_parser
SUB_CDECL pass4_parser()
The GMarkupParser for last pass.
Definition: GirToBac.bas:883
Type_parser
static GMarkupParser Type_parser
The GMarkupParser for the type XML-tags.
Definition: GirToBac.bas:334
passX_parser
SUB_CDECL passX_parser()
The GMarkupParser for the second pass.
Definition: GirToBac.bas:771
UserUDT::ParaStr
STRING ParaStr
A parameter list.
Definition: GirToBac.bas:98
UserUDT::FnrBi
gint32 FnrBi
The file number for output.
Definition: GirToBac.bas:113
g2b_parser
SUB_CDECL g2b_parser()
The GMarkupParser for the configuration file *.GirToBac.
Definition: GirToBac_RepData.bas:181
UserUDT::ParaBy
gint32 ParaBy
The parameter passing (BYVAL/BYREF)
Definition: GirToBac.bas:113
UserUDT::RausMax
gint32 RausMax
The highest level of output (nested blocks)
Definition: GirToBac.bas:131
UserUDT::NamDll
STRING NamDll
The name of the library to include.
Definition: GirToBac.bas:98
unio_parser
SUB_CDECL unio_parser()
The GMarkupParser for the union blocks.
Definition: GirToBac.bas:626
start_type
SUB_CDECL start_type(BYVAL_AS_GMarkupParseContext_PTR, BYVAL_AS_CONST_gchar_PTR, BYVAL_AS_CONST_gchar_PTR_PTR, BYVAL_AS_CONST_gchar_PTR_PTR, BYVAL_AS_gpointer, BYVAL_AS_GError_PTR_PTR)
Forward declaration (due to circular references)
UserUDT::PropRW
gint32 PropRW
The PROPERTY style (read/write)
Definition: GirToBac.bas:113
UserUDT::FunDll
STRING FunDll
The function name in the dll.
Definition: GirToBac.bas:98
UserUDT::FunTyp
STRING FunTyp
The type of a FUNCTION/callback ("" = SUB)
Definition: GirToBac.bas:98
TypeFlags
TypeFlags
ENUM used to specify a type.
Definition: GirToBac.bas:81
TYPE_VARARG
a variadic parameter (in a parameter list)
Definition: GirToBac.bas:85
func_parser
SUB_CDECL func_parser()
The GMarkupParser for the functions (function, method, constructor, callback)
Definition: GirToBac.bas:376
UserUDT
TYPE struct used the parsers.
Definition: GirToBac.bas:96
TYPE_FUN
a FUNCTION
Definition: GirToBac.bas:84
class_parser
SUB_CDECL class_parser()
The GMarkupParser for the interfaces, records and classes (OOP style -> ToDo)
Definition: GirToBac.bas:455
UserUDT::FieldNam
STRING FieldNam
The FB name of a field.
Definition: GirToBac.bas:98
UserUDT::NamSpace
STRING NamSpace
The namespace of the library.
Definition: GirToBac.bas:98
UserUDT::Nams
STRING Nams[15+1]
Names of the current block on each level (0 to 15)
Definition: GirToBac.bas:127
UserUDT::ArrayTyp
STRING ArrayTyp
The type of an array.
Definition: GirToBac.bas:98
Skip_parser
static GMarkupParser Skip_parser
The GMarkupParser for skipping XML-tags.
Definition: GirToBac.bas:234
find_value
FUNCTION_AS_CONST_gchar_PTR find_value(BYVAL_AS_CONST_gchar_PTR Nam, BYVAL_AS_CONST_gchar_PTR_PTR AttNams, BYVAL_AS_CONST_gchar_PTR_PTR AttVals)
Find an attribute by its name.
Definition: GirToBac.bas:147
UserUDT::ArrayLen
gint32 ArrayLen
The length or size of an array.
Definition: GirToBac.bas:113
UserUDT::ParaCnt
gint32 ParaCnt
The number of parameters in a list.
Definition: GirToBac.bas:113
UserUDT::GErrr
CONST_gchar_PTR GErrr
Used as flag to add a GError PTR PTR in parameter lists.
Definition: GirToBac.bas:123
RepData::rep
FUNCTION_AS_CONST_ZSTRING_PTR rep(BYVAL_AS_CONST_gchar_PTR T)
Get replacement for a text (if any))
Definition: GirToBac_RepData.bas:106
UserUDT::Typ
STRING Typ
The type of a field.
Definition: GirToBac.bas:98
UserUDT::OopDll
STRING OopDll
The FB variable for OOP ???
Definition: GirToBac.bas:98
UserUDT::TypC
STRING TypC
The type of a field in C-style.
Definition: GirToBac.bas:98
RepData
Object to check texts (Su) and provide replacements (Er)
Definition: GirToBac_RepData.bas:25
UserUDT::SkipElem
gint32 SkipElem
Wether to skip the current element (in ordered parsing process)
Definition: GirToBac.bas:113
udt_parser
SUB_CDECL udt_parser()
The GMarkupParser for the interfaces, records and classes (C-like style)
Definition: GirToBac.bas:575
GirToBac_RepData.bas
Helper Classes list and replacements.
type_parser
SUB_CDECL type_parser()
The GMarkupParser for the types.
Definition: GirToBac.bas:400
end_type
SUB_CDECL end_type(BYVAL_AS_GMarkupParseContext_PTR, BYVAL_AS_CONST_gchar_PTR, BYVAL_AS_gpointer, BYVAL_AS_GError_PTR_PTR)
Forward declaration (due to circular references)
UserUDT::FuncSkip
CONST_gchar_PTR FuncSkip
Used as flag to skip a function.
Definition: GirToBac.bas:123
Stack::A
INTEGER A
Start position of next entry (-1)
Definition: GirToBac_RepData.bas:123
TYPE_LIST
a list (GLib type)
Definition: GirToBac.bas:87