Loading...
Searching...
No Matches
juce::AppleRemoteDevice Class Referenceabstract

## Detailed Description

Receives events from an Apple IR remote control device (Only available in OSX!).

To use it, just create a subclass of this class, implementing the buttonPressed() callback, then call start() and stop() to start or stop receiving events.

The documentation for this class was generated from the following file:

- juce_gui_extra/misc/juce_AppleRemote.h

## Public Types

enum | ButtonType { menuButton = 0 , playButton , plusButton , minusButton , rightButton , leftButton , rightButton_Long , leftButton_Long , menuButton_Long , playButtonSleepMode , switched }
| The set of buttons that may be pressed. More...

## Public Member Functions

| AppleRemoteDevice ()
virtual | ~AppleRemoteDevice ()
virtual void | buttonPressed (ButtonType buttonId, bool isDown)=0
| Override this method to receive the callback about a button press.
bool | start (bool inExclusiveMode)
| Starts the device running and responding to events.
void | stop ()
| Stops the device running.
bool | isActive () const
| Returns true if the device has been started successfully.
int | getRemoteId () const
| Returns the ID number of the remote, if it has sent one.
void | handleCallbackInternal ()

## Member Enums

## ButtonType

enum juce::AppleRemoteDevice::ButtonType

The set of buttons that may be pressed.

See also
  buttonPressed

Enumerator
menuButton | The menu button (if it's held for a short time).
playButton | The play button.
plusButton | The plus or volume-up button.
minusButton | The minus or volume-down button.
rightButton | The right button (if it's held for a short time).
leftButton | The left button (if it's held for a short time).
rightButton_Long | The right button (if it's held for a long time).
leftButton_Long | The menu button (if it's held for a long time).
menuButton_Long | The menu button (if it's held for a long time).
playButtonSleepMode |
switched |

## Constructors and Destructors

## AppleRemoteDevice()

juce::AppleRemoteDevice::AppleRemoteDevice | ( |  | ) |

Referenced by handleCallbackInternal().

## ~AppleRemoteDevice()

virtual juce::AppleRemoteDevice::~AppleRemoteDevice | ( |  | ) |

virtual

## Member Functions

## buttonPressed()

virtual void juce::AppleRemoteDevice::buttonPressed | ( | ButtonType | buttonId,
|  | bool | isDown )

pure virtual

Override this method to receive the callback about a button press.

The callback will happen on the application's message thread.

Some buttons trigger matching up and down events, in which the isDown parameter will be true and then false. Others only send a single event when the button is pressed.

## start()

bool juce::AppleRemoteDevice::start | ( | bool | inExclusiveMode | ) |

Starts the device running and responding to events.

Returns true if it managed to open the device.

Parameters

  inExclusiveMode | if true, the remote will be grabbed exclusively for this app, and will not be available to any other part of the system. If false, it will be shared with other apps.

See also
  stop

## stop()

void juce::AppleRemoteDevice::stop | ( |  | ) |

Stops the device running.

See also
  start

## isActive()

bool juce::AppleRemoteDevice::isActive | ( |  | ) | const

Returns true if the device has been started successfully.

## getRemoteId()

int juce::AppleRemoteDevice::getRemoteId | ( |  | ) | const

inline

Returns the ID number of the remote, if it has sent one.

## handleCallbackInternal()

void juce::AppleRemoteDevice::handleCallbackInternal | ( |  | ) |

References AppleRemoteDevice().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited