1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsTouchBarNativeAPIDefines_h
6 #define nsTouchBarNativeAPIDefines_h
8 #import <Cocoa/Cocoa.h>
10 #if !defined(MAC_OS_X_VERSION_10_12_2) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_2
11 @interface
NSApplication (TouchBarMenu
)
12 - (IBAction
)toggleTouchBarCustomizationPalette
:(id
)sender
;
15 typedef NSString
* NSTouchBarItemIdentifier
;
16 __attribute__((weak_import
))
17 @interface NSTouchBarItem
: NSObject
18 @
property(readonly
) NSView
* view
;
19 @
property(readonly
) NSString
* customizationLabel
;
20 - (instancetype
)initWithIdentifier
:(NSTouchBarItemIdentifier
)aIdentifier
;
23 @protocol NSSharingServicePickerTouchBarItemDelegate
26 __attribute__((weak_import
))
27 @interface NSSharingServicePickerTouchBarItem
: NSTouchBarItem
28 @
property(strong
) id
<NSSharingServicePickerTouchBarItemDelegate
> delegate
;
29 @
property(strong
) NSImage
* buttonImage
;
32 __attribute__((weak_import
))
33 @interface NSCustomTouchBarItem
: NSTouchBarItem
34 @
property(strong
) NSView
* view
;
35 @
property(strong
) NSString
* customizationLabel
;
38 @protocol NSTouchBarDelegate
41 typedef NSString
* NSTouchBarCustomizationIdentifier
;
42 __attribute__((weak_import
))
43 @interface NSTouchBar
: NSObject
44 @
property(strong
) NSArray
<NSTouchBarItemIdentifier
>* defaultItemIdentifiers
;
45 @
property(strong
) id
<NSTouchBarDelegate
> delegate
;
46 @
property(strong
) NSTouchBarCustomizationIdentifier customizationIdentifier
;
47 @
property(strong
) NSArray
<NSTouchBarItemIdentifier
>* customizationAllowedItemIdentifiers
;
48 - (NSTouchBarItem
*)itemForIdentifier
:(NSTouchBarItemIdentifier
)aIdentifier
;
51 __attribute__((weak_import
))
52 @interface NSPopoverTouchBarItem
: NSTouchBarItem
53 @
property(strong
) NSString
* customizationLabel
;
54 @
property(strong
) NSView
* collapsedRepresentation
;
55 @
property(strong
) NSImage
* collapsedRepresentationImage
;
56 @
property(strong
) NSString
* collapsedRepresentationLabel
;
57 @
property(strong
) NSTouchBar
* popoverTouchBar
;
58 @property BOOL showsCloseButton
;
59 - (void)showPopover
:(id
)sender
;
60 - (void)dismissPopover
:(id
)sender
;
63 @interface
NSButton (TouchBarButton
)
64 @
property(strong
) NSColor
* bezelColor
;
66 #endif // !defined(MAC_OS_X_VERSION_10_12_2)
67 #endif // nsTouchBarNativeAPIDefines_h