MacWindow
Engine/source/windowManager/mac/macWindow.h
Classes:
Public Friends
class
class
Private Static Attributes
SafariWindowInfo *
Private Attributes
NSWindow *
NSDictionary *
CGDirectDisplayID
CGRect
bool
CGRect
bool
bool
bool
bool
Public Functions
Does the work of actually locking or unlocking the mouse, based on the value of shouldLockMouse().
_setVideoMode(const GFXVideoMode & mode)
bool
bool
If we're fullscreen, this function returns us to desktop mode.
clientToScreen(const Point2I & point)
Convert the coordinate given in this window space to screen coordinates.
const char *
Get the window's caption.
Get the Client Area Extent (Resolution) of this window.
CGDirectDisplayID
CGRect
Return a pointer to the GFX device this window is bound to.
Return a pointer to this window's render target.
CGRect
void *
Get the platform specific object needed to create or attach an accelerated graohics drawing context on or to the window Win32 D3D and OpenGL typically needs an HWND Mac Cocoa OpenGL typically needs an NSOpenGLView Mac Carbon OpenGL typically needs a WindowRef.
Get the position of this window.
Get our current video mode - if the window has been resized, it will reflect this.
Get the ID that uniquely identifies this window in the context of its window manager.
bool
Returns true if the window has input focus.
bool
bool
Returns true if the window is maximized.
bool
Returns true if the window is minimized.
bool
Is the mouse locked ?
bool
isOpen()
Returns true if the window is instantiated in the OS.
bool
Returns true if the window is visible.
screenToClient(const Point2I & point)
Convert the given screen coordinates to coordinates in this window space.
bool
setCaption(const char * cap)
Set the window's caption.
setClientExtent(const Point2I newExtent)
The Client Rectangle or "Render Area" of a window is the area that is occupied by a given client that is rendering to that window.
setDisplay(CGDirectDisplayID display)
setMouseLocked(bool enable)
Lock the mouse to this window.
setPosition(const Point2I newPosition)
The Position of a window is always in relation to the very upper left of the window.
bool
bool
Should the mouse be locked at the next opportunity ?
Public Static Functions
hideBrowserWindow(bool hide)
Protected Functions
_setFullscreen(bool fullScreen)
Private Functions
_initCocoaWindow(const char * windowText, Point2I clientExtent)
_onAppEvent(WindowId , S32 )
setWindowId(U32 newid)
Detailed Description
Public Friends
Private Static Attributes
MacWindow * sInstance
SafariWindowInfo * sSafariWindowInfo
Private Attributes
NSWindow * mCocoaWindow
GFXVideoMode mCurrentMode
NSDictionary * mDefaultDisplayMode
GFXDevice * mDevice
CGDirectDisplayID mDisplay
CGRect mDisplayBounds
bool mFullscreen
CGRect mMainDisplayBounds
bool mMouseCaptured
bool mMouseLocked
MacWindow * mNextWindow
MacWindowManager * mOwningWindowManager
bool mShouldFullscreen
bool mShouldMouseLock
U32 mSkipMouseEvents
GFXWindowTargetRef mTarget
const char * mTitle
Public Functions
~MacWindow()
_associateMouse()
_centerMouse()
_disassociateCocoaWindow()
_dissociateMouse()
_doMouseLockNow()
Does the work of actually locking or unlocking the mouse, based on the value of shouldLockMouse().
Disassociates the cursor movement from the mouse input and hides the mouse when locking. Re-associates cursor movement with mouse input and shows the mouse when unlocking.
Returns true if we locked or unlocked the mouse. Returns false if the mouse was already in the correct state.
_setVideoMode(const GFXVideoMode & mode)
Reimplemented from: PlatformWindow
_skipAnotherMouseEvent()
_skipNextMouseEvent()
_skippedMouseEvent()
centerWindow()
Reimplemented from: PlatformWindow
clearFocus()
clearFullscreen()
Reimplemented from: PlatformWindow
clientToScreen(const Point2I & point)
Reimplemented from: PlatformWindow
close()
Reimplemented from: PlatformWindow
getBounds()
Reimplemented from: PlatformWindow
getCaption()
Reimplemented from: PlatformWindow
getClientExtent()
Reimplemented from: PlatformWindow
getDisplay()
getDisplayBounds()
getGFXDevice()
Reimplemented from: PlatformWindow
getGFXTarget()
Reimplemented from: PlatformWindow
getMainDisplayBounds()
getNextWindow()
Reimplemented from: PlatformWindow
getPlatformDrawable()
Reimplemented from: PlatformWindow
getPosition()
Reimplemented from: PlatformWindow
getVideoMode()
Reimplemented from: PlatformWindow
getWindowId()
Reimplemented from: PlatformWindow
hide()
Reimplemented from: PlatformWindow
isFocused()
Reimplemented from: PlatformWindow
isFullscreen()
Reimplemented from: PlatformWindow
isMaximized()
Reimplemented from: PlatformWindow
isMinimized()
Reimplemented from: PlatformWindow
isMouseLocked()
Reimplemented from: PlatformWindow
isOpen()
Reimplemented from: PlatformWindow
isVisible()
Reimplemented from: PlatformWindow
maximize()
Reimplemented from: PlatformWindow
minimize()
Reimplemented from: PlatformWindow
restore()
Reimplemented from: PlatformWindow
screenToClient(const Point2I & point)
Reimplemented from: PlatformWindow
setBounds(const RectI & newBounds)
Reimplemented from: PlatformWindow
setCaption(const char * cap)
Reimplemented from: PlatformWindow
setClientExtent(const Point2I newExtent)
Reimplemented from: PlatformWindow
setDisplay(CGDirectDisplayID display)
setFocus()
Reimplemented from: PlatformWindow
setMouseLocked(bool enable)
Reimplemented from: PlatformWindow
setPosition(const Point2I newPosition)
Reimplemented from: PlatformWindow
setSize(const Point2I & newSize)
Reimplemented from: PlatformWindow
setType(S32 windowType)
shouldLockMouse()
Reimplemented from: PlatformWindow
show()
Reimplemented from: PlatformWindow
Public Static Functions
hideBrowserWindow(bool hide)
setSafariWindow(NSWindow * window, S32 x, S32 y, S32 width, S32 height)
Protected Functions
_setFullscreen(bool fullScreen)
Reimplemented from: PlatformWindow
Private Functions
MacWindow(U32 windowId, const char * windowText, Point2I clientExtent)
_initCocoaWindow(const char * windowText, Point2I clientExtent)
_onAppEvent(WindowId , S32 )
setWindowId(U32 newid)
signalGainFocus()