README.md 2.01 KB
Newer Older
Guido Günther's avatar
Guido Günther committed
1
# Handy
2 3
[![Pipeline status](https://source.puri.sm/Librem5/libhandy/badges/master/build.svg)](https://source.puri.sm/Librem5/libhandy/commits/master)
[![Code coverage](https://source.puri.sm/Librem5/libhandy/badges/master/coverage.svg)](https://source.puri.sm/Librem5/libhandy/commits/master)
Guido Günther's avatar
Guido Günther committed
4 5 6 7 8 9

The aim of The handy library is to help with developing UI for mobile devices
using GTK+/GNOME.

## License

Guido Günther's avatar
Guido Günther committed
10
libhandy is licensed under the LGPL-2.1+.
Guido Günther's avatar
Guido Günther committed
11

12 13 14 15
## Build dependencies

To build libhandy you need the following build-deps:

16 17 18
```sh
sudo apt-get -y install gtk-doc-tools libgirepository1.0-dev libgnome-desktop-3-dev libgtk-3-dev meson pkg-config valac
```
19

Guido Günther's avatar
Guido Günther committed
20 21
## Building

22
We use the meson (and thereby Ninja) build system for libhandy. The quickest
Guido Günther's avatar
Guido Günther committed
23 24
way to get going is to do the following:

25 26 27 28 29
```sh
meson . _build
ninja -C _build
ninja -C _build install
```
Guido Günther's avatar
Guido Günther committed
30

Guido Günther's avatar
Guido Günther committed
31
For build options see [meson_options.txt](./meson_options.txt). E.g. to enable documentation:
Guido Günther's avatar
Guido Günther committed
32

33 34 35 36
```sh
meson . _build -Dgtk_doc=true
ninja -C _build/ libhandy-doc
```
Guido Günther's avatar
Guido Günther committed
37 38 39

## Usage

Guido Günther's avatar
Guido Günther committed
40
There's a C example:
Guido Günther's avatar
Guido Günther committed
41

42 43 44
```sh
_build/examples/example
```
Guido Günther's avatar
Guido Günther committed
45 46 47 48

and one in Python. When running from the built source tree it
needs several environment varibles so use \_build/run to set them:

49 50 51
```sh
_build/run examples/example.py
```
52 53

### Glade
54

55 56 57
To be able to use Handy's widgets in the glade interface designer without
installing the library use:

58 59 60
```sh
_build/run glade
```
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

## Documentation

The documentation can be found online
[here](http://honk.sigxcpu.org/projects/libhandy/doc/). Further examples on how
to the widgets in you favorite programming language can be found here:

### C
- [calls](https://source.puri.sm/Librem5/calls) (HdyDialer)
- [phosh](https://source.puri.sm/Librem5/phosh) (HdyDialer)

### Python 3
- [PasswordSafe](https://gitlab.gnome.org/World/PasswordSafe) (HdyColumn)

### Rust
- [Fractal](https://gitlab.gnome.org/World/fractal) (HdyColumn)
- [Podcasts](https://gitlab.gnome.org/World/podcasts) (HdyColumn)

### Vala
- [GNOME Games](https://gitlab.gnome.org/GNOME/gnome-games) (HdyColumn, HdyTitleBar)