Vuo  2.3.2
Classes | Macros | Functions | Variables
VuoScreenCommon.mm File Reference

Description

VuoScreenCommon implementation.

Definition in file VuoScreenCommon.mm.

Go to the source code of this file.

Classes

category  NSScreen(VuoAdditions)
 Some convenience methods for fetching information about an NSScreen. More...
 

Macros

#define VuoScreen_reconfigurationCallback_showFlag(a)    if (flags & a) VUserLog(" %s", #a);
 If the flag is set, logs it. More...
 

Functions

static VuoText VuoScreen_getName (CGDirectDisplayID displayID)
 Returns a descriptive string identifying the device. More...
 
void * VuoScreen_getNSScreen (VuoScreen screen)
 Returns a platform screen (NSScreen) matching screen. More...
 
VuoScreen VuoScreen_makeFromCGDirectDisplay (CGDirectDisplayID display)
 Fills in a VuoScreen structure describing an CGDirectDisplayID. More...
 
VuoScreen VuoScreen_makeFromNSScreen (void *vscreen)
 Fills in a VuoScreen structure describing an NSScreen. More...
 
VuoList_VuoScreen VuoScreen_getList (void)
 Returns a list of the currently-active screens. More...
 
VuoScreen VuoScreen_getActive (void)
 Returns the screen with the window that has keyboard focus. More...
 
VuoScreen VuoScreen_getPrimary (void)
 Returns the primary screen. More...
 
VuoScreen VuoScreen_getSecondary (void)
 Returns a secondary (non-primary) screen if present, or a null screen otherwise. More...
 
void VuoScreen_reconfigurationCallback (CGDirectDisplayID display, CGDisplayChangeSummaryFlags flags, void *userInfo)
 Invoked by macOS Quartz Display Services. More...
 
void VuoScreen_use (void)
 Indicates that the caller needs to get notifications about screens. More...
 
void VuoScreen_disuse (void)
 Indicates that the caller no longer needs notifications about screens. More...
 
void VuoScreen_addDevicesChangedTriggers (VuoOutputTrigger(screens, VuoList_VuoScreen))
 Adds a trigger callback, to be invoked whenever the list of known screens changes. More...
 
void VuoScreen_removeDevicesChangedTriggers (VuoOutputTrigger(screens, VuoList_VuoScreen))
 Removes a trigger callback previously added by VuoScreen_addDevicesChangedTriggers. More...
 

Variables

static VuoTriggerSet< VuoList_VuoScreenVuoScreen_callbacks
 Trigger functions to call when the list of screens changes. More...
 
unsigned int VuoScreen_useCount = 0
 Process-wide count of callers (typically node instances) interested in notifications about screens. More...
 

Macro Definition Documentation

◆ VuoScreen_reconfigurationCallback_showFlag

#define VuoScreen_reconfigurationCallback_showFlag (   a)     if (flags & a) VUserLog(" %s", #a);

If the flag is set, logs it.

Definition at line 270 of file VuoScreenCommon.mm.

Function Documentation

◆ VuoScreen_addDevicesChangedTriggers()

void VuoScreen_addDevicesChangedTriggers ( VuoOutputTrigger(screens, VuoList_VuoScreen )

Adds a trigger callback, to be invoked whenever the list of known screens changes.

Call VuoScreen_use() before calling this.

This function may be called from any thread.

Changed in Vuo 2.0.0:
New.

Definition at line 364 of file VuoScreenCommon.mm.

◆ VuoScreen_disuse()

void VuoScreen_disuse ( void  )

Indicates that the caller no longer needs notifications about screens.

This function may be called from any thread.

Changed in Vuo 2.0.0:
New.

Definition at line 344 of file VuoScreenCommon.mm.

◆ VuoScreen_getActive()

VuoScreen VuoScreen_getActive ( void  )

Returns the screen with the window that has keyboard focus.

Definition at line 226 of file VuoScreenCommon.mm.

◆ VuoScreen_getList()

VuoList_VuoScreen VuoScreen_getList ( void  )

Returns a list of the currently-active screens.

Definition at line 200 of file VuoScreenCommon.mm.

◆ VuoScreen_getName()

static VuoText VuoScreen_getName ( CGDirectDisplayID  displayID)
static

Returns a descriptive string identifying the device.

E.g., "Color LCD" or "LA2405".

Definition at line 49 of file VuoScreenCommon.mm.

◆ VuoScreen_getNSScreen()

void* VuoScreen_getNSScreen ( VuoScreen  screen)

Returns a platform screen (NSScreen) matching screen.

Definition at line 142 of file VuoScreenCommon.mm.

◆ VuoScreen_getPrimary()

VuoScreen VuoScreen_getPrimary ( void  )

Returns the primary screen.

(In System Preferences > Displays > Arrangement, the primary screen is the one with the menu bar.)

Definition at line 240 of file VuoScreenCommon.mm.

◆ VuoScreen_getSecondary()

VuoScreen VuoScreen_getSecondary ( void  )

Returns a secondary (non-primary) screen if present, or a null screen otherwise.

Changed in Vuo 2.0.0:
Now returns a null screen if there is no secondary screen (instead of returning the primary screen.

Definition at line 250 of file VuoScreenCommon.mm.

◆ VuoScreen_makeFromCGDirectDisplay()

VuoScreen VuoScreen_makeFromCGDirectDisplay ( CGDirectDisplayID  display)

Fills in a VuoScreen structure describing an CGDirectDisplayID.

Definition at line 166 of file VuoScreenCommon.mm.

◆ VuoScreen_makeFromNSScreen()

VuoScreen VuoScreen_makeFromNSScreen ( void *  vscreen)

Fills in a VuoScreen structure describing an NSScreen.

Definition at line 191 of file VuoScreenCommon.mm.

◆ VuoScreen_reconfigurationCallback()

void VuoScreen_reconfigurationCallback ( CGDirectDisplayID  display,
CGDisplayChangeSummaryFlags  flags,
void *  userInfo 
)

Invoked by macOS Quartz Display Services.

Definition at line 276 of file VuoScreenCommon.mm.

◆ VuoScreen_removeDevicesChangedTriggers()

void VuoScreen_removeDevicesChangedTriggers ( VuoOutputTrigger(screens, VuoList_VuoScreen )

Removes a trigger callback previously added by VuoScreen_addDevicesChangedTriggers.

This function may be called from any thread.

Changed in Vuo 2.0.0:
New.

Definition at line 376 of file VuoScreenCommon.mm.

◆ VuoScreen_use()

void VuoScreen_use ( void  )

Indicates that the caller needs to get notifications about screens.

This function may be called from any thread.

Changed in Vuo 2.0.0:
New.

Definition at line 327 of file VuoScreenCommon.mm.

Variable Documentation

◆ VuoScreen_callbacks

VuoTriggerSet<VuoList_VuoScreen> VuoScreen_callbacks
static

Trigger functions to call when the list of screens changes.

Definition at line 36 of file VuoScreenCommon.mm.

◆ VuoScreen_useCount

unsigned int VuoScreen_useCount = 0

Process-wide count of callers (typically node instances) interested in notifications about screens.

Definition at line 37 of file VuoScreenCommon.mm.