1
/* GObject introspection: gen-introspect
3
* Copyright (C) 2007 Jürg Billeter
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the
17
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
* Boston, MA 02111-1307, USA.
21
* Jürg Billeter <j@bitron.ch>
24
#ifndef __GEN_INTROSPECT_H__
25
#define __GEN_INTROSPECT_H__
28
#include "gidlmodule.h"
32
typedef struct _GIGenerator GIGenerator;
33
typedef struct _CSymbol CSymbol;
34
typedef struct _CType CType;
37
const char *namespace;
38
char *lower_case_namespace;
39
/* specified files to be parsed */
42
/* source reference of current lexer position */
43
char *current_filename;
45
GHashTable *typedef_table;
46
GHashTable *struct_or_union_or_enum_table;
51
GList *get_type_symbols;
53
GHashTable *type_by_lower_case_prefix;
58
GIGenerator *g_igenerator_new (void);
59
void g_igenerator_parse (GIGenerator *igenerator, FILE *f);
60
void g_igenerator_add_symbol (GIGenerator *igenerator, CSymbol *symbol);
61
gboolean g_igenerator_is_typedef (GIGenerator *igenerator, const char *name);
62
void g_igenerator_generate (GIGenerator *igenerator);
64
GIGenerator *the_igenerator;
70
CSYMBOL_TYPE_FUNCTION,
82
gboolean const_int_set;
87
CSymbol *csymbol_new (CSymbolType type);
88
gboolean csymbol_get_const_boolean (CSymbol *symbol);
104
STORAGE_CLASS_NONE = 0,
105
STORAGE_CLASS_TYPEDEF = 1 << 1,
106
STORAGE_CLASS_EXTERN = 1 << 2,
107
STORAGE_CLASS_STATIC = 1 << 3,
108
STORAGE_CLASS_AUTO = 1 << 4,
109
STORAGE_CLASS_REGISTER = 1 << 5
110
} StorageClassSpecifier;
113
TYPE_QUALIFIER_NONE = 0,
114
TYPE_QUALIFIER_CONST = 1 << 1,
115
TYPE_QUALIFIER_RESTRICT = 1 << 2,
116
TYPE_QUALIFIER_VOLATILE = 1 << 3
121
FUNCTION_INLINE = 1 << 1
126
UNARY_POINTER_INDIRECTION,
129
UNARY_BITWISE_COMPLEMENT,
130
UNARY_LOGICAL_NEGATION
135
StorageClassSpecifier storage_class_specifier;
136
TypeQualifier type_qualifier;
137
FunctionSpecifier function_specifier;
143
CType *ctype_new (CTypeType type);
144
CType *ctype_copy (CType *type);
145
CType *cbasic_type_new (const char *name);
146
CType *ctypedef_new (const char *name);
147
CType *cstruct_new (const char *name);
148
CType *cunion_new (const char *name);
149
CType *cenum_new (const char *name);
150
CType *cpointer_new (CType *base_type);
151
CType *carray_new (void);
152
CType *cfunction_new (void);