Johan Dahlin [Sat, 3 May 2008 15:09:38 +0000 (15:09 +0000)]
Refactor and comment scanner frontend
svn path=/trunk/; revision=264
Johan Dahlin [Sat, 3 May 2008 15:01:06 +0000 (15:01 +0000)]
Avoid a tiny bit of duplication
svn path=/trunk/; revision=263
Johan Dahlin [Sat, 3 May 2008 14:59:43 +0000 (14:59 +0000)]
Handle missing parameters better, allow - and + in .la dlname filenames.
2008-05-03 Johan Dahlin <johan@gnome.org>
* giscanner/glibtransformer.py:
* tools/g-ir-scanner:
Handle missing parameters better, allow - and + in .la dlname
filenames.
svn path=/trunk/; revision=262
Johan Dahlin [Sat, 3 May 2008 14:36:47 +0000 (14:36 +0000)]
Parse struct fields properly, improve debugging.
2008-05-03 Johan Dahlin <johan@gnome.org>
* giscanner/__init__.py:
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/glibtransformer.py:
* giscanner/transformer.py:
Parse struct fields properly, improve debugging.
svn path=/trunk/; revision=261
Johan Dahlin [Wed, 30 Apr 2008 01:48:36 +0000 (01:48 +0000)]
Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
2008-04-29 Johan Dahlin <johan@gnome.org>
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/transformer.py:
* tests/parser/Foo-expected.gir:
* TODO:
Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
svn path=/trunk/; revision=260
Johan Dahlin [Tue, 29 Apr 2008 11:29:37 +0000 (11:29 +0000)]
Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
2008-04-29 Johan Dahlin <jdahlin@async.com.br>
* Makefile.am:
* docs/g-ir-scanner.1:
* metadata-annotations-proposal.txt:
* metadata-format.txt:
Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
svn path=/trunk/; revision=259
Johan Dahlin [Tue, 29 Apr 2008 11:20:29 +0000 (11:20 +0000)]
gdk-pixbuf.gidl note
svn path=/trunk/; revision=258
Johan Dahlin [Tue, 29 Apr 2008 11:07:35 +0000 (11:07 +0000)]
Write record/structs to gir file too. Add a couple of tests, fix an off by
2008-04-29 Johan Dahlin <jdahlin@async.com.br>
* giscanner/girwriter.py:
* giscanner/glibtransformer.py:
* giscanner/transformer.py:
* giscanner/xmlwriter.py:
* tests/parser/Foo-expected.gir:
* tests/parser/foo-object.h:
Write record/structs to gir file too. Add a couple of tests,
fix an off by one error in xmlwriter.py.
svn path=/trunk/; revision=257
Johan Dahlin [Mon, 28 Apr 2008 22:37:23 +0000 (22:37 +0000)]
Calculate the line length properly, include the provided extra indentation
2008-04-28 Johan Dahlin <johan@gnome.org>
* giscanner/xmlwriter.py: Calculate the line length properly,
include the provided extra indentation in the calculation, really.
svn path=/trunk/; revision=256
Johan Dahlin [Mon, 28 Apr 2008 22:14:43 +0000 (22:14 +0000)]
Add a --strip-prefix and sort out confusion between names and symbols for
2008-04-28 Johan Dahlin <jdahlin@async.com.br>
* giscanner/ast.py:
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* giscanner/transformer.py:
* tools/g-ir-scanner:
Add a --strip-prefix and sort out confusion between names and symbols
for functions and struct + derivaties.
Refactor bootstrap of g-ir-scanner, so we can set options on
Transformer() before parsing everything.
svn path=/trunk/; revision=255
Johan Dahlin [Mon, 28 Apr 2008 21:08:21 +0000 (21:08 +0000)]
Avoid recursion when scanning girepository.h
2008-04-28 Johan Dahlin <johan@gnome.org>
* giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
when scanning girepository.h
* giscanner/sourcescanner.py (SourceScanner._preprocess): Define
a __GI_SCANNER__ when we run.
svn path=/trunk/; revision=254
Johan Dahlin [Mon, 28 Apr 2008 20:10:26 +0000 (20:10 +0000)]
Update
svn path=/trunk/; revision=253
Johan Dahlin [Mon, 28 Apr 2008 19:49:46 +0000 (19:49 +0000)]
Rename most c:identifier to c:type. Add new ones to
2008-04-28 Johan Dahlin <jdahlin@async.com.br>
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* tests/parser/Foo-expected.gir:
* tests/parser/utility-expected.gir:
Rename most c:identifier to c:type. Add new ones to
class/interface/enum/boxed.
svn path=/trunk/; revision=252
Johan Dahlin [Mon, 28 Apr 2008 19:27:21 +0000 (19:27 +0000)]
Update TODO
svn path=/trunk/; revision=251
Johan Dahlin [Mon, 28 Apr 2008 19:24:11 +0000 (19:24 +0000)]
Move c:identifier from return-value to subchild type, as per Jürgs
2008-04-28 Johan Dahlin <jdahlin@async.com.br>
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/glibtransformer.py:
* tests/parser/Foo-expected.gidl:
* tests/parser/Makefile.am:
Move c:identifier from return-value to subchild type,
as per Jürgs suggestion
svn path=/trunk/; revision=250
Johan Dahlin [Mon, 28 Apr 2008 19:12:00 +0000 (19:12 +0000)]
Add parent for GInitiallyUnowned
svn path=/trunk/; revision=249
Johan Dahlin [Mon, 28 Apr 2008 18:58:28 +0000 (18:58 +0000)]
Check explicitly for None, so we can write False
svn path=/trunk/; revision=248
Johan Dahlin [Mon, 28 Apr 2008 12:06:37 +0000 (12:06 +0000)]
Line wrap license header
svn path=/trunk/; revision=247
Johan Dahlin [Mon, 28 Apr 2008 11:52:53 +0000 (11:52 +0000)]
Write property.type as a child node.
2008-04-28 Johan Dahlin <johan@gnome.org>
* giscanner/girwriter.py:
* tests/parser/Foo-expected.gir:
Write property.type as a child node.
svn path=/trunk/; revision=246
Johan Dahlin [Mon, 28 Apr 2008 03:05:29 +0000 (03:05 +0000)]
Make distcheck pass
svn path=/trunk/; revision=245
Johan Dahlin [Mon, 28 Apr 2008 02:51:08 +0000 (02:51 +0000)]
fix a typo, revert to automake hack for uninstalled shared libraries
svn path=/trunk/; revision=244
Johan Dahlin [Mon, 28 Apr 2008 02:41:57 +0000 (02:41 +0000)]
First steps towards passing distcheck
svn path=/trunk/; revision=243
Johan Dahlin [Mon, 28 Apr 2008 02:29:28 +0000 (02:29 +0000)]
newline
svn path=/trunk/; revision=242
Johan Dahlin [Mon, 28 Apr 2008 02:22:07 +0000 (02:22 +0000)]
Replace the GObject gidl with a GObject gir.
2008-04-27 Johan Dahlin <johan@gnome.org>
* Makefile.am:
* configure.ac:
* gidl/Makefile.am:
* gidl/gobject-2.0.gidl:
* gir/Makefile.am:
* gir/gobject-2.0.gir:
* tests/parser/Makefile.am:
Replace the GObject gidl with a GObject gir.
svn path=/trunk/; revision=241
Johan Dahlin [Mon, 28 Apr 2008 02:20:45 +0000 (02:20 +0000)]
g-ir-scanner is a script, not a program.
2008-04-27 Johan Dahlin <johan@gnome.org>
* tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
not a program.
svn path=/trunk/; revision=240
Johan Dahlin [Mon, 28 Apr 2008 02:12:17 +0000 (02:12 +0000)]
Include indentation in line length calculation
2008-04-27 Johan Dahlin <johan@gnome.org>
* giscanner/xmlwriter.py:
* tests/parser/Foo-expected.gir:
Include indentation in line length calculation
svn path=/trunk/; revision=239
Johan Dahlin [Mon, 28 Apr 2008 01:59:11 +0000 (01:59 +0000)]
Prettify NS parsing using elementtree.
2008-04-27 Johan Dahlin <johan@gnome.org>
* giscanner/girparser.py:
Prettify NS parsing using elementtree.
svn path=/trunk/; revision=238
Johan Dahlin [Mon, 28 Apr 2008 01:21:27 +0000 (01:21 +0000)]
Switch over to GIR as the default format. Add a simple GIDL parser. Update
2008-04-27 Johan Dahlin <johan@gnome.org>
* configure.ac:
* giscanner/Makefile.am:
* giscanner/girparser.py:
* giscanner/glibtransformer.py:
* tests/parser/Foo-expected.gidl:
* tests/parser/Foo-expected.gir:
* tests/parser/Makefile.am:
* tests/parser/utility-expected.gidl:
* tests/parser/utility-expected.gir:
* tools/g-ir-scanner:
Switch over to GIR as the default format. Add a simple GIDL
parser.
Update tests and fix simplify makefiles by depending
on GNU make extensions.
svn path=/trunk/; revision=237
Johan Dahlin [Mon, 28 Apr 2008 00:54:43 +0000 (00:54 +0000)]
Refactor pretty attribute indentation to be more generic and always use it
svn path=/trunk/; revision=236
Johan Dahlin [Mon, 28 Apr 2008 00:15:16 +0000 (00:15 +0000)]
Wrap attributes for lines which are wider than 79 characters
2008-04-27 Johan Dahlin <johan@gnome.org>
* giscanner/xmlwriter.py:
Wrap attributes for lines which are wider than 79 characters
svn path=/trunk/; revision=235
Johan Dahlin [Mon, 28 Apr 2008 00:07:57 +0000 (00:07 +0000)]
Simplify & Remove a bit of unused code
svn path=/trunk/; revision=234
Johan Dahlin [Sun, 27 Apr 2008 23:27:17 +0000 (23:27 +0000)]
Allow parenthesis in annotations
2008-04-27 Johan Dahlin <johan@gnome.org>
* giscanner/scannerlexer.l:
Allow parenthesis in annotations
* giscanner/ast.py:
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/glibtransformer.py:
* giscanner/transformer.py:
Add initial sequence support, including annotation.
Refactor type handling a bit.
svn path=/trunk/; revision=233
Johan Dahlin [Sun, 27 Apr 2008 23:13:24 +0000 (23:13 +0000)]
Add two new functions to check sequence return values. Also fixes a
2008-04-27 Johan Dahlin <johan@gnome.org>
* tests/parser/Foo-expected.gidl:
* tests/parser/foo-object.h:
* tests/parser/foo.c (foo_object_class_init),
(foo_object_get_strings), (foo_object_get_objects):
Add two new functions to check sequence return values.
Also fixes a compilation warning.
svn path=/trunk/; revision=232
Johan Dahlin [Sun, 27 Apr 2008 23:09:07 +0000 (23:09 +0000)]
Cast the getter, avoids a compilation warning.
2008-04-27 Johan Dahlin <johan@gnome.org>
* giscanner/giscannermodule.c (]): Cast the getter, avoids
a compilation warning.
svn path=/trunk/; revision=231
Johan Dahlin [Sun, 27 Apr 2008 23:08:19 +0000 (23:08 +0000)]
g-ir-scanner has no sources.
2008-04-27 Johan Dahlin <johan@gnome.org>
* tools/Makefile.am (g_ir_scanner_SOURCES):
g-ir-scanner has no sources.
svn path=/trunk/; revision=230
Johan Dahlin [Sat, 26 Apr 2008 02:37:07 +0000 (02:37 +0000)]
Split out nodes to ast.py and glibast.py
2008-04-25 Johan Dahlin <johan@gnome.org>
* giscanner/Makefile.am:
* giscanner/ast.py:
* giscanner/gidlparser.py:
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* giscanner/transformer.py:
Split out nodes to ast.py and glibast.py
svn path=/trunk/; revision=229
Johan Dahlin [Sat, 26 Apr 2008 02:27:40 +0000 (02:27 +0000)]
Rename treebuilder to transformer and gobjectreebuilder to
2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* giscanner/Makefile.am:
* giscanner/gidlparser.py:
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/glibtransformer.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/transformer.py:
* giscanner/treebuilder.py:
* tools/g-ir-scanner:
Rename treebuilder to transformer and
gobjectreebuilder to glibtransformer.
svn path=/trunk/; revision=228
Johan Dahlin [Sat, 26 Apr 2008 02:20:07 +0000 (02:20 +0000)]
Add LGPLv2 license header and install all python files
2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* giscanner/Makefile.am:
* giscanner/__init__.py:
* giscanner/cgobject.py:
* giscanner/gidlparser.py:
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/odict.py:
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* giscanner/xmlwriter.py:
* tools/Makefile.am:
* tools/g-ir-scanner:
Add LGPLv2 license header and install all python files
svn path=/trunk/; revision=227
Johan Dahlin [Fri, 25 Apr 2008 23:50:02 +0000 (23:50 +0000)]
Add support for virtual methods. Pair struct FooClass with struct Foo.
2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* TODO:
* giscanner/gidlwriter.py:
* giscanner/giscannermodule.c (pygi_source_directive_new),
(directive_get_options), (pygi_source_symbol_new),
(symbol_get_base_type), (pygi_source_type_new),
(type_get_base_type), (type_get_child_list),
(pygi_source_scanner_get_symbols),
(pygi_source_scanner_get_directives):
* giscanner/gobjecttreebuilder.py:
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* tests/parser/foo-object.h:
Add support for virtual methods.
Pair struct FooClass with struct Foo.
Clean up the SourceScanner bindings a bit.
Add a testcase for virtual methods.
svn path=/trunk/; revision=226
Johan Dahlin [Fri, 25 Apr 2008 16:26:51 +0000 (16:26 +0000)]
Add support for signals
2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* giscanner/cgobject.py:
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
Add support for signals
* tests/parser/foo.c (foo_object_class_init):
* Foo-expected.gidl:
Add a signal and update the expected output.
svn path=/trunk/; revision=225
Johan Dahlin [Fri, 25 Apr 2008 00:17:15 +0000 (00:17 +0000)]
Add support for source/header annotations.
2008-04-24 Johan Dahlin <jdahlin@async.com.br>
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/giscannermodule.c (directive_get_name),
(directive_get_value), (directive_get_options),
(symbol_get_directives), (symbol_set_directives),
(pygi_source_scanner_parse_file),
(pygi_source_scanner_lex_filename),
(pygi_source_scanner_get_directives), (init_giscanner):
* giscanner/sourcescanner.c (gi_source_scanner_get_directives):
* giscanner/sourcescanner.h:
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* tools/g-ir-scanner:
Add support for source/header annotations.
svn path=/trunk/; revision=224
Johan Dahlin [Wed, 23 Apr 2008 01:32:49 +0000 (01:32 +0000)]
bitmask->bitfield, c:symbol->c:identifer api->repository
svn path=/trunk/; revision=223
Johan Dahlin [Wed, 23 Apr 2008 01:28:27 +0000 (01:28 +0000)]
Add support for Callbacks
2008-04-22 Johan Dahlin <jdahlin@async.com.br>
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
Add support for Callbacks
svn path=/trunk/; revision=222
Havoc Pennington [Wed, 23 Apr 2008 01:24:57 +0000 (01:24 +0000)]
If a symbol is not in metadata->module, look for it in the global module,
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/ginvoke.c (g_function_info_invoke): If a symbol is
not in metadata->module, look for it in the global module, in case
some other object or the app itself provides the symbol.
svn path=/trunk/; revision=221
Havoc Pennington [Wed, 23 Apr 2008 01:17:24 +0000 (01:17 +0000)]
hack to avoid dlopening a library that is already in the main app, by
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/gmetadata.c (_g_metadata_init): hack to avoid
dlopening a library that is already in the main app, by checking
whether one of the lib's symbols is already loaded.
svn path=/trunk/; revision=220
Johan Dahlin [Wed, 23 Apr 2008 01:13:57 +0000 (01:13 +0000)]
Add a callback test
2008-04-22 Johan Dahlin <jdahlin@async.com.br>
* tests/parser/Foo-expected.gidl:
* tests/parser/foo-object.h:
Add a callback test
svn path=/trunk/; revision=219
Havoc Pennington [Wed, 23 Apr 2008 01:07:05 +0000 (01:07 +0000)]
Use interface_blob_size not object_blob_size to compute offset.
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/ginfo.c (g_interface_info_find_method):
Use interface_blob_size not object_blob_size to compute offset.
svn path=/trunk/; revision=218
Havoc Pennington [Wed, 23 Apr 2008 01:04:43 +0000 (01:04 +0000)]
remove G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/gmetadata.c (_g_metadata_init): remove
G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
(Glade and Clutter for example) rely on being loaded globally.
svn path=/trunk/; revision=217
Havoc Pennington [Wed, 23 Apr 2008 00:57:48 +0000 (00:57 +0000)]
new function to get the GType given a RegisteredTypeInfo
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/ginfo.c (g_registered_type_info_get_g_type): new
function to get the GType given a RegisteredTypeInfo
svn path=/trunk/; revision=216
Johan Dahlin [Wed, 23 Apr 2008 00:09:22 +0000 (00:09 +0000)]
Add a LGPL license, to prevent automake to put in a copy of GPL here.
2008-04-22 Johan Dahlin <johan@gnome.org>
* COPYING: Add a LGPL license, to prevent automake to
put in a copy of GPL here. Pointed out by Havoc.
svn path=/trunk/; revision=215
Johan Dahlin [Tue, 22 Apr 2008 22:48:16 +0000 (22:48 +0000)]
Revert revisions 157,149-148,136-129 and 120. Move back to using
2008-04-22 Johan Dahlin <johan@gnome.org>
* girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
(g_type_info_is_pointer), (g_type_info_get_tag),
(g_type_info_get_param_type), (g_type_info_get_interface),
(g_type_info_get_array_length), (g_type_info_is_zero_terminated),
(g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
(g_error_domain_info_get_codes), (g_enum_info_get_value),
(g_object_info_get_interface), (g_object_info_get_field),
(g_interface_info_get_prerequisite),
(g_signal_info_get_class_closure), (g_constant_info_get_value):
* girepository/ginvoke.c (get_ffi_type):
* girepository/girepository.h:
* girepository/gmetadata.c (g_metadata_get_dir_entry),
(g_metadata_check_sanity), (validate_header),
(validate_array_type_blob), (validate_iface_type_blob),
(validate_param_type_blob), (validate_error_type_blob),
(validate_type_blob), (validate_constant_blob),
(validate_struct_blob), (validate_enum_blob):
* girepository/gmetadata.h:
* tests/Makefile.am:
* tests/invoke/Makefile.am:
* tests/invoke/invoke.c (main):
* tests/roundtrips.sh:
* tools/Makefile.am:
* tools/compiler.c (format_output), (write_out_metadata), (main):
* tools/generate.c (write_type_name), (write_type_info),
(write_constant_value), (write_enum_info), (load_metadata), (main):
* tools/gidlcompilercontext.c:
* tools/gidlcompilercontext.h:
* tools/gidlcompilerentrynode.c:
* tools/gidlcompilerentrynode.h:
* tools/gidlcompilertypenode.c:
* tools/gidlcompilertypenode.h:
* tools/gidlmodule.c (g_idl_module_build_metadata):
* tools/gidlmodule.h:
* tools/gidlnode.c (init_stats), (dump_stats),
(g_idl_node_get_size), (g_idl_node_get_full_size),
(g_idl_node_cmp), (g_idl_node_can_have_member),
(g_idl_node_add_member), (g_idl_node_param_direction_string),
(parse_int_value), (parse_uint_value), (parse_float_value),
(parse_boolean_value), (find_entry_node), (find_entry),
(serialize_type), (g_idl_node_build_metadata), (write_string):
* tools/gidlnode.h:
* tools/gidlparser.c (parse_type_internal):
* tools/quote-file.sh:
Revert revisions 157,149-148,136-129 and 120.
Move back to using g-idl-generate to generate the metadata and
avoids dependency on a c compiler.
svn path=/trunk/; revision=214
Johan Dahlin [Tue, 22 Apr 2008 15:17:50 +0000 (15:17 +0000)]
Update
svn path=/trunk/; revision=213
Johan Dahlin [Tue, 22 Apr 2008 14:37:04 +0000 (14:37 +0000)]
Add an initial GIR writer and a --format option to g-ir-scanner
2008-04-22 Johan Dahlin <jdahlin@async.com.br>
* giscanner/girwriter.py:
* tools/g-ir-scanner:
Add an initial GIR writer and a --format option to g-ir-scanner
svn path=/trunk/; revision=212
Johan Dahlin [Tue, 22 Apr 2008 11:28:48 +0000 (11:28 +0000)]
cleanup namespace stripping
svn path=/trunk/; revision=211
Johan Dahlin [Tue, 22 Apr 2008 04:31:44 +0000 (04:31 +0000)]
only attempt load a library if one was specified
svn path=/trunk/; revision=210
Johan Dahlin [Tue, 22 Apr 2008 04:31:16 +0000 (04:31 +0000)]
skip private symbols
svn path=/trunk/; revision=209
Johan Dahlin [Tue, 22 Apr 2008 04:30:56 +0000 (04:30 +0000)]
avoid sending the same options multiple times to cpp
svn path=/trunk/; revision=208
Johan Dahlin [Tue, 22 Apr 2008 01:31:59 +0000 (01:31 +0000)]
Use ctypes.util.find_library to locate gobject-2.0 and raise ImportError
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/cgobject.py: Use ctypes.util.find_library to locate
gobject-2.0 and raise ImportError if not found.
svn path=/trunk/; revision=207
Johan Dahlin [Tue, 22 Apr 2008 00:53:40 +0000 (00:53 +0000)]
Add a --include argument to include types from other idls. Add a
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/gidlparser.py:
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* tools/g-ir-scanner:
Add a --include argument to include types from other idls.
Add a minimalistic GIDL parser (just objects for now)
Implement resolving of external type references and use it to
resolve parent types, argument types and return types.
svn path=/trunk/; revision=206
Johan Dahlin [Mon, 21 Apr 2008 21:03:05 +0000 (21:03 +0000)]
Add support for properties. Refactor Class/Interface support a bit, to
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
Add support for properties.
Refactor Class/Interface support a bit, to share more code and
always initialize their method attribute to an empty list.
svn path=/trunk/; revision=205
Johan Dahlin [Mon, 21 Apr 2008 21:01:50 +0000 (21:01 +0000)]
Add a workaround for a glib bug interface introspection bug
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/cgobject.py:
Add a workaround for a glib bug interface introspection bug
(object_interface_list_properties, object_class_list_properties):
Cast the return value to GParamSpec.
svn path=/trunk/; revision=204
Johan Dahlin [Mon, 21 Apr 2008 21:00:40 +0000 (21:00 +0000)]
Update Add a string property
2008-04-21 Johan Dahlin <johan@gnome.org>
* tests/parser/Foo-expected.gidl: Update
* tests/parser/foo.c: Add a string property
svn path=/trunk/; revision=203
Johan Dahlin [Mon, 21 Apr 2008 19:53:51 +0000 (19:53 +0000)]
After stripping namespaces, remove the original item to avoid duplication
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/gobjecttreebuilder.py:
After stripping namespaces, remove the original
item to avoid duplication (GtkButton struct and Button object)
svn path=/trunk/; revision=202
Johan Dahlin [Mon, 21 Apr 2008 19:40:09 +0000 (19:40 +0000)]
Strip namespaces before objects, so we'll export GtkButton as Button in
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
Strip namespaces before objects, so we'll export
GtkButton as Button in the gtk namespace
svn path=/trunk/; revision=201
Johan Dahlin [Mon, 21 Apr 2008 19:02:06 +0000 (19:02 +0000)]
Avoid a bit of duplication
svn path=/trunk/; revision=200
Johan Dahlin [Mon, 21 Apr 2008 18:56:23 +0000 (18:56 +0000)]
Add constructors for object/boxed types.
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
Add constructors for object/boxed types.
svn path=/trunk/; revision=199
Johan Dahlin [Mon, 21 Apr 2008 18:46:21 +0000 (18:46 +0000)]
Add support for boxed types
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
Add support for boxed types
svn path=/trunk/; revision=198
Johan Dahlin [Mon, 21 Apr 2008 18:41:55 +0000 (18:41 +0000)]
Add Constant, so far unused
svn path=/trunk/; revision=197
Johan Dahlin [Mon, 21 Apr 2008 18:39:04 +0000 (18:39 +0000)]
mark them as const and comment out
svn path=/trunk/; revision=196
Johan Dahlin [Mon, 21 Apr 2008 18:24:02 +0000 (18:24 +0000)]
Mark structures as const, wrap SourceType.const_string.
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/giscannermodule.c: Mark structures as const,
wrap SourceType.const_string.
svn path=/trunk/; revision=195
Johan Dahlin [Mon, 21 Apr 2008 18:09:31 +0000 (18:09 +0000)]
Add a couple of constants.
2008-04-21 Johan Dahlin <johan@gnome.org>
* tests/parser/foo-object.h: Add a couple of constants.
svn path=/trunk/; revision=194
Johan Dahlin [Mon, 21 Apr 2008 18:05:18 +0000 (18:05 +0000)]
Add basic support for interfaces
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
Add basic support for interfaces
* tools/g-ir-scanner:
Add -o/--output for writing to a file
svn path=/trunk/; revision=193
Havoc Pennington [Mon, 21 Apr 2008 16:55:13 +0000 (16:55 +0000)]
add some C API wishlist items I could think of quickly
2008-04-21 Havoc Pennington <hp@redhat.com>
* TODO: add some C API wishlist items I could think of quickly
svn path=/trunk/; revision=192
Johan Dahlin [Mon, 21 Apr 2008 16:36:54 +0000 (16:36 +0000)]
Use relative imports
svn path=/trunk/; revision=191
Johan Dahlin [Mon, 21 Apr 2008 14:12:47 +0000 (14:12 +0000)]
Add a simple api for writing tags which can be used with the new 'with
2008-04-21 Johan Dahlin <jdahlin@async.com.br>
* giscanner/gidlwriter.py:
* giscanner/xmlwriter.py:
Add a simple api for writing tags which can be used
with the new 'with statement' in python 2.5
svn path=/trunk/; revision=190
Johan Dahlin [Mon, 21 Apr 2008 14:05:32 +0000 (14:05 +0000)]
Rename and refactor internal introspection api and get-type calling
svn path=/trunk/; revision=189
Johan Dahlin [Mon, 21 Apr 2008 13:59:20 +0000 (13:59 +0000)]
Strip namespace and object prefix from method names.
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/gobjecttreebuilder.py:
Strip namespace and object prefix from method names.
svn path=/trunk/; revision=188
Johan Dahlin [Mon, 21 Apr 2008 13:42:50 +0000 (13:42 +0000)]
Simplify and remove improper use of getattr
svn path=/trunk/; revision=187
Johan Dahlin [Mon, 21 Apr 2008 04:40:01 +0000 (04:40 +0000)]
Set default to an empty list
svn path=/trunk/; revision=186
Johan Dahlin [Mon, 21 Apr 2008 04:36:52 +0000 (04:36 +0000)]
Add --pkg option to pass in pkg-config modules to get cflags from.
2008-04-21 Johan Dahlin <johan@gnome.org>
* tools/g-ir-scanner (main): Add --pkg option to pass in
pkg-config modules to get cflags from.
svn path=/trunk/; revision=185
Johan Dahlin [Mon, 21 Apr 2008 04:20:53 +0000 (04:20 +0000)]
Avoid duplication, reuse function writer for methods.
2008-04-21 Johan Dahlin <johan@gnome.org>
* giscanner/gidlwriter.py (GIDLWriter._write_method):
Avoid duplication, reuse function writer for methods.
svn path=/trunk/; revision=184
Johan Dahlin [Mon, 21 Apr 2008 04:18:56 +0000 (04:18 +0000)]
Resolve libtool .la files. Strip name spaces for methods. Add function
2008-04-21 Johan Dahlin <jdahlin@async.com.br>
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
* tools/g-ir-scanner:
Resolve libtool .la files.
Strip name spaces for methods.
Add function symbols
svn path=/trunk/; revision=183
Johan Dahlin [Sun, 20 Apr 2008 19:53:12 +0000 (19:53 +0000)]
Oops, forgot to uncomment this
svn path=/trunk/; revision=182
Johan Dahlin [Sun, 20 Apr 2008 19:52:33 +0000 (19:52 +0000)]
Add support for classes and methods
2008-04-20 Johan Dahlin <jdahlin@async.com.br>
* giscanner/cgobject.py:
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
Add support for classes and methods
svn path=/trunk/; revision=181
Johan Dahlin [Sun, 20 Apr 2008 19:06:19 +0000 (19:06 +0000)]
Avoid conflicts, keep the output ordered similar to the order of the
2008-04-20 Johan Dahlin <johan@gnome.org>
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/odict.py:
Avoid conflicts, keep the output ordered similar to
the order of the input.
Add a simple ordered dictionary implemenation
svn path=/trunk/; revision=180
Johan Dahlin [Sat, 19 Apr 2008 13:31:03 +0000 (13:31 +0000)]
Start introspecting get-type functions. Implement support for GLib/GFlags
2008-04-19 Johan Dahlin <johan@gnome.org>
* giscanner/cgobject.py:
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* tools/g-ir-scanner:
Start introspecting get-type functions.
Implement support for GLib/GFlags GTypes.
Add a ctype based GObject binding.
svn path=/trunk/; revision=179
Johan Dahlin [Fri, 18 Apr 2008 21:01:02 +0000 (21:01 +0000)]
add a namespace option
svn path=/trunk/; revision=178
Johan Dahlin [Fri, 18 Apr 2008 20:47:40 +0000 (20:47 +0000)]
Add support for enums
svn path=/trunk/; revision=177
Johan Dahlin [Fri, 18 Apr 2008 20:41:37 +0000 (20:41 +0000)]
Do function names too
svn path=/trunk/; revision=176
Johan Dahlin [Fri, 18 Apr 2008 20:37:51 +0000 (20:37 +0000)]
Add a simplistic gidl writer, which can't do too much.
2008-04-18 Johan Dahlin <jdahlin@async.com.br>
* giscanner/gidlwriter.py:
* giscanner/xmlwriter.py:
* tools/g-ir-scanner:
Add a simplistic gidl writer, which can't do too much.
svn path=/trunk/; revision=175
Johan Dahlin [Fri, 18 Apr 2008 20:20:06 +0000 (20:20 +0000)]
split tree building and source scanning interface to separate files.
2008-04-18 Johan Dahlin <johan@gnome.org>
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* tools/g-ir-scanner:
split tree building and source scanning interface to separate files.
svn path=/trunk/; revision=174
Johan Dahlin [Fri, 18 Apr 2008 20:08:10 +0000 (20:08 +0000)]
Add support for void ctype
svn path=/trunk/; revision=173
Johan Dahlin [Fri, 18 Apr 2008 20:05:31 +0000 (20:05 +0000)]
- Add support for struct/parameter/return, start parsing of ctypes
svn path=/trunk/; revision=172
Johan Dahlin [Fri, 18 Apr 2008 19:49:43 +0000 (19:49 +0000)]
Start constructing a real node tree.
2008-04-18 Johan Dahlin <johan@gnome.org>
* tools/g-ir-scanner (Parameter.__init__): Start constructing
a real node tree.
* giscanner/giscannermodule.c: wrap GISourceType.child_list and
fix the style
svn path=/trunk/; revision=171
Johan Dahlin [Mon, 31 Mar 2008 19:38:22 +0000 (19:38 +0000)]
Start to build abstract syntax node of scanned sources. Add support for
2008-03-31 Johan Dahlin <johan@gnome.org>
* tools/g-ir-scanner:
Start to build abstract syntax node of scanned sources.
Add support for cpp options.
svn path=/trunk/; revision=170
Johan Dahlin [Thu, 27 Mar 2008 19:20:45 +0000 (19:20 +0000)]
Add simple pre-processor using subprocess and a PIPE. Change the
2008-03-27 Johan Dahlin <johan@gnome.org>
* giscanner/giscannermodule.c:
* giscanner/scannerlexer.l:
* giscanner/sourcescanner.c:
* tools/g-ir-scanner:
Add simple pre-processor using subprocess and a PIPE.
Change the parse_file apis to accept a file descriptor.
svn path=/trunk/; revision=169
Johan Dahlin [Wed, 26 Mar 2008 07:25:47 +0000 (07:25 +0000)]
Remove unused files
svn path=/trunk/; revision=168
Johan Dahlin [Tue, 25 Mar 2008 22:07:17 +0000 (22:07 +0000)]
Fix a typo and add an example python test program.
2008-03-25 Johan Dahlin <johan@gnome.org>
* giscanner/__init__.py:
* tools/g-ir-scanner:
Fix a typo and add an example python test program.
svn path=/trunk/; revision=167
Johan Dahlin [Tue, 25 Mar 2008 21:58:43 +0000 (21:58 +0000)]
Add constants and wrap a few more SymbolType fields
2008-03-25 Johan Dahlin <johan@gnome.org>
* giscanner/__init__.py:
* giscanner/giscannermodule.c:
* giscanner/sourcescanner.c:
* giscanner/sourcescanner.h:
Add constants and wrap a few more SymbolType fields
svn path=/trunk/; revision=166
Johan Dahlin [Tue, 25 Mar 2008 21:47:47 +0000 (21:47 +0000)]
Add initial python bindings for the scanner and depend on python 2.5.
2008-03-25 Johan Dahlin <johan@gnome.org>
* configure.ac:
* giscanner:
* giscanner/__init__.py:
* giscanner/giscannermodule.c:
* giscanner/Makefile.am:
Add initial python bindings for the scanner and
depend on python 2.5.
svn path=/trunk/; revision=165