source: project/release/2/xosd/xosd.html @ 8751

Last change on this file since 8751 was 8751, checked in by felix winkelmann, 12 years ago

rrb2 move completion

File size: 6.9 KB
Line 
1<html><head><title>xosd</title>
2
3<style type="text/css">
4  <!--
5      CODE {
6             color: #666666;
7           }
8      EM {
9           font-weight: bold;
10           font-style: normal;
11         }
12      DT.function { 
13                    background: #f5f5f5;
14                    color: black;
15                    padding: 0.1em;
16                    border: 1px solid #bbbaaf;
17                    font-family: monospace;
18                  }
19      PRE {
20        background: #efeee0;
21        padding: 0.1em;
22        border: 1px solid #bbbaaf;
23      }
24    -->
25</style></head>
26  <body>
27
28<center><img src="egg.jpg"></center>
29<center><a href="index.html">back</a></center>
30
31<h2>xosd</h2>
32
33<h3>Description:</h3>
34
35An interface to the <a href="http://www.ignavus.net/software.html">XOSD</a> on-screen display library.
36
37<h3>Author:</h3>
38<a href="mailto:felix@call-with-current-continuation.org">felix</a>.
39
40<h3>Version:</h3>
41<ul>
42<li>1.5
43fix in setup script
44<li>1.4
45displaying a percentage did actually show a slider
46<li>1.3
47Alignment flags for center and right were swapped
48<li>1.2
49Fixed two typos in the example [Thanks to Mario Goulart]
50<li>1.1
51Alignment constants where wrongly named; changed <code>xosd:is-oncsreen</code> to <code>xosd:is-onscreen?</code>.
52<li>1.0
53</li></ul>
54
55<h3>Usage:</h3>
56<pre>(require-extension xosd)
57</pre>
58
59<p>This extension requires CHICKEN 1.931 or newer.
60
61<h3>Download:</h3>
62<a href="xosd.egg">xosd.egg</a>
63
64<h3>Documentation:</h3>
65
66<dl>
67<dt class="function"><em>(procedure)</em> (xosd:create NUMBER-OF-LINES)
68</dt><dd><p>
69Creates and returns an XOSD window or <code>#f</code> on failure. NUMBER-OF-LINES specifies
70the maximum number of lines that can be displayed.
71</dd>
72<dt class="function"><em>(procedure)</em> (xosd:destroy OSD)
73</dt><dd><p>
74Destroys the XOSD window.
75</dd>
76<dt class="function"><em>(procedure)</em> (xosd:is-onscreen? OSD)
77</dt><dd><p>
78Returns true, if an XOSD window is currently shown.
79</dd>
80<dt class="function"><em>(procedure)</em> (xosd:wait-until-no-display OSD)
81</dt><dd><p>
82Waits until the timeout has been reached.
83</dd>
84<dt class="function"><em>(procedure)</em> (xosd:hide OSD)
85</dt><dd><p>
86Hides the XOSD window.
87</dd>
88<dt class="function"><em>(procedure)</em> (xosd:show OSD)
89</dt><dd><p>
90Shows the XOSD window.
91</dd>
92<dt class="function"><em>(procedure)</em> (xosd:set-pos OSD POSITION)
93</dt><dd><p>
94Sets the position of the window. POSITION may be any of the symbols
95<code>top</code>, <code>middle</code> or <code>bottom</code>.
96</dd>
97<dt class="function"><em>(procedure)</em> (xosd:set-vertical-offset OSD OFFSET)
98</dt><dd><p>
99Sets the offset in pixels the window should be placed, relative to the top (or bottom)
100of the screen.
101</dd>
102<dt class="function"><em>(procedure)</em> (xosd:set-horizontal-offset OSD OFFSET)
103</dt><dd><p>
104Sets the offset in pixels the window should be placed, relative to the left (or right)
105of the screen.
106</dd>
107<dt class="function"><em>(procedure)</em> (xosd:set-align OSD ALIGN)
108</dt><dd><p>
109Sets the alignment of the window. ALIGN may be any of the symbols <code>left</code>,
110<code>center</code> or <code>right</code>.
111</dd>
112<dt class="function"><em>(procedure)</em> (xosd:set-shadow-offset OSD OFFSET)
113</dt><dd><p>
114Sets the offset to the bottom-right of the shadow underneath the window.
115</dd>
116<dt class="function"><em>(procedure)</em> (xosd:set-outline-offset OSD ALIGN)
117</dt><dd><p>
118Sets the offset of the window-outline.
119</dd>
120<dt class="function"><em>(procedure)</em> (xosd:set-timeout OSD TIMEOUT)
121</dt><dd><p>
122Sets the timeout in seconds.
123</dd>
124<dt class="function"><em>(procedure)</em> (xosd:set-font OSD FONT)
125</dt><dd><p>
126Sets the font with which text should be displayed. FONT should be a string
127containing a valid X fontname.
128</dd>
129<dt class="function"><em>(procedure)</em> (xosd:set-colour OSD COLOR)
130</dt><dd><p>
131Sets the color of the displayed text. COLOR should be string containing a valid
132X color name.
133</dd>
134<dt class="function"><em>(procedure)</em> (xosd:set-outline-colour OSD COLOR)
135</dt><dd><p>
136Sets the color of the window outline.
137</dd>
138<dt class="function"><em>(procedure)</em> (xosd:set-shadow-colour OSD COLOR)
139</dt><dd><p>
140Sets the color of the shadow.
141</dd>
142<dt class="function"><em>(procedure)</em> (xosd:get-colour OSD)
143</dt><dd><p>
144Returns the red-, green- and blue parts of the currently selected text color
145as three values between 0 and 65535.
146</dd>
147<dt class="function"><em>(procedure)</em> (xosd:set-scroll OSD LINES)
148</dt><dd><p>
149Scrolls the text by a given number of lines.
150</dd>
151<dt class="function"><em>(procedure)</em> (xosd:get-number-lines OSD)
152</dt><dd><p>
153Returns the currently set number of lines.
154</dd>
155<dt class="function"><em>(procedure)</em> (xosd:set-bar-length OSD N)
156</dt><dd><p>
157Sets the length of the percentage bar or slider.
158</dd>
159<dt class="function"><em>(procedure)</em> (xosd:display OSD LINE [MODE] VALUE)
160</dt><dd><p>
161Shows VALUE in the OSD window in the given line. MODE should be one of the
162symbols <code>string</code>, <code>percentage</code> or <code>slider</code>.
163If MODE is omitted, it defaults to <code>percentage</code> if VALUE is an
164integer, or to <code>string</code> otherwise.
165</dd>
166</dl>
167
168<h3>Examples:</h3>
169
170<pre>
171(require-extension xosd)
172
173(define osd (xosd:create 1))
174
175(xosd:set-font osd "fixed")
176(xosd:set-colour osd "LawnGreen")
177(xosd:set-timeout osd 3)
178(xosd:set-shadow-offset osd 1)
179(xosd:display osd 0 'string "Example XOSD output")
180(xosd:wait-until-no-display osd)
181(xosd:destroy osd)
182</pre>
183
184
185<h3>License:</h3>
186
187<pre>
188Copyright (c) 2005, Felix L. Winkelmann
189All rights reserved.
190
191Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
192conditions are met:
193
194  Redistributions of source code must retain the above copyright notice, this list of conditions and the following
195    disclaimer.
196  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
197    disclaimer in the documentation and/or other materials provided with the distribution.
198  Neither the name of the author nor the names of its contributors may be used to endorse or promote
199    products derived from this software without specific prior written permission.
200
201THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
202OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
203AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
204CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
205CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
206SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
207THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
208OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
209POSSIBILITY OF SUCH DAMAGE.
210</pre>
211
212
213<hr><a href="index.html">back</a>
214
215
216</body></html>
Note: See TracBrowser for help on using the repository browser.