# gtk3bindings

The code in this repository was automatically generated by [gir2pas][] an utility
program to convert the GIR metadata format (= XML files) used by 
[GObject introspection][] into usable Free Pascal source code, suitable for
generating corresponding language bindings.

It was originally maintained as part of the Lazarus Code.

# License

This project builds upon the original Lazarus CCR version and is thus intended
to follow the same licensing principles. For the `gobject-introspection` folder
this seems to be [GPL v2](LICENSE.md), as referenced in a number of file headers.

# Usage
## Compilation
In order to compile `gir2pas` one needs to install FPC and make:
```
aptitude install fpc make
```
Then run default make target:
```
make
```

## Generation of bindings
First, the GIR files need to be installed:
```
aptitude install \
	libatk1.0-dev \
	libgtk-3-dev \
	libgdk-pixbuf-2.0-dev \
	gir1.2-glib-2.0-dev \
	libgirepository1.0-dev \
	libgtk-3-dev \
	libharfbuzz-dev \
	libpango1.0-dev \
	gir1.2-freedesktop-dev
```
Then run the program `gir2pas` in the following order.

### Generate PangoCairo1 unit
```
gir2pas -e Set -w -d \
	-M atk-2.52 \
	-M cairo-1.0 \
	-M gdk-3.24.49 \
	-M gdkpixbuf-2.42.12 \
	-M glib-2.84.4 \
	-M gio-2.82 \
	-M gmodule-2.84.4 \
	-M gobject-2.84.4 \
	-M gtk-3.24.49 \
	-M harfbuzz-10.2 \
	-M pango-1.56.3 \
	-M pangocairo-1.46 \
	-i PangoCairo-1.0 \
	-o ../gtk3bindings/
```

### Generate Gtk3 dependency units
```
gir2pas -e Set -w -d \
	-M atk-2.52 \
	-M cairo-1.0 \
	-M gdk-3.24.49 \
	-M gdkpixbuf-2.42.12 \
	-M glib-2.84.4 \
	-M gio-2.82 \
	-M gmodule-2.84.4 \
	-M gobject-2.84.4 \
	-M gtk-3.24.49 \
	-M harfbuzz-10.2 \
	-M pango-1.56.3 \
	-M pangocairo-1.46 \
	-i Gtk-3.0 \
	-o ../gtk3bindings/
```

[gir2pas]: https://gitlab.com/gtk4pas/tools/gir2pas
[GObject introspection]: https://gi.readthedocs.io/
