summaryrefslogtreecommitdiffstats
path: root/widget/nsITouchBarInput.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /widget/nsITouchBarInput.idl
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--widget/nsITouchBarInput.idl78
1 files changed, 78 insertions, 0 deletions
diff --git a/widget/nsITouchBarInput.idl b/widget/nsITouchBarInput.idl
new file mode 100644
index 0000000000..0c9c3b0b1a
--- /dev/null
+++ b/widget/nsITouchBarInput.idl
@@ -0,0 +1,78 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsIArray.idl"
+#include "nsISupports.idl"
+#include "nsIURI.idl"
+
+[scriptable, function, uuid(001ab07c-1b3a-4dbf-a657-fada0065ff55)]
+interface nsITouchBarInputCallback : nsISupports
+{
+ void onCommand();
+};
+
+/**
+ * Implements an input to be registered on the Mac Touch Bar.
+ */
+
+[scriptable, uuid(77441d17-f29c-49d7-982f-f20a5ab5a900)]
+interface nsITouchBarInput : nsISupports
+{
+ readonly attribute AString key;
+
+ /**
+ * The lookup key for the button's localized text title.
+ */
+ attribute AString title;
+
+ /**
+ * The URI of an icon file.
+ */
+ attribute nsIURI image;
+
+ /**
+ * The type of the input.
+ * Takes one of:
+ * `button`:
+ * A standard button.
+ * If an image is available, only the image is displayed.
+ * `mainButton`:
+ * An extra-wide button. Displays both the image and title.
+ * `scrubber`:
+ * A Scrubber element. Not yet implemented, except in the case of Apple's
+ * pre-built Share scrubber.
+ * `popover`:
+ * An element that displays a new instance of nsTouchBar when tapped.
+ * The elements in the new Touch Bar should be defined in the
+ * input's `children` property.
+ * `label`:
+ * A text label.
+ * `scrollView`:
+ * Contains several buttons, defined in the input's `children` property.
+ * The user can scroll through the buttons.
+ */
+ attribute AString type;
+
+ /**
+ * A callback function to be invoked when an element is touched.
+ */
+ attribute nsITouchBarInputCallback callback;
+
+ /**
+ * A hexadecimal uint32_t specifying the input's
+ * background color. If omitted, the default background color is used.
+ */
+ attribute uint32_t color;
+
+ /**
+ * If `true`, the Touch Bar input is greyed out and inoperable.
+ */
+ attribute boolean disabled;
+
+ /**
+ * An array containing an input's children.
+ * Available for type = ("scrollView" || "popover").
+ */
+ attribute nsIArray children;
+};