]> gitweb.factorcode.org Git - factor.git/blob - basis/cocoa/application/application-docs.factor
*-docs: replace double spaces with single spaces
[factor.git] / basis / cocoa / application / application-docs.factor
1 USING: debugger quotations help.markup help.syntax strings alien
2 core-foundation core-foundation.strings core-foundation.arrays ;
3 IN: cocoa.application
4
5 HELP: <NSString>
6 { $values { "str" string } { "alien" alien } }
7 { $description "Allocates an autoreleased " { $snippet "CFString" } "." } ;
8
9 { <NSString> <CFString> CF>string } related-words
10
11 HELP: with-autorelease-pool
12 { $values { "quot" quotation } }
13 { $description "Sets up a new " { $snippet "NSAutoreleasePool" } ", calls the quotation and frees the pool." } ;
14
15 HELP: NSApp
16 { $values { "app" "an " { $snippet "NSApplication" } } }
17 { $description "Pushes the current " { $snippet "NSApplication" } " singleton." } ;
18
19 HELP: with-cocoa
20 { $values { "quot" quotation } }
21 { $description "Sets up an autorelease pool, initializes the " { $snippet "NSApplication" } " singleton, and calls the quotation." } ;
22
23 HELP: cocoa-app
24 { $values { "quot" quotation } }
25 { $description "Initializes Cocoa, calls the quotation, and starts the Cocoa event loop." } ;
26
27 HELP: add-observer
28 { $values { "observer" "an " { $snippet "NSObject" } } { "selector" string } { "name" "an " { $snippet "NSString" } } { "object" "an " { $snippet "NSObject" } } }
29 { $description "Registers an observer with the " { $snippet "NSNotificationCenter" } " singleton." } ;
30
31 HELP: remove-observer
32 { $values { "observer" "an " { $snippet "NSObject" } } }
33 { $description "Unregisters an observer from the " { $snippet "NSNotificationCenter" } " singleton." } ;
34
35 HELP: install-delegate
36 { $values { "receiver" "an " { $snippet "NSObject" } } { "delegate" "an Objective C class" } }
37 { $description "Sets the receiver's delegate to a new instance of the delegate class." } ;
38
39 ARTICLE: "cocoa-application-utils" "Cocoa application utilities"
40 "Utilities:"
41 { $subsections
42     NSApp
43     add-observer
44     remove-observer
45     install-delegate
46 }
47 "Combinators:"
48 { $subsections
49     cocoa-app
50     with-autorelease-pool
51     with-cocoa
52 } ;
53
54 ABOUT: "cocoa-application-utils"