gecko-dev/widget/nsITouchBarInput.idl
shindli 083cbd8b40 Backed out 8 changesets (bug 1563350, bug 1563351, bug 1563349, bug 1567939) on suspicion of causing OS X crashes https://bugzilla.mozilla.org/show_bug.cgi?id=1587351 CLOSED TREE a=backout
Backed out changeset 86ed8b9bee5f (bug 1563351)
Backed out changeset 355b0329bd95 (bug 1563350)
Backed out changeset 653caa0c494a (bug 1567939)
Backed out changeset 4b4a71e170bd (bug 1563349)
Backed out changeset 81b93962243b (bug 1563349)
Backed out changeset cff2050ff540 (bug 1563349)
Backed out changeset db50ea44f0b1 (bug 1563349)
Backed out changeset dcbddc5738c3 (bug 1563349)
2019-10-09 13:33:05 +03:00

69 lines
1.8 KiB
Plaintext

/* 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"
webidl Document;
[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.
*/
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;
/**
* The context in which this nsITouchBarInput exists. Required to create
* an imgLoader to load our SVG icons.
*/
readonly attribute Document document;
};