Interface nsITouchBarInputType

Implements an input to be registered on the Mac Touch Bar.

Hierarchy

Properties

callback: nsITouchBarInputCallback

A callback function to be invoked when an element is touched.

children: nsIArray

An array containing an input's children. Available for type = ("scrollView" || "popover").

color: uint32_t

A hexadecimal uint32_t specifying the input's background color. If omitted, the default background color is used.

disabled: boolean

If true, the Touch Bar input is greyed out and inoperable.

image: nsIURI

The URI of an icon file.

key: string
title: string

The lookup key for the button's localized text title.

type: string

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.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

Generated using TypeDoc