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 #include
"nsIArray.idl"
6 #include
"nsISupports.idl"
8 [scriptable
, function
, uuid(001ab07c
-1b3a
-4dbf
-a657
-fada0065ff55
)]
9 interface nsITouchBarInputCallback
: nsISupports
15 * Implements an input to be registered on the Mac Touch Bar.
18 [scriptable
, uuid(77441d17
-f29c
-49d7
-982f
-f20a5ab5a900
)]
19 interface nsITouchBarInput
: nsISupports
21 readonly attribute AString key
;
24 * The lookup key for the button's localized text title.
26 attribute AString title
;
29 * The name of a icon file added to
30 * /widget/cocoa/touchbar.
32 attribute AString image
;
35 * The type of the input.
37 * `button`: A standard button.
38 * If an image is available, only the image is displayed.
39 * `mainButton`: An extra-wide button. Displays both the image and title.
40 * `scrubber`: A Scrubber element. Not yet implemented, except in the
41 * case of Apple's pre-built Share scrubber.
43 attribute AString type
;
46 * A callback function to be invoked when an element is touched.
48 attribute nsITouchBarInputCallback
callback;
51 * A hexadecimal uint32_t specifying the input's
52 * background color. If omitted, the default background color is used.
54 attribute uint32_t color
;
57 * If `true`, the Touch Bar input is greyed out and inoperable.
59 attribute
boolean disabled
;