34 #if JUCE_ANDROID || JUCE_IOS
49 return &sourceArray.getReference (sourceArray.size() - 1);
54 return isPositiveAndBelow (index, sourceArray.size()) ? &sourceArray.getReference (index)
60 if (type == MouseInputSource::InputSourceType::mouse
61 || type == MouseInputSource::InputSourceType::pen)
63 for (
auto& m : sourceArray)
64 if (type == m.getType())
69 else if (type == MouseInputSource::InputSourceType::touch)
73 for (
auto& m : sourceArray)
74 if (type == m.getType() &&
touchIndex == m.getIndex())
84 int getNumDraggingMouseSources()
const noexcept
88 for (
auto* s : sources)
99 for (
auto& s : sourceArray)
113 void beginDragAutoRepeat (
int interval)
130 for (
auto* s : sources)
136 s->lastPointerState.position = s->getRawScreenPosition();
137 s->triggerFakeMove();
151 bool canUseTouch()
const;
Holds a resizable array of primitive or copy-by-value objects.
static ModifierKeys getCurrentModifiersRealtime() noexcept
On desktop platforms this method will check all the mouse and key states and return a ModifierKeys ob...
bool isAnyMouseButtonDown() const noexcept
Tests for any of the mouse-button flags.
An array designed for holding objects.
Makes repeated callbacks to a virtual method at a specified time interval.
void stopTimer() noexcept
Stops the timer.
int getTimerInterval() const noexcept
Returns the timer's interval.
void startTimer(int intervalInMilliseconds) noexcept
Starts the timer and sets the length of interval required.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
bool isPositiveAndBelow(Type1 valueToTest, Type2 upperLimit) noexcept
Returns true if a value is at least zero, and also below a specified upper limit.