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"
9 [scriptable
, function
, uuid(001ab07c
-1b3a
-4dbf
-a657
-fada0065ff55
)]
10 interface nsITouchBarInputCallback
: nsISupports
16 * Implements an input to be registered on the Mac Touch Bar.
19 [scriptable
, uuid(77441d17
-f29c
-49d7
-982f
-f20a5ab5a900
)]
20 interface nsITouchBarInput
: nsISupports
22 readonly attribute AString key
;
25 * The lookup key for the button's localized text title.
27 attribute AString title
;
30 * The URI of an icon file.
32 attribute nsIURI image
;
35 * The type of the input.
39 * If an image is available, only the image is displayed.
41 * An extra-wide button. Displays both the image and title.
43 * A Scrubber element. Not yet implemented, except in the case of Apple's
44 * pre-built Share scrubber.
46 * An element that displays a new instance of nsTouchBar when tapped.
47 * The elements in the new Touch Bar should be defined in the
48 * input's `children` property.
52 * Contains several buttons, defined in the input's `children` property.
53 * The user can scroll through the buttons.
55 attribute AString type
;
58 * A callback function to be invoked when an element is touched.
60 attribute nsITouchBarInputCallback
callback;
63 * A hexadecimal uint32_t specifying the input's
64 * background color. If omitted, the default background color is used.
66 attribute uint32_t color
;
69 * If `true`, the Touch Bar input is greyed out and inoperable.
71 attribute
boolean disabled
;
74 * An array containing an input's children.
75 * Available for type = ("scrollView" || "popover").
77 attribute nsIArray children
;