#lang scribble/doc @(require (lib "manual.ss" "scribble") (for-label (lib "class.ss" "scheme") "xosd.ss")) @title{X OSD} @section{The @filepath{xosd.ss} Module} @defmodule[(planet "xosd.ss" ("murphy" "xosd.plt" 1 0))]{ Bindings to the X on-screen display library. } @defproc[(make-xosd [lines exact-positive-integer?]) (or/c xosd? #f)]{ Create a new on-screen display object with room for @scheme[lines] of text or other status information. Returns the new display or @scheme[#f] if no display could be created, for example because no X server was running. } @defproc[(xosd? [v any/c]) any/c]{ Checks whether @scheme[v] is an on-screen display object. Returns a true value iff this is the case. } @defproc[(xosd-onscreen? [osd xosd?]) boolean?]{ Returns whether the given on-screen display is currently visible for the user. } @defproc[(xosd-hide [osd xosd?]) boolean?]{ Hides the given on-screen display from the user. Returns @scheme[#t] iff the display was actually hidden and previously visible. } @defproc[(xosd-show [osd xosd?]) boolean?]{ Shows the given on-screen display to the user. Returns @scheme[#t] iff the display was actually shown and not previously visible. } @defproc[(set-xosd-pos! [osd xosd?] [pos (one-of/c 'top 'middle 'bottom)]) void?]{ Sets the vertical position of the display on the screen. } @defproc[(set-xosd-align! [osd xosd?] [align (one-of/c 'left 'center 'right)]) void?]{ Sets the horizontal position and text alignment of the display on the screen. } @defproc[(set-xosd-horizontal-offset! [osd xosd?] [offset exact-nonnegative-integer?]) void?]{ Sets the horizontal offset of the on-screen display from its position defined by @scheme[set-xosd-pos!] and @scheme[set-xosd-align!]. } @defproc[(set-xosd-vertical-offset! [osd xosd?] [offset exact-nonnegative-integer?]) void?]{ Sets the vertical offset of the on-screen display from its position defined by @scheme[set-xosd-pos!] and @scheme[set-xosd-align!]. } @defproc[(set-xosd-color! [osd xosd?] [color string?]) boolean?]{ Sets the foreground color of the on-screen display according to the given X color specification string. Returns @scheme[#t] iff the given color was successfully set. In case the color specification is not understood, a default color is set instead. } @defproc[(set-xosd-font! [osd xosd?] [font string?]) boolean?]{ Sets the font of the on-screen display according to the given X font specification string. Returns @scheme[#t] iff the given font was successfully set. In case the font specification is not understood, the font remains unchanged. } @defproc[(set-xosd-shadow-color! [osd xosd?] [color string?]) boolean?]{ Sets the shadow color of the on-screen display according to the given X color specification string. Returns @scheme[#t] iff the given color was successfully set. In case the color specification is not understood, a default color is set instead. } @defproc[(set-xosd-shadow-offset! [osd xosd?] [offset exact-nonnegative-integer?]) void?]{ Sets the shadow offset of the on-screen display to the given value. } @defproc[(set-xosd-outline-color! [osd xosd?] [color string?]) boolean?]{ Sets the outline color of the on-screen display according to the given X color specification string. Returns @scheme[#t] iff the given color was successfully set. In case the color specification is not understood, a default color is set instead. } @defproc[(set-xosd-outline-offset! [osd xosd?] [offset exact-nonnegative-integer?]) void?]{ Sets the outline offset of the on-screen display to the given value. } @defproc[(set-xosd-bar-length! [osd xosd?] [length (or/c exact-nonnegative-integer? #f)]) void?]{ Sets the length of visually presented percentages and sliders. If @scheme[length] is @scheme[#f], a default length is restored. } @defproc[(set-xosd-timeout! [osd xosd?] [timeout (or/c exact-nonnegative-integer? #f)]) void?]{ Sets the timeout between a change to the on-screen display and the time it is automatically hidden. If @scheme[timeout] is @scheme[#f], the display stays permanently visible. } @defproc[(xosd-lines [osd xosd?]) exact-positive-integer?]{ Retrieves the number of lines available for information display in the on-screen display @scheme[osd]. } @defproc[(xosd-color [osd xosd?]) (values exact-nonnegative-integer? exact-nonnegative-integer? exact-nonnegative-integer?)]{ Returns the red, green and blue intensities of the foreground color of the given on-screen display. } @defproc[(xosd-scroll [osd xosd?] [lines exact-nonnegative-integer?]) void?]{ Scrolls the given on-screen display @scheme[lines] up. } @defproc[(xosd-display-percentage [osd xosd?] [line exact-nonnegative-integer?] [percentage (integer-in 0 100)]) void?]{ Displays a percentage bar in @scheme[osd] on line @scheme[line]. } @defproc[(xosd-display-slider [osd xosd?] [line exact-nonnegative-integer?] [percentage (integer-in 0 100)]) void?]{ Displays a slider in @scheme[osd] on line @scheme[line]. } @defproc[(xosd-display-string [osd xosd?] [line exact-nonnegative-integer?] [str string?]) void?]{ Displays the given string in @scheme[osd] on line @scheme[line]. } @defproc[(xosd-display-format [osd xosd?] [line exact-nonnegative-integer?] [fmt string?] [arg any/c] ...) void?]{ Displays a string constructed using @scheme[format] from the format specification @scheme[fmt] and the given @scheme[args] in @scheme[osd] on line @scheme[line]. } @section{License} Copyright (c) 2008 by @link["mailto:chust@web.de"]{Thomas Chust @""}. This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You can find a copy of the GNU Lesser General Public License at @link["http://www.gnu.org/licenses/lgpl-3.0.html"]{http://www.gnu.org/licenses/lgpl-3.0.html}.