d3dx10: Add support for ID3DX10ThreadPump parameter in D3DX10CreateTextureFromFileW.
[wine.git] / dlls / winemac.drv / cocoa_cursorclipping.h
blobbec7b384d870364d5c912ac13ab5a9476dd54c1b
1 /*
2 * MACDRV CGEventTap-based cursor clipping class declaration
4 * Copyright 2011, 2012, 2013 Ken Thomases for CodeWeavers Inc.
5 * Copyright 2021 Tim Clem for CodeWeavers Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #import <AppKit/AppKit.h>
25 @protocol WineClipCursorHandler <NSObject>
27 @property (readonly, nonatomic) BOOL clippingCursor;
28 @property (readonly, nonatomic) CGRect cursorClipRect;
30 - (BOOL) startClippingCursor:(CGRect)rect;
31 - (BOOL) stopClippingCursor;
33 - (void) clipCursorLocation:(CGPoint*)location;
35 - (void) setRetinaMode:(int)mode;
37 @optional
38 /* If provided, should reposition the cursor as needed given the current
39 * clipping rect. If not provided, the location will be clipped by
40 * -clipCursorLocation, and the cursor will be warped normally.
42 - (BOOL) setCursorPosition:(CGPoint)pos;
44 @end
47 @interface WineEventTapClipCursorHandler : NSObject <WineClipCursorHandler>
49 BOOL clippingCursor;
50 CGRect cursorClipRect;
51 CFMachPortRef cursorClippingEventTap;
52 NSMutableArray* warpRecords;
53 CGPoint synthesizedLocation;
54 NSTimeInterval lastEventTapEventTime;
57 @end
60 @interface WineConfinementClipCursorHandler : NSObject <WineClipCursorHandler>
62 BOOL clippingCursor;
63 CGRect cursorClipRect;
64 /* The number of the window that "owns" the clipping (i.e., the one with a
65 * mouseConfinementRect set). Using this rather than a WineWindow* to avoid
66 * tricky retain situations. */
67 NSInteger clippingWindowNumber;
70 /* Returns true if the API in use by this handler is available. */
71 + (BOOL) isAvailable;
73 @end