source: project/release/3/macosx/trunk/macosx-eggdoc.scm @ 8926

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

Canon dir struct

File size: 6.2 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    (history
38     (version "2.002" "Dropped invalid use of 'CFStringGetCStringPtr'.")
39     (version "2.001" "Use of unsigned-c-string*. Bugfix for macosx:open-url.")
40     (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.")
41     (version "1.3" "Added macosx:tick-count, macosx:delay, macosx:gestalt")
42     (version "1.2" "Added `macosx:get-bundle-path' [felix]")
43     (version "1.1" "Renamed macosx-utils to macosx-env")
44     (version "1.0" "Initial release"))
45    (download "macosx.egg")
46    (requires
47      (url "dollar.html" "dollar"))
48
49    (documentation
50
51      (p "Very incomplete MacOS X Core API.")
52
53      (subsection "Environment Query"
54
55        (usage
56          "(require-extension macosx-env)")
57
58        (procedure "(macosx:machine-name)"
59          (p "The machine name from core services. Probably not the same as "
60          (code "(get-host-name)") ".") )
61
62        (procedure "(macosx:short-user-name)"
63          (p "The short name for the user. Based on the current process uid.") )
64
65        (procedure "(macosx:long-user-name)"
66          (p "The long name for the user. Based on the current process uid.") )
67
68        (procedure "(macosx:machine-location)"
69          (p "Returns a 4 element vector:")
70          (symbol-table
71            (describe LATITUDE "Latitude in degrees north to 2 decimal places.")
72            (describe LONGITUDE "Longitude in degrees east to 2 decimal places.")
73            (describe DLS-OFFSET "Number of seconds to add for daylight saving time.")
74            (describe GMT-OFFSET "Number of seconds east of GMT, includes daylight saving time status.") ) )
75
76        (procedure "(macosx:metric?)"
77          (p "Using the metric system?") )
78
79        (procedure "(macosx:computer-name [STORE])"
80          (p "The computer name from system configuration.") )
81
82        (procedure "(macosx:console-user [STORE])"
83          (p "Returns a 3 element vector:")
84          (symbol-table
85            (describe NAME "The (short) name of the console user.")
86            (describe UID "The user id of the console user.")
87            (describe GID "The group id of the console user.") ) )
88
89        (procedure "(macosx:local-host-name [STORE])"
90          (p "The local host name from system configuration. Probably not the same as "
91          (code "(get-host-name)") ".") )
92
93        (procedure "(macosx:location-name [STORE])"
94          (p "The location.") )
95
96        (procedure "(macosx:session-info)"
97          (p "Returns a 10 element vector:")
98          (symbol-table
99            (describe SESSION-ID "The security session identifier number.")
100            (describe IS-ROOT "A root session?")
101            (describe HAS-GRAPHICS "Has graphics access?")
102            (describe HAS-TTY "Has tty?")
103            (describe IS-REMOTE "Is a remote session?")
104            (describe WAS-INITIALIZED "Initialized?")
105            (describe SHORT-USER-NAME "Short user name.")
106            (describe USER-ID "User identification number.")
107            (describe CONSOLE-SET "Console hardware number.")
108            (describe LOGIN-COMPLETED "Login operations complete?")
109            (describe IS-USER-ACTIVE "On console?") ) )
110
111        (procedure "(macosx:main-bundle-path)"
112          (p "The full pathname of the currently running executable "
113          "(including the program name).") )
114
115        (procedure "(macosx:tick-count)"
116          (p "Returns an unsigned 32-bit integer that indicates the current number of "
117          "ticks (1/60th of a second) since the system last started up.") )
118
119        (procedure "(macosx:delay TICKS)"
120          (p "Suspend execution for the specified number of " (tt "TICKS") ". "
121          "Returns an unsigned integer that indicates the ticks after the delay.") )
122
123        (procedure "(macosx:gestalt SELECTOR)"
124          (p "Calls the Gestalt Manager with specified " (tt "SELECTOR") " and "
125          "returns an unsigned 32-bit integer.")
126
127          (p "The " (tt "SELECTOR") " can be a string, symbol, or an unsigned integer. "
128          "When a string or symbol it is converted to a Macintosh 4-byte character "
129          "value - an unsigned 32-bit integer. The string length may not be greater than "
130          "4 but can be less; space padding will be performed.") )
131      )
132
133      (subsection "URL Support"
134
135        (usage
136          "(require-extension macosx-url)")
137
138        (procedure "(macosx:open-url URL-STRING)"
139          (p "Opens the " (tt "URL-STRING") " using the system-dependent default "
140          "application.") )
141
142      )
143
144#|
145      (subsection "Error Codes"
146
147        (usage
148          "(require-extension macosx-osstatus)")
149
150        (procedure "(macosx:OSStatus->string OSSTATUS-CODE)"
151          (p "Returns a text description string of " (tt "OSSTATUS-CODE") ".") )
152      )
153|#
154    )
155
156  ;;(examples ,examples)
157  (section "License" (pre ,license))
158) ) )
159
160(eggdoc->html doc)
Note: See TracBrowser for help on using the repository browser.