Back to index

libsfml  1.6+dfsg2
GLKit.h
Go to the documentation of this file.
00001 
00002 //
00003 // SFML - Simple and Fast Multimedia Library
00004 // Copyright (C) 2007-2009 Lucas Soltic (ceylow@gmail.com) and Laurent Gomila (laurent.gom@gmail.com)
00005 //
00006 // This software is provided 'as-is', without any express or implied warranty.
00007 // In no event will the authors be held liable for any damages arising from the use of this software.
00008 //
00009 // Permission is granted to anyone to use this software for any purpose,
00010 // including commercial applications, and to alter it and redistribute it freely,
00011 // subject to the following restrictions:
00012 //
00013 // 1. The origin of this software must not be misrepresented;
00014 //    you must not claim that you wrote the original software.
00015 //    If you use this software in a product, an acknowledgment
00016 //    in the product documentation would be appreciated but is not required.
00017 //
00018 // 2. Altered source versions must be plainly marked as such,
00019 //    and must not be misrepresented as being the original software.
00020 //
00021 // 3. This notice may not be removed or altered from any source distribution.
00022 //
00024 
00026 // Headers
00028 #import <Cocoa/Cocoa.h>
00029 #import <SFML/Window/Cocoa/WindowImplCocoa.hpp>
00030 
00031 
00035 @interface sfPrivGLContext : NSOpenGLContext
00036 
00040 + (id)sharedContext;
00041 
00046 - (id)initWithAttributes:(sf::WindowSettings&)attribs
00047                                    mode:(const sf::VideoMode&)mode
00048                  sharedContext:(sfPrivGLContext *)context;
00049 
00050 @end
00051 
00052 
00056 @interface sfPrivGLView : NSOpenGLView
00057 {
00058        sf::priv::WindowImplCocoa *myDelegate;
00059        sfPrivGLContext *myGLContext;
00060 }
00061 
00067 - (id)initWithFrame:(NSRect)frame
00068                         mode:(const sf::VideoMode&)mode
00069                  settings:(sf::WindowSettings&)settings;
00070 
00071 
00075 - (void)setDelegate:(sf::priv::WindowImplCocoa *)aDelegate;
00076 
00080 - (sf::priv::WindowImplCocoa *)delegate;
00081 
00085 - (void)finishInitialization;
00086 
00090 - (void)enableVerticalSync:(bool)flag;
00091 
00095 - (void)setActive:(bool)flag;
00096 
00100 - (void)flushBuffer;
00101 
00102 @end
00103 
00107 @interface sfPrivWindow : NSObject
00108 {
00109 @private
00110        NSWindow *myWindow;
00111        sfPrivGLView *myView;
00112 }
00113 
00117 - (NSWindow *)window;
00118 
00122 - (sfPrivGLView *)view;
00123 
00127 - (void)setDelegate:(sf::priv::WindowImplCocoa *)aDelegate;
00128 
00132 - (sf::priv::WindowImplCocoa *)delegate;
00133 
00137 - (void)setPosition:(NSPoint)pos;
00138 
00142 - (void)setSize:(NSSize)size;
00143 
00147 - (NSPoint)mouseLocation;
00148 
00152 - (BOOL)mouseInside;
00153 
00157 - (void)show:(bool)flag;
00158 
00162 - (void)enableVerticalSync:(bool)flag;
00163 
00167 - (void)setActive:(bool)flag;
00168 
00172 - (void)flushBuffer;
00173 
00174 @end
00175 
00179 @interface sfPrivOwnedWindow : sfPrivWindow
00180 {
00181 @private
00182        sf::VideoMode myFullscreenMode;
00183        bool myIsFullscreen;
00184 }
00185 
00190 - (id)initWithVideoMode:(sf::VideoMode&)aMode
00191                         settings:(sf::WindowSettings&)someSettings
00192                               style:(unsigned long)aStyle
00193                               title:(NSString *)aTitle;
00194 
00198 - (BOOL)isFullscreen;
00199 
00200 @end
00201 
00202 
00206 @interface sfPrivImportedWindow : sfPrivWindow
00207 
00212 - (id)initWithWindow:(NSWindow *)aWindow
00213                      settings:(sf::WindowSettings&)someSettings;
00214 
00215 @end
00216 
00217 
00221 @interface sfPrivImportedView : sfPrivWindow
00222 {
00223        NSView *parentView;
00224 }
00225 
00230 - (id)initWithView:(NSView *)aView
00231                 settings:(sf::WindowSettings&)someSettings;
00232 
00233 @end