~ubuntu-branches/ubuntu/hardy/vala/hardy

« back to all changes in this revision

Viewing changes to gobject-introspection/gen-introspect.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge, Marc-Andre Lureau, Kumar Appaiah, Sebastian Dröge
  • Date: 2007-11-26 08:16:57 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20071126081657-pbycv1holrkgalk3
Tags: 0.1.5-1
[ Marc-Andre Lureau ]
* New Upstream Version; closes: #452870.
* debian/libvala-dev.install
  + Rename gidlgen to vala-gen-instrospect
  + Remove deleted .pl files

[ Kumar Appaiah ]
* debian/control:
  + Add Homepage field.
  + Modify XS-Vcs-Git and XS-Vcs-Broswer to Vcs-Git and Vcs-Browser
    respectively, as dpkg now supports them.

[ Sebastian Dröge ]
* debian/libvala-dev.install,
  debian/rules:
  + Also ship vala-gen-project.
* debian/control:
  + Build depend on libgtk2.0-dev (>= 2.10.0) and libglib2.0-dev (>= 2.12.0).
* debian/patches/01_vala-gen-project-paths.patch,
  debian/rules:
  + Adjust the paths in vala-gen-project for the license files, etc.
    Needs again an automake-touch hack for timestamp issues.
* debian/control,
  debian/libvala-dev.install,
  debian/valac.install,
  debian/vala-utils.install:
  + Move vala-gen-introspect/vapigen to valac and vala-gen-project/vapicheck
    to vala-utils.
* debian/patches/01_vala-gen-project-paths.patch,
  debian/control:
  + Fix paths for COPYING and INSTALL files and depend on automake1.10 for
    this.

[ Kumar Appaiah ]
* debian/watch: Fix watch file to point to new download location.
  (Closes: #452870)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GObject introspection: gen-introspect
 
2
 *
 
3
 * Copyright (C) 2007  Jürg Billeter
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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.
 
19
 *
 
20
 * Author:
 
21
 *      Jürg Billeter <j@bitron.ch>
 
22
 */
 
23
 
 
24
#ifndef __GEN_INTROSPECT_H__
 
25
#define __GEN_INTROSPECT_H__
 
26
 
 
27
#include <glib.h>
 
28
#include "gidlmodule.h"
 
29
 
 
30
G_BEGIN_DECLS
 
31
 
 
32
typedef struct _GIGenerator GIGenerator;
 
33
typedef struct _CSymbol CSymbol;
 
34
typedef struct _CType CType;
 
35
 
 
36
struct _GIGenerator {
 
37
        const char *namespace;
 
38
        char *lower_case_namespace;
 
39
        /* specified files to be parsed */
 
40
        GList *filenames;
 
41
        GList *libraries;
 
42
        /* source reference of current lexer position */
 
43
        char *current_filename;
 
44
        GList *symbol_list;
 
45
        GHashTable *typedef_table;
 
46
        GHashTable *struct_or_union_or_enum_table;
 
47
 
 
48
        gboolean macro_scan;
 
49
 
 
50
        GIdlModule *module;
 
51
        GList *get_type_symbols;
 
52
        GHashTable *type_map;
 
53
        GHashTable *type_by_lower_case_prefix;
 
54
 
 
55
        int indent;
 
56
};
 
57
 
 
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);
 
63
 
 
64
GIGenerator *the_igenerator;
 
65
 
 
66
typedef enum {
 
67
        CSYMBOL_TYPE_INVALID,
 
68
        CSYMBOL_TYPE_CONST,
 
69
        CSYMBOL_TYPE_OBJECT,
 
70
        CSYMBOL_TYPE_FUNCTION,
 
71
        CSYMBOL_TYPE_STRUCT,
 
72
        CSYMBOL_TYPE_UNION,
 
73
        CSYMBOL_TYPE_ENUM,
 
74
        CSYMBOL_TYPE_TYPEDEF
 
75
} CSymbolType;
 
76
 
 
77
struct _CSymbol {
 
78
        CSymbolType type;
 
79
        int id;
 
80
        char *ident;
 
81
        CType *base_type;
 
82
        gboolean const_int_set;
 
83
        int const_int;
 
84
        char *const_string;
 
85
};
 
86
 
 
87
CSymbol *csymbol_new (CSymbolType type);
 
88
gboolean csymbol_get_const_boolean (CSymbol *symbol);
 
89
 
 
90
typedef enum {
 
91
        CTYPE_INVALID,
 
92
        CTYPE_VOID,
 
93
        CTYPE_BASIC_TYPE,
 
94
        CTYPE_TYPEDEF,
 
95
        CTYPE_STRUCT,
 
96
        CTYPE_UNION,
 
97
        CTYPE_ENUM,
 
98
        CTYPE_POINTER,
 
99
        CTYPE_ARRAY,
 
100
        CTYPE_FUNCTION
 
101
} CTypeType;
 
102
 
 
103
typedef enum {
 
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;
 
111
 
 
112
typedef enum {
 
113
        TYPE_QUALIFIER_NONE = 0,
 
114
        TYPE_QUALIFIER_CONST = 1 << 1,
 
115
        TYPE_QUALIFIER_RESTRICT = 1 << 2,
 
116
        TYPE_QUALIFIER_VOLATILE = 1 << 3
 
117
} TypeQualifier;
 
118
 
 
119
typedef enum {
 
120
        FUNCTION_NONE = 0,
 
121
        FUNCTION_INLINE = 1 << 1
 
122
} FunctionSpecifier;
 
123
 
 
124
typedef enum {
 
125
        UNARY_ADDRESS_OF,
 
126
        UNARY_POINTER_INDIRECTION,
 
127
        UNARY_PLUS,
 
128
        UNARY_MINUS,
 
129
        UNARY_BITWISE_COMPLEMENT,
 
130
        UNARY_LOGICAL_NEGATION
 
131
} UnaryOperator;
 
132
 
 
133
struct _CType {
 
134
        CTypeType type;
 
135
        StorageClassSpecifier storage_class_specifier;
 
136
        TypeQualifier type_qualifier;
 
137
        FunctionSpecifier function_specifier;
 
138
        char *name;
 
139
        CType *base_type;
 
140
        GList *child_list;
 
141
};
 
142
 
 
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);
 
153
 
 
154
G_END_DECLS
 
155
 
 
156
#endif
 
157