source: project/macosx/macosx.html @ 5500

Last change on this file since 5500 was 5500, checked in by Kon Lovett, 13 years ago

Dropped use of CFStringGetCStringPtr.

File size: 10.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 - macosx</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>macosx</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>
154<p>MacOS X Utilities</p></div>
155<div class="section">
156<h3>Author</h3><a href="mailto:klovett@pacbell.net">Kon Lovett</a></div>
157<div class="section">
158<h3>Version</h3>
159<ul>
160<li>2.002 Dropped invalid use of 'CFStringGetCStringPtr'.</li>
161<li>2.001 Use of unsigned-c-string*. Bugfix for macosx:open-url.</li>
162<li>2.0 Changed macosx:machine-location &amp; macosx:console-user to return a vector. Deprecated macosx:get-bundle-path, use macosx:main-bundle-path. Added macosx:session-info.</li>
163<li>1.3 Added macosx:tick-count, macosx:delay, macosx:gestalt</li>
164<li>1.2 Added `macosx:get-bundle-path' [felix]</li>
165<li>1.1 Renamed macosx-utils to macosx-env</li>
166<li>1.0 Initial release</li></ul></div>
167<div class="section">
168<h3>Download</h3><a href="macosx.egg">macosx.egg</a></div>
169<div class="section">
170<h3>Requires</h3>
171<ul>
172<li><a href="dollar.html">dollar</a></li></ul></div>
173<div class="section">
174<h3>Documentation</h3>
175<p>Very incomplete MacOS X Core API.</p>
176<div class="subsection">
177<h4>Environment Query</h4>
178<div class="section">
179<h3>Usage</h3>(require-extension macosx-env)</div>
180<dt class="definition"><strong>procedure:</strong> (macosx:machine-name)</dt>
181<dd>
182<p>The machine name from core services. Probably not the same as <code>(get-host-name)</code>.</p></dd>
183<dt class="definition"><strong>procedure:</strong> (macosx:short-user-name)</dt>
184<dd>
185<p>The short name for the user. Based on the current process uid.</p></dd>
186<dt class="definition"><strong>procedure:</strong> (macosx:long-user-name)</dt>
187<dd>
188<p>The long name for the user. Based on the current process uid.</p></dd>
189<dt class="definition"><strong>procedure:</strong> (macosx:machine-location)</dt>
190<dd>
191<p>Returns a 4 element vector:</p><table class="symbol-table">
192<tr>
193<td class="symbol">LATITUDE</td>
194<td>Latitude in degrees north to 2 decimal places.</td></tr>
195<tr>
196<td class="symbol">LONGITUDE</td>
197<td>Longitude in degrees east to 2 decimal places.</td></tr>
198<tr>
199<td class="symbol">DLS-OFFSET</td>
200<td>Number of seconds to add for daylight saving time.</td></tr>
201<tr>
202<td class="symbol">GMT-OFFSET</td>
203<td>Number of seconds east of GMT, includes daylight saving time status.</td></tr></table></dd>
204<dt class="definition"><strong>procedure:</strong> (macosx:metric?)</dt>
205<dd>
206<p>Using the metric system?</p></dd>
207<dt class="definition"><strong>procedure:</strong> (macosx:computer-name [STORE])</dt>
208<dd>
209<p>The computer name from system configuration.</p></dd>
210<dt class="definition"><strong>procedure:</strong> (macosx:console-user [STORE])</dt>
211<dd>
212<p>Returns a 3 element vector:</p><table class="symbol-table">
213<tr>
214<td class="symbol">NAME</td>
215<td>The (short) name of the console user.</td></tr>
216<tr>
217<td class="symbol">UID</td>
218<td>The user id of the console user.</td></tr>
219<tr>
220<td class="symbol">GID</td>
221<td>The group id of the console user.</td></tr></table></dd>
222<dt class="definition"><strong>procedure:</strong> (macosx:local-host-name [STORE])</dt>
223<dd>
224<p>The local host name from system configuration. Probably not the same as <code>(get-host-name)</code>.</p></dd>
225<dt class="definition"><strong>procedure:</strong> (macosx:location-name [STORE])</dt>
226<dd>
227<p>The location.</p></dd>
228<dt class="definition"><strong>procedure:</strong> (macosx:session-info)</dt>
229<dd>
230<p>Returns a 10 element vector:</p><table class="symbol-table">
231<tr>
232<td class="symbol">SESSION-ID</td>
233<td>The security session identifier number.</td></tr>
234<tr>
235<td class="symbol">IS-ROOT</td>
236<td>A root session?</td></tr>
237<tr>
238<td class="symbol">HAS-GRAPHICS</td>
239<td>Has graphics access?</td></tr>
240<tr>
241<td class="symbol">HAS-TTY</td>
242<td>Has tty?</td></tr>
243<tr>
244<td class="symbol">IS-REMOTE</td>
245<td>Is a remote session?</td></tr>
246<tr>
247<td class="symbol">WAS-INITIALIZED</td>
248<td>Initialized?</td></tr>
249<tr>
250<td class="symbol">SHORT-USER-NAME</td>
251<td>Short user name.</td></tr>
252<tr>
253<td class="symbol">USER-ID</td>
254<td>User identification number.</td></tr>
255<tr>
256<td class="symbol">CONSOLE-SET</td>
257<td>Console hardware number.</td></tr>
258<tr>
259<td class="symbol">LOGIN-COMPLETED</td>
260<td>Login operations complete?</td></tr>
261<tr>
262<td class="symbol">IS-USER-ACTIVE</td>
263<td>On console?</td></tr></table></dd>
264<dt class="definition"><strong>procedure:</strong> (macosx:main-bundle-path)</dt>
265<dd>
266<p>The full pathname of the currently running executable (including the program name).</p></dd>
267<dt class="definition"><strong>procedure:</strong> (macosx:tick-count)</dt>
268<dd>
269<p>Returns an unsigned 32-bit integer that indicates the current number of ticks (1/60th of a second) since the system last started up.</p></dd>
270<dt class="definition"><strong>procedure:</strong> (macosx:delay TICKS)</dt>
271<dd>
272<p>Suspend execution for the specified number of <tt>TICKS</tt>. Returns an unsigned integer that indicates the ticks after the delay.</p></dd>
273<dt class="definition"><strong>procedure:</strong> (macosx:gestalt SELECTOR)</dt>
274<dd>
275<p>Calls the Gestalt Manager with specified <tt>SELECTOR</tt> and returns an unsigned 32-bit integer.</p>
276<p>The <tt>SELECTOR</tt> can be a string, symbol, or an unsigned integer. When a string or symbol it is converted to a Macintosh 4-byte character value - an unsigned 32-bit integer. The string length may not be greater than 4 but can be less; space padding will be performed.</p></dd></div>
277<div class="subsection">
278<h4>URL Support</h4>
279<div class="section">
280<h3>Usage</h3>(require-extension macosx-url)</div>
281<dt class="definition"><strong>procedure:</strong> (macosx:open-url URL-STRING)</dt>
282<dd>
283<p>Opens the <tt>URL-STRING</tt> using the system-dependent default application.</p></dd></div></div>
284<div class="section">
285<h3>License</h3>
286<pre>Copyright (c) 2006, Kon Lovett.  All rights reserved.
287
288Permission is hereby granted, free of charge, to any person obtaining a
289copy of this software and associated documentation files (the Software),
290to deal in the Software without restriction, including without limitation
291the rights to use, copy, modify, merge, publish, distribute, sublicense,
292and/or sell copies of the Software, and to permit persons to whom the
293Software is furnished to do so, subject to the following conditions:
294
295The above copyright notice and this permission notice shall be included
296in all copies or substantial portions of the Software.
297
298THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
299IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
300FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
301THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
302OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
303ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
304OTHER DEALINGS IN THE SOFTWARE.</pre></div></div>
305<div id="footer">
306<hr /><a href="index.html">&lt; Egg index</a>
307<div id="revision-history">$Revision$ $Date$</div>&nbsp;</div></body></html>
Note: See TracBrowser for help on using the repository browser.