#include <juce_MouseInputSourceList.h>


Public Member Functions | |
| MouseInputSourceList () | |
| MouseInputSource * | addSource (int index, MouseInputSource::InputSourceType type) |
| void | beginDragAutoRepeat (int interval) |
| MouseInputSource * | getDraggingMouseSource (int index) noexcept |
| MouseInputSource * | getMouseSource (int index) noexcept |
| int | getNumDraggingMouseSources () const noexcept |
| MouseInputSource * | getOrCreateMouseInputSource (MouseInputSource::InputSourceType type, int touchIndex=0) |
| int | getTimerInterval () const noexcept |
| Returns the timer's interval. | |
| bool | isTimerRunning () const noexcept |
| Returns true if the timer is currently running. | |
| void | startTimer (int intervalInMilliseconds) noexcept |
| Starts the timer and sets the length of interval required. | |
| void | startTimerHz (int timerFrequencyHz) noexcept |
| Starts the timer with an interval specified in Hertz. | |
| void | stopTimer () noexcept |
| Stops the timer. | |
| void | timerCallback () override |
| The user-defined callback routine that actually gets called periodically. | |
Static Public Member Functions | |
| static void | callAfterDelay (int milliseconds, std::function< void()> functionToCall) |
| Invokes a lambda after a given number of milliseconds. | |
| static void | callPendingTimersSynchronously () |
| For internal use only: invokes any timers that need callbacks. | |
Public Attributes | |
| Array< MouseInputSource > | sourceArray |
| OwnedArray< MouseInputSourceImpl > | sources |
Private Member Functions | |
| bool | addSource () |
| bool | canUseTouch () const |
Private Attributes | |
| size_t | positionInQueue = (size_t) -1 |
| int | timerPeriodMs = 0 |
| SharedResourcePointer< TimerThread > | timerThread |
|
inline |
References addSource(), juce::MouseInputSource::mouse, and juce::MouseInputSource::touch.
|
private |
Referenced by MouseInputSourceList(), and getOrCreateMouseInputSource().
|
inline |
References sourceArray, and sources.
|
inline |
References juce::Timer::getTimerInterval(), juce::Timer::startTimer(), and juce::Timer::stopTimer().
|
staticinherited |
Invokes a lambda after a given number of milliseconds.
|
staticinherited |
For internal use only: invokes any timers that need callbacks.
Don't call this unless you really know what you're doing!
|
private |
Referenced by getOrCreateMouseInputSource().
|
inlinenoexcept |
References sourceArray.
|
inlinenoexcept |
References juce::isPositiveAndBelow(), and sourceArray.
|
inlinenoexcept |
References sources.
|
inline |
|
inlinenoexceptinherited |
Returns the timer's interval.
Referenced by beginDragAutoRepeat(), and juce::detail::TopLevelWindowManager::checkFocus().
|
inlinenoexceptinherited |
Returns true if the timer is currently running.
|
noexceptinherited |
Starts the timer and sets the length of interval required.
If the timer is already started, this will reset it, so the time between calling this method and the next timer callback will not be less than the interval length passed in.
| intervalInMilliseconds | the interval to use (any value less than 1 will be rounded up to 1) |
Referenced by beginDragAutoRepeat(), juce::detail::TopLevelWindowManager::checkFocus(), juce::detail::TopLevelWindowManager::checkFocusAsync(), juce::StandalonePluginHolder::init(), and juce::DeviceChangeDetector::triggerAsyncDeviceChangeCallback().
|
noexceptinherited |
Starts the timer with an interval specified in Hertz.
This is effectively the same as calling startTimer (1000 / timerFrequencyHz).
Referenced by juce::AnimatedPosition< Behaviour >::endDrag(), juce::AnimatedPosition< Behaviour >::nudge(), and juce::AnimatedPosition< Behaviour >::timerCallback().
|
noexceptinherited |
Stops the timer.
No more timer callbacks will be triggered after this method returns.
Note that if you call this from a background thread while the message-thread is already in the middle of your callback, then this method will cancel any future timer callbacks, but it will return without waiting for the current one to finish. The current callback will continue, possibly still running some of your timer code after this method has returned.
Referenced by juce::StandalonePluginHolder::~StandalonePluginHolder(), juce::AnimatedPosition< Behaviour >::beginDrag(), beginDragAutoRepeat(), juce::AnimatedPosition< Behaviour >::setPosition(), juce::DeviceChangeDetector::timerCallback(), timerCallback(), and juce::AnimatedPosition< Behaviour >::timerCallback().
|
inlineoverridevirtual |
The user-defined callback routine that actually gets called periodically.
It's perfectly ok to call startTimer() or stopTimer() from within this callback to change the subsequent intervals.
Implements juce::Timer.
References juce::ComponentPeer::getCurrentModifiersRealtime(), juce::ModifierKeys::isAnyMouseButtonDown(), sources, and juce::Timer::stopTimer().
|
privateinherited |
| Array<MouseInputSource> juce::detail::MouseInputSourceList::sourceArray |
Referenced by addSource(), getDraggingMouseSource(), getMouseSource(), and getOrCreateMouseInputSource().
| OwnedArray<MouseInputSourceImpl> juce::detail::MouseInputSourceList::sources |
Referenced by addSource(), getNumDraggingMouseSources(), and timerCallback().
|
privateinherited |
|
privateinherited |