Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/macosx|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. [[tags: egg]] == macosx [[toc:]] == Documentation Very incomplete MacOS X Core API. === Environment Query ==== Usage <enscript language=scheme> (require-extension macosx-env) </enscript> ==== Notes ; {{STORE}} : {{(or #f (c-pointer SCDynamicStoreRef))}}. ==== machine-name <procedure>(machine-name) -> string</procedure> The machine name from core services. Probably not the same as {{(get-host-name)}}. ==== short-user-name <procedure>(short-user-name) -> string</procedure> The short name for the user. Based on the current process uid. ==== long-user-name <procedure>(long-user-name) -> string</procedure> The long name for the user. Based on the current process uid. ==== machine-location <procedure>(machine-location) -> vector</procedure> Returns a 4 element vector: ; LATITUDE : {{inexact}} ; Latitude in degrees north to 2 decimal places. ; LONGITUDE : {{inexact}} ; Longitude in degrees east to 2 decimal places. ; DLS-OFFSET : {{fixnum}} ; Number of seconds to add for daylight saving time. ; GMT-OFFSET : {{fixnum}} ; Number of seconds east of GMT, includes daylight saving time status. ==== metric? <procedure>(metric?) -> boolean</procedure> Using the metric system? ==== computer-name <procedure>(computer-name [STORE]) -> string</procedure> The computer name from system configuration. ==== console-user <procedure>(console-user [STORE]) -> (or boolean vector)</procedure> Returns a 3 element vector or {{#f}} for failure. ; NAME : {{string}} ; The (short) name of the console user. ; UID : {{fixnum}} ; The user id of the console user. ; GID : {{fixnum}} ; The group id of the console user. ==== local-host-name <procedure>(local-host-name [STORE]) -> string</procedure> The local host name from system configuration. Probably not the same as {{(get-host-name)}}. ==== location-name <procedure>(location-name [STORE]) -> string</procedure> The location. ==== session-info <procedure>(session-info) -> vector</procedure> Returns a 10 element vector: ; SESSION-ID : {{fixnum}} ; The security session identifier number. ; IS-ROOT : {{boolean}} ; A root session? ; HAS-GRAPHICS : {{boolean}} ; Has graphics access? ; HAS-TTY : {{boolean}} ; Has tty? ; IS-REMOTE : {{boolean}} ; Is a remote session? ; WAS-INITIALIZED : {{boolean}} ; Initialized? (see note below) ; SHORT-USER-NAME : {{string}} ; Short user name. ; USER-ID : {{fixnum}} ; User identification number. ; CONSOLE-SET : {{fixnum}} ; Console hardware number. ; LOGIN-COMPLETED : {{boolean}} ; Login operations complete? ; IS-USER-ACTIVE : {{boolean}} ; On console? The OS API behind {{WAS-INITIALIZED}} is unsupported as of macOS 10.7 so to indicate the value is {{(void)}}. Raises an {{osstatus-condition}} for failure. ==== main-bundle-path <procedure>(main-bundle-path) -> string</procedure> The full pathname of the currently running executable, including the program name. ==== tick-count <procedure>(tick-count) -> number</procedure> Returns an unsigned 32-bit integer that indicates the current number of ticks (1/60th of a second) since the system last started up. ==== delay <procedure>(delay TICKS) -> number</procedure> Suspend execution for the specified number of {{TICKS}}. Returns an unsigned integer that indicates the ticks after the delay. ==== gestalt <procedure>(gestalt SELECTOR) -> number</procedure> Calls the Gestalt Manager with specified {{SELECTOR}} and returns an unsigned 32-bit integer. ; {{SELECTOR}} : {{(or string symbol number)}}. An {{(or string symbol)}} is converted to a Macintosh 4-byte character value. The string length may not be greater than 4 but can be less; space padding will be performed. Raises an {{oserr-condition}} for failure. === Error Conditons ==== Usage <enscript language=scheme> (require-extension macosx-errors) </enscript> ==== osstatus-condition? <procedure>(osstatus-condition? OBJ) -> boolean</procedure> Is {{OBJ}} an {{osstatus}} {{condition}}? ==== oserr-condition? <procedure>(oserr-condition? OBJ) -> boolean</procedure> Is {{OBJ}} an {{oserr}} {{condition}}? === URL Support ==== Usage <enscript language=scheme> (require-extension macosx-url) </enscript> ==== open-url <procedure>(open-url URL)</procedure> Opens the {{(: URL string}} using the system-dependent default application. == Notes * The utility of {{gestalt}} is almost none now. == Bugs & Limitations * The {{macosx-env}} module is on ''life-support''. * {{sessionWasInitialized}} was removed as of MacOS 10.7 (Lion). == Requirements [[dollar]] [[check-errors]] [[condition-utils]] [[test]] [[setup-helper]] == Author [[/users/kon-lovett|Kon Lovett]] == Version history ; 2.2.0 : Remove {{osstatus-condition?}}, & {{oserr-condition?}} ; 2.1.4 : Fix for ticket #630. ; 2.1.3 : Gestalt defunct & sessionWasInitialized not Lion. ; 2.1.2 : Uses [[condition-utils]]. : 2.1.1 : ; 2.1.0 : Needs "check-errors" extension. ; 2.0.0 : Chicken 4 release. == License Copyright (C) 2009-2018 Kon Lovett. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you add 21 to 15?