29 #ifndef __OSXCocoaWindow_H__
30 #define __OSXCocoaWindow_H__
34 #include <AppKit/NSWindow.h>
35 #include <QuartzCore/CVDisplayLink.h>
52 NSOpenGLContext *mGLContext;
53 NSOpenGLPixelFormat *mGLPixelFormat;
54 NSPoint mWindowOrigin;
56 OSXCocoaContext* mContext;
66 float mContentScalingFactor;
67 bool mContentScalingSupported;
69 void _setWindowParameters(
void);
74 NSView* ogreView()
const {
return mView; };
75 NSWindow* ogreWindow()
const {
return mWindow; };
76 NSOpenGLContext* nsopenGLContext()
const {
return mGLContext; };
77 NSOpenGLPixelFormat* nsopenGLPixelFormat()
const {
return mGLPixelFormat; };
80 void create(
const String& name,
unsigned int width,
unsigned int height,
85 bool isActive(
void)
const;
87 bool isClosed(
void)
const;
89 bool isHidden(
void)
const {
return mHidden; }
91 void setHidden(
bool hidden);
93 void setVSyncEnabled(
bool vsync);
95 bool isVSyncEnabled()
const;
97 void reposition(
int left,
int top);
99 void resize(
unsigned int width,
unsigned int height);
103 virtual void copyContentsToMemory(
const PixelBox &dst, FrameBuffer buffer);
105 virtual void setFullscreen(
bool fullScreen,
unsigned int width,
unsigned int height);
107 virtual unsigned int getWidth(
void)
const;
109 virtual unsigned int getHeight(
void)
const;
111 void windowMovedOrResized(
void);
112 void windowResized(
void);
113 void windowHasResized(
void);
114 void createNewWindow(
unsigned int width,
unsigned int height,
String title);
115 void createWindowFromExternal(NSView *viewRef);
117 bool requiresTextureFlipping()
const {
return false; }
118 void getCustomAttribute(
const String& name,
void* pData );
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)