src/video/uikit/SDL_uikitwindow.h
author Alex Szpakowski <slime73@gmail.com>
Sun, 23 Nov 2014 23:29:24 -0400
branchiOS-improvements
changeset 9528 6915f7db6791
parent 9523 9cbd69cac7ed
child 9529 4bf9830d8153
permissions -rw-r--r--
Removed an ugly hack to make windows rotate properly on iOS 8+. Recent commits apparently resolved the issue that made the hack necessary.
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
/*
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
     2
  Simple DirectMedia Layer
8149
681eb46b8ac4 Fixed bug 2374 - Update copyright for 2014...
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
     3
  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     4
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
     5
  This software is provided 'as-is', without any express or implied
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
     6
  warranty.  In no event will the authors be held liable for any damages
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
     7
  arising from the use of this software.
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     8
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
     9
  Permission is granted to anyone to use this software for any purpose,
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
    10
  including commercial applications, and to alter it and redistribute it
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
    11
  freely, subject to the following restrictions:
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    12
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
    13
  1. The origin of this software must not be misrepresented; you must not
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
    14
     claim that you wrote the original software. If you use this software
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
    15
     in a product, an acknowledgment in the product documentation would be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
    16
     appreciated but is not required.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
    17
  2. Altered source versions must be plainly marked as such, and must not be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
    18
     misrepresented as being the original software.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5527
diff changeset
    19
  3. This notice may not be removed or altered from any source distribution.
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    20
*/
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    21
#ifndef _SDL_uikitwindow_h
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    22
#define _SDL_uikitwindow_h
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    23
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    24
#include "../SDL_sysvideo.h"
6267
ed2cf4669e55 * On iOS, fix support for the case where [UIScreen scale] is not 1.0 (retina)
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 6138
diff changeset
    25
#import "SDL_uikitvideo.h"
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    26
#import "SDL_uikitopenglview.h"
6005
f5327bae25cb Cleanup of the use of include files in src/video/uikit
Kees Bakker <kees@ijzerbout.nl>
parents: 5535
diff changeset
    27
#import "SDL_uikitviewcontroller.h"
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    28
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    29
extern int UIKit_CreateWindow(_THIS, SDL_Window * window);
6379
8f224d0762ab Fix for the Game Center status window always being behind the SDL window (untested!)
Sam Lantinga <slouken@libsdl.org>
parents: 6267
diff changeset
    30
extern void UIKit_ShowWindow(_THIS, SDL_Window * window);
8f224d0762ab Fix for the Game Center status window always being behind the SDL window (untested!)
Sam Lantinga <slouken@libsdl.org>
parents: 6267
diff changeset
    31
extern void UIKit_HideWindow(_THIS, SDL_Window * window);
6419
b75e82af5ef1 Moved iOS-specific code into uikit target. Fixes crashes in X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 6379
diff changeset
    32
extern void UIKit_RaiseWindow(_THIS, SDL_Window * window);
9505
6fc615dfc93f Added support for SDL_SetWindowBordered on iOS. Worked around a bug with rotating the device on iOS 8.
Alex Szpakowski <slime73@gmail.com>
parents: 8149
diff changeset
    33
extern void UIKit_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered);
6073
9738f2a8eee4 Fixed creating a fullscreen window on iOS
Sam Lantinga <slouken@libsdl.org>
parents: 6005
diff changeset
    34
extern void UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    35
extern void UIKit_DestroyWindow(_THIS, SDL_Window * window);
5056
8b7988f42fcb Added the ability to get the UIKit window through the SDL API.
Sam Lantinga <slouken@libsdl.org>
parents: 4446
diff changeset
    36
extern SDL_bool UIKit_GetWindowWMInfo(_THIS, SDL_Window * window,
8b7988f42fcb Added the ability to get the UIKit window through the SDL API.
Sam Lantinga <slouken@libsdl.org>
parents: 4446
diff changeset
    37
                                      struct SDL_SysWMinfo * info);
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    38
9523
9cbd69cac7ed Fixed mismatching orientations for the window width and height on iOS when the window is created or the app is brought to the foreground, when SDL_HINT_ORIENTATIONS or SDL_WINDOW_FULLSCREEN is used.
Alex Szpakowski <slime73@gmail.com>
parents: 9510
diff changeset
    39
extern NSUInteger UIKit_GetSupportedOrientations(SDL_Window * window);
9cbd69cac7ed Fixed mismatching orientations for the window width and height on iOS when the window is created or the app is brought to the foreground, when SDL_HINT_ORIENTATIONS or SDL_WINDOW_FULLSCREEN is used.
Alex Szpakowski <slime73@gmail.com>
parents: 9510
diff changeset
    40
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    41
@class UIWindow;
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    42
9510
e19faa3b5d88 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC).
Alex Szpakowski <slime73@gmail.com>
parents: 9505
diff changeset
    43
@interface SDL_WindowData : NSObject
e19faa3b5d88 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC).
Alex Szpakowski <slime73@gmail.com>
parents: 9505
diff changeset
    44
9528
6915f7db6791 Removed an ugly hack to make windows rotate properly on iOS 8+.
Alex Szpakowski <slime73@gmail.com>
parents: 9523
diff changeset
    45
@property (nonatomic, strong) UIWindow *uiwindow;
9510
e19faa3b5d88 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC).
Alex Szpakowski <slime73@gmail.com>
parents: 9505
diff changeset
    46
@property (nonatomic, strong) SDL_uikitopenglview *view;
e19faa3b5d88 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC).
Alex Szpakowski <slime73@gmail.com>
parents: 9505
diff changeset
    47
@property (nonatomic, strong) SDL_uikitviewcontroller *viewcontroller;
e19faa3b5d88 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC).
Alex Szpakowski <slime73@gmail.com>
parents: 9505
diff changeset
    48
e19faa3b5d88 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC).
Alex Szpakowski <slime73@gmail.com>
parents: 9505
diff changeset
    49
@end
2765
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    50
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    51
#endif /* _SDL_uikitwindow_h */
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    52
f55c87ae336b Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    53
/* vi: set ts=4 sw=4 expandtab: */