src/video/quartz/SDL_QuartzWindow.h
author Ryan C. Gordon
Sun, 18 Sep 2011 02:00:39 -0400
branchSDL-1.2
changeset 5952 c838b121901e
parent 4240 cb44bf8f8a0f
child 5955 0ade820b8f5f
permissions -rw-r--r--
Fixed building with a newer Mac OS X SDK and -mmacosx-version-min=10.4.
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2009  Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Library General Public
     7     License as published by the Free Software Foundation; either
     8     version 2 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Library General Public License for more details.
    14 
    15     You should have received a copy of the GNU Library General Public
    16     License along with this library; if not, write to the Free
    17     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 #include "SDL_config.h"
    23 
    24 /* this is defined in the 10.5+ SDK headers
    25 #ifndef MAC_OS_X_VERSION_10_5
    26 typedef unsigned int NSUInteger;
    27 #endif
    28 
    29 /* Subclass of NSWindow to fix genie effect and support resize events  */
    30 @interface SDL_QuartzWindow : NSWindow
    31 {
    32 	BOOL watchForMouseUp;
    33 }
    34 
    35 - (void)miniaturize:(id)sender;
    36 - (void)display;
    37 - (void)setFrame:(NSRect)frameRect display:(BOOL)flag;
    38 - (void)appDidHide:(NSNotification*)note;
    39 - (void)appWillUnhide:(NSNotification*)note;
    40 - (void)appDidUnhide:(NSNotification*)note;
    41 - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag;
    42 @end
    43 
    44 /* Delegate for our NSWindow to send SDLQuit() on close */
    45 @interface SDL_QuartzWindowDelegate : NSObject
    46 - (BOOL)windowShouldClose:(id)sender;
    47 @end
    48 
    49 /* Subclass of NSView to set cursor rectangle */
    50 @interface SDL_QuartzView : NSView
    51 - (void)resetCursorRects;
    52 @end