All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Luminous::CocoaWindow Class Reference

This class represents an OpenGL window using Cocoa on OS X. More...

#include <Luminous/CocoaWindow.hpp>

Inheritance diagram for Luminous::CocoaWindow:
Luminous::Window

Public Member Functions

 CocoaWindow (const MultiHead::Window &window)
 Constructs a new window. More...
 
virtual void doneCurrent ()
 Clears the OpenGL context for the calling thread.
 
virtual int height () const
 Returns the height of the window. More...
 
virtual void makeCurrent ()
 Sets the OpenGL context for the calling thread.
 
virtual void maximize ()
 Maximize the window.
 
virtual void minimize ()
 Minimize the window.
 
virtual void poll ()
 Update window system (mouse & keyboard) events.
 
virtual Nimble::Vector2i position () const
 Get the window position. More...
 
virtual void restore ()
 Restore the window from minimized state.
 
virtual void setHeight (int h)
 Set the height of the window. More...
 
virtual bool setIcon (const QString &)
 
virtual void setPosition (Nimble::Vector2i pos)
 Set the window position. More...
 
virtual void setWidth (int w)
 Set the width of the window. More...
 
virtual void showCursor (bool visible)
 Control mouse cursor visibility. More...
 
virtual void swapBuffers ()
 Swap OpenGL buffers.
 
virtual int width () const
 Returns the width of the window. More...
 
- Public Member Functions inherited from Luminous::Window
virtual void deinit ()
 Cleanup any window resources. Default implementation does nothing.
 
WindowEventHookeventHook () const
 Get the event handler for the window. More...
 
virtual unsigned gpuId () const
 Gets the native GPU id for the OpenGL context of this window.
 
virtual void init ()
 This function can be used to perform any initialization that must be executed in the render-thread associated with the window. More...
 
bool isFinished () const
 Queries if the window is closed. More...
 
virtual bool mainThreadInit ()
 This function can be used to perform any initialization that must be performed in the main-thread. More...
 
virtual void setEventHook (WindowEventHook *hook)
 Set the event handler for window events. More...
 
void setFullscreen (bool fullscreen)
 Sets the full-screen mode of the window. More...
 
 Window ()
 Construct an empty window with zero size.
 
virtual ~Window ()
 Destructor.
 

Static Public Member Functions

static void setQuitCallback (std::function< void()> callback)
 

Detailed Description

This class represents an OpenGL window using Cocoa on OS X.

Constructor & Destructor Documentation

Luminous::CocoaWindow::CocoaWindow ( const MultiHead::Window window)

Constructs a new window.

Parameters
windowwindow configuration

Member Function Documentation

virtual int Luminous::CocoaWindow::height ( ) const
virtual

Returns the height of the window.

Returns
height of the window in pixels

Implements Luminous::Window.

virtual Nimble::Vector2i Luminous::CocoaWindow::position ( ) const
virtual

Get the window position.

Returns
window position

Implements Luminous::Window.

virtual void Luminous::CocoaWindow::setHeight ( int  h)
virtual

Set the height of the window.

Parameters
hwindow height in pixels

Implements Luminous::Window.

virtual bool Luminous::CocoaWindow::setIcon ( const QString &  )
inlinevirtual

Implements Luminous::Window.

virtual void Luminous::CocoaWindow::setPosition ( Nimble::Vector2i  pos)
virtual

Set the window position.

Parameters
poswindow position

Implements Luminous::Window.

virtual void Luminous::CocoaWindow::setWidth ( int  w)
virtual

Set the width of the window.

Parameters
wwindow width in pixels

Implements Luminous::Window.

virtual void Luminous::CocoaWindow::showCursor ( bool  visible)
virtual

Control mouse cursor visibility.

Parameters
visibletrue to show cursor; false to hide it

Implements Luminous::Window.

virtual int Luminous::CocoaWindow::width ( ) const
virtual

Returns the width of the window.

Returns
width of the window in pixels

Implements Luminous::Window.