]> git.saurik.com Git - uikittools.git/blob - sbdidlaunch.mm
Add iomfsetgamma.
[uikittools.git] / sbdidlaunch.mm
1 #import <CoreFoundation/CoreFoundation.h>
2
3 extern "C" void *SBSSpringBoardServerPort();
4
5 void OnDidLaunch(
6 CFNotificationCenterRef center,
7 void *observer,
8 CFStringRef name,
9 const void *object,
10 CFDictionaryRef info
11 ) {
12 CFRunLoopStop(CFRunLoopGetCurrent());
13 }
14
15 int main() {
16 CFNotificationCenterAddObserver(
17 CFNotificationCenterGetDarwinNotifyCenter(),
18 NULL,
19 &OnDidLaunch,
20 CFSTR("SBSpringBoardDidLaunchNotification"),
21 NULL,
22 NULL
23 );
24
25 if (SBSSpringBoardServerPort() == NULL)
26 CFRunLoopRun();
27
28 return 0;
29 }