Variable WINDOW_LEVELSConst

WINDOW_LEVELS: {
    baseWindow: -2147483648;
    minimumWindow: -2147483643;
    desktopWindow: -2147483623;
    desktopIconWindow: -2147483603;
    backstopMenu: -20;
    normal: 0;
    floating: 3;
    submenu: 3;
    tornOffMenu: 3;
    modalPanel: 8;
    utilityWindow: 19;
    mainMenu: 24;
    statusBar: 25;
    popUpMenu: 101;
    overlayWindow: 102;
    helpWindow: 200;
    draggingWindow: 500;
    screenSaver: 1000;
    screenSaverWindow: 1000;
    assistiveTechHighWindow: 1500;
    cursorWindow: 2147483630;
    maximumWindow: 2147483631;
} = ...

Named macOS window levels, mirroring RecordKit's RKWindow.Level Swift type.

A Window's level is a raw integer. macOS assigns windows to a small set of well-known levels; this map lets you compare a window's level against those named values, e.g.

if (window.level === WINDOW_LEVELS.floating) { ... }
if (window.level >= WINDOW_LEVELS.mainMenu) { ... } // at or above the menu bar

Levels are Comparable in Swift: a higher number is drawn in front of a lower one. Some names share the same numeric value (e.g. floating, submenu, tornOffMenu are all 3).

Type declaration

  • Readonly baseWindow: -2147483648
  • Readonly minimumWindow: -2147483643
  • Readonly desktopWindow: -2147483623
  • Readonly desktopIconWindow: -2147483603
  • Readonly backstopMenu: -20
  • Readonly normal: 0
  • Readonly floating: 3
  • Readonly submenu: 3
  • Readonly tornOffMenu: 3
  • Readonly modalPanel: 8
  • Readonly utilityWindow: 19
  • Readonly mainMenu: 24
  • Readonly statusBar: 25
  • Readonly popUpMenu: 101
  • Readonly overlayWindow: 102
  • Readonly helpWindow: 200
  • Readonly draggingWindow: 500
  • Readonly screenSaver: 1000
  • Readonly screenSaverWindow: 1000
  • Readonly assistiveTechHighWindow: 1500
  • Readonly cursorWindow: 2147483630
  • Readonly maximumWindow: 2147483631

Generated using TypeDoc