gir2pascal: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: gir2pascal
| Old | New | Line | |
|---|---|---|---|
| 1 | + | # About | |
| 2 | + | ||
| 3 | + | gir2pascal is a program to convert gobject-introspection (*.gir) xml files into into Pascal files which can be compiled (hopefully) without modification. | |
| 4 | + | ||
| 5 | + | More information about gobject-introspection technology can be found here: [<http://live.gnome.org/GObjectIntrospection>](http://live.gnome.org/GObjectIntrospection) | |
| 6 | + | ||
| 7 | + | Some of the features of gir2pascal are: | |
| 8 | + | ||
| 9 | + | - Converts the .gir file used as an argument into a .pas file | |
| 10 | + | - Also converts any .gir files required into .pas files. | |
| 11 | + | - GObject's are mapped to pascal objects (not classes) for easier use. | |
| 12 | + | - Creating an instance of an object is done through Foo := *TSomeGObjectType*.new(*Parameters*). | |
| 13 | + | - Can currently generate bindings for gtk3, glib2, atk1, pango1 and webkit without the resulting files needing to be modified to be compiled and linked. | |
| 14 | + | - Many other .gir files may work as well | |
| 15 | + | - Can create test units that help verify the conversion is correct. | |
| 16 | + | ||
| 17 | + | Some limitations in generated code | |
| 18 | + | ||
| 19 | + | - The objects are just memory mapped to the C structs that are allocated. | |
| 20 | + | - The pascal new and dispose functions cannot be used with the objects. | |
| 21 | + | - 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) | |
| 22 | + | - The objects created cannot wrap the c varargs methods. However the flat functions with varargs are available as before. | |
| 23 | + | ||
| 24 | + | gir2pascal is currently being used to generate the [[Gtk+3]] bindings for pascal. | |
| 25 | + | ||
| 26 | + | # License | |
| 27 | + | ||
| 28 | + | [GPL-2.0](http://www.opensource.org/licenses/GPL-2.0) | |
| 29 | + | ||
| 30 | + | # Author | |
| 31 | + | ||
| 32 | + | Andrew Haines | |
| 33 | + | ||
| 34 | + | Email: (andrewd207 at aol dot com) | |
| 35 | + | ||
| 36 | + | If you find this program useful you can donate with paypal [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SYYDBL2TAQMPY). | |
| 37 | + | ||
| 38 | + | # Source code | |
| 39 | + | ||
| 40 | + | Since Lazarus 2.3, this tool is part of Lazarus source code tree and located in [tools/gir2pascal](https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main/tools/gir2pascal) directory. | |
| 41 | + | ||
| 42 | + | Historic sources are located in [Lazarus-CCR SVN](http://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/applications/gobject-introspection/). Later the tool has received maintenance on [GitHub](https://github.com/n1tehawk/gir2pascal) by Bnortmann ([[User talk:Bnortmann|talk]]) and finally was imported from his repository into Lazarus source tree. | |
| 43 | + | ||
| 44 | + | --- | |
| 45 | + | *From the Free Pascal wiki, page "gir2pascal", as it stood on 2023-02-05 after a change by AndrewH, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 46 | + | Category: Lazarus-CCR |
