src/video/uikit/SDL_uikitappdelegate.m
author Sam Lantinga <slouken@libsdl.org>
Tue, 05 Apr 2011 09:50:25 -0700
changeset 5532 8a04b596b472
parent 5487 ad3abbbe0381
child 5535 96594ac5fd1a
permissions -rw-r--r--
Allow overriding the app delegate on iOS Vittorio G. to Eric, Sam Actually this is much simpler than i thought, I just had to specify a class method to get the delegate name and then the category can override that method! I've attached the patch that enables this features: in my code i could remove my custom main() and simply add @implementation SDLUIKitDelegate (customDelegate) +(NSString *)getAppDelegateClassName { return @"HedgewarsAppDelegate"; } @end I tested it and with the sdl demos it loads the normal SDLUIKitDelegate, while in my code it loads my HedgewarsAppDelegate!
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     1
/*
5262
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
     2
    SDL - Simple DirectMedia Layer
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
     3
    Copyright (C) 1997-2011 Sam Lantinga
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
     4
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
     5
    This library is free software; you can redistribute it and/or
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
     6
    modify it under the terms of the GNU Lesser General Public
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
     7
    License as published by the Free Software Foundation; either
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
     8
    version 2.1 of the License, or (at your option) any later version.
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
     9
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    10
    This library is distributed in the hope that it will be useful,
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    13
    Lesser General Public License for more details.
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    14
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    15
    You should have received a copy of the GNU Lesser General Public
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    16
    License along with this library; if not, write to the Free Software
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    18
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    19
    Sam Lantinga
b530ef003506 Happy 2011! :)
Sam Lantinga <slouken@libsdl.org>
parents: 5251
diff changeset
    20
    slouken@libsdl.org
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    21
*/
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    22
4446
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
    23
#import "../SDL_sysvideo.h"
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
    24
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    25
#import "SDL_uikitappdelegate.h"
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    26
#import "SDL_uikitopenglview.h"
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    27
#import "SDL_events_c.h"
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    28
#import "jumphack.h"
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    29
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    30
#ifdef main
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    31
#undef main
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    32
#endif
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    33
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    34
extern int SDL_main(int argc, char *argv[]);
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    35
static int forward_argc;
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    36
static char **forward_argv;
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    37
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    38
int main(int argc, char **argv) {
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    39
5131
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    40
    int i;
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    41
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    42
    
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    43
    /* store arguments */
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    44
    forward_argc = argc;
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    45
    forward_argv = (char **)malloc((argc+1) * sizeof(char *));
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    46
    for (i=0; i<argc; i++) {
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    47
        forward_argv[i] = malloc( (strlen(argv[i])+1) * sizeof(char));
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    48
        strcpy(forward_argv[i], argv[i]);
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    49
    }
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    50
    forward_argv[i] = NULL;
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    51
5131
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    52
    /* Give over control to run loop, SDLUIKitDelegate will handle most things from here */
5532
8a04b596b472 Allow overriding the app delegate on iOS
Sam Lantinga <slouken@libsdl.org>
parents: 5487
diff changeset
    53
    UIApplicationMain(argc, argv, NULL, [SDLUIKitDelegate getAppDelegateClassName]);
5131
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    54
    
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    55
    [pool release];
5332
ae8b6fb1feaf Fixed warnings about unused variables and so forth.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    56
    return 0;
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    57
}
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    58
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    59
@implementation SDLUIKitDelegate
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    60
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    61
/* convenience method */
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    62
+(SDLUIKitDelegate *)sharedAppDelegate {
5131
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    63
    /* the delegate is set in UIApplicationMain(), which is garaunteed to be called before this method */
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    64
    return (SDLUIKitDelegate *)[[UIApplication sharedApplication] delegate];
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    65
}
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    66
5532
8a04b596b472 Allow overriding the app delegate on iOS
Sam Lantinga <slouken@libsdl.org>
parents: 5487
diff changeset
    67
+(NSString *)getAppDelegateClassName {
8a04b596b472 Allow overriding the app delegate on iOS
Sam Lantinga <slouken@libsdl.org>
parents: 5487
diff changeset
    68
    /* subclassing notice: when you subclass this appdelegate, make sure to add a category to override
8a04b596b472 Allow overriding the app delegate on iOS
Sam Lantinga <slouken@libsdl.org>
parents: 5487
diff changeset
    69
       this method and return the actual name of the delegate */
8a04b596b472 Allow overriding the app delegate on iOS
Sam Lantinga <slouken@libsdl.org>
parents: 5487
diff changeset
    70
    return @"SDLUIKitDelegate";
8a04b596b472 Allow overriding the app delegate on iOS
Sam Lantinga <slouken@libsdl.org>
parents: 5487
diff changeset
    71
}
8a04b596b472 Allow overriding the app delegate on iOS
Sam Lantinga <slouken@libsdl.org>
parents: 5487
diff changeset
    72
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    73
- (id)init {
5131
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    74
    self = [super init];
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    75
    return self;
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    76
}
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    77
3422
ec4db979dddb Fixed bug #847
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    78
- (void)postFinishLaunch {
ec4db979dddb Fixed bug #847
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    79
5131
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    80
    /* run the user's application, passing argc and argv */
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    81
    int exit_status = SDL_main(forward_argc, forward_argv);
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    82
    
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    83
    /* free the memory we used to hold copies of argc and argv */
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    84
    int i;
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    85
    for (i=0; i<forward_argc; i++) {
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    86
        free(forward_argv[i]);
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    87
    }
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    88
    free(forward_argv);    
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    89
        
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    90
    /* exit, passing the return status from the user's application */
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    91
    exit(exit_status);
3422
ec4db979dddb Fixed bug #847
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    92
}
ec4db979dddb Fixed bug #847
Sam Lantinga <slouken@libsdl.org>
parents: 3400
diff changeset
    93
5487
ad3abbbe0381 Delegate should use application: didFinishLaunchingWithOptions:
Sam Lantinga <slouken@libsdl.org>
parents: 5332
diff changeset
    94
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
5131
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    95
            
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    96
    /* Set working directory to resource path */
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    97
    [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
    98
    
5532
8a04b596b472 Allow overriding the app delegate on iOS
Sam Lantinga <slouken@libsdl.org>
parents: 5487
diff changeset
    99
    [self performSelector:@selector(postFinishLaunch) withObject:nil afterDelay:0.0];
5487
ad3abbbe0381 Delegate should use application: didFinishLaunchingWithOptions:
Sam Lantinga <slouken@libsdl.org>
parents: 5332
diff changeset
   100
ad3abbbe0381 Delegate should use application: didFinishLaunchingWithOptions:
Sam Lantinga <slouken@libsdl.org>
parents: 5332
diff changeset
   101
    return YES;
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   102
}
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   103
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   104
- (void)applicationWillTerminate:(UIApplication *)application {
5131
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
   105
    
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
   106
    SDL_SendQuit();
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
   107
     /* hack to prevent automatic termination.  See SDL_uikitevents.m for details */
7b7da52e8775 Fixed spacing
Sam Lantinga <slouken@libsdl.org>
parents: 4489
diff changeset
   108
    longjmp(*(jump_env()), 1);
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   109
}
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   110
3400
4ec48602f1db iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   111
- (void) applicationWillResignActive:(UIApplication*)application
4ec48602f1db iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   112
{
4446
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   113
    //NSLog(@"%@", NSStringFromSelector(_cmd));
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   114
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   115
    // Send every window on every screen a MINIMIZED event.
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   116
    SDL_VideoDevice *_this = SDL_GetVideoDevice();
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   117
    if (!_this) {
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   118
        return;
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   119
    }
5251
1b0de3574c58 Fixed compile in Xcode
Sam Lantinga <slouken@libsdl.org>
parents: 5132
diff changeset
   120
	
5532
8a04b596b472 Allow overriding the app delegate on iOS
Sam Lantinga <slouken@libsdl.org>
parents: 5487
diff changeset
   121
    SDL_Window *window;
5251
1b0de3574c58 Fixed compile in Xcode
Sam Lantinga <slouken@libsdl.org>
parents: 5132
diff changeset
   122
    for (window = _this->windows; window != nil; window = window->next) {
1b0de3574c58 Fixed compile in Xcode
Sam Lantinga <slouken@libsdl.org>
parents: 5132
diff changeset
   123
        SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
4446
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   124
    }
3400
4ec48602f1db iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   125
}
4ec48602f1db iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   126
4ec48602f1db iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   127
- (void) applicationDidBecomeActive:(UIApplication*)application
4ec48602f1db iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   128
{
4446
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   129
    //NSLog(@"%@", NSStringFromSelector(_cmd));
3400
4ec48602f1db iPhone interruption patch / SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 2859
diff changeset
   130
4446
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   131
    // Send every window on every screen a RESTORED event.
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   132
    SDL_VideoDevice *_this = SDL_GetVideoDevice();
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   133
    if (!_this) {
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   134
        return;
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   135
    }
5251
1b0de3574c58 Fixed compile in Xcode
Sam Lantinga <slouken@libsdl.org>
parents: 5132
diff changeset
   136
	
1b0de3574c58 Fixed compile in Xcode
Sam Lantinga <slouken@libsdl.org>
parents: 5132
diff changeset
   137
	SDL_Window *window;
1b0de3574c58 Fixed compile in Xcode
Sam Lantinga <slouken@libsdl.org>
parents: 5132
diff changeset
   138
    for (window = _this->windows; window != nil; window = window->next) {
1b0de3574c58 Fixed compile in Xcode
Sam Lantinga <slouken@libsdl.org>
parents: 5132
diff changeset
   139
		SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0);
4446
8b03a20b320f Much improved multi-display support for iPad.
Ryan C. Gordon <icculus@icculus.org>
parents: 3685
diff changeset
   140
    }
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   141
}
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   142
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   143
@end
5132
5f09cb749d75 Added vim spacing hints
Sam Lantinga <slouken@libsdl.org>
parents: 5131
diff changeset
   144
5f09cb749d75 Added vim spacing hints
Sam Lantinga <slouken@libsdl.org>
parents: 5131
diff changeset
   145
/* vi: set ts=4 sw=4 expandtab: */