chickadee » xosd

Outdated egg!

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 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.

xosd

Description

An interface to the XOSD on-screen display library.

Author

Felix Winkelmann

Usage

  (require-extension xosd)

Documentation

xosd:create NUMBER-OF-LINESprocedure

Creates and returns an XOSD window or #f on failure. NUMBER-OF-LINES specifies the maximum number of lines that can be displayed.

xosd:destroy OSDprocedure

Destroys the XOSD window.

xosd:is-onscreen? OSDprocedure

Returns true, if an XOSD window is currently shown.

xosd:wait-until-no-display OSDprocedure

Waits until the timeout has been reached.

xosd:hide OSDprocedure

Hides the XOSD window.

xosd:show OSDprocedure

Shows the XOSD window.

xosd:set-pos OSD POSITIONprocedure

Sets the position of the window. POSITION may be any of the symbols top, middle or bottom.

xosd:set-vertical-offset OSD OFFSETprocedure

Sets the offset in pixels the window should be placed, relative to the top (or bottom) of the screen.

xosd:set-horizontal-offset OSD OFFSETprocedure

Sets the offset in pixels the window should be placed, relative to the left (or right) of the screen.

xosd:set-align OSD ALIGNprocedure

Sets the alignment of the window. ALIGN may be any of the symbols left, center or right.

xosd:set-shadow-offset OSD OFFSETprocedure

Sets the offset to the bottom-right of the shadow underneath the window.

xosd:set-outline-offset OSD ALIGNprocedure

Sets the offset of the window-outline.

xosd:set-timeout OSD TIMEOUTprocedure

Sets the timeout in seconds.

xosd:set-font OSD FONTprocedure

Sets the font with which text should be displayed. FONT should be a string containing a valid X fontname.

xosd:set-colour OSD COLORprocedure

Sets the color of the displayed text. COLOR should be string containing a valid X color name.

xosd:set-outline-colour OSD COLORprocedure

Sets the color of the window outline.

xosd:set-shadow-colour OSD COLORprocedure

Sets the color of the shadow.

xosd:get-colour OSDprocedure

Returns the red-, green- and blue parts of the currently selected text color as three values between 0 and 65535.

xosd:scroll OSD LINESprocedure

Scrolls the text by a given number of lines.

xosd:get-number-lines OSDprocedure

Returns the currently set number of lines.

xosd:set-bar-length OSD Nprocedure

Sets the length of the percentage bar or slider.

(xosd:display OSD LINE [MODE] VALUE)procedure

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.

Examples

(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)

Changelog

License

 Copyright (c) 2005-2011, 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.

Contents »