source: project/sx/sx.html @ 4981

Last change on this file since 4981 was 4981, checked in by felix winkelmann, 13 years ago

included sources in sx egg

File size: 11.4 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<!-- Generated by eggdoc Revision: 1.20  -->
3<html>
4<head>
5<title>Eggs Unlimited - sx</title><style type="text/css"> <!--
6      CODE {
7            color: #666666;
8          }
9/*   DT.definition EM { font-weight: bold; font-style: normal; } */
10
11     DT.definition { 
12                   background: #eee;
13                   color: black;
14                   padding: 0.2em 1em 0.2em 0.7em;
15                   margin-left: 0.2em;
16border: 1px solid #bbc;
17                   font-family: "Andale Mono", monospace;
18                   /* font-size: 1.2em; */
19                   
20                 }
21     DD {
22                   margin-top: 0.8em;
23                   margin-bottom: 0.8em;
24     }
25     DIV.subsection {
26                    border-top: 1px solid #448;
27                    padding-left: 1em;
28                    margin-bottom: 1.2em;
29     }
30     DIV.subsubsection {
31                    border-top: 1px dotted #99c;
32                    /* border-left: 1px solid #99c; */
33                    padding-left: 1em;
34                    margin-bottom: 1.2em;
35     }
36     DIV.subsubsubsection {
37                    border-top: 1px solid #ddf;
38                    padding-left: 1em;
39                    margin-bottom: 1.2em;
40     }
41
42         DIV.section {
43                 margin-bottom: 1.5em;
44         }
45         a:link {
46                 color: #336;
47         }
48         a:visited { color: #666; }
49         a:active  { color: #966; }
50         a:hover   { color: #669; }
51         body { margin: 0; padding: 0; background: #fff; color: #000; font: 9pt "Lucida Grande", "Verdana", sans-serif; }
52         H2 {
53                 background: #336;
54                 color: #fff;
55                 padding-top: 0.5em;
56                 padding-bottom: 0.5em;
57                 padding-left: 16px;
58                 margin: 0 0 1em 0;
59        }
60        UL LI {
61                list-style: none;
62        }
63        TT {
64                font-family: "Andale Mono", monospace;
65                /* font-size: 1.2em; */
66        }
67        H3 {
68                color: #113;
69                margin-bottom: 0.5em;
70        }
71        H4, H5, H6 {
72                color: #113;
73                margin-bottom: 1.0em;
74        }
75        H5 {
76                font-weight: normal;
77                font-style: italic;
78                font-size: 100%;
79                margin-top: 1.2em;
80        }
81        H6 {
82                font-weight: bold;
83                font-size: 85%;
84                margin-top: 1.2em;
85        }
86     DIV#eggheader {
87         text-align: center;
88                 float: right;
89                 margin-right: 2em;
90     }
91     DIV#header IMG {
92            /* display: block; margin-left: auto; margin-right: auto;  */
93            /* float: right; */
94            border: none;  /* firefox */
95     }
96     DIV#footer {
97                background: #bbd;
98                padding: 0.7em ;
99                border-top: 1px solid #cce;
100     }
101     DIV#footer hr {
102                display: none;
103     }
104     DIV#footer a {
105                float: left;
106     }
107     DIV#revision-history {
108         float: right;
109     }
110     
111     DIV#body {
112                 margin: 1em 1em 1em 16px;
113         }
114
115     DIV#examples PRE {
116       background: #eef;
117       padding: 0.1em;
118       border: 1px solid #aac;
119     }
120     PRE#license, DIV#examples PRE {
121       padding: 0.5em;
122     }
123     DIV#examples PRE {
124       /* font-size: 85%; */
125     }
126     PRE { font-family: "Andale Mono", monospace; }
127     TABLE {
128       background: #eef;
129       padding: 0.2em;
130       border: 1px solid #aac;
131       border-collapse: collapse;
132       width: 100%;
133     }
134     TABLE.symbol-table TD.symbol {
135          width: 15em;
136          font-family: "Andale Mono", monospace;
137          /* font-size: 1.2em; */
138     }
139     TH {
140       text-align: left;
141       border-bottom: 1px solid #aac;
142       padding: 0.25em 0.5em 0.25em 0.5em;
143     } 
144     TD { padding: 0.25em 0.5em 0.25em 0.5em; }
145     --></style></head>
146<body>
147<div id="header">
148<h2>sx</h2>
149<div id="eggheader"><a href="index.html">
150<img src="egg.jpg" alt="[Picture of an egg]" /></a></div></div>
151<div id="body">
152<div class="section">
153<h3>Description</h3>Simple X library</div>
154<div class="section">
155<h3>Author</h3><a href="mailto:felix@call-with-current-continuation.org">felix</a></div>
156<div class="section">
157<h3>Version</h3>
158<ul>
159<li>1.3 Included and fixed libsx sources</li>
160<li>1.2 Uses exteralize easyffi</li>
161<li>1.1 Adapted to SRFI-69 compatible hash-tables</li>
162<li>1.0 Initial release</li></ul></div>
163<div class="section">
164<h3>Usage</h3><tt>(require-extension sx)</tt></div>
165<div class="section">
166<h3>Download</h3><a href="sx.egg">sx.egg</a></div>
167<div class="section">
168<h3>Documentation</h3>
169<p>A wrapper for `The Simple X library' by Dominic Giampaolo. You must have the <a href="http://freshmeat.net/projects/libsx/">libsx</a> library installed in order to build and use this extension.</p>
170<div class="subsection">
171<h4>Procedures</h4>
172<pre>(sx:add-time-out UNSIGNED-LONG TOPROC)
173(sx:attach-edge SXWIDGET INT INT)
174(sx:author) -&gt; C-STRING
175(sx:beep)
176(sx:change-scroll-list SXWIDGET STRINGLIST)
177(sx:check-for-event)
178(sx:clear-draw-area)
179(sx:close-window)
180(sx:draw-arc INT INT INT INT INT INT)
181(sx:draw-bitmap (POINTER VOID) INT INT INT INT)
182(sx:draw-box INT INT INT INT)
183(sx:draw-filled-arc INT INT INT INT INT INT)
184(sx:draw-filled-box INT INT INT INT)
185(sx:draw-filled-polygon S16VECTOR INT)
186(sx:draw-image (POINTER VOID) INT INT INT INT)
187(sx:draw-line INT INT INT INT)
188(sx:draw-pixel INT INT)
189(sx:draw-polyline S16VECTOR INT)
190(sx:draw-text C-STRING INT INT)
191(sx:exit-main-loop)
192(sx:font-height (POINTER &quot;XFONTSTRUCT&quot;)) -&gt; INT
193(sx:free-all-colors)
194(sx:free-font SXFONT)
195(sx:free-private-color INT)
196(sx:free-standard-colors)
197(sx:get-all-colors) -&gt; BOOL
198(sx:get-bg-color SXWIDGET) -&gt; INT
199(sx:get-current-list-item SXWIDGET) -&gt; INT
200(sx:get-draw-area-size S32VECTOR S32VECTOR)
201(sx:get-fg-color SXWIDGET) -&gt; INT
202(sx:get-file C-STRING C-STRING FREQPROC) -&gt; C-STRING
203(sx:get-font C-STRING) -&gt; SXFONT
204(sx:get-form) -&gt; SXWIDGET
205(sx:get-image (POINTER VOID) INT INT INT INT)
206(sx:get-long-string C-STRING C-STRING INT) -&gt; C-STRING
207(sx:get-menu-item-checked SXWIDGET) -&gt; BOOL
208(sx:get-named-color C-STRING) -&gt; INT
209(sx:get-okay C-STRING) -&gt; BOOL
210(sx:get-pixel INT INT) -&gt; INT
211(sx:get-private-color) -&gt; INT
212(sx:get-rgbcolor INT INT INT) -&gt; INT
213(sx:get-standard-colors)
214(sx:get-string C-STRING C-STRING) -&gt; C-STRING
215(sx:get-string-entry SXWIDGET) -&gt; C-STRING
216(sx:get-text C-STRING C-STRING INT INT) -&gt; C-STRING
217(sx:get-text-widget-text SXWIDGET) -&gt; C-STRING
218(sx:get-toggle-state SXWIDGET) -&gt; BOOL
219(sx:get-top-widget SXWIDGET) -&gt; SXWIDGET
220(sx:get-tri-state C-STRING) -&gt; INT
221(sx:get-widget-font SXWIDGET) -&gt; SXFONT
222(sx:get-widget-state SXWIDGET) -&gt; BOOL
223(sx:get-yes-no C-STRING) -&gt; BOOL
224(sx:grab-pixel C-STRING) -&gt; C-STRING
225(sx:lib-version) -&gt; C-STRING
226(sx:main-loop)
227(sx:make-button C-STRING BUTTONPROC) -&gt; SXWIDGET
228(sx:make-draw-area INT INT REDISPLAYPROC) -&gt; SXWIDGET
229(sx:make-form SXWIDGET) -&gt; SXWIDGET
230(sx:make-horiz-scrollbar INT SCROLLPROC) -&gt; SXWIDGET
231(sx:make-label C-STRING) -&gt; SXWIDGET
232(sx:make-menu C-STRING) -&gt; SXWIDGET
233(sx:make-menu-item SXWIDGET C-STRING BUTTONPROC) -&gt; SXWIDGET
234(sx:make-scroll-list STRINGLIST INT INT SCROLLPROC) -&gt; SXWIDGET
235(sx:make-string-entry C-STRING INT STRINGPROC) -&gt; SXWIDGET
236(sx:make-stringlist SCHEME-OBJECT) -&gt; (POINTER (POINTER CHAR))
237(sx:make-text-widget C-STRING BOOL BOOL INT INT) -&gt; SXWIDGET
238(sx:make-toggle C-STRING BOOL SXWIDGET BUTTONPROC) -&gt; SXWIDGET
239(sx:make-vert-scrollbar INT SCROLLPROC) -&gt; SXWIDGET
240(sx:make-window C-STRING C-STRING BOOL) -&gt; SXWIDGET
241(sx:open-display INT (POINTER (POINTER CHAR))) -&gt; INT
242(sx:read-locale C-STRING)
243(sx:scroll-draw-area INT INT INT INT INT INT)
244(sx:set-bg-color SXWIDGET INT)
245(sx:set-border-color SXWIDGET INT)
246(sx:set-button-down-cb SXWIDGET BUTTONPROC)
247(sx:set-button-up-cb SXWIDGET BUTTONPROC)
248(sx:set-color INT)
249(sx:set-color-map INT)
250(sx:set-current-list-item SXWIDGET INT)
251(sx:set-current-window SXWIDGET)
252(sx:set-draw-area SXWIDGET)
253(sx:set-draw-mode INT)
254(sx:set-enter-cb SXWIDGET ENTERPROC)
255(sx:set-fg-color SXWIDGET INT)
256(sx:set-form SXWIDGET)
257(sx:set-freq-filter C-STRING)
258(sx:set-icon-title C-STRING)
259(sx:set-keypress-cb SXWIDGET KEYPROC)
260(sx:set-label SXWIDGET C-STRING)
261(sx:set-leave-cb SXWIDGET LEAVEPROC)
262(sx:set-line-style INT)
263(sx:set-line-width INT)
264(sx:set-menu-item-checked SXWIDGET BOOL)
265(sx:set-mouse-motion-cb SXWIDGET MOTIONPROC)
266(sx:set-my-color-map INT U8VECTOR U8VECTOR U8VECTOR)
267(sx:set-private-color INT INT INT INT)
268(sx:set-scrollbar SXWIDGET FLOAT FLOAT FLOAT)
269(sx:set-scrollbar-direction FLOAT)
270(sx:set-scrollbar-step SXWIDGET FLOAT)
271(sx:set-string-entry SXWIDGET C-STRING)
272(sx:set-text-editable SXWIDGET BOOL)
273(sx:set-text-widget-position SXWIDGET INT)
274(sx:set-text-widget-text SXWIDGET C-STRING BOOL)
275(sx:set-thumb-bitmap SXWIDGET C-STRING INT INT)
276(sx:set-toggle-state SXWIDGET BOOL)
277(sx:set-widget-bitmap SXWIDGET (POINTER VOID) INT INT)
278(sx:set-widget-font SXWIDGET SXFONT)
279(sx:set-widget-pixmap SXWIDGET (POINTER (POINTER VOID)))
280(sx:set-widget-pos SXWIDGET INT SXWIDGET [INT SXWIDGET])
281(sx:set-widget-size SXWIDGET INT INT)
282(sx:set-widget-state SXWIDGET BOOL)
283(sx:set-window-title C-STRING)
284(sx:show-display)
285(sx:sync-display)
286(sx:text-width SXFONT C-STRING) -&gt; INT
287(sx:turn-on-backing-store SXWIDGET) -&gt; INT</pre></div>
288<div class="subsection">
289<h4>Callback signatures</h4>
290<pre>TOPROC =        (lambda () ...)
291FREQPROC =      (lambda (directory file) ...)
292BUTTONPROC =    (lambda () ...)
293REDISPLAYPROC = (lambda (width height) ...)
294STRINGPROC =    (lambda (string) ...)
295SCROLLPROC =    (lambda (float-val) ...)
296ENTERPPROC =    (lambda (x y) ...)
297LEAVEPROC =     (lambda (x y) ...)
298KEYPROC =       (lambda (inputstring up?) ...)</pre></div>
299<div class="subsection">
300<h4>Flags</h4>
301<pre>sx:attach-bottom
302sx:attach-left
303sx:attach-right
304sx:attach-top
305sx:black
306sx:blue
307sx:bottom-edge
308sx:buttonbg
309sx:can-modify
310sx:colsel-dial
311sx:edit-file
312sx:edit-string
313sx:exclusive-window
314sx:freq-dial
315sx:green
316sx:grey-scale-1
317sx:grey-scale-2
318sx:hilight
319sx:inputbg
320sx:left-edge
321sx:main-dial
322sx:no-care
323sx:no-modify
324sx:nonexclusive-window
325sx:num-dial
326sx:place-right
327sx:place-under
328sx:popup-dial
329sx:rainbow-1
330sx:rainbow-2
331sx:red
332sx:right-edge
333sx:sane-xor
334sx:top-edge
335sx:white
336sx:yellow</pre></div></div>
337<div class="section">
338<h3>Examples</h3>
339<div id="examples">
340<p>A simple `Hello world' example:
341<pre>(require-extension sx)
342
343(sx:make-label &quot;Hello, world!&quot;)
344(sx:main-loop)</pre></p>
345<p>Show current directory in scroll-list:
346<pre>(require-extension sx posix (srfi 1))
347
348(define (button)
349  (sx:change-scroll-list sl (directory &quot;.&quot;)) )
350
351(define (scroll s i)
352  (print &quot;current: &quot; s &quot; \t&quot; i) )
353
354(define b (sx:make-button &quot;Update&quot; button))
355(define sl (sx:make-scroll-list (directory &quot;.&quot;) 200 300 scroll))
356
357(sx:set-widget-pos sl sx:place-under b)
358
359(sx:main-loop)</pre></p></div></div>
360<div class="section">
361<h3>License</h3>
362<pre>Copyright (c) 2005, Dominic Giampaolo
363
364This library is free software; you can redistribute it and/or
365modify it under the terms of the GNU Lesser General Public
366License as published by the Free Software Foundation; either
367version 2.1 of the License, or (at your option) any later version.
368
369This library is distributed in the hope that it will be useful,
370but WITHOUT ANY WARRANTY; without even the implied warranty of
371MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
372Lesser General Public License for more details.
373
374You should have received a copy of the GNU Lesser General Public
375License along with this library; if not, write to the Free Software
376Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
377All rights reserved.</pre></div></div>
378<div id="footer">
379<hr /><a href="index.html">&lt; Egg index</a>
380<div id="revision-history">$Revision$ $Date$</div>&nbsp;</div></body></html>
Note: See TracBrowser for help on using the repository browser.