-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppController.h
executable file
·40 lines (33 loc) · 1.02 KB
/
AppController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// AppController.h
// InWatch:mac
//
// Created by Vagrod on 4/26/10.
// Copyright 2010 Vagrod Software. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#include <CoreServices/CoreServices.h>
@interface AppController : NSObject {
- (void)awakeFromNib{
/* Define variables and create a CFArray object containing
CFString objects containing paths to watch.
*/
CFStringRef mypath = CFSTR("/");
CFArrayRef pathsToWatch = CFArrayCreate(NULL, (const void **)&mypath, 1, NULL);
void *callbackInfo = NULL; // could put stream-specific data here.
FSEventStreamRef stream;
CFAbsoluteTime latency = 3.0; /* Latency in seconds */
/* Create the stream, passing in a callback */
stream = FSEventStreamCreate(NULL,
&myCallbackFunction,
callbackInfo,
pathsToWatch,
kFSEventStreamEventIdSinceNow, /* Or a previous event ID */
latency,
kFSEventStreamCreateFlagNone /* Flags explained in reference */
);
}
- (void)myCallbackFunction{
}
}
@end