Interface IStreamDeck

All Known Implementing Classes:
SoftStreamDeck, StreamDeck

public interface IStreamDeck
MIT License Copyright (c) 2017 Roland von Werden Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Author:
Roland von Werden
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addKey(int keyId, StreamItem item)
    Adds a StreamKeyListener to the given index
    boolean
    Adds an StreamKeyListener to the ESD.
    void
    clearButton(int i)
     
    void
     
    void
    drawImage(int keyIndex, SDImage imgData)
    Creates a Job to send the give icon to the ESD to be displayed on the given keyxIndex
    void
    drawImage(int keyIndex, SDImage imgData, Dimension overrideSize)
    Creates a Job to send the give icon to the ESD to be displayed on the given keyxIndex
    void
    Creates a Job to send the give icon to the ESD to be displayed on the the Touch screen at the given starting point
    void
    drawTouchScreenImage(Point startPoint, SDImage imgData)
    Creates a Job to send the give icon to the ESD to be displayed on the the Touch screen at the given starting point
    default int
    Returns the amount of columns on the StreamDeck.
    Returns the descriptor representing this device
    getDial(int keyIndex)
    Return the dials of the stream deck.
    Return the dials of the stream deck.
    purejavahidapi.HidDevice
    Returns the Hid Devices representation the stream deck.
    default int
    Returns the amount of keys on the StreamDeck.
    default int
    Returns the amount of rows on the StreamDeck.
    Return the touch screen of the stream deck.
    boolean
    Returns if the stream deck has dials
    boolean
    Returns if the stream deck has a touch screen
    boolean
    Returns if behind the interface is actual hardware or a software only StreamDeck.
    void
    pressButton(int no)
    Create a KeyEvent for a pressed button through software
    void
    pushButton(int no)
    Create a KeyEvent for a pushed button through software
    void
    releaseButton(int no)
    Create a KeyEvent for a released button through software
    void
    removeKey(int keyId)
    Removes a registered Key.
    boolean
    Removes an StreamKeyListener from the ESD.
    void
    Queues a task to reset the stream deck.
    void
    setBrightness(int brightness)
    Sets the desired brightness from 0 - 100 % and queues the change.
    void
    Tells the background task for the stream deck to stop working.
    void
    Wait for all tasks to be executed
  • Method Details

    • addKey

      void addKey(int keyId, StreamItem item)
      Adds a StreamKeyListener to the given index
      Parameters:
      keyId - Index of the key, 0..14
      item - StreamItem to be bound to the index
      Throws:
      IndexOutOfBoundsException - when keyId is < 0 or > 14.
    • addKeyListener

      boolean addKeyListener(StreamKeyListener listener)
      Adds an StreamKeyListener to the ESD. WHenever a Event is generated, the Listener will be informed.
      Parameters:
      listener - Listener to be added
      Returns:
      true if listener was added, false if listener is already registered.
    • removeKeyListener

      boolean removeKeyListener(StreamKeyListener listener)
      Removes an StreamKeyListener from the ESD.
      Parameters:
      listener - Listener to be removed
      Returns:
      true if listener was removed, false if listener is not registered.
    • drawImage

      void drawImage(int keyIndex, SDImage imgData)
      Creates a Job to send the give icon to the ESD to be displayed on the given keyxIndex
      Parameters:
      keyIndex - Index on the ESD as defined by DeckDescriptor
      imgData - Image to be displayed
    • drawTouchScreenImage

      void drawTouchScreenImage(Point startPoint, SDImage imgData)
      Creates a Job to send the give icon to the ESD to be displayed on the the Touch screen at the given starting point
      Parameters:
      startPoint - Pixel coordinates to start drawing the image
      imgData - Image to be displayed
    • drawTouchScreenImage

      void drawTouchScreenImage(SDImage imgData)
      Creates a Job to send the give icon to the ESD to be displayed on the the Touch screen at the given starting point
      Parameters:
      imgData - Image to be displayed
    • hasTouchScreen

      boolean hasTouchScreen()
      Returns if the stream deck has a touch screen
      Returns:
      True if it has a touch screen, false if not
    • getTouchScreen

      TouchScreen getTouchScreen()
      Return the touch screen of the stream deck.
      Returns:
      Returns the touch screen object or null, if the stream deck has none.
    • hasDials

      boolean hasDials()
      Returns if the stream deck has dials
      Returns:
      True if it has one or more dials, false if not
    • getDials

      DialKey[] getDials()
      Return the dials of the stream deck.
      Returns:
      Returns the dial objects or an empty array, if the stream deck has none.
    • getDial

      DialKey getDial(int keyIndex)
      Return the dials of the stream deck.
      Parameters:
      keyIndex - Index on the ESD as defined by DeckDescriptor
      Returns:
      Returns the dial objects or an empty array, if the stream deck has none.
    • drawImage

      void drawImage(int keyIndex, SDImage imgData, Dimension overrideSize)
      Creates a Job to send the give icon to the ESD to be displayed on the given keyxIndex
      Parameters:
      keyIndex - Index on the ESD as defined by DeckDescriptor
      imgData - Image to be displayed
      overrideSize - Overrides the default icon size of the given streamdeck
    • getHidDevice

      purejavahidapi.HidDevice getHidDevice()
      Returns the Hid Devices representation the stream deck.
      Returns:
      HidDevice representation the stream deck.
    • getDescriptor

      DeckDescriptor getDescriptor()
      Returns the descriptor representing this device
      Returns:
      DeckDescriptor with the appropriate information
    • removeKey

      void removeKey(int keyId)
      Removes a registered Key. Queues update to the stream deck
      Parameters:
      keyId - id of the key to be removed
    • reset

      void reset()
      Queues a task to reset the stream deck.
    • setBrightness

      void setBrightness(int brightness)
      Sets the desired brightness from 0 - 100 % and queues the change.
      Parameters:
      brightness - Brightness in percentile
    • stop

      void stop()
      Tells the background task for the stream deck to stop working.
    • waitForCompletion

      void waitForCompletion()
      Wait for all tasks to be executed
    • clearButton

      void clearButton(int i)
    • isHardware

      boolean isHardware()
      Returns if behind the interface is actual hardware or a software only StreamDeck.
      Returns:
      true if hardware is sued, false if the implementation is only software.
    • getKeySize

      default int getKeySize()
      Returns the amount of keys on the StreamDeck.
      Returns:
      Numbers of keys on the deck (Default 15).
    • getRowSize

      default int getRowSize()
      Returns the amount of rows on the StreamDeck.
      Returns:
      Numbers of keys on the deck (Default 15).
    • getColumnSize

      default int getColumnSize()
      Returns the amount of columns on the StreamDeck.
      Returns:
      Numbers of keys on the deck (Default 15).
    • pushButton

      void pushButton(int no)
      Create a KeyEvent for a pushed button through software
      Parameters:
      no - Key no
    • pressButton

      void pressButton(int no)
      Create a KeyEvent for a pressed button through software
      Parameters:
      no - Key no
    • releaseButton

      void releaseButton(int no)
      Create a KeyEvent for a released button through software
      Parameters:
      no - Key no
    • drawFullImage

      void drawFullImage(SDImage imgData)