]> gitweb.factorcode.org Git - factor.git/blob - extra/core-foundation/core-foundation-docs.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / extra / core-foundation / core-foundation-docs.factor
1 USING: alien strings arrays help.markup help.syntax destructors ;
2 IN: core-foundation
3
4 HELP: CF>array
5 { $values { "alien" "a " { $snippet "CFArray" } } { "array" "an array of " { $link alien } " instances" } }
6 { $description "Creates a Factor array from a Core Foundation array." } ;
7
8 HELP: <CFArray>
9 { $values { "seq" "a sequence of " { $link alien } " instances" } { "alien" "a " { $snippet "CFArray" } } }
10 { $description "Creates a Core Foundation array from a Factor array." } ;
11
12 HELP: <CFString>
13 { $values { "string" string } { "alien" "a " { $snippet "CFString" } } }
14 { $description "Creates a Core Foundation string from a Factor string." } ;
15
16 HELP: CF>string
17 { $values { "alien" "a " { $snippet "CFString" } } { "string" string } }
18 { $description "Creates a Factor string from a Core Foundation string." } ;
19
20 HELP: CF>string-array
21 { $values { "alien" "a " { $snippet "CFArray" } " of " { $snippet "CFString" } " instances" } { "seq" string } }
22 { $description "Creates an array of Factor strings from a " { $snippet "CFArray" } " of " { $snippet "CFString" } "s." } ;
23
24 HELP: <CFFileSystemURL>
25 { $values { "string" "a pathname string" } { "dir?" "a boolean indicating if the pathname is a directory" } { "url" "a " { $snippet "CFURL" } } }
26 { $description "Creates a new " { $snippet "CFURL" } " pointing to the given local pathname." } ;
27
28 HELP: <CFURL>
29 { $values { "string" "a URL string" } { "url" "a " { $snippet "CFURL" } } }
30 { $description "Creates a new " { $snippet "CFURL" } "." } ;
31
32 HELP: <CFBundle>
33 { $values { "string" "a pathname string" } { "bundle" "a " { $snippet "CFBundle" } } }
34 { $description "Creates a new " { $snippet "CFBundle" } "." } ;
35
36 HELP: load-framework
37 { $values { "name" "a pathname string" } }
38 { $description "Loads a Core Foundation framework." } ;
39
40 HELP: &CFRelease
41 { $values { "alien" "Pointer to a Core Foundation object" } }
42 { $description "Marks the given Core Foundation object for unconditional release via " { $link CFRelease } " at the end of the enclosing " { $link with-destructors } " scope." } ;
43
44 HELP: |CFRelease
45 { $values { "interface" "Pointer to a Core Foundation object" } }
46 { $description "Marks the given Core Foundation object for release via " { $link CFRelease } " in the event of an error at the end of the enclosing " { $link with-destructors } " scope." } ;
47
48 { CFRelease |CFRelease &CFRelease } related-words
49
50 ARTICLE: "core-foundation" "Core foundation utilities"
51 "The " { $vocab-link "core-foundation" } " vocabulary defines bindings for some frequently-used Core Foundation functions. It also provides some utility words."
52 $nl
53 "Strings:"
54 { $subsection <CFString> }
55 { $subsection CF>string }
56 "Arrays:"
57 { $subsection <CFArray> }
58 { $subsection CF>array }
59 { $subsection CF>string-array }
60 "URLs:"
61 { $subsection <CFFileSystemURL> }
62 { $subsection <CFURL> }
63 "Frameworks:"
64 { $subsection load-framework }
65 "Memory management:"
66 { $subsection &CFRelease }
67 { $subsection |CFRelease } ;
68
69 ABOUT: "core-foundation"