src/video/cocoa/cocoa_v.h
branchnoai
changeset 9723 eee46cb39750
parent 9722 ebf0ece7d8f6
child 10455 22c441f5adf9
equal deleted inserted replaced
9722:ebf0ece7d8f6 9723:eee46cb39750
     1 /* $Id$ */
     1 /* $Id$ */
     2 
     2 
     3 #ifndef VIDEO_COCOA_H
     3 #ifndef VIDEO_COCOA_H
     4 #define VIDEO_COCOA_H
     4 #define VIDEO_COCOA_H
       
     5 
       
     6 #include <AvailabilityMacros.h>
     5 
     7 
     6 #include "../video_driver.hpp"
     8 #include "../video_driver.hpp"
     7 
     9 
     8 class VideoDriver_Cocoa: public VideoDriver {
    10 class VideoDriver_Cocoa: public VideoDriver {
     9 public:
    11 public:
    15 
    17 
    16 	/* virtual */ void MainLoop();
    18 	/* virtual */ void MainLoop();
    17 
    19 
    18 	/* virtual */ bool ChangeResolution(int w, int h);
    20 	/* virtual */ bool ChangeResolution(int w, int h);
    19 
    21 
    20 	/* virtual */ void ToggleFullscreen(bool fullscreen);
    22 	/* virtual */ bool ToggleFullscreen(bool fullscreen);
    21 };
    23 };
    22 
    24 
    23 class FVideoDriver_Cocoa: public VideoDriverFactory<FVideoDriver_Cocoa> {
    25 class FVideoDriver_Cocoa: public VideoDriverFactory<FVideoDriver_Cocoa> {
    24 public:
    26 public:
    25 	static const int priority = 10;
    27 	static const int priority = 10;
    36 
    38 
    37 	virtual void Draw() = 0;
    39 	virtual void Draw() = 0;
    38 	virtual void MakeDirty(int left, int top, int width, int height) = 0;
    40 	virtual void MakeDirty(int left, int top, int width, int height) = 0;
    39 	virtual void UpdatePalette(uint first_color, uint num_colors) = 0;
    41 	virtual void UpdatePalette(uint first_color, uint num_colors) = 0;
    40 
    42 
    41 	virtual uint ListModes(OTTDPoint* modes, uint max_modes) = 0;
    43 	virtual uint ListModes(OTTD_Point* modes, uint max_modes) = 0;
    42 
    44 
    43 	virtual bool ChangeResolution(int w, int h) = 0;
    45 	virtual bool ChangeResolution(int w, int h) = 0;
    44 
    46 
    45 	virtual bool IsFullscreen() = 0;
    47 	virtual bool IsFullscreen() = 0;
    46 	virtual int GetWidth() = 0;
    48 	virtual int GetWidth() = 0;
    57 };
    59 };
    58 
    60 
    59 extern CocoaSubdriver* _cocoa_subdriver;
    61 extern CocoaSubdriver* _cocoa_subdriver;
    60 
    62 
    61 CocoaSubdriver *QZ_CreateFullscreenSubdriver(int width, int height, int bpp);
    63 CocoaSubdriver *QZ_CreateFullscreenSubdriver(int width, int height, int bpp);
       
    64 
       
    65 #ifdef ENABLE_COCOA_QUICKDRAW
       
    66 CocoaSubdriver *QZ_CreateWindowQuickdrawSubdriver(int width, int height, int bpp);
       
    67 #endif
       
    68 
       
    69 #ifdef ENABLE_COCOA_QUARTZ
       
    70 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
    62 CocoaSubdriver *QZ_CreateWindowQuartzSubdriver(int width, int height, int bpp);
    71 CocoaSubdriver *QZ_CreateWindowQuartzSubdriver(int width, int height, int bpp);
    63 CocoaSubdriver *QZ_CreateWindowQuickdrawSubdriver(int width, int height, int bpp);
    72 #endif
       
    73 #endif
    64 
    74 
    65 void QZ_GameSizeChanged();
    75 void QZ_GameSizeChanged();
    66 
    76 
    67 void QZ_GameLoop();
    77 void QZ_GameLoop();
    68 
    78 
    69 void QZ_ShowMouse();
    79 void QZ_ShowMouse();
    70 void QZ_HideMouse();
    80 void QZ_HideMouse();
    71 
    81 
       
    82 uint QZ_ListModes(OTTD_Point* modes, uint max_modes, CGDirectDisplayID display_id, int display_depth);
       
    83 
    72 #endif /* VIDEO_COCOA_H */
    84 #endif /* VIDEO_COCOA_H */