An Objective-C wrapper for Mac OS X’s FSEvents C API.
リビジョン | aaf1474a25c89143c543c451a6165b136dd33d76 (tree) |
---|---|
日時 | 2011-11-03 00:22:17 |
作者 | Aron Cedercrantz <aron@cede...> |
コミッター | Aron Cedercrantz |
Update the project page.
- Improved the content on the page and the order of the content.
- Changed the page style.
@@ -3,9 +3,9 @@ | ||
3 | 3 | <head> |
4 | 4 | <meta charset='utf-8'> |
5 | 5 | |
6 | - <title>rastersize/CDEvents @ GitHub</title> | |
6 | + <title>CDEvents - Objective-C wrapper of FSEvents</title> | |
7 | 7 | |
8 | - <style type="text/css"> | |
8 | + <!--<style type="text/css"> | |
9 | 9 | body { |
10 | 10 | margin-top: 1.0em; |
11 | 11 | background-color: #0dbb84; |
@@ -27,7 +27,8 @@ | ||
27 | 27 | pre { background: #000; color: #fff; padding: 15px;} |
28 | 28 | hr { border: 0; width: 80%; border-bottom: 1px solid #aaa} |
29 | 29 | .footer { text-align:center; padding-top:30px; font-style: italic; } |
30 | - </style> | |
30 | + </style>--> | |
31 | + <link rel="stylesheet" href="styles.css?v=1" type="text/css" media="screen" charset="utf-8"> | |
31 | 32 | </head> |
32 | 33 | |
33 | 34 | <body> |
@@ -50,65 +51,49 @@ | ||
50 | 51 | </div> |
51 | 52 | |
52 | 53 | |
53 | - <p>CDEvents is an Objective-C wrapper for Mac OS X's [FSEvents C API](http://developer.apple.com/mac/library/documentation/Darwin/Reference/FSEvents_Ref/FSEvents_h/index.html) with support for blocks. Furthermore, all the classes are immutable and it should be thread-safe.</p> | |
54 | + <p>CDEvents is an Objective-C wrapper for Mac OS X's <a href="http://developer.apple.com/mac/library/documentation/Darwin/Reference/FSEvents_Ref/FSEvents_h/index.html" title="The FSEvents C API documentation on Apples developer site">FSEvents C API</a> with support for blocks. Furthermore, all the classes are immutable and it should be thread-safe.</p> | |
54 | 55 | |
55 | - | |
56 | - | |
57 | - <h2>Depdendencies</h2> | |
58 | - <p>- Mac OS X 10.6 (Snow Leopard) | |
59 | -- Modern Objective-C runtime (i.e. 64-bit) | |
60 | -- Intel 64-bit CPU. | |
61 | -- Automatic Reference Counting </p> | |
62 | - | |
63 | - | |
64 | - | |
65 | - <h2>Install</h2> | |
66 | - <p>1. Add CDEvents to your project, | |
67 | - * either by compiling the project and dragging the `CDEvents.framework` into your project or | |
68 | - * by dragging the entire CDEvents project into your project as a sub-project. | |
69 | -2. Import the `CDEvents.h` header where you need it. | |
70 | -3. Set up your `CDEvents` instance and give it a block to execute when a event occurs. | |
71 | - | |
72 | -Easy example code: | |
73 | - | |
74 | - self.events = [[CDEvents alloc]] initWithURLs:<NSArray of URLs to watch> | |
75 | - block:^(CDEvents *watcher, CDEvent *event) { | |
76 | - <Your code here> | |
77 | - }]; | |
78 | - | |
79 | -Or use all the glory-all-options initiator: | |
80 | - | |
81 | - self.events = [[CDEvents alloc] initWithURLs:<NSArray of URLs to watch> | |
82 | - block:^(CDEvents *watcher, CDEvent *event) { | |
83 | - <Your code here> | |
84 | - } | |
85 | - onRunLoop:[NSRunLoop currentRunLoop] | |
86 | - sinceEventIdentifier:kCDEventsSinceEventNow | |
87 | - notificationLantency:CD_EVENTS_DEFAULT_NOTIFICATION_LATENCY | |
88 | - ignoreEventsFromSubDirs:CD_EVENTS_DEFAULT_IGNORE_EVENT_FROM_SUB_DIRS | |
89 | - excludeURLs:<NSArray of URLs to exlude> | |
90 | - streamCreationFlags:kCDEventsDefaultEventStreamFlags];</p> | |
91 | - | |
92 | - | |
93 | - | |
94 | - <h2>License</h2> | |
95 | - <p>Copyright (c) 2010, 2011 Aron Cedercrantz | |
96 | - | |
97 | -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: | |
98 | - | |
99 | -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
100 | - | |
101 | -THE SOFTWARE IS PROVIDED "AS IS", 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.</p> | |
102 | - | |
103 | - | |
104 | - | |
105 | - <h2>Authors</h2> | |
106 | - <p>Aron Cedercrantz (aron@cedercrantz.se) <br/> </p> | |
107 | - | |
108 | - | |
109 | - | |
110 | - <h2>Contact</h2> | |
111 | - <p>Aron Cedercrantz (aron@cedercrantz.se) <br/> </p> | |
56 | + <h2 id="usage">Usage</h2> | |
57 | + <ol> | |
58 | + <li>Add CDEvents to your project,</li> | |
59 | + <ul> | |
60 | + <li>either by compiling the project and dragging the `CDEvents.framework` into your project or</li> | |
61 | + <li>by dragging the entire CDEvents project into your project as a sub-project.</li> | |
62 | + </ul> | |
63 | + <li>Import the `CDEvents.h` header where you need it.</li> | |
64 | + <li>Set up your `CDEvents` instance and give it a block to execute when a event occurs.</li> | |
65 | + </ol> | |
66 | + | |
67 | +<p>Short example which will print each event:</p> | |
68 | +<code><pre> | |
69 | +<span class="pre-processor">#import</span> <span class="string"><CDEvents/CDEvents.h></span> | |
70 | + | |
71 | +... | |
72 | + | |
73 | +<span class="class">NSArray</span> *url = [<span class="class">NSURL</span> <span class="method">URLWithString</span>:<span class="string">@"/path/to/directory"</span>]; | |
74 | +<span class="class">NSArray</span> *urls = [<span class="class">NSArray</span> <span class="method">arrayWithObject</span>:url]; | |
75 | +<span class="keyword">self</span>.<span class="property">events</span> = [[<span class="class">CDEvents</span> <span class="method">alloc</span>]] <span class="method">initWithURLs</span>:urls <span class="method">block</span>: | |
76 | + ^(<span class="class">CDEvents</span> *watcher, <span class="class">CDEvent</span> *event) { | |
77 | + <span class="external-function">NSLog</span>( | |
78 | + <span class="string">@"URLWatcher: %@\nEvent: %@"</span>, | |
79 | + <span class="variable">watcher</span>, | |
80 | + <span class="variable">event</span> | |
81 | + ); | |
82 | + }];</pre></code> | |
83 | + | |
84 | +<p>For a more complete example of usage please see the example application CDEventsTestApp target in the CDEvents Xcode project. Please, also have a look at the API documentation</p> | |
85 | + | |
86 | + <h2 id="documentation">Documentation</h2> | |
87 | + <p>View the <a href="docs/api">index of API documentation</a> for all version of CDEvents or go directly to <a href="docs/api/latest"> API documentation for the latest version</a> of CDEvents. Now and then the <a href="docs/api/head">API documentation for HEAD</a> is also updated. The API documentation for all versions of CDEvents can be</p> | |
88 | + | |
89 | + <h2>Depdendencies</h2> | |
90 | + <p>Requires <a href="http://www.apple.com/macosx/">Mac OS X</a> 10.6 (Snow Leopard) and an Intel 64-bit CPU. The requirements stems from that <a href="http://clang.llvm.org/docs/AutomaticReferenceCounting.html">automatic reference counting</a> (ARC) is supported from 10.6 and up as long as the modern (i.e. 64-bit) Objective-C runtime is used since ARC requires the non-fragile ABI. Although the built product works on 10.6 and up it must be built on a machine running 10.7 (Lion) using Xcode 4.2 and the 10.7 SDK as the 10.6 SDK does not include ARC. The built product support both manual memory management and automatic reference counting.</p> | |
91 | + | |
92 | + <p>If you need to support older versions of OS X or garbage collection please see the branch <a href="https://github.com/rastersize/CDEvents/tree/support%2F1.1" title="CDEvents support branch 1.1 with support for GC and OS X 10.5">support/1.1</a> All 1.1.x version will support garbage collection and OS X 10.5.</p> | |
93 | + | |
94 | + <h2>Author</h2> | |
95 | + <p>Aron Cedercrantz (my first name: aron @ my last name: cedercrantz dot se, or <a href="http://github.com/inbox/new/rastersize" title="Send Aron Cedercrantz (rastersize) a message via GitHub">send me a message via GitHub</a>) | |
96 | +<br/> </p> | |
112 | 97 | |
113 | 98 | |
114 | 99 | <h2>Download</h2> |
@@ -119,11 +104,20 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI | ||
119 | 104 | </p> |
120 | 105 | <p>You can also clone the project with <a href="http://git-scm.com">Git</a> |
121 | 106 | by running: |
122 | - <pre>$ git clone git://github.com/rastersize/CDEvents</pre> | |
107 | + <pre><span class="prompt">$</span> <span class="program">git</span> <span class="command">clone</span> <span class="argument">git://github.com/rastersize/CDEvents</span></pre> | |
123 | 108 | </p> |
124 | 109 | |
110 | + <h2>License</h2> | |
111 | + <p>Copyright (c) 2010, 2011 Aron Cedercrantz</p> | |
112 | + | |
113 | + <p>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:</p> | |
114 | + | |
115 | + <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p> | |
116 | + | |
117 | + <p>THE SOFTWARE IS PROVIDED "AS IS", 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.</p> | |
118 | + | |
125 | 119 | <div class="footer"> |
126 | - get the source code on GitHub : <a href="https://github.com/rastersize/CDEvents">rastersize/CDEvents</a> | |
120 | + © 2011 Aron Cedercrantz. View source on <a href="https://github.com/rastersize/CDEvents" title="View source on GitHub (repository: rastersize/CDEvents)">GitHub</a>. | |
127 | 121 | </div> |
128 | 122 | |
129 | 123 | </div> |
@@ -0,0 +1,101 @@ | ||
1 | +body { | |
2 | + font-family: 'Helvetica Nueu',Helvetica,Arial,FreeSans,sans-serif; | |
3 | + font-size: 18px; | |
4 | + margin-top: 1em; | |
5 | +} | |
6 | + | |
7 | +ul { | |
8 | + list-style-type: square; | |
9 | +} | |
10 | + | |
11 | +li { | |
12 | + margin-bottom: 10px; | |
13 | +} | |
14 | + | |
15 | +a { | |
16 | + text-decoration: none; | |
17 | + color: #36C; | |
18 | +} | |
19 | + | |
20 | +a:hover { | |
21 | + text-decoration: underline; | |
22 | + color: #36C; | |
23 | +} | |
24 | + | |
25 | +h1 { | |
26 | + color: #36C; | |
27 | + font-size: 200%; | |
28 | +} | |
29 | + | |
30 | +h2 { | |
31 | + border-bottom: 1px solid #8391A8; | |
32 | + color: #3C4C6C; | |
33 | + font-size: 160%; | |
34 | + font-weight: normal; | |
35 | + margin-top: 1.75em; | |
36 | + padding-bottom: 2px; | |
37 | +} | |
38 | + | |
39 | +p { | |
40 | + line-height: 1.5em; | |
41 | +} | |
42 | + | |
43 | +.download { float: right; } | |
44 | + | |
45 | +.footer { | |
46 | + font-size: 80%; | |
47 | + color: #666; | |
48 | + text-align: center; | |
49 | + padding-top: 1em; | |
50 | + padding-bottom: 2em; | |
51 | +} | |
52 | + | |
53 | +#container { | |
54 | + margin: 0 auto; | |
55 | + width: 700px; | |
56 | +} | |
57 | + | |
58 | +code { | |
59 | + font-family: Courier, Consolas, monospace; | |
60 | + font-size: 16px; | |
61 | + color: #666; | |
62 | + overflow: auto; | |
63 | +} | |
64 | + | |
65 | +pre { | |
66 | + font-family: Courier, Consolas, monospace; | |
67 | + font-size: 16px; | |
68 | + line-height: 18px; | |
69 | + tab-interval: 0.5em; | |
70 | + /*border: 1px solid #C7CFD5;*/ | |
71 | + /*background-color: #F1F5F9;*/ | |
72 | + /*color: #666;*/ | |
73 | + background-color: #161616; | |
74 | + color: #e9e9e9; | |
75 | + padding: .5em .75em; | |
76 | +} | |
77 | + | |
78 | + | |
79 | +code .keyword, pre .prompt { | |
80 | + color: #db403d; | |
81 | +} | |
82 | + | |
83 | +code .method, code .property, pre .command, pre .program { | |
84 | + color: #e09cff; | |
85 | +} | |
86 | + | |
87 | +code .external-function { | |
88 | + color: #e3a055; | |
89 | +} | |
90 | + | |
91 | +code .class { | |
92 | + color: #8d5bdb; | |
93 | +} | |
94 | + | |
95 | +code .string { | |
96 | + color: #ba5bd7; | |
97 | +} | |
98 | + | |
99 | +code .pre-processor { | |
100 | + color: #c7afff; | |
101 | +} | |
\ No newline at end of file |