README 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. -*- mode: org -*-
  2. * About
  3. Guile-XOSD provides the Guile bindings for [[http://sourceforge.net/projects/libxosd/][libxosd]] library.
  4. Guile-XOSD is the reincarnation of [[https://github.com/sigma/lisposd][lisposd]]. The C file with the Guile
  5. bindings was written at the time (2004-2005) by Yann Hodique, and the
  6. rest (GNU Build System infrastructure, guile modules, documentation and
  7. examples) was added as a part of Guile-XOSD in 2016 by Alex Kost.
  8. * Usage
  9. From the following screenshots you can get the idea how Guile-XOSD may
  10. be used:
  11. - [[http://i.imgur.com/vNbFrDm.png]]
  12. - [[http://i.imgur.com/XCn4ysP.png]]
  13. And here is the code to display the OSD from the second screenshot:
  14. #+BEGIN_SRC scheme
  15. (use-modules (xosd))
  16. (define osd (xosd-create 2))
  17. (xosd-set-pos! osd 'top)
  18. (xosd-set-align! osd 'center)
  19. (xosd-set-font! osd "-*-ubuntu-bold-r-normal--*-500-*-*-p-*-*-1")
  20. (xosd-set-colour! osd "dark green")
  21. (xosd-set-outline-offset! osd 1)
  22. (xosd-set-outline-colour! osd "white")
  23. (define (display-percentage percent)
  24. (xosd-display-string osd 0 (format #f "~a%" percent))
  25. (xosd-display-percentage osd 1 percent))
  26. (display-percentage 73)
  27. #+END_SRC
  28. The full documentation (texinfo manual) and a couple of other examples
  29. can be found in the source tree (and in the installed package).
  30. * Building from Git
  31. Along with the obvious requirements for Guile-XOSD:
  32. - [[http://gnu.org/software/guile/][GNU Guile]]
  33. - [[http://sourceforge.net/projects/libxosd/][XOSD]] library
  34. to build it from git, you also need:
  35. - [[http://gnu.org/software/autoconf/][GNU Autoconf]]
  36. - [[http://gnu.org/software/automake/][GNU Automake]]
  37. - [[http://gnu.org/software/help2man/][GNU Help2man]]
  38. Run =./autogen.sh= to generate the build system infrastructure. After
  39. that, the program can be built and installed with the usual sequence of
  40. commands of the GNU Build System:
  41. #+BEGIN_SRC sh
  42. $ ./configure
  43. $ make
  44. # make install
  45. #+END_SRC
  46. It is possible to use/test Guile-XOSD without installing (i.e., after
  47. running =make= but before running =make install=) with the help of
  48. =pre-inst-env= script in the top build tree, like this:
  49. #+BEGIN_SRC sh
  50. $ ./pre-inst-env guile
  51. scheme@(guile-user)> ,use(xosd)
  52. #+END_SRC