Skip to content
Snippets Groups Projects
README.md 2.95 KiB
Newer Older
Guido Günther's avatar
Guido Günther committed
# Handy
[![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

The aim of the Handy library is to help with developing UI for mobile devices
Oliver Galvin's avatar
Oliver Galvin committed
using GTK/GNOME.
Guido Günther's avatar
Guido Günther committed

## License

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

## Build dependencies

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).

If you are running a Debian based distribution, you can easily install all those the dependencies making use of the following command
sudo apt-get build-dep .
Guido Günther's avatar
Guido Günther committed
## Building

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

```sh
meson . _build
ninja -C _build
ninja -C _build install
```
Guido Günther's avatar
Guido Günther committed

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

```sh
meson . _build -Dgtk_doc=true
Guido Günther's avatar
Guido Günther committed

## Usage

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

```sh
_build/examples/example
```
Guido Günther's avatar
Guido Günther committed

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

```sh
_build/run examples/example.py
```
To be able to use Handy's widgets in the glade interface designer without
installing the library use:


## Documentation

The documentation can be found online
[here](https://developer.puri.sm/projects/libhandy/unstable). Further examples on how
to use the widgets in your favorite programming language can be found here:

### C
- [calls](https://source.puri.sm/Librem5/calls) (HdyDialer)
- [gnome-bluetooth](https://gitlab.gnome.org/GNOME/gnome-bluetooth) (HdyColumn)
- [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)
- [phosh](https://source.puri.sm/Librem5/phosh) (HdyDialer)

### Python 3
- [Daty](https://gitlab.gnome.org/World/Daty) (HdyColumn, HdyLeaflet, HdySearchBar, HdyTitleBar)
- [HydraPaper](https://gabmus.gitlab.io/HydraPaper/) (HdyActionRow, HdyHeaderBar, HdyPreferencesGroup, HdyPreferencesPage, HdyPreferencesRow, HdyPreferencesWindow, HdyViewSwitcher)
- [PasswordSafe](https://gitlab.gnome.org/World/PasswordSafe) (HdyColumn)
- [Unifydmin](https://gitlab.com/gabmus/unifydmin) (HdyColumn, HdyLeaflet, HdyTitleBar)

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

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