Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
38f7a4d5
Commit
38f7a4d5
authored
Feb 24, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Feb 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Implement GetCursorPos().
parent
b79d9553
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
0 deletions
+38
-0
cocoa_app.m
dlls/winemac.drv/cocoa_app.m
+17
-0
macdrv_cocoa.h
dlls/winemac.drv/macdrv_cocoa.h
+1
-0
mouse.c
dlls/winemac.drv/mouse.c
+19
-0
winemac.drv.spec
dlls/winemac.drv/winemac.drv.spec
+1
-0
No files found.
dlls/winemac.drv/cocoa_app.m
View file @
38f7a4d5
...
...
@@ -815,3 +815,20 @@ void macdrv_set_cursor(CFStringRef name, CFArrayRef frames)
}
}
}
/***********************************************************************
* macdrv_get_cursor_position
*
* Obtains the current cursor position. Returns zero on failure,
* non-zero on success.
*/
int
macdrv_get_cursor_position
(
CGPoint
*
pos
)
{
OnMainThread
(
^
{
NSPoint
location
=
[
NSEvent
mouseLocation
];
location
=
[
NSApp
flippedMouseLocation
:
location
];
*
pos
=
NSPointToCGPoint
(
location
);
});
return
TRUE
;
}
dlls/winemac.drv/macdrv_cocoa.h
View file @
38f7a4d5
...
...
@@ -120,6 +120,7 @@ extern void macdrv_beep(void) DECLSPEC_HIDDEN;
/* cursor */
extern
void
macdrv_set_cursor
(
CFStringRef
name
,
CFArrayRef
frames
)
DECLSPEC_HIDDEN
;
extern
int
macdrv_get_cursor_position
(
CGPoint
*
pos
)
DECLSPEC_HIDDEN
;
/* display */
...
...
dlls/winemac.drv/mouse.c
View file @
38f7a4d5
...
...
@@ -736,6 +736,25 @@ void CDECL macdrv_DestroyCursorIcon(HCURSOR cursor)
/***********************************************************************
* GetCursorPos (MACDRV.@)
*/
BOOL
CDECL
macdrv_GetCursorPos
(
LPPOINT
pos
)
{
CGPoint
pt
;
BOOL
ret
;
ret
=
macdrv_get_cursor_position
(
&
pt
);
if
(
ret
)
{
TRACE
(
"pointer at (%g,%g) server pos %d,%d
\n
"
,
pt
.
x
,
pt
.
y
,
pos
->
x
,
pos
->
y
);
pos
->
x
=
pt
.
x
;
pos
->
y
=
pt
.
y
;
}
return
ret
;
}
/***********************************************************************
* SetCursor (MACDRV.@)
*/
void
CDECL
macdrv_SetCursor
(
HCURSOR
cursor
)
...
...
dlls/winemac.drv/winemac.drv.spec
View file @
38f7a4d5
...
...
@@ -13,6 +13,7 @@
@ cdecl DestroyWindow(long) macdrv_DestroyWindow
@ cdecl EnumDisplayMonitors(long ptr ptr long) macdrv_EnumDisplayMonitors
@ cdecl EnumDisplaySettingsEx(ptr long ptr long) macdrv_EnumDisplaySettingsEx
@ cdecl GetCursorPos(ptr) macdrv_GetCursorPos
@ cdecl GetKeyboardLayout(long) macdrv_GetKeyboardLayout
@ cdecl GetKeyboardLayoutName(ptr) macdrv_GetKeyboardLayoutName
@ cdecl GetKeyNameText(long ptr long) macdrv_GetKeyNameText
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment