Skip to content

Instantly share code, notes, and snippets.

@ThatsJustCheesy
Created August 21, 2017 00:39
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ThatsJustCheesy/823c806d78e6b3628cd6fdc86eb290d4 to your computer and use it in GitHub Desktop.
Private interfaces in HIServices.framework (subframework of ApplicationServices.framework) that message the Dock to set preferences on-the-fly.
// HIServicesPrivate.h v1
// By ThatsJustCheesy
// TO USE THESE INTERFACES, you MUST link against ApplicationServices.framework.
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
// Boolean preferences
extern void CoreDockSetLaunchAnimationsEnabled(bool enable);
extern void CoreDockSetMagnificationEnabled(bool enable);
extern void CoreDockSetAutoHideEnabled(bool enable);
extern void CoreDockSetMinimizeInPlace(bool enable);
// Sets other preferences such as whether the indicators below the app icons are shown
// 'preferenceDict' is a CFDictionary containing a magic key value
// Will require further inspection of Dock.prefpane to find all the keys
// (I haven't noted them down)
extern void CoreDockSetPreferences(CFDictionaryRef preferenceDict);
#ifdef __cplusplus
} // extern "C"
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment