Difference between revisions of "gir2pascal"
(Github fork (see README)) |
|||
Line 30: | Line 30: | ||
svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/applications/gobject-introspection gir2pascal | svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/applications/gobject-introspection gir2pascal | ||
Or alternatively you can browse the source [http://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/applications/gobject-introspection/ here] | Or alternatively you can browse the source [http://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/applications/gobject-introspection/ here] | ||
+ | |||
+ | =Newer version= | ||
+ | I have forked and updated ''gir2pascal'' <code>r6630</code> [https://github.com/n1tehawk/gir2pascal on GitHub]. Feel free to contact me (there) if I can help with contributing/merging any changes back to the SVN. <br> [[User:Bnortmann|Bnortmann]] ([[User talk:Bnortmann|talk]]) 16:14, 26 April 2020 (CEST) | ||
[[Category:Lazarus-CCR]] | [[Category:Lazarus-CCR]] |
Revision as of 15:14, 26 April 2020
About
gir2pascal is a program to convert gobject-introspection (*.gir) xml files into into Pascal files which can be compiled (hopefully) without modification.
More information about gobject-introspection technology can be found here: http://live.gnome.org/GObjectIntrospection
Some of the features of gir2pascal are:
- Converts the .gir file used as an argument into a .pas file
- Also converts any .gir files required into .pas files.
- GObject's are mapped to pascal objects (not classes) for easier use.
- Creating an instance of an object is done through Foo := TSomeGObjectType.new(Parameters).
- Can currently generate bindings for gtk3, glib2, atk1, pango1 and webkit without the resulting files needing to be modified to be compiled and linked.
- Many other .gir files may work as well
- Can create test units that help verify the conversion is correct.
Some limitations in generated code
- The objects are just memory mapped to the C structs that are allocated.
- The pascal new and dispose functions cannot be used with the objects.
- You cannot create a new object type that inherits the generated objects. (Technically possible if you don't add any additional fields or virtual methods)
- The objects created cannot wrap the c varargs methods. However the flat functions with varargs are available as before.
gir2pascal is currently being used to generate the Gtk+3 bindings for pascal.
License
Author
Andrew Haines
Email: (andrewd207 at aol dot com)
If you find this program useful you can donate with paypal here.
SVN
You can download the source from svn
svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/applications/gobject-introspection gir2pascal
Or alternatively you can browse the source here
Newer version
I have forked and updated gir2pascal r6630
on GitHub. Feel free to contact me (there) if I can help with contributing/merging any changes back to the SVN.
Bnortmann (talk) 16:14, 26 April 2020 (CEST)