15 #include "../video_driver.hpp"
19 const char *
Start(
const char *
const *param);
30 void MakeDirty(
int left,
int top,
int width,
int height);
61 const char *
GetName()
const {
return "cocoa"; }
91 # define MAX_DIRTY_RECTS 100
112 virtual void Draw(
bool force_update =
false) = 0;
120 virtual void MakeDirty(
int left,
int top,
int width,
int height) = 0;
123 virtual void UpdatePalette(uint first_color, uint num_colors) = 0;
125 virtual uint ListModes(OTTD_Point *modes, uint max_modes) = 0;
193 CocoaSubdriver *QZ_CreateFullscreenSubdriver(
int width,
int height,
int bpp);
195 #ifdef ENABLE_COCOA_QUICKDRAW
196 CocoaSubdriver *QZ_CreateWindowQuickdrawSubdriver(
int width,
int height,
int bpp);
199 #ifdef ENABLE_COCOA_QUARTZ
200 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
201 CocoaSubdriver *QZ_CreateWindowQuartzSubdriver(
int width,
int height,
int bpp);
205 void QZ_GameSizeChanged();
209 uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_id,
int display_depth);
212 @interface NSCursor (OTTD_QuickdrawCursor)
213 + (NSCursor *) clearCocoaCursor;
223 - (void)miniaturize:(
id)sender;
225 - (void)setFrame:(NSRect)frameRect display:(BOOL)flag;
226 - (void)appDidHide:(NSNotification*)note;
227 - (void)appWillUnhide:(NSNotification*)note;
228 - (void)appDidUnhide:(NSNotification*)note;
229 - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag;
234 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
235 # if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
236 <NSTextInputClient, NSTextInput>
245 NSTrackingRectTag trackingtag;
248 - (void)drawRect:(NSRect)rect;
250 - (BOOL)acceptsFirstResponder;
251 - (BOOL)becomeFirstResponder;
252 - (void)setTrackingRect;
253 - (void)clearTrackingRect;
254 - (void)resetCursorRects;
255 - (void)viewWillMoveToWindow:(NSWindow *)win;
256 - (void)viewDidMoveToWindow;
257 - (void)mouseEntered:(NSEvent *)theEvent;
258 - (void)mouseExited:(NSEvent *)theEvent;
268 - (BOOL)windowShouldClose:(
id)sender;
269 - (void)windowDidEnterFullScreen:(NSNotification *)aNotification;