Commit 1c80eb5e authored by Tim Clem's avatar Tim Clem Committed by Alexandre Julliard

winemac.drv: Factor out cursor clipping code to its own class.

parent bdea8924
......@@ -25,6 +25,7 @@ C_SRCS = \
OBJC_SRCS = \
cocoa_app.m \
cocoa_clipboard.m \
cocoa_cursorclipping.m \
cocoa_display.m \
cocoa_event.m \
cocoa_main.m \
......
......@@ -67,6 +67,7 @@ enum {
@class WineEventQueue;
@class WineEventTapClipCursorHandler;
@class WineWindow;
......@@ -118,13 +119,9 @@ enum {
BOOL cursorHidden;
BOOL clientWantsCursorHidden;
BOOL clippingCursor;
CGRect cursorClipRect;
CFMachPortRef cursorClippingEventTap;
NSMutableArray* warpRecords;
CGPoint synthesizedLocation;
NSTimeInterval lastSetCursorPositionTime;
NSTimeInterval lastEventTapEventTime;
WineEventTapClipCursorHandler* clipCursorHandler;
NSImage* applicationIcon;
......@@ -139,6 +136,7 @@ enum {
@property (readonly, nonatomic) BOOL areDisplaysCaptured;
@property (readonly) BOOL clippingCursor;
@property (nonatomic) NSTimeInterval lastSetCursorPositionTime;
+ (WineApplicationController*) sharedController;
......@@ -160,6 +158,7 @@ enum {
- (void) windowWillOrderOut:(WineWindow*)window;
- (void) flipRect:(NSRect*)rect;
- (NSPoint) flippedMouseLocation:(NSPoint)point;
- (WineWindow*) frontWineWindow;
- (void) adjustWindowLevels;
......
/*
* MACDRV CGEventTap-based cursor clipping class declaration
*
* Copyright 2011, 2012, 2013 Ken Thomases for CodeWeavers Inc.
* Copyright 2021 Tim Clem for CodeWeavers Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#import <AppKit/AppKit.h>
@interface WineEventTapClipCursorHandler : NSObject
{
BOOL clippingCursor;
CGRect cursorClipRect;
CFMachPortRef cursorClippingEventTap;
NSMutableArray* warpRecords;
CGPoint synthesizedLocation;
NSTimeInterval lastEventTapEventTime;
}
@property (readonly, nonatomic) BOOL clippingCursor;
@property (readonly, nonatomic) CGRect cursorClipRect;
- (BOOL) startClippingCursor:(CGRect)rect;
- (BOOL) stopClippingCursor;
- (void) clipCursorLocation:(CGPoint*)location;
- (void) setRetinaMode:(int)mode;
- (BOOL) setCursorPosition:(CGPoint)pos;
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment