Guile bindings for libxosd

Alex Kost 1b1ec7199f README: Use org link for "guix.scm" 8 tahun lalu
build-aux 985f146002 Generate file with docstrings from texinfo 8 tahun lalu
doc 835ca79662 doc: Update example to use (xosd) module 8 tahun lalu
examples eae73de698 examples: sound: Mention Guile-Daemon 8 tahun lalu
modules 13966afe10 xosd: Add 'toggle-osd' procedure 8 tahun lalu
src a73b35170e libguile-xosd: Raise an error for wrong align/position 8 tahun lalu
.gitignore 2898a956d0 Add "pre-inst-env.el" 8 tahun lalu
AUTHORS 7c4d33dc11 Update AUTHORS 8 tahun lalu
COPYING d41e97fbce Update the license to GNU GPLv3 8 tahun lalu
INSTALL 341b76b73f Replace INSTALL file with the usual one 8 tahun lalu
Makefile.am 1588abd409 build: Guile modules compilation depends on libguile-xosd 8 tahun lalu
NEWS add7eff19a Rename Guile modules 8 tahun lalu
README 1b1ec7199f README: Use org link for "guix.scm" 8 tahun lalu
README.org 655af4024e Update README 8 tahun lalu
autogen.sh 7e2cc23634 Add "autogen.sh" 8 tahun lalu
configure.ac 8fded01cb3 examples: Add "message.scm" 8 tahun lalu
guix.scm 685132d1bc guix: Remove unneeded module 8 tahun lalu
pre-inst-env.el.in 74588ab2e5 pre-inst-env.el: Fix Guile paths 8 tahun lalu
pre-inst-env.in 985f146002 Generate file with docstrings from texinfo 8 tahun lalu

README

-*- mode: org -*-

* About

Guile-XOSD provides the Guile bindings for [[http://sourceforge.net/projects/libxosd/][libxosd]] library.

Guile-XOSD is the reincarnation of [[https://github.com/sigma/lisposd][lisposd]]. The C file with the Guile
bindings was written at the time (2004-2005) by Yann Hodique, and the
rest (GNU Build System infrastructure, guile modules, documentation and
examples) was added as a part of Guile-XOSD in 2016 by Alex Kost.

* Usage

From the following screenshots you can get the idea how Guile-XOSD may
be used:

- [[http://i.imgur.com/vNbFrDm.png]]
- [[http://i.imgur.com/XCn4ysP.png]]

And here is the code to display the OSD from the second screenshot:

#+BEGIN_SRC scheme
(use-modules (xosd))

(define osd
(make-osd #:lines 2
#:position 'top
#:align 'center
#:font "-*-ubuntu-bold-r-normal--*-500-*-*-p-*-*-1"
#:color "dark green"
#:outline-offset 1
#:outline-color "white"))

(define (display-percentage percent)
(display-string-in-osd osd (format #f "~a%" percent) 0)
(display-percentage-in-osd osd percent 1))

(display-percentage 73)
#+END_SRC

The full documentation (texinfo manual) and a couple of other examples
can be found in the source tree (and in the installed package).

* Building from Git

Along with the obvious requirements for Guile-XOSD:

- [[http://gnu.org/software/guile/][GNU Guile]]
- [[http://sourceforge.net/projects/libxosd/][XOSD]] library

to build it from git, you also need:

- [[http://gnu.org/software/autoconf/][GNU Autoconf]]
- [[http://gnu.org/software/automake/][GNU Automake]]
- [[http://gnu.org/software/libtool/][GNU Libtool]]
- [[http://gnu.org/software/texinfo/][GNU Texinfo]]

Run =./autogen.sh= to generate the build system infrastructure. After
that, the program can be built and installed with the usual sequence of
commands of the GNU Build System:

#+BEGIN_SRC sh
$ ./configure
$ make
# make install
#+END_SRC

It is possible to use/test Guile-XOSD without installing (i.e., after
running =make= but before running =make install=) with the help of
=pre-inst-env= script in the top build tree, like this:

#+BEGIN_SRC sh
$ ./pre-inst-env guile
scheme@(guile-user)> ,use(xosd)
#+END_SRC

* Building with Guix

This repository contains [[file:guix.scm]] file which can be used to build
or install the development version of Guile-XOSD with [[http://www.gnu.org/software/guix/][GNU Guix]] (this
file also contains the package for the latest release).