Swift: WindowLevelのrawValue一覧

1 min read読了の目安(約1300字

NSWindow.Level

import PlaygroundSupport
import Cocoa

Swift.print("normal", NSWindow.Level.normal.rawValue)
Swift.print("floating", NSWindow.Level.floating.rawValue)
Swift.print("submenu", NSWindow.Level.submenu.rawValue)
Swift.print("tornOffMenu", NSWindow.Level.tornOffMenu.rawValue)
Swift.print("mainMenu", NSWindow.Level.mainMenu.rawValue)
Swift.print("statusBar", NSWindow.Level.statusBar.rawValue)
Swift.print("modalPanel", NSWindow.Level.modalPanel.rawValue)
Swift.print("popUpMenu", NSWindow.Level.popUpMenu.rawValue)
Swift.print("screenSaver", NSWindow.Level.screenSaver.rawValue)
出力結果
normal 0
floating 3
submenu 3
tornOffMenu 3
mainMenu 24
statusBar 25
modalPanel 8
popUpMenu 101
screenSaver 1000

CGWindowLevelKey

case baseWindow = 0
case minimumWindow = 1
case desktopWindow = 2
case backstopMenu = 3
case normalWindow = 4
case floatingWindow = 5
case tornOffMenuWindow = 6
case dockWindow = 7
case mainMenuWindow = 8
case statusWindow = 9
case modalPanelWindow = 10
case popUpMenuWindow = 11
case draggingWindow = 12
case screenSaverWindow = 13
case maximumWindow = 14
case overlayWindow = 15
case helpWindow = 16
case utilityWindow = 17
case desktopIconWindow = 18
case cursorWindow = 19
case assistiveTechHighWindow = 20
case numberOfWindowLevelKeys = 21 /* Must be last. */