Guile bindings for libxosd

Alex Kost ce6d49c49a Update version to 0.2.2 3 лет назад
build-aux 985f146002 Generate file with docstrings from texinfo 8 лет назад
doc 835ca79662 doc: Update example to use (xosd) module 8 лет назад
examples eae73de698 examples: sound: Mention Guile-Daemon 8 лет назад
modules 13966afe10 xosd: Add 'toggle-osd' procedure 8 лет назад
src a73b35170e libguile-xosd: Raise an error for wrong align/position 8 лет назад
.gitignore 2898a956d0 Add "pre-inst-env.el" 8 лет назад
AUTHORS 7c4d33dc11 Update AUTHORS 8 лет назад
COPYING d41e97fbce Update the license to GNU GPLv3 8 лет назад
INSTALL 341b76b73f Replace INSTALL file with the usual one 8 лет назад
Makefile.am 1588abd409 build: Guile modules compilation depends on libguile-xosd 8 лет назад
NEWS 97b0c9637d build: Add support for Guile 2.2 8 лет назад
README ce6d49c49a Update version to 0.2.2 3 лет назад
README.org 655af4024e Update README 8 лет назад
autogen.sh 7e2cc23634 Add "autogen.sh" 8 лет назад
configure.ac ce6d49c49a Update version to 0.2.2 3 лет назад
guix.scm 239c284886 guix.scm: Use 'close-pipe' instead of 'close-port' 3 лет назад
pre-inst-env.el.in 74588ab2e5 pre-inst-env.el: Fix Guile paths 8 лет назад
pre-inst-env.in 985f146002 Generate file with docstrings from texinfo 8 лет назад

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/installing with Guix

The latest version of Guile-XOSD can be installed with [[http://www.gnu.org/software/guix/][GNU Guix]]:
[[https://guix.gnu.org/en/packages/guile-xosd-0.2.2]].

Also this repository contains [[file:guix.scm]] file which can be used to
build/install Guile-XOSD using the git checkout, or to make a
development environment for it (see the commentary in that file for more
details).