Skip to content

Instantly share code, notes, and snippets.

@hym3242
Last active April 22, 2024 17:26
Show Gist options
  • Save hym3242/6cf5cbebc1ce41c245edd8342f11344f to your computer and use it in GitHub Desktop.
Save hym3242/6cf5cbebc1ce41c245edd8342f11344f to your computer and use it in GitHub Desktop.
macOS privateframework SkyLight.framework private external function test: flash your screen with a visual bell!
//compile with
//cc SLsymtest.c -o SLsymtest -framework Carbon -undefined dynamic_lookup
// -framework for macho loading commands for SkyLight to be loaded otherwise dyld at runtime will complain and abort
// -undefined dynamic_lookup to prevent linker from complaining it can't find a definition/implementation for symbol
void SLDisplayDefaultVisualBell();
int main(){
SLDisplayDefaultVisualBell(); //via default mach port to WindowServer (after SkyLight bootstraps)
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment