Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save synthesizerpatel/059b67b7b0ac8f8c4bd4 to your computer and use it in GitHub Desktop.
Save synthesizerpatel/059b67b7b0ac8f8c4bd4 to your computer and use it in GitHub Desktop.
OS X window levels
2015-01-16 10:09:00.037 WindowLevels[72050:11476115] 0 (kCGBaseWindowLevelKey) : -2147483648
2015-01-16 10:09:00.039 WindowLevels[72050:11476115] 1 (kCGMinimumWindowLevelKey) : -2147483643
2015-01-16 10:09:00.039 WindowLevels[72050:11476115] 2 (kCGDesktopWindowLevelKey) : -2147483623
2015-01-16 10:09:00.039 WindowLevels[72050:11476115] 3 (kCGBackstopMenuLevelKey) : -20
2015-01-16 10:09:00.039 WindowLevels[72050:11476115] 4 (kCGNormalWindowLevelKey) : 0
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 5 (kCGFloatingWindowLevelKey) : 3
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 6 (kCGTornOffMenuWindowLevelKey) : 3
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 7 (kCGDockWindowLevelKey) : 20
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 8 (kCGMainMenuWindowLevelKey) : 24
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 9 (kCGStatusWindowLevelKey) : 25
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 10 (kCGModalPanelWindowLevelKey) : 8
2015-01-16 10:09:00.041 WindowLevels[72050:11476115] 11 (kCGPopUpMenuWindowLevelKey) : 101
2015-01-16 10:09:00.041 WindowLevels[72050:11476115] 12 (kCGDraggingWindowLevelKey) : 500
2015-01-16 10:09:00.064 WindowLevels[72050:11476115] 13 (kCGScreenSaverWindowLevelKey) : 1000
2015-01-16 10:09:00.064 WindowLevels[72050:11476115] 14 (kCGMaximumWindowLevelKey) : 2147483631
2015-01-16 10:09:00.064 WindowLevels[72050:11476115] 15 (kCGOverlayWindowLevelKey) : 102
2015-01-16 10:09:00.064 WindowLevels[72050:11476115] 16 (kCGHelpWindowLevelKey) : 200
2015-01-16 10:09:00.065 WindowLevels[72050:11476115] 17 (kCGUtilityWindowLevelKey) : 19
2015-01-16 10:09:00.065 WindowLevels[72050:11476115] 18 (kCGDesktopIconWindowLevelKey) : -2147483603
2015-01-16 10:09:00.065 WindowLevels[72050:11476115] 19 (kCGCursorWindowLevelKey) : 2147483630
2015-01-16 10:09:00.065 WindowLevels[72050:11476115] 20 (kCGAssistiveTechHighWindowLevelKey) : 1500
-2147483648 : kCGBaseWindowLevelKey (0)
-2147483643 : kCGMinimumWindowLevelKey (1)
-2147483623 : kCGDesktopWindowLevelKey (2)
-2147483603 : kCGDesktopIconWindowLevelKey (18)
-20 : kCGBackstopMenuLevelKey (3)
0 : kCGNormalWindowLevelKey (4)
3 : kCGFloatingWindowLevelKey (5)
3 : kCGTornOffMenuWindowLevelKey (6)
8 : kCGModalPanelWindowLevelKey (10)
19 : kCGUtilityWindowLevelKey (17)
20 : kCGDockWindowLevelKey (7)
24 : kCGMainMenuWindowLevelKey (8)
25 : kCGStatusWindowLevelKey (9)
101 : kCGPopUpMenuWindowLevelKey (11)
102 : kCGOverlayWindowLevelKey (15)
200 : kCGHelpWindowLevelKey (16)
500 : kCGDraggingWindowLevelKey (12)
1000 : kCGScreenSaverWindowLevelKey (13)
1500 : kCGAssistiveTechHighWindowLevelKey (20)
2147483630 : kCGCursorWindowLevelKey (19)
2147483631 : kCGMaximumWindowLevelKey (14)
#include <stdio.h>
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[]) {
NSArray *keys=@[
@"kCGBaseWindowLevelKey",
@"kCGMinimumWindowLevelKey",
@"kCGDesktopWindowLevelKey",
@"kCGBackstopMenuLevelKey",
@"kCGNormalWindowLevelKey",
@"kCGFloatingWindowLevelKey",
@"kCGTornOffMenuWindowLevelKey",
@"kCGDockWindowLevelKey",
@"kCGMainMenuWindowLevelKey",
@"kCGStatusWindowLevelKey",
@"kCGModalPanelWindowLevelKey",
@"kCGPopUpMenuWindowLevelKey",
@"kCGDraggingWindowLevelKey",
@"kCGScreenSaverWindowLevelKey",
@"kCGMaximumWindowLevelKey",
@"kCGOverlayWindowLevelKey",
@"kCGHelpWindowLevelKey",
@"kCGUtilityWindowLevelKey",
@"kCGDesktopIconWindowLevelKey",
@"kCGCursorWindowLevelKey",
@"kCGAssistiveTechHighWindowLevelKey",
@"kCGNumberOfWindowLevelKey"];
for (int i=0; i<kCGNumberOfWindowLevelKeys; i+=1) {
CGWindowLevel lvl=CGWindowLevelForKey(i);
NSLog(@"%@ (%@) : %@", @(i), keys[i], @(lvl));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment