mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-11 17:38:38 +00:00
32 lines
1.1 KiB
Swift
32 lines
1.1 KiB
Swift
//
|
|
// ExtendNSTouchBar.swift
|
|
// MTMR
|
|
//
|
|
// Created by Anton Palgunov on 07/06/2018.
|
|
// Copyright © 2018 Anton Palgunov. All rights reserved.
|
|
//
|
|
|
|
func presentSystemModal(_ touchBar: NSTouchBar!, systemTrayItemIdentifier identifier: NSTouchBarItem.Identifier!) {
|
|
if #available(OSX 10.14, *) {
|
|
NSTouchBar.presentSystemModalTouchBar(touchBar, systemTrayItemIdentifier: identifier)
|
|
} else {
|
|
NSTouchBar.presentSystemModalFunctionBar(touchBar, systemTrayItemIdentifier: identifier)
|
|
}
|
|
}
|
|
|
|
func presentSystemModal(_ touchBar: NSTouchBar!, placement: Int64, systemTrayItemIdentifier identifier: NSTouchBarItem.Identifier!) {
|
|
if #available(OSX 10.14, *) {
|
|
NSTouchBar.presentSystemModalTouchBar(touchBar, placement: placement, systemTrayItemIdentifier: identifier)
|
|
} else {
|
|
NSTouchBar.presentSystemModalFunctionBar(touchBar, placement: placement, systemTrayItemIdentifier: identifier)
|
|
}
|
|
}
|
|
|
|
func minimizeSystemModal(_ touchBar: NSTouchBar!) {
|
|
if #available(OSX 10.14, *) {
|
|
NSTouchBar.minimizeSystemModalTouchBar(touchBar)
|
|
} else {
|
|
NSTouchBar.minimizeSystemModalFunctionBar(touchBar)
|
|
}
|
|
}
|