X OSD
1 The "xosd.ss" Module
(require (planet "xosd.ss" ("murphy" "xosd.plt" 1 0))) |
Bindings to the X on-screen display library.
(make-xosd lines) → (or/c xosd? #f) |
lines : exact-positive-integer? |
Create a new on-screen display object with room for lines of text or other status information.
Returns the new display or #f if no display could be created, for example because no X server was running.
(xosd? v) → any/c |
v : any/c |
Checks whether v is an on-screen display object. Returns a true value iff this is the case.
(xosd-onscreen? osd) → boolean? |
osd : xosd? |
Returns whether the given on-screen display is currently visible for the user.
(xosd-hide osd) → boolean? |
osd : xosd? |
Hides the given on-screen display from the user. Returns #t iff the display was actually hidden and previously visible.
(xosd-show osd) → boolean? |
osd : xosd? |
Shows the given on-screen display to the user. Returns #t iff the display was actually shown and not previously visible.
(set-xosd-pos! osd pos) → void? |
osd : xosd? |
pos : (one-of/c 'top 'middle 'bottom) |
Sets the vertical position of the display on the screen.
(set-xosd-align! osd align) → void? |
osd : xosd? |
align : (one-of/c 'left 'center 'right) |
Sets the horizontal position and text alignment of the display on the screen.
(set-xosd-horizontal-offset! osd offset) → void? |
osd : xosd? |
offset : exact-nonnegative-integer? |
Sets the horizontal offset of the on-screen display from its position defined by set-xosd-pos! and set-xosd-align!.
(set-xosd-vertical-offset! osd offset) → void? |
osd : xosd? |
offset : exact-nonnegative-integer? |
Sets the vertical offset of the on-screen display from its position defined by set-xosd-pos! and set-xosd-align!.
(set-xosd-color! osd color) → boolean? |
osd : xosd? |
color : string? |
Sets the foreground color of the on-screen display according to the given X color specification string.
Returns #t iff the given color was successfully set. In case the color specification is not understood, a default color is set instead.
(set-xosd-font! osd font) → boolean? |
osd : xosd? |
font : string? |
Sets the font of the on-screen display according to the given X font specification string.
Returns #t iff the given font was successfully set. In case the font specification is not understood, the font remains unchanged.
(set-xosd-shadow-color! osd color) → boolean? |
osd : xosd? |
color : string? |
Sets the shadow color of the on-screen display according to the given X color specification string.
Returns #t iff the given color was successfully set. In case the color specification is not understood, a default color is set instead.
(set-xosd-shadow-offset! osd offset) → void? |
osd : xosd? |
offset : exact-nonnegative-integer? |
Sets the shadow offset of the on-screen display to the given value.
(set-xosd-outline-color! osd color) → boolean? |
osd : xosd? |
color : string? |
Sets the outline color of the on-screen display according to the given X color specification string.
Returns #t iff the given color was successfully set. In case the color specification is not understood, a default color is set instead.
(set-xosd-outline-offset! osd offset) → void? |
osd : xosd? |
offset : exact-nonnegative-integer? |
Sets the outline offset of the on-screen display to the given value.
(set-xosd-bar-length! osd length) → void? |
osd : xosd? |
length : (or/c exact-nonnegative-integer? #f) |
Sets the length of visually presented percentages and sliders. If length is #f, a default length is restored.
(set-xosd-timeout! osd timeout) → void? |
osd : xosd? |
timeout : (or/c exact-nonnegative-integer? #f) |
Sets the timeout between a change to the on-screen display and the time it is automatically hidden. If timeout is #f, the display stays permanently visible.
(xosd-lines osd) → exact-positive-integer? |
osd : xosd? |
Retrieves the number of lines available for information display in the on-screen display osd.
| ||||||||
osd : xosd? |
Returns the red, green and blue intensities of the foreground color of the given on-screen display.
(xosd-scroll osd lines) → void? |
osd : xosd? |
lines : exact-nonnegative-integer? |
Scrolls the given on-screen display lines up.
| |||||||||||||||||||||
osd : xosd? | |||||||||||||||||||||
line : exact-nonnegative-integer? | |||||||||||||||||||||
percentage : (integer-in 0 100) |
Displays a percentage bar in osd on line line.
(xosd-display-slider osd line percentage) → void? |
osd : xosd? |
line : exact-nonnegative-integer? |
percentage : (integer-in 0 100) |
Displays a slider in osd on line line.
(xosd-display-string osd line str) → void? |
osd : xosd? |
line : exact-nonnegative-integer? |
str : string? |
Displays the given string in osd on line line.
(xosd-display-format osd line fmt arg ) → void? |
osd : xosd? |
line : exact-nonnegative-integer? |
fmt : string? |
arg : any/c |
Displays a string constructed using format from the format specification fmt and the given args in osd on line line.
2 License
Copyright (c) 2008 by Thomas Chust <chust@web.de>.
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 http://www.gnu.org/licenses/lgpl-3.0.html.