Permalink
Switch branches/tags
Nothing to show
Find file
0ac8955 Aug 7, 2011
16 lines (13 sloc) 481 Bytes
#include <CoreFoundation/CoreFoundation.h>
#include <stdio.h>
#include <stdbool.h>
CFArrayRef SBSCopyApplicationDisplayIdentifiers(bool onlyActive, bool debuggable);
int main() {
char buf[1024];
CFArrayRef ary = SBSCopyApplicationDisplayIdentifiers(false, false);
for(CFIndex i = 0; i < CFArrayGetCount(ary); i++) {
CFStringGetCString(CFArrayGetValueAtIndex(ary, i),buf, sizeof(buf), kCFStringEncodingUTF8);
printf("%s\n", buf);
}
return 0;
}