DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (ce8742e6c77b)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
/* 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"

[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 name of a icon file added to
   * /widget/cocoa/touchbar.
   */
  attribute AString 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;
};