source: project/release/3/macosx/tags/2.002/macosx-eggdoc.scm @ 8927

Last change on this file since 8927 was 8927, checked in by Kon Lovett, 12 years ago

Save

File size: 6.1 KB
Line 
1;;;; macosx-eggdoc.scm
2
3(use eggdoc)
4
5(define license #<<EOF
6Copyright (c) 2006, Kon Lovett.  All rights reserved.
7
8Permission is hereby granted, free of charge, to any person obtaining a
9copy of this software and associated documentation files (the Software),
10to deal in the Software without restriction, including without limitation
11the rights to use, copy, modify, merge, publish, distribute, sublicense,
12and/or sell copies of the Software, and to permit persons to whom the
13Software is furnished to do so, subject to the following conditions:
14
15The above copyright notice and this permission notice shall be included
16in all copies or substantial portions of the Software.
17
18THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
22OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24OTHER DEALINGS IN THE SOFTWARE.
25EOF
26)
27
28(define examples '((pre #<<EOF
29EOF
30)))
31
32(define doc `(
33  (eggdoc:begin
34    (name "macosx")
35    (description (p "MacOS X Utilities"))
36    (author (url "mailto:klovett@pacbell.net" "Kon Lovett"))
37    (download "macosx.egg")
38    (requires
39      (url "dollar.html" "dollar"))
40
41    (documentation
42
43      (p "Very incomplete MacOS X Core API.")
44
45      (subsection "Environment Query"
46
47        (usage
48          "(require-extension macosx-env)")
49
50        (procedure "(macosx:machine-name)"
51          (p "The machine name from core services. Probably not the same as "
52          (code "(get-host-name)") ".") )
53
54        (procedure "(macosx:short-user-name)"
55          (p "The short name for the user. Based on the current process uid.") )
56
57        (procedure "(macosx:long-user-name)"
58          (p "The long name for the user. Based on the current process uid.") )
59
60        (procedure "(macosx:machine-location)"
61          (p "Returns a 4 element vector:")
62          (symbol-table
63            (describe LATITUDE "Latitude in degrees north to 2 decimal places.")
64            (describe LONGITUDE "Longitude in degrees east to 2 decimal places.")
65            (describe DLS-OFFSET "Number of seconds to add for daylight saving time.")
66            (describe GMT-OFFSET "Number of seconds east of GMT, includes daylight saving time status.") ) )
67
68        (procedure "(macosx:metric?)"
69          (p "Using the metric system?") )
70
71        (procedure "(macosx:computer-name [STORE])"
72          (p "The computer name from system configuration.") )
73
74        (procedure "(macosx:console-user [STORE])"
75          (p "Returns a 3 element vector:")
76          (symbol-table
77            (describe NAME "The (short) name of the console user.")
78            (describe UID "The user id of the console user.")
79            (describe GID "The group id of the console user.") ) )
80
81        (procedure "(macosx:local-host-name [STORE])"
82          (p "The local host name from system configuration. Probably not the same as "
83          (code "(get-host-name)") ".") )
84
85        (procedure "(macosx:location-name [STORE])"
86          (p "The location.") )
87
88        (procedure "(macosx:session-info)"
89          (p "Returns a 10 element vector:")
90          (symbol-table
91            (describe SESSION-ID "The security session identifier number.")
92            (describe IS-ROOT "A root session?")
93            (describe HAS-GRAPHICS "Has graphics access?")
94            (describe HAS-TTY "Has tty?")
95            (describe IS-REMOTE "Is a remote session?")
96            (describe WAS-INITIALIZED "Initialized?")
97            (describe SHORT-USER-NAME "Short user name.")
98            (describe USER-ID "User identification number.")
99            (describe CONSOLE-SET "Console hardware number.")
100            (describe LOGIN-COMPLETED "Login operations complete?")
101            (describe IS-USER-ACTIVE "On console?") ) )
102
103        (procedure "(macosx:main-bundle-path)"
104          (p "The full pathname of the currently running executable "
105          "(including the program name).") )
106
107        (procedure "(macosx:tick-count)"
108          (p "Returns an unsigned 32-bit integer that indicates the current number of "
109          "ticks (1/60th of a second) since the system last started up.") )
110
111        (procedure "(macosx:delay TICKS)"
112          (p "Suspend execution for the specified number of " (tt "TICKS") ". "
113          "Returns an unsigned integer that indicates the ticks after the delay.") )
114
115        (procedure "(macosx:gestalt SELECTOR)"
116          (p "Calls the Gestalt Manager with specified " (tt "SELECTOR") " and "
117          "returns an unsigned 32-bit integer.")
118
119          (p "The " (tt "SELECTOR") " can be a string, symbol, or an unsigned integer. "
120          "When a string or symbol it is converted to a Macintosh 4-byte character "
121          "value - an unsigned 32-bit integer. The string length may not be greater than "
122          "4 but can be less; space padding will be performed.") )
123      )
124
125      (subsection "URL Support"
126
127        (usage
128          "(require-extension macosx-url)")
129
130        (procedure "(macosx:open-url URL-STRING)"
131          (p "Opens the " (tt "URL-STRING") " using the system-dependent default "
132          "application.") )
133
134      )
135
136#|
137      (subsection "Error Codes"
138
139        (usage
140          "(require-extension macosx-osstatus)")
141
142        (procedure "(macosx:OSStatus->string OSSTATUS-CODE)"
143          (p "Returns a text description string of " (tt "OSSTATUS-CODE") ".") )
144      )
145|#
146    )
147
148  ;;(examples ,examples)
149  (history
150   (version "2.002" "Dropped invalid use of 'CFStringGetCStringPtr'.")
151   (version "2.001" "Use of unsigned-c-string*. Bugfix for macosx:open-url.")
152   (version "2.0" "Changed macosx:machine-location & macosx:console-user to return a vector. Deprecated macosx:get-bundle-path, use macosx:main-bundle-path. Added macosx:session-info.")
153   (version "1.3" "Added macosx:tick-count, macosx:delay, macosx:gestalt")
154   (version "1.2" "Added `macosx:get-bundle-path' [felix]")
155   (version "1.1" "Renamed macosx-utils to macosx-env")
156   (version "1.0" "Initial release"))
157  (section "License" (pre ,license))
158) ) )
159
160(eggdoc->html doc)
Note: See TracBrowser for help on using the repository browser.