packages feed

hs-wayland-scanner-0.1.0: examples/simple-server/README.md

About
=====

A simple Wayland server, to be used together with `simple-client`

Building
========

Use `hws -c hs-wayland-scanner.cfg` to generate the Wayland bindings:

``` shell
cd examples/simple-server
/path/to/hws -c hs-wayland-scanner.cfg
```

Alternatively run:

``` shell
/path/to/hws -p ./  -r Server protocols/wayland.xml
```

Now you can build it with `cabal`:

``` shell
cabal [run|build|install]
```

Running
=======

Run with:

``` shell
/path/to/simple-server
```

The server will print the socket name used for waiting for connections:

``` shell
[SERVER] Wayland server running...
[SERVER] Socket: wayland-0
```

You can use the socket name to connect `simple-client` with:

``` shell
WAYLAND_DISPLAY="wayland-0" /path/to/simple-client
```

When the client connects you should see something like:

``` shell
[SERVER] Client bound to wl_compositor
[SERVER] create_surface called, new id = 0x0000000000000005
```

Documentation
=============

This example exposes a library also to show the documentation
generated by `hws`. To produce the documentation run:

``` shell
cabal haddock
```