hbgi - Harbour bindings for GObject Introspection
These are bindings for the GObject Introspection library, to be used in Harbour. It is in no way complete, but already usable for writing moderately complex applications. It is almost fully based on pygobject - the similar bindings for Python - and can be viewed as the successor to xbgtk - the older Harbour bindings for GTK+.
Please report any issues on GitHub issues page at: https://github.com/tuffnatty/hbgi/issues
This software is covered by the GNU Lesser General Public License (version 2.1, or if you choose, a later version). Basically just don't say you wrote bits you didn't.
Documentation and Examples
hbgi lacks documentation and examples. As the project is modeled after Python bindings for GObject Introspection, I think the best source for docs and examples are Python examples - with the exception that they must be translated to Harbour, but this is mostly straightforward.
- Examples by Rafa Carmona at https://github.com/tuffnatty/hbgi/tree/master/demo
- Examples by Rafał Jopek at http://harbour.edu.pl/lib/hbgi/menu.html
Python GObject Introspection examples
- https://developer.gnome.org/gnome-devel-demos/stable/py.html.en - some demo apps
- https://git.gnome.org/browse/pygobject/tree/demos/gtk-demo - gtk-demo app
Python GObject Introspection documentation
- http://lazka.github.io/pgi-docs/#Gtk-3.0 - full API reference
- http://python-gtk-3-tutorial.readthedocs.io/en/latest/ - tutorials
So far only a Unix-based build script is available. You need
hbmk2 from Harbour on your
PATH. To build, it should be as simple as running:
It produces both static and dynamic libraries. There was a report of a successful (static) build under Windows, using MSYS2.
To build your app with the static libraries:
hbmk2 MY_APP.prg -oMY_APP_STATIC_EXECUTABLE_NAME -gtcgi hbgi.hbc
To build your app with the dynamic library:
hbmk2 MY_APP.prg -oMY_APP_STATIC_EXECUTABLE_NAME -gtcgi -env:HBGI_DYNAMIC=yes hbgi.hbc
- Properties getter/setter support via :props
- Inheritance of Harbour classes from GObject classes
- More examples
- Documentation (https://github.com/lazka/pgi-docgen can be used I guess)