xosd

  1. xosd
    1. Description
    2. Author
    3. Requirements
    4. Usage
    5. Download
    6. Documentation
    7. Examples
    8. Changelog
    9. License

Description

An interface to the XOSD on-screen display library.

Author

Felix Winkelmann

Requirements

This extension requires CHICKEN 1.931 or newer.

Usage

  (require-extension xosd)

Download

xosd.egg

Documentation

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

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, 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.