README.md 3.28 KB
Newer Older
Guido Gunther's avatar
Guido Gunther 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 Gunther's avatar
Guido Gunther committed
4

5
The aim of the Handy library is to help with developing UI for mobile devices
Oliver Galvin's avatar
Oliver Galvin committed
6
using GTK/GNOME.
Guido Gunther's avatar
Guido Gunther committed
7 8 9

## License

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

12 13
## Build dependencies

14
To build libhandy you need to first install the build-deps defined by [the debian/control file](https://source.puri.sm/Librem5/libhandy/blob/master/debian/control#L6).
15 16

If you are running a Debian based distribution, you can easily install all those the dependencies making use of the following command
17

18
```sh
19
sudo apt-get build-dep .
20
```
21

Guido Gunther's avatar
Guido Gunther committed
22 23
## Building

24
We use the Meson (and thereby Ninja) build system for libhandy. The quickest
Guido Gunther's avatar
Guido Gunther committed
25 26
way to get going is to do the following:

27 28 29 30 31
```sh
meson . _build
ninja -C _build
ninja -C _build install
```
Guido Gunther's avatar
Guido Gunther committed
32

Guido Gunther's avatar
Guido Gunther committed
33
For build options see [meson_options.txt](./meson_options.txt). E.g. to enable documentation:
Guido Gunther's avatar
Guido Gunther committed
34

35 36
```sh
meson . _build -Dgtk_doc=true
37
ninja -C _build libhandy-doc
38
```
Guido Gunther's avatar
Guido Gunther committed
39 40 41

## Usage

Guido Gunther's avatar
Guido Gunther committed
42
There's a C example:
Guido Gunther's avatar
Guido Gunther committed
43

44 45 46
```sh
_build/examples/example
```
Guido Gunther's avatar
Guido Gunther committed
47 48

and one in Python. When running from the built source tree it
louib's avatar
louib committed
49
needs several environment variables so use \_build/run to set them:
Guido Gunther's avatar
Guido Gunther committed
50

51 52 53
```sh
_build/run examples/example.py
```
54 55

### Glade
56

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

60 61 62
```sh
_build/run glade
```
Guido Gunther's avatar
Guido Gunther committed
63 64 65 66

## Documentation

The documentation can be found online
67
[here](https://developer.puri.sm/projects/libhandy/unstable). Further examples on how
68
to use the widgets in your favorite programming language can be found here:
Guido Gunther's avatar
Guido Gunther committed
69 70

### C
71
- [gnome-bluetooth](https://gitlab.gnome.org/GNOME/gnome-bluetooth) (HdyColumn)
72 73
- [GNOME Settings](https://gitlab.gnome.org/GNOME/gnome-control-center) (HdyActionRow, HdyColumn, HdyLeaflet, HdyTitleBar)
- [GNOME Web](https://gitlab.gnome.org/GNOME/epiphany) (HdyActionRow, HdyColumn, HdyComboRow, HdySearchBar)
74
- [phosh](https://source.puri.sm/Librem5/phosh) (HdyKeypad)
Guido Gunther's avatar
Guido Gunther committed
75 76

### Python 3
77
- [Daty](https://gitlab.gnome.org/World/Daty) (HdyColumn, HdyLeaflet, HdySearchBar, HdyTitleBar)
78
- [HydraPaper](https://gabmus.gitlab.io/HydraPaper/) (HdyActionRow, HdyHeaderBar, HdyPreferencesGroup, HdyPreferencesPage, HdyPreferencesRow, HdyPreferencesWindow, HdyViewSwitcher)
Guido Gunther's avatar
Guido Gunther committed
79
- [PasswordSafe](https://gitlab.gnome.org/World/PasswordSafe) (HdyColumn)
80
- [Unifydmin](https://gitlab.com/gabmus/unifydmin) (HdyColumn, HdyLeaflet, HdyTitleBar)
Guido Gunther's avatar
Guido Gunther committed
81 82

### Rust
83
- [Fractal](https://gitlab.gnome.org/GNOME/fractal) (HdyColumn, HdyLeaflet)
Guido Gunther's avatar
Guido Gunther committed
84
- [Podcasts](https://gitlab.gnome.org/World/podcasts) (HdyColumn)
85
- [Shortwave](https://gitlab.gnome.org/World/Shortwave) (HdyActionRow, HdyColumn, HdyDialog, HdyHeaderBar, HdyLeaflet, HdyPaginator, HdyPreferencesGroup, HdyPreferencesPage, HdyPreferencesWindow, HdySearchBar, HdySqueezer, HdyViewSwitcher, HdyViewSwitcherBar)
Guido Gunther's avatar
Guido Gunther committed
86 87

### Vala
88
- [GNOME Contacts](https://gitlab.gnome.org/GNOME/gnome-contacts) (HdyLeaflet, HdyHeaderGroup, HdyTitleBar)
Guido Gunther's avatar
Guido Gunther committed
89
- [GNOME Games](https://gitlab.gnome.org/GNOME/gnome-games) (HdyColumn, HdyTitleBar)
90
- [GNOME Clocks](https://gitlab.gnome.org/GNOME/gnome-clocks) (HdyActionRow, HdyColumn, HdyDialog, HdyHeaderBar, HdySqueezer, HdyViewSwitcher)