VuoMouse interface.
Definition in file VuoMouse.h.
Go to the source code of this file.
Typedefs | |
typedef void * | VuoMouse |
Handle returned when starting to listen for events, to be used when stopping listening. More... | |
Functions | |
VuoMouse * | VuoMouse_make (void) |
Creates a handle for starting and stopping event listeners. More... | |
void | VuoMouse_GetScreenDimensions (int64_t *width, int64_t *height) |
Get the full screen width and height in pixels. More... | |
void | VuoMouse_startListeningForScrolls (VuoMouse *mouseListener, void(*scrolled)(VuoPoint2d), VuoWindowReference window, VuoModifierKey modifierKey) |
Starts listening for scroll events, and calling the trigger function for each one. More... | |
void | VuoMouse_startListeningForScrollsWithCallback (VuoMouse *mouseListener, void(^scrolled)(VuoPoint2d), VuoWindowReference window, VuoModifierKey modifierKey) |
Starts listening for scroll events, and calling the scrolled block for each one. More... | |
void | VuoMouse_startListeningForMoves (VuoMouse *mouseListener, void(*movedTo)(VuoPoint2d), VuoWindowReference window, VuoModifierKey modifierKey) |
Starts listening for mouse move events, and calling the trigger function (with mouse position) for each one,. More... | |
void | VuoMouse_startListeningForMovesWithCallback (VuoMouse *mouseListener, void(^movedTo)(VuoPoint2d), VuoWindowReference window, VuoModifierKey modifierKey) |
Starts listening for mouse move events, and calling the given block for each one. More... | |
void | VuoMouse_startListeningForDeltas (VuoMouse *mouseListener, void(*movedBy)(VuoPoint2d), VuoWindowReference window, VuoModifierKey modifierKey) |
Starts listening for mouse move events, and calling the trigger function (with change in mouse position) for each one. More... | |
void | VuoMouse_startListeningForDrags (VuoMouse *mouseListener, void(*dragMovedTo)(VuoPoint2d), VuoMouseButton button, VuoWindowReference window, VuoModifierKey modifierKey) |
Starts listening for mouse drag events, and calling the trigger function for each one. More... | |
void | VuoMouse_startListeningForDragsWithCallback (VuoMouse *mouseListener, void(^dragMovedTo)(VuoPoint2d), VuoMouseButton button, VuoWindowReference window, VuoModifierKey modifierKey, bool fireRegardlessOfPosition) |
Starts listening for mouse drag events, and calling the given block for each one. More... | |
void | VuoMouse_startListeningForPresses (VuoMouse *mouseListener, void(*pressed)(VuoPoint2d), void(*forcePressed)(VuoPoint2d), VuoMouseButton button, VuoWindowReference window, VuoModifierKey modifierKey) |
Starts listening for mouse press events, and calling the trigger function for each one. More... | |
void | VuoMouse_startListeningForPressesWithCallback (VuoMouse *mouseListener, void(^pressed)(VuoPoint2d), void(^forcePressed)(VuoPoint2d), VuoMouseButton button, VuoWindowReference window, VuoModifierKey modifierKey) |
Starts listening for mouse press events, and calling the given block for each one. More... | |
void | VuoMouse_startListeningForPressureChanges (VuoMouse *mouseListener, void(*pressureChanged)(VuoReal), VuoMouseButton button, VuoModifierKey modifierKey) |
Starts listening for mouse pressure-change events, and calling the trigger function for each one. More... | |
void | VuoMouse_startListeningForReleases (VuoMouse *mouseListener, void(*released)(VuoPoint2d), VuoMouseButton button, VuoWindowReference window, VuoModifierKey modifierKey, bool fireRegardlessOfPosition) |
Starts listening for mouse release events, and calling the trigger function for each one. More... | |
void | VuoMouse_startListeningForReleasesWithCallback (VuoMouse *mouseListener, void(^released)(VuoPoint2d), VuoMouseButton button, VuoWindowReference window, VuoModifierKey modifierKey, bool fireRegardlessOfPosition) |
Starts listening for mouse release events, and calling the given block for each one. More... | |
void | VuoMouse_startListeningForClicks (VuoMouse *mouseListener, void(*singleClicked)(VuoPoint2d), void(*doubleClicked)(VuoPoint2d), void(*tripleClicked)(VuoPoint2d), VuoMouseButton button, VuoWindowReference window, VuoModifierKey modifierKey) |
Starts listening for mouse click events, and calling the trigger function for each one. More... | |
void | VuoMouse_startListeningForTouches (VuoMouse *mouseListener, void(*touchesMoved)(VuoList_VuoPoint2d), void(*zoomed)(VuoReal), void(*swipedLeft)(void), void(*swipedRight)(void), VuoWindowReference window) |
Starts listening for touch events, and calling the trigger function for each one. More... | |
void | VuoMouse_stopListening (VuoMouse *mouseListener) |
Stops listening for mouse events for the given handle. More... | |
void | VuoMouseStatus_use (void) |
Starts tracking mouse events to later be reported by VuoMouse_getStatus. More... | |
void | VuoMouseStatus_disuse (void) |
Stops tracking mouse events for VuoMouse_getStatus. More... | |
bool | VuoMouse_getStatus (VuoPoint2d *position, VuoBoolean *isPressed, VuoMouseButton button, VuoWindowReference window, VuoModifierKey modifierKey, bool onlyUpdateWhenActive) VuoWarnUnusedResult |
Outputs the current mouse position and whether the mouse is currently pressed. More... | |
typedef void* VuoMouse |
Handle returned when starting to listen for events, to be used when stopping listening.
Definition at line 22 of file VuoMouse.h.
void VuoMouse_GetScreenDimensions | ( | int64_t * | width, |
int64_t * | height | ||
) |
Get the full screen width and height in pixels.
This function may be called on any thread except the main thread.
Definition at line 57 of file VuoMouse.m.
bool VuoMouse_getStatus | ( | VuoPoint2d * | position, |
VuoBoolean * | isPressed, | ||
VuoMouseButton | button, | ||
VuoWindowReference | windowRef, | ||
VuoModifierKey | modifierKey, | ||
bool | onlyUpdateWhenActive | ||
) |
Outputs the current mouse position and whether the mouse is currently pressed.
If onlyUpdateWhenActive
is true, and the application is not active, then neither position
nor isPressed
is modified.
If a window is given, but it's not the key window or the mouse is not within the window, then position is modified but isPressed is not.
If a window is given, the mouse position is in Vuo coordinates relative to the window's content view. Otherwise, the mouse position is in screen coordinates.
Returns true if position
was updated.
This function may be called from any thread.
Definition at line 927 of file VuoMouse.m.
VuoMouse* VuoMouse_make | ( | void | ) |
Creates a handle for starting and stopping event listeners.
Definition at line 101 of file VuoMouse.m.
void VuoMouse_startListeningForClicks | ( | VuoMouse * | mouseListener, |
void(*)(VuoPoint2d) | singleClicked, | ||
void(*)(VuoPoint2d) | doubleClicked, | ||
void(*)(VuoPoint2d) | tripleClicked, | ||
VuoMouseButton | button, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey | ||
) |
Starts listening for mouse click events, and calling the trigger function for each one.
This function may be called from any thread.
Definition at line 727 of file VuoMouse.m.
void VuoMouse_startListeningForDeltas | ( | VuoMouse * | mouseListener, |
void(*)(VuoPoint2d) | movedBy, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey | ||
) |
Starts listening for mouse move events, and calling the trigger function (with change in mouse position) for each one.
This function may be called from any thread.
Definition at line 523 of file VuoMouse.m.
void VuoMouse_startListeningForDrags | ( | VuoMouse * | mouseListener, |
void(*)(VuoPoint2d) | dragMovedTo, | ||
VuoMouseButton | button, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey | ||
) |
Starts listening for mouse drag events, and calling the trigger function for each one.
This function may be called from any thread.
Definition at line 579 of file VuoMouse.m.
void VuoMouse_startListeningForDragsWithCallback | ( | VuoMouse * | mouseListener, |
void(^)(VuoPoint2d) | dragMovedTo, | ||
VuoMouseButton | button, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey, | ||
bool | fireRegardlessOfPosition | ||
) |
Starts listening for mouse drag events, and calling the given block for each one.
This function may be called from any thread.
Definition at line 539 of file VuoMouse.m.
void VuoMouse_startListeningForMoves | ( | VuoMouse * | mouseListener, |
void(*)(VuoPoint2d) | movedTo, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey | ||
) |
Starts listening for mouse move events, and calling the trigger function (with mouse position) for each one,.
If window
is non-NULL and modifierKey
is Any or None, immediately invokes movedTo
with the mouse's current position.
This function may be called from any thread.
Definition at line 484 of file VuoMouse.m.
void VuoMouse_startListeningForMovesWithCallback | ( | VuoMouse * | mouseListener, |
void(^)(VuoPoint2d) | movedTo, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey | ||
) |
Starts listening for mouse move events, and calling the given block for each one.
If window
is non-NULL and modifierKey
is Any or None, immediately invokes movedTo
with the mouse's current position.
This function may be called from any thread.
Definition at line 504 of file VuoMouse.m.
void VuoMouse_startListeningForPresses | ( | VuoMouse * | mouseListener, |
void(*)(VuoPoint2d) | pressed, | ||
void(*)(VuoPoint2d) | forcePressed, | ||
VuoMouseButton | button, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey | ||
) |
Starts listening for mouse press events, and calling the trigger function for each one.
This function may be called from any thread.
Definition at line 642 of file VuoMouse.m.
void VuoMouse_startListeningForPressesWithCallback | ( | VuoMouse * | mouseListener, |
void(^)(VuoPoint2d) | pressed, | ||
void(^)(VuoPoint2d) | forcePressed, | ||
VuoMouseButton | button, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey | ||
) |
Starts listening for mouse press events, and calling the given block for each one.
This function may be called from any thread.
Definition at line 591 of file VuoMouse.m.
void VuoMouse_startListeningForPressureChanges | ( | VuoMouse * | mouseListener, |
void(*)(VuoReal) | pressureChanged, | ||
VuoMouseButton | button, | ||
VuoModifierKey | modifierKey | ||
) |
Starts listening for mouse pressure-change events, and calling the trigger function for each one.
This function may be called from any thread.
Definition at line 658 of file VuoMouse.m.
void VuoMouse_startListeningForReleases | ( | VuoMouse * | mouseListener, |
void(*)(VuoPoint2d) | released, | ||
VuoMouseButton | button, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey, | ||
bool | fireRegardlessOfPosition | ||
) |
Starts listening for mouse release events, and calling the trigger function for each one.
This function may be called from any thread.
Definition at line 717 of file VuoMouse.m.
void VuoMouse_startListeningForReleasesWithCallback | ( | VuoMouse * | mouseListener, |
void(^)(VuoPoint2d) | released, | ||
VuoMouseButton | button, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey, | ||
bool | fireRegardlessOfPosition | ||
) |
Starts listening for mouse release events, and calling the given block for each one.
This function may be called from any thread.
Definition at line 677 of file VuoMouse.m.
void VuoMouse_startListeningForScrolls | ( | VuoMouse * | mouseListener, |
void(*)(VuoPoint2d) | scrolled, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey | ||
) |
Starts listening for scroll events, and calling the trigger function for each one.
This function may be called from any thread.
Definition at line 432 of file VuoMouse.m.
void VuoMouse_startListeningForScrollsWithCallback | ( | VuoMouse * | mouseListener, |
void(^)(VuoPoint2d) | scrolled, | ||
VuoWindowReference | window, | ||
VuoModifierKey | modifierKey | ||
) |
Starts listening for scroll events, and calling the scrolled block for each one.
This function may be called from any thread.
Definition at line 448 of file VuoMouse.m.
void VuoMouse_startListeningForTouches | ( | VuoMouse * | mouseListener, |
void(*)(VuoList_VuoPoint2d) | touchesMoved, | ||
void(*)(VuoReal) | zoomed, | ||
void(*)(void) | swipedLeft, | ||
void(*)(void) | swipedRight, | ||
VuoWindowReference | windowRef | ||
) |
Starts listening for touch events, and calling the trigger function for each one.
This function may be called from any thread.
Definition at line 772 of file VuoMouse.m.
void VuoMouse_stopListening | ( | VuoMouse * | mouseListener | ) |
Stops listening for mouse events for the given handle.
This function may be called from any thread.
Definition at line 795 of file VuoMouse.m.
void VuoMouseStatus_disuse | ( | void | ) |
Stops tracking mouse events for VuoMouse_getStatus.
This function may be called from any thread.
Definition at line 903 of file VuoMouse.m.
void VuoMouseStatus_use | ( | void | ) |
Starts tracking mouse events to later be reported by VuoMouse_getStatus.
This function may be called from any thread.
Definition at line 849 of file VuoMouse.m.