Vuo  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions
VuoEventLoop.m File Reference

Description

VuoEventLoop implementation.

Functions

void VuoEventLoop_processEvent (VuoEventLoopMode mode)
 Handles one or more blocks or application events (e.g., keypresses, mouse moves, window state changes).
 
void VuoEventLoop_break (void)
 Interrupts VuoEventLoop_processEvent while it is waiting.
 
void VuoEventLoop_switchToAppMode (void)
 Interrupts VuoEventLoop_processEvent if it's currently blocking, so that it can process NSEvents next time it's invoked.
 
bool VuoEventLoop_mayBeTerminated (void)
 Returns false if the app is currently waiting on user input in a modal dialog or a window sheet.
 
void VuoEventLoop_disableTermination (void)
 Temporarily disables automatic termination.
 
void VuoEventLoop_enableTermination (void)
 Resumes automatic termination after a call to VuoEventLoop_disableTermination.
 
unsigned long VuoEventLoop_getDispatchStrictMask (void)
 Returns DISPATCH_TIMER_STRICT if it's supported on the current OS version; otherwise returns 0.
 
void VuoEventLoop_signalHandler (int signum)
 Called when the process receives a SIGINT (control-C) or SIGTERM (kill).
 
void VuoEventLoop_installSignalHandlers (void)
 Installs SIGINT and SIGTERM handlers, to cleanly shut down the composition.
 
void VuoEventLoop_disableAppNap (void)
 Disable "App Nap" since even if our timers are set to strict (VuoEventLoop_getDispatchStrictMask), the OS still prevents the process from running smoothly while taking a nap.
 

Function Documentation

void VuoEventLoop_break ( void  )

Interrupts VuoEventLoop_processEvent while it is waiting.

void VuoEventLoop_disableAppNap ( void  )

Disable "App Nap" since even if our timers are set to strict (VuoEventLoop_getDispatchStrictMask), the OS still prevents the process from running smoothly while taking a nap.

https://b33p.net/kosada/node/12685

void VuoEventLoop_disableTermination ( 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 VuoEventLoop_enableTermination.

void VuoEventLoop_enableTermination ( void  )

Resumes automatic termination after a call to VuoEventLoop_disableTermination.

unsigned long VuoEventLoop_getDispatchStrictMask ( void  )

Returns DISPATCH_TIMER_STRICT if it's supported on the current OS version; otherwise returns 0.

void VuoEventLoop_installSignalHandlers ( void  )

Installs SIGINT and SIGTERM handlers, to cleanly shut down the composition.

bool VuoEventLoop_mayBeTerminated ( void  )

Returns false if the app is currently waiting on user input in a modal dialog or a window sheet.

void VuoEventLoop_processEvent ( VuoEventLoopMode  mode)

Handles one or more blocks or application events (e.g., keypresses, mouse moves, window state changes).

If an NSApp is available:

  • If mode is VuoEventLoop_WaitIndefinitely, waits until an NSEvent arrives, processes the event, and returns.
  • If mode is VuoEventLoop_RunOnce, processes an NSEvent (if one is ready), and returns.

If there's no NSApp, executes the CFRunLoop:

  • If mode is VuoEventLoop_WaitIndefinitely, returns when the CFRunLoop exits.
  • If mode is VuoEventLoop_RunOnce, returns immediately after a single CFRunLoop iteration.

In either case, when mode is VuoEventLoop_WaitIndefinitely, VuoEventLoop_break will cause this function to return immediately.

This function may only be called on the main thread.

void VuoEventLoop_signalHandler ( int  signum)

Called when the process receives a SIGINT (control-C) or SIGTERM (kill).

void VuoEventLoop_switchToAppMode ( void  )

Interrupts VuoEventLoop_processEvent if it's currently blocking, so that it can process NSEvents next time it's invoked.