Vuo  1.1.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Instance Methods | Protected Attributes | Properties | List of all members
VuoWindowOpenGLInternal Class Reference

Description

A graphics window for use by Vuo node classes.

The graphics window renders onto an OpenGL context shared with Vuo nodes, so that it can render the scenes created by those nodes. A scene is rendered by calling callbacks provided by the Vuo nodes.

Instance Methods

(id) - initWithDepthBuffer:initCallback:resizeCallback:drawCallback:drawContext:
 Creates a window containing an OpenGL view.
 
(void) - enableTriggers:
 Sets up the window to call trigger functions.
 
(void) - disableTriggers
 Stops the window from calling trigger functions.
 
(void) - scheduleRedraw
 Schedules the OpenGL view to be redrawn.
 
(void) - setProperties:
 Applies a list of properties to this window.
 
(void) - executeWithWindowContext:
 Executes the specifed block on the window's OpenGL context, then returns.
 
(void) - setAspectRatioToWidth:height:
 Constrains the window's aspect ratio to pixelsWide/pixelsHigh.
 
(void) - unlockAspectRatio
 Removes the aspect ratio constraint set by VuoWindowOpenGl_setAspectRatio.
 
(void) - setFullScreen:onScreen:
 Switches between full-screen and windowed mode.
 
(void) - stopRecording
 Stops recording a movie of the currently-selected window.
 

Protected Attributes

BOOL userResizedWindow
 True if the user has manually resized the window.
 
BOOL programmaticallyResizingWindow
 True if a programmatic resize of the window is in progress.
 
dispatch_queue_t contentRectQueue
 Synchronizes access to contentRectCached.
 
void(* showedWindow )(VuoWindowReference window)
 Callback to invoke when the window is shown, moved, and resized.
 

Properties

BOOL callbacksEnabled
 True if the window can call its trigger callbacks.
 
VuoWindowOpenGLViewglView
 The OpenGL view inside this window.
 
BOOL depthBuffer
 Was a depth buffer requested?
 
NSRect contentRectCached
 The position and size of the window's content area. In points (not pixels).
 
float backingScaleFactorCached
 The number of pixels per point in the window's content area.
 
NSRect contentRectWhenWindowed
 The position and size of the window's content area, prior to switching to full-screen. In points (not pixels).
 
NSUInteger styleMaskWhenWindowed
 The window's style mask, prior to switching to full-screen.
 
VuoCursor cursor
 The current mouse cursor for this window.
 
NSString * titleBackup
 The window's title (stored since it gets cleared when switching to fullscreen mode).
 
VuoWindowRecorderrecorder
 nil if recording is inactive.
 
NSMenuItem * recordMenuItem
 The record/stop menu item.
 
NSURL * temporaryMovieURL
 The temporary file to which the movie is being saved.
 

Method Documentation

- (void) disableTriggers

Stops the window from calling trigger functions.

This function may be called from any thread.

- (void) enableTriggers: (VuoWindowReference _showedWindow

Sets up the window to call trigger functions.

This function may be called from any thread.

- (void) executeWithWindowContext: (VuoGlContext glContext)  blockToExecute

Executes the specifed block on the window's OpenGL context, then returns.

Ensures that nobody else is using the OpenGL context at that time (by synchronizing with the window's drawQueue).

This function may be called from any thread.

- (id) initWithDepthBuffer: (BOOL)  _depthBuffer
initCallback: (VuoGlContext glContext, float backingScaleFactor, void *)  _initCallback
resizeCallback: (VuoGlContext glContext, void *, unsigned int width, unsigned int height)  _resizeCallback
drawCallback: (VuoGlContext glContext, void *)  _drawCallback
drawContext: (void *)  _drawContext 

Creates a window containing an OpenGL view.

This function may only be called on the main thread.

- (void) scheduleRedraw

Schedules the OpenGL view to be redrawn.

This can be used in both windowed and full-screen mode.

This function may be called from any thread.

- (void) setAspectRatioToWidth: (unsigned int)  pixelsWide
height: (unsigned int)  pixelsHigh 

Constrains the window's aspect ratio to pixelsWide/pixelsHigh.

Also resizes the window to pixelsWide by pixelsHigh, unless the user has manually resized the window (in which case the width is preserved) or the requested size is larger than the window's screen (in which case the window is scaled to fit the screen).

This function may only be called on the main thread.

- (void) setFullScreen: (BOOL)  fullScreen
onScreen: (NSScreen *)  screen 

Switches between full-screen and windowed mode.

This function may only be called on the main thread.

- (void) setProperties: (VuoList_VuoWindowProperty properties

Applies a list of properties to this window.

This function may only be called on the main thread.

- (void) stopRecording

Stops recording a movie of the currently-selected window.

Does nothing if recording is not currently enabled.

This function may only be called on the main thread.

- (void) unlockAspectRatio

Removes the aspect ratio constraint set by VuoWindowOpenGl_setAspectRatio.

This function may only be called on the main thread.

Member Data Documentation

- (dispatch_queue_t) contentRectQueue
protected

Synchronizes access to contentRectCached.

- (BOOL) programmaticallyResizingWindow
protected

True if a programmatic resize of the window is in progress.

- (void(* showedWindow)(VuoWindowReference window))
protected

Callback to invoke when the window is shown, moved, and resized.

- (BOOL) userResizedWindow
protected

True if the user has manually resized the window.

Property Documentation

- (float) backingScaleFactorCached
readwriteatomic

The number of pixels per point in the window's content area.

- (BOOL) callbacksEnabled
atomicprotected

True if the window can call its trigger callbacks.

- (NSRect) contentRectCached
readwriteatomic

The position and size of the window's content area. In points (not pixels).

Thread-safe accessor.

This function may be called from any thread.

- (NSRect) contentRectWhenWindowed
readwriteatomic

The position and size of the window's content area, prior to switching to full-screen. In points (not pixels).

- (VuoCursor) cursor
readwriteatomic

The current mouse cursor for this window.

- (BOOL) depthBuffer
readwriteatomic

Was a depth buffer requested?

- (VuoWindowOpenGLView*) glView
readwriteatomicretain

The OpenGL view inside this window.

- (VuoWindowRecorder*) recorder
readwriteatomicretain

nil if recording is inactive.

- (NSMenuItem*) recordMenuItem
readwriteatomicretain

The record/stop menu item.

- (NSUInteger) styleMaskWhenWindowed
readwriteatomic

The window's style mask, prior to switching to full-screen.

- (NSURL*) temporaryMovieURL
readwriteatomicretain

The temporary file to which the movie is being saved.

- (NSString*) titleBackup
readwriteatomicretain

The window's title (stored since it gets cleared when switching to fullscreen mode).


The documentation for this class was generated from the following files: