mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Get cursor position setting working with cocoa
This commit is contained in:
parent
cde36cc0f2
commit
a637aa517d
15
src/Window.c
15
src/Window.c
@ -1745,6 +1745,13 @@ void Clipboard_SetText(const String* value) {
|
|||||||
PasteboardPutItemFlavor(pbRef, 1, FMT_UTF8, cfData, 0);
|
PasteboardPutItemFlavor(pbRef, 1, FMT_UTF8, cfData, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Cursor_SetPosition(int x, int y) {
|
||||||
|
CGPoint point;
|
||||||
|
point.x = x + windowX;
|
||||||
|
point.y = y + windowY;
|
||||||
|
CGDisplayMoveCursorToPoint(CGMainDisplayID(), point);
|
||||||
|
}
|
||||||
|
|
||||||
void Window_OpenKeyboard(void) { }
|
void Window_OpenKeyboard(void) { }
|
||||||
void Window_CloseKeyboard(void) { }
|
void Window_CloseKeyboard(void) { }
|
||||||
|
|
||||||
@ -2150,13 +2157,6 @@ static void Cursor_GetRawPos(int* x, int* y) {
|
|||||||
*x = (int)point.h; *y = (int)point.v;
|
*x = (int)point.h; *y = (int)point.v;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cursor_SetPosition(int x, int y) {
|
|
||||||
CGPoint point;
|
|
||||||
point.x = x + windowX;
|
|
||||||
point.y = y + windowY;
|
|
||||||
CGDisplayMoveCursorToPoint(CGMainDisplayID(), point);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool cursorVisible = true;
|
static bool cursorVisible = true;
|
||||||
void Cursor_SetVisible(bool visible) {
|
void Cursor_SetVisible(bool visible) {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
@ -3843,7 +3843,6 @@ void Window_ProcessEvents(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void Cursor_GetRawPos(int* x, int* y) { *x = 0; *y = 0; }
|
static void Cursor_GetRawPos(int* x, int* y) { *x = 0; *y = 0; }
|
||||||
void Cursor_SetPosition(int x, int y) { }
|
|
||||||
void Cursor_SetVisible(bool visible) { }
|
void Cursor_SetVisible(bool visible) { }
|
||||||
|
|
||||||
void Window_ShowDialog(const char* title, const char* msg) {
|
void Window_ShowDialog(const char* title, const char* msg) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user