summaryrefslogtreecommitdiff
path: root/codegen/h2def.py
Commit message (Collapse)AuthorAgeFilesLines
* bug 542821:Paul Pogonyshev2008-07-131-540/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-14 Paul Pogonyshev <pogonyshev@gmx.net> bug 542821: * codegen: Remove directory, we will use PyGObject's codegen from now on. * configure.in: Remove local codegen mentions. (CODEGENDIR): New AC_SUBST: determine where installed PyGObject's codegen is. * Makefile.am: * gtk/Makefile.am: Remove local codegen mentions and use 'CODEGENDIR' instead. * MANIFEST.in: * pygtk.spec.in: * setup.py: Remove all mentions of codegen. * pygobject-2.0.pc.in: Remove file (unused). * pygtk-2.0.pc.in: Change 'codegendir' to refer to PyGObject's codegen. svn path=/trunk/; revision=3006
* clean_func(): Strip GSEAL out, to avoid us thinking that there are manyMurray Cumming2008-07-081-0/+4
| | | | | | | | | 2008-07-08 Murray Cumming <murrayc@murrayc.com> * codegen/h2def.py: clean_func(): Strip GSEAL out, to avoid us thinking that there are many functions called GSEAL. svn path=/trunk/; revision=3005
* Fix two typos in codegen.Paul Pogonyshev2008-01-291-2/+2
| | | | svn path=/trunk/; revision=2957
* Add support for filtering out definies in existing filesJohan Dahlin2006-05-061-10/+44
| | | | | * codegen/h2def.py (main): Add support for filtering out definies in existing files
* Refactor to use OOP, remove duplicated codeJohan Dahlin2006-05-061-226/+216
| | | | * codegen/h2def.py: Refactor to use OOP, remove duplicated code
* Run reindent.py on all python codeJohan Dahlin2006-04-031-18/+18
|
* Allow whitespace before last parenthesis. Fixes #317124Johan Dahlin2006-04-011-1/+1
| | | | | * codegen/h2def.py (proto_pat): Allow whitespace before last parenthesis. Fixes #317124
* more h2def/merge fixesGustavo J. A. M. Carneiro2004-11-141-2/+1
|
* codegen merge/h2def fixesGustavo J. A. M. Carneiro2004-11-071-1/+1
|
* And the fileJohan Dahlin2004-07-291-1/+1
|
* Add a new option to be able to separate output of objects and functionsJohan Dahlin2004-03-281-20/+59
|
* Added the interface detection (interface -*Iface- inheriting fromXavier Ordoquy2004-03-221-5/+20
| | | | | | | 2004-03-22 Xavier Ordoquy <xordoquy@wanadoo.fr> * codegen/h2def.py: Added the interface detection (interface -*Iface- inheriting from GTypeInterface)
* Added the interface detection (class inheriting from GTypeInterface)Xavier Ordoquy2004-03-181-0/+15
| | | | | | | 2004-03-18 Xavier Ordoquy <xordoquy@wanadoo.fr> * codegen/h2def.py: Added the interface detection (class inheriting from GTypeInterface)
* Fixes #136811 (h2def ignores some functions) skips the extern "C"Xavier Ordoquy2004-03-121-1/+5
| | | | | | | 2004-03-12 Xavier Ordoquy <xordoquy@wanadoo.fr> Fixes #136811 (h2def ignores some functions) * codegen/h2def.py: skips the extern "C"
* don't expect a whitespace after the type name Fixes bug #128988, patchXavier Ordoquy2004-02-221-1/+1
| | | | | | | 2004-02-22 Xavier Ordoquy <xordoquy@wanadoo.fr> * codegen/h2def.py: don't expect a whitespace after the type name Fixes bug #128988, patch from Jon Willeke.
* apply patch from Jon Willeke <willeke@users.sourceforge.net> to strip outJames Henstridge2003-12-231-0/+4
| | | | | | | | | 2003-12-23 James Henstridge <james@daa.com.au> * codegen/h2def.py (clean_func): apply patch from Jon Willeke <willeke@users.sourceforge.net> to strip out eg. G_BEGIN_DECLS, which was tripping up some of the following regexps (fixes bug #129414).
* apply patch by David Lehn <dlehn@vt.edu> to correctly handle multi-lineJames Henstridge2002-07-101-2/+18
| | | | | | | | | | | | 2002-07-10 James Henstridge <james@daa.com.au> * codegen/h2def.py (clean_func): apply patch by David Lehn <dlehn@vt.edu> to correctly handle multi-line preprocessor macros. From bug #81771. (write_func): apply patch by Arjan Molenaar to write out is-constructor-of lines for function definitions that look like they might be constructors (doesn't catch every case, but is better than nothing). From bug #80914.
* add function to strip comments, and get rest of script to use it. This oneJames Henstridge2002-04-171-8/+20
| | | | | | | | | | | | 2002-04-18 James Henstridge <james@daa.com.au> * codegen/h2def.py (strip_comments): add function to strip comments, and get rest of script to use it. This one doesn't use RE's, so it doesn't cause a stack overflow when parsing atkobject.h. * gtk/libglade.defs (get_toplevel_names): remove def, as it isn't in the libglade API anymore.
* add defs.James Henstridge2002-01-111-1/+27
| | | | | | | | | | | 2002-01-11 James Henstridge <james@daa.com.au> * bonobo/*.defs: add defs. 2002-01-11 James Henstridge <james@daa.com.au> * codegen/h2def.py (find_obj_defs): handle typedef struct { ... } style type defs, as used in bonobo.
* added min_aspect and max_aspect to the kwlist so that the kwlist lengthMatt Wilson2001-11-291-2/+2
| | | | | | | | | | | | 2001-11-28 Matt Wilson <msw@redhat.com> * gtk/gtk.override (_wrap_gtk_window_set_geometry_hints): added min_aspect and max_aspect to the kwlist so that the kwlist length matches the number of arguments in the argparse format string. * codegen/h2def.py (define_func): someone was thinking that a re.split looked like string.split. Also fix the argument munger that I broke the other day.
* added start of atk wrapperMatt Wilson2001-11-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-11-27 Matt Wilson <msw@redhat.com> * atk.defs, atk.override, atkmodule.c: added start of atk wrapper * gtk/Makefile.am (DISTCLEANFILES): remove generated files ($(srcdir)/gtk.c): modify targets to output generated files in the builddir, not the srcdir. ($(srcdir)/gdk.c): likewise. ($(srcdir)/libglade.c): likewise. * codegen/h2def.py (define_func): add check to workaround broken string.replace semantics on python 1.5 * codegen/codegen.py (write_enums): if the enum or flag doesn't have a GType, just add those enum values listed in the defs file by hand. * codegen/argtypes.py (ArgMatcher.register_enum): if defs file doesn't specify a GType for the enum, use G_TYPE_NONE. (ArgMatcher.register_flag): likewise. * gobjectmodule.c (pyg_enum_get_value): allow enums to pass G_TYPE_NONE in as the type, disabling the string to value conversion. (pyg_flags_get_value): likewise. (pyg_constant_strip_prefix): new function to combine common codepath. (pyg_enum_add_constants): use pyg_constant_strip_prefix (pyg_flags_add_constants): likewise. (functions): make pyg_constant_strip_prefix available to users of pygobject * pygobject.h: added pyg_constant_strip_prefix wrapper * configure.in: added ATK test, subst for ATK_CFLAGS and ATK_LIBS. * Makefile.am (%.c): added generic codegen target for pango and atk. Added DISTCLEANFILES so that generated files will be removed. Added atk targets, cflags, ldflags.
* deal with const return types when cleaning up function prototypeMatt Wilson2001-10-211-4/+6
| | | | | | | | | 2001-10-21 Matt Wilson <msw@redhat.com> * codegen/h2def.py (clean_func): deal with const return types when cleaning up function prototype (proto_pat): add '-' to the ret group so that const- will work in the return type
* convert all argument type whitespace to '-'.Matt Wilson2001-10-161-2/+2
| | | | | | | 2001-10-16 Matt Wilson <msw@redhat.com> * codegen/h2def.py (define_func): convert all argument type whitespace to '-'.
* h2def.py couldn't handle functions parameters with a type but no name. Now ↵Murray Cumming2001-10-111-3/+6
| | | | it ignores that parameter.
* new program to convert v2 defs to v3 defs. It will probably only work withJames Henstridge2001-07-081-62/+78
| | | | | | | | | | | | | | | | | | | | | | | | 2001-07-08 James Henstridge <james@daa.com.au> * codegen/defsconvert.py (convert): new program to convert v2 defs to v3 defs. It will probably only work with files in the style created by the h2def.py program. 2001-07-07 James Henstridge <james@daa.com.au> * codegen/h2def.py (to_upper_str): add function to convert a type name to upper case with underscores using the same algorithm as gtk+ (with an extra rule to catch cases like GObject. (typecode): function to create a typecode like GTK_TYPE_WIDGET from the type name. (write_obj_defs): output v3 defs. (write_enum_defs): output v3 defs. (define_func): replace 'G_CONST_RETURN ' to 'const-' for return value. (write_func): output v3 defs. * codegen/scmexpr.py (parse): make the parser ignore single quotes, which are used in the new defs format.
* same here.James Henstridge2001-04-081-2/+7
| | | | | | | | | | | | | | | | | | | | | 2001-04-08 James Henstridge <james@daa.com.au> * gtk/gtk.override: same here. * gtk/gtk-types.c (_pygtk_register_boxed_types): more fixups * gtk/gtkobject-support.c: lots of similar fixups. * codegen/argtypes.py (_enum_name): gdk type codes now seem to be named GDK_TYPE_... and not GTK_TYPE_GDK_... 2001-04-07 James Henstridge <james@daa.com.au> * gtk/gtk.defs: lots of defs file updates. 2001-04-06 James Henstridge <james@daa.com.au> * codegen/h2def.py: add --onlyobjdefs flag to script.
* moved rewritten testgtk demo hereJames Henstridge2001-03-301-6/+15
| | | | | | | | | | | | | | | | | | | | 2001-03-30 James Henstridge <james@daa.com.au> * examples/pygtk-demo: moved rewritten testgtk demo here * gobjectmodule.c (pygobject_set_property): initialise the GValue to { 0, }, so set_property actually works. (pygobject_get_property): same here. * gtk/gtk.defs: updated enum/flag defs. * gtk/gdk.defs: updated enum/flag defs. * examples/gobject/signal.py (D.do_my_signal): add small example of overriding class closure for a signal introduced from python code. * codegen/h2def.py: add --onlyenums flag to only output enum defs.
* Havoc's enum handling patch.James Henstridge2000-11-291-2/+4
| | | | | | | | | 2000-11-29 James Henstridge <james@daa.com.au> * codegen/h2def.py (write_enum_defs): Havoc's enum handling patch. * TODO: add todo item about creating real GObject subclasses, and add some info on the GInterface stuff.
* small updates.James Henstridge2000-10-241-0/+1
| | | | | | | | | | 2000-10-24 James Henstridge <james@daa.com.au> * gtk/gtk.override: small updates. * gtk/gtk.defs: update with defs from all of gtk. * codegen/h2def.py (find_enum_defs): small fix to enums parsing.
* updated to gdk-1.3. A lot of stuff in here.James Henstridge2000-07-021-3/+1
| | | | | | | | | | 2000-07-03 James Henstridge <james@daa.com.au> * gtk/gdk.defs: updated to gdk-1.3. A lot of stuff in here. * codegen/h2def.py (verbose): remove the special case for GtkObject. (find_obj_defs): amend regexes so that GObject is considered a valid object name.
* Commit codegen stuff to head from extension-class-branchJames Henstridge2000-06-261-0/+345