Files
@ r28403:d4cdcb69255f
Branch filter:
Location: cpp/openttd-patchpack/source/src/video/cocoa/cocoa_wnd.h - annotation
r28403:d4cdcb69255f
2.4 KiB
text/x-c
Fix: race-condition when quitting the game with libcurl (#11688)
There could be a callback in _new_http_callbacks that is not
processed yet. All callbacks in _http_callbacks were cancelled,
but not the ones in _new_http_callbacks
There could be a callback in _new_http_callbacks that is not
processed yet. All callbacks in _http_callbacks were cancelled,
but not the ones in _new_http_callbacks
r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r26143:a4ef11add553 r26143:a4ef11add553 r26143:a4ef11add553 r26143:a4ef11add553 r24764:1ef60c5f1172 r24556:fb8120e96ffe r24773:589823de4b62 r24773:589823de4b62 r24773:589823de4b62 r24773:589823de4b62 r24773:589823de4b62 r24773:589823de4b62 r24773:589823de4b62 r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24770:fdcfd3362821 r26143:a4ef11add553 r26143:a4ef11add553 r25984:e5fd5e0b5e49 r25984:e5fd5e0b5e49 r24770:fdcfd3362821 r24556:fb8120e96ffe r24556:fb8120e96ffe r26145:f785a693652c r26145:f785a693652c r24556:fb8120e96ffe r24556:fb8120e96ffe r24771:8e2ad2807649 r24771:8e2ad2807649 r24790:dc721278c245 r24790:dc721278c245 r24790:dc721278c245 r24773:589823de4b62 r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24768:48450d9ea0c2 r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24768:48450d9ea0c2 r24564:81ff12c3a266 r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24922:9b8f4fa2e9a1 r24922:9b8f4fa2e9a1 r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe r24556:fb8120e96ffe | /*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD 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 General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file cocoa_wnd.h OS interface for the cocoa video driver. */
#ifndef COCOA_WND_H
#define COCOA_WND_H
#import <Cocoa/Cocoa.h>
#ifdef MAC_OS_X_VERSION_10_12_2
# define HAVE_TOUCHBAR_SUPPORT
#endif
class VideoDriver_Cocoa;
/* Right Mouse Button Emulation enum */
enum RightMouseButtonEmulationState {
RMBE_COMMAND = 0,
RMBE_CONTROL = 1,
RMBE_OFF = 2,
};
extern NSString *OTTDMainLaunchGameEngine;
/** Category of NSCursor to allow cursor showing/hiding */
@interface NSCursor (OTTD_QuickdrawCursor)
+ (NSCursor *) clearCocoaCursor;
@end
/** Subclass of NSWindow to cater our special needs */
@interface OTTD_CocoaWindow : NSWindow
#ifdef HAVE_TOUCHBAR_SUPPORT
<NSTouchBarDelegate>
#endif
- (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag driver:(VideoDriver_Cocoa *)drv;
- (void)setFrame:(NSRect)frameRect display:(BOOL)flag;
- (void)refreshSystemSprites;
@end
/** Subclass of NSView to support mouse awareness and text input. */
@interface OTTD_CocoaView : NSView <NSTextInputClient>
- (NSRect)getRealRect:(NSRect)rect;
- (NSRect)getVirtualRect:(NSRect)rect;
- (CGFloat)getContentsScale;
- (NSPoint)mousePositionFromEvent:(NSEvent *)e;
@end
/** Delegate for our NSWindow to send ask for quit on close */
@interface OTTD_CocoaWindowDelegate : NSObject <NSWindowDelegate>
- (instancetype)initWithDriver:(VideoDriver_Cocoa *)drv;
- (BOOL)windowShouldClose:(id)sender;
- (void)windowDidEnterFullScreen:(NSNotification *)aNotification;
- (void)windowDidChangeBackingProperties:(NSNotification *)notification;
- (NSApplicationPresentationOptions)window:(NSWindow *)window willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions;
@end
extern bool _allow_hidpi_window;
bool CocoaSetupApplication();
void CocoaExitApplication();
#endif /* COCOA_WND_H */
|