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 | NS_RETURNS_INNER_POINTER |
Disable NS_RETURNS_INNER_POINTER (new in Mac OS 10.10's system headers), since Clang 3.2 doesn't support it. More... | |
#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_VuoScreen > | VuoScreen_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... | |
#define NS_RETURNS_INNER_POINTER |
Disable NS_RETURNS_INNER_POINTER (new in Mac OS 10.10's system headers), since Clang 3.2 doesn't support it.
https://b33p.net/kosada/node/9140
Definition at line 21 of file VuoScreenCommon.mm.
#define VuoScreen_reconfigurationCallback_showFlag | ( | a | ) | if (flags & a) VUserLog(" %s", #a); |
If the flag is set, logs it.
Definition at line 274 of file VuoScreenCommon.mm.
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.
Definition at line 368 of file VuoScreenCommon.mm.
void VuoScreen_disuse | ( | void | ) |
Indicates that the caller no longer needs notifications about screens.
This function may be called from any thread.
Definition at line 348 of file VuoScreenCommon.mm.
VuoScreen VuoScreen_getActive | ( | void | ) |
Returns the screen with the window that has keyboard focus.
Definition at line 230 of file VuoScreenCommon.mm.
VuoList_VuoScreen VuoScreen_getList | ( | void | ) |
Returns a list of the currently-active screens.
Definition at line 204 of file VuoScreenCommon.mm.
|
static |
Returns a descriptive string identifying the device.
E.g., "Color LCD" or "LA2405".
Definition at line 53 of file VuoScreenCommon.mm.
void* VuoScreen_getNSScreen | ( | VuoScreen | screen | ) |
Returns a platform screen (NSScreen
) matching screen
.
Definition at line 146 of file VuoScreenCommon.mm.
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 244 of file VuoScreenCommon.mm.
VuoScreen VuoScreen_getSecondary | ( | void | ) |
Returns a secondary (non-primary) screen if present, or a null screen otherwise.
Definition at line 254 of file VuoScreenCommon.mm.
VuoScreen VuoScreen_makeFromCGDirectDisplay | ( | CGDirectDisplayID | display | ) |
Fills in a VuoScreen structure describing an CGDirectDisplayID.
Definition at line 170 of file VuoScreenCommon.mm.
VuoScreen VuoScreen_makeFromNSScreen | ( | void * | vscreen | ) |
Fills in a VuoScreen structure describing an NSScreen.
Definition at line 195 of file VuoScreenCommon.mm.
void VuoScreen_reconfigurationCallback | ( | CGDirectDisplayID | display, |
CGDisplayChangeSummaryFlags | flags, | ||
void * | userInfo | ||
) |
Invoked by macOS Quartz Display Services.
Definition at line 280 of file VuoScreenCommon.mm.
void VuoScreen_removeDevicesChangedTriggers | ( | VuoOutputTrigger(screens, VuoList_VuoScreen) | ) |
Removes a trigger callback previously added by VuoScreen_addDevicesChangedTriggers.
This function may be called from any thread.
Definition at line 380 of file VuoScreenCommon.mm.
void VuoScreen_use | ( | void | ) |
Indicates that the caller needs to get notifications about screens.
This function may be called from any thread.
Definition at line 331 of file VuoScreenCommon.mm.
|
static |
Trigger functions to call when the list of screens changes.
Definition at line 40 of file VuoScreenCommon.mm.
unsigned int VuoScreen_useCount = 0 |
Process-wide count of callers (typically node instances) interested in notifications about screens.
Definition at line 41 of file VuoScreenCommon.mm.