hs-wayland-scanner-0.1.0: examples/simple-client/README.md
About
=====
A simple Wayland client. It can be used to test the `simple-server`
Building
========
Use `hws -c hs-wayland-scanner.cfg` to generate the Wayland bindings:
``` shell
cd examples/simple-client
/path/to/hws -c hs-wayland-scanner.cfg
```
Alternatively run:
``` shell
/path/to/hws -p ./ protocols/wayland.xml
```
Now you can build it with `cabal`:
``` shell
cabal [run|build|install]
```
Running
=======
Run with:
``` shell
# change the socket name with the one printed by simple-server
WAYLAND_DISPLAY="wayland-0" /path/to/simple-client
```
or, if there is only one server running:
``` shell
/path/to/simple-client
```
Anyway the client will connect to any server and print the list of
available interfaces
If the connection is successful the client will print something like:
``` shell
Connected!
[CLIENT] Global: wl_compositor (name=1)
[CLIENT] bound compositor
```
wait two seconds and exit.
Documentation
=============
This example exposes a library also to show the documentation
generated by `hws`. To produce the documentation run:
``` shell
cabal haddock
```