Bug 1831502 [wpt PR 39860] - HTML: sync html5lib-tests, a=testonly
[gecko.git] / widget / nsITouchBarInput.idl
blob0c9c3b0b1af444f3413fc79538c3daa402681835
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"
7 #include "nsIURI.idl"
9 [scriptable, function, uuid(001ab07c-1b3a-4dbf-a657-fada0065ff55)]
10 interface nsITouchBarInputCallback : nsISupports
12 void onCommand();
15 /**
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;
24 /**
25 * The lookup key for the button's localized text title.
27 attribute AString title;
29 /**
30 * The URI of an icon file.
32 attribute nsIURI image;
34 /**
35 * The type of the input.
36 * Takes one of:
37 * `button`:
38 * A standard button.
39 * If an image is available, only the image is displayed.
40 * `mainButton`:
41 * An extra-wide button. Displays both the image and title.
42 * `scrubber`:
43 * A Scrubber element. Not yet implemented, except in the case of Apple's
44 * pre-built Share scrubber.
45 * `popover`:
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.
49 * `label`:
50 * A text label.
51 * `scrollView`:
52 * Contains several buttons, defined in the input's `children` property.
53 * The user can scroll through the buttons.
55 attribute AString type;
57 /**
58 * A callback function to be invoked when an element is touched.
60 attribute nsITouchBarInputCallback callback;
62 /**
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;
68 /**
69 * If `true`, the Touch Bar input is greyed out and inoperable.
71 attribute boolean disabled;
73 /**
74 * An array containing an input's children.
75 * Available for type = ("scrollView" || "popover").
77 attribute nsIArray children;