This is an egg for CHICKEN 3, the unsupported old release. You're almost certainly looking for the CHICKEN 4 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
An interface to the XOSD on-screen display library.
This extension requires CHICKEN 1.931 or newer.
(procedure) (xosd:create NUMBER-OF-LINES)
Creates and returns an XOSD window or #f on failure. NUMBER-OF-LINES specifies the maximum number of lines that can be displayed.
(procedure) (xosd:destroy OSD)
Destroys the XOSD window.
(procedure) (xosd:is-onscreen? OSD)
Returns true, if an XOSD window is currently shown.
(procedure) (xosd:wait-until-no-display OSD)
Waits until the timeout has been reached.
(procedure) (xosd:hide OSD)
Hides the XOSD window.
(procedure) (xosd:show OSD)
Shows the XOSD window.
(procedure) (xosd:set-pos OSD POSITION)
Sets the position of the window. POSITION may be any of the symbols top, middle or bottom.
(procedure) (xosd:set-vertical-offset OSD OFFSET)
Sets the offset in pixels the window should be placed, relative to the top (or bottom) of the screen.
(procedure) (xosd:set-horizontal-offset OSD OFFSET)
Sets the offset in pixels the window should be placed, relative to the left (or right) of the screen.
(procedure) (xosd:set-align OSD ALIGN)
Sets the alignment of the window. ALIGN may be any of the symbols left, center or right.
(procedure) (xosd:set-shadow-offset OSD OFFSET)
Sets the offset to the bottom-right of the shadow underneath the window.
(procedure) (xosd:set-outline-offset OSD ALIGN)
Sets the offset of the window-outline.
(procedure) (xosd:set-timeout OSD TIMEOUT)
Sets the timeout in seconds.
(procedure) (xosd:set-font OSD FONT)
Sets the font with which text should be displayed. FONT should be a string containing a valid X fontname.
(procedure) (xosd:set-colour OSD COLOR)
Sets the color of the displayed text. COLOR should be string containing a valid X color name.
(procedure) (xosd:set-outline-colour OSD COLOR)
Sets the color of the window outline.
(procedure) (xosd:set-shadow-colour OSD COLOR)
Sets the color of the shadow.
(procedure) (xosd:get-colour OSD)
Returns the red-, green- and blue parts of the currently selected text color as three values between 0 and 65535.
(procedure) (xosd:set-scroll OSD LINES)
Scrolls the text by a given number of lines.
(procedure) (xosd:get-number-lines OSD)
Returns the currently set number of lines.
(procedure) (xosd:set-bar-length OSD N)
Sets the length of the percentage bar or slider.
(procedure) (xosd:display OSD LINE [MODE] VALUE)
Shows VALUE in the OSD window in the given line. MODE should be one of the symbols string, percentage or slider. If MODE is omitted, it defaults to percentage if VALUE is an integer, or to string otherwise.
(require-extension xosd) (define osd (xosd:create 1)) (xosd:set-font osd "fixed") (xosd:set-colour osd "LawnGreen") (xosd:set-timeout osd 3) (xosd:set-shadow-offset osd 1) (xosd:display osd 0 'string "Example XOSD output") (xosd:wait-until-no-display osd) (xosd:destroy osd)
- 1.5 fix in setup script
- 1.4 displaying a percentage did actually show a slider
- 1.3 Alignment flags for center and right were swapped
- 1.2 Fixed two typos in the example [Thanks to Mario Goulart]
- 1.1 Alignment constants where wrongly named; changed xosd:is-oncsreen to xosd:is-onscreen?.
Copyright (c) 2005, Felix L. Winkelmann All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.