CoreDockSendNotification - hewigovens/hewigovens.github.com GitHub Wiki
CoreDockSendNotification is an undocumented API, the main functionally of Expose.app/Launchpad.app/Mission Control.app are implemented by Dock, these apps just send notifications out.
####Proof
% nm /Applications/Launchpad.app/Contents/MacOS/Launchpad
U _CoreDockSendNotification
U ___CFConstantStringClassReference
0000000100000000 T __mh_execute_header
U _exit
U dyld_stub_binder
####Notifications:
com.apple.launchpad.toggle
com.apple.expose.awake
com.apple.showdesktop.awake
com.apple.expose.front.awake
####Example
#include <CoreFoundation/CoreFoundation.h>
#include <ApplicationServices/ApplicationServices.h>
CG_EXTERN void CoreDockSendNotification(CFStringRef);
int main(int argc, const char * argv[])
{
//you need adding link to ApplicationServices.framework
CoreDockSendNotification(CFSTR("com.apple.launchpad.toggle"));
return 0;
}
####Other reference