|
|
@@ -131,6 +131,27 @@ namespace dsr {
|
|
|
bool window_setCursorVisibility(const Window& window, bool visible);
|
|
|
// Returns true iff the cursor is allowed to be displayed over window.
|
|
|
bool window_getCursorVisibility(const Window& window);
|
|
|
+ // Tries move the cursor so that its active point is at (x, y) within window.
|
|
|
+ // To get back the new cursor location and see if it worked, you must wait for the triggered mouse move event.
|
|
|
+ // It is impossible to know if the operation succeeded while returning, due to absolute position input devices overwriting the side-effect.
|
|
|
+ // It is recommended to avoid this method if you can, but some games require capturing relative mouse movements.
|
|
|
+ // If you use this then make sure to test it carefully on all targeted operating systems and both relative and absolute input devices.
|
|
|
+ // Pre-conditions:
|
|
|
+ // 0 <= x < width
|
|
|
+ // 0 <= y < height
|
|
|
+ // Moving the mouse outside of the window's region may cause undefined behavior between platforms.
|
|
|
+ // WARNING!
|
|
|
+ // Only set the cursor location if you know for sure that the cursor is controlled using relative input devices, such as a mouse or track-pad.
|
|
|
+ // If an absolute input method is used, such as a stylus-pen, touch-screen or eye-tracker, the cursor will shake quickly.
|
|
|
+ // The solution is to let the user select between modes for relative and absolute inputs.
|
|
|
+ // You can for example let absolute input mode move the cursor freely within a dead zone and hover over edges
|
|
|
+ // to rotate the camera itself, when pattern detection noticed a stylus pen being used instead of a mouse.
|
|
|
+ // WARNING!
|
|
|
+ // On MS-Windows the cursor will always move, but on X11 the cursor must be within the window's region.
|
|
|
+ // Only use this in full-screen mode to prevent getting stuck outside of the window.
|
|
|
+ // WARNING!
|
|
|
+ // Due to potential race-conditions, you can not assume that the next mouse move event is generated by this call.
|
|
|
+ void window_setCursorPosition(const Window& window, int x, int y);
|
|
|
|
|
|
// Full screen
|
|
|
void window_setFullScreen(const Window& window, bool enabled);
|