Vuo  2.3.2
Functions | Variables
libmodule.c File Reference

Description

Implementations of functions available to modules (nodes, types, libraries).

Definition in file libmodule.c.

Go to the source code of this file.

Functions

static void * copyCompositionStateFromThreadLocalStorage (void)
 Wrapper for vuoCopyCompositionStateFromThreadLocalStorage(). More...
 
const char * VuoGetWorkingDirectory (void)
 Returns the POSIX path that this composition should use to resolve relative paths. More...
 
const char * VuoGetFrameworkPath (void)
 Returns the path of the folder containing Vuo.framework. More...
 
const char * VuoGetRunnerFrameworkPath (void)
 Returns the path of the folder containing VuoRunner.framework. More...
 
pid_t VuoGetRunnerPid (void)
 Returns the process ID of the runner that started the composition. More...
 
void VuoStopComposition (void)
 Asynchronously stops the composition. More...
 
void VuoStopCurrentComposition (void)
 Asynchronously stops the composition. More...
 
void VuoAddCompositionFiniCallback (VuoCompositionFiniCallback fini)
 Registers a callback to be invoked when the composition is shutting down, after nodeInstanceFini() has been called for all nodes. More...
 
void VuoDisableTermination (void)
 Temporarily disables automatic termination. More...
 
void VuoEnableTermination (void)
 Resumes automatic termination after a call to VuoDisableTermination(). More...
 
bool VuoShouldShowSplashWindow (void)
 Returns true if this composition should show the Vuo Community Edition splash window. More...
 
bool VuoProcessorSupportsAVX2 (void)
 Returns true if the current (runtime) processor supports Intel AVX2. More...
 

Variables

const int VuoGraphicsWindowDefaultWidth = 1024
 The standard Vuo graphics window width, in points. More...
 
dispatch_once_t VuoGetWorkingDirectoryOnce = 0
 Ensures the bulk of VuoGetWorkingDirectory only executes once. More...
 

Function Documentation

◆ copyCompositionStateFromThreadLocalStorage()

static void* copyCompositionStateFromThreadLocalStorage ( void  )
static

Wrapper for vuoCopyCompositionStateFromThreadLocalStorage().

Definition at line 23 of file libmodule.c.

◆ VuoAddCompositionFiniCallback()

void VuoAddCompositionFiniCallback ( VuoCompositionFiniCallback  fini)

Registers a callback to be invoked when the composition is shutting down, after nodeInstanceFini() has been called for all nodes.

VuoCompositionFiniCallbacks are not called during livecoding reloads.

Definition at line 157 of file libmodule.c.

◆ VuoDisableTermination()

void VuoDisableTermination ( void  )

Temporarily disables automatic termination.

When a composition is asked to shut down, a watchdog timer waits a few seconds then force-quits if it hasn't cleanly shut down by then. This disables that watchdog.

Call this before entering a section where it would be undesirable to have the composition automatically force-quit, such as when saving a movie file that needs to be finalized.

When the work is over, call VuoEnableTermination().

Definition at line 172 of file libmodule.c.

◆ VuoEnableTermination()

void VuoEnableTermination ( void  )

Resumes automatic termination after a call to VuoDisableTermination().

Definition at line 184 of file libmodule.c.

◆ VuoGetFrameworkPath()

const char* VuoGetFrameworkPath ( void  )

Returns the path of the folder containing Vuo.framework.

See also VuoFileUtilities::getVuoFrameworkPath.

Definition at line 76 of file libmodule.c.

◆ VuoGetRunnerFrameworkPath()

const char* VuoGetRunnerFrameworkPath ( void  )

Returns the path of the folder containing VuoRunner.framework.

See also VuoFileUtilities::getVuoRunnerFrameworkPath.

Changed in Vuo 2.0.0:
New.

Definition at line 102 of file libmodule.c.

◆ VuoGetRunnerPid()

pid_t VuoGetRunnerPid ( void  )

Returns the process ID of the runner that started the composition.

Definition at line 122 of file libmodule.c.

◆ VuoGetWorkingDirectory()

const char* VuoGetWorkingDirectory ( void  )

Returns the POSIX path that this composition should use to resolve relative paths.

Returns the directory that nodes should use to resolve relative paths.

The returned string remains owned by this function; the caller should not modify or free it.

Definition at line 45 of file libmodule.c.

◆ VuoProcessorSupportsAVX2()

bool VuoProcessorSupportsAVX2 ( void  )

Returns true if the current (runtime) processor supports Intel AVX2.

Definition at line 227 of file libmodule.c.

◆ VuoShouldShowSplashWindow()

bool VuoShouldShowSplashWindow ( void  )

Returns true if this composition should show the Vuo Community Edition splash window.

Definition at line 196 of file libmodule.c.

◆ VuoStopComposition()

void VuoStopComposition ( void  )

Asynchronously stops the composition.

Definition at line 135 of file libmodule.c.

◆ VuoStopCurrentComposition()

void VuoStopCurrentComposition ( void  )

Asynchronously stops the composition.

VuoStopComposition() is typically preferable to this function, since this function doesn't handle multiple compositions running in the process.

Definition at line 147 of file libmodule.c.

Variable Documentation

◆ VuoGetWorkingDirectoryOnce

dispatch_once_t VuoGetWorkingDirectoryOnce = 0

Ensures the bulk of VuoGetWorkingDirectory only executes once.

This is a public symbol so TestVuoUrl can reset it.

Definition at line 38 of file libmodule.c.

◆ VuoGraphicsWindowDefaultWidth

const int VuoGraphicsWindowDefaultWidth = 1024

The standard Vuo graphics window width, in points.

Changed in Vuo 2.0.0:
New.

Definition at line 18 of file libmodule.c.