JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::ScopedDisplayLink Class Reference

#include <juce_PerScreenDisplayLinks_mac.h>

Collaboration diagram for juce::ScopedDisplayLink:

Classes

struct  DisplayLinkDestructor
 

Public Member Functions

 ScopedDisplayLink (NSScreen *screenIn, std::function< void(double)> onCallbackIn)
 
 ~ScopedDisplayLink () noexcept
 
CGDirectDisplayID getDisplayId () const
 
double getNominalVideoRefreshPeriodS () const
 

Static Public Member Functions

static CGDirectDisplayID getDisplayIdForScreen (NSScreen *screen)
 

Private Attributes

CGDirectDisplayID displayId
 
std::unique_ptr< std::remove_pointer_t< CVDisplayLinkRef >, DisplayLinkDestructorlink
 
std::function< void(double)> onCallback
 

Constructor & Destructor Documentation

◆ ScopedDisplayLink()

juce::ScopedDisplayLink::ScopedDisplayLink ( NSScreen *  screenIn,
std::function< void(double)>  onCallbackIn 
)
inline

References jassert.

◆ ~ScopedDisplayLink()

juce::ScopedDisplayLink::~ScopedDisplayLink ( )
inlinenoexcept

References link.

Member Function Documentation

◆ getDisplayId()

CGDirectDisplayID juce::ScopedDisplayLink::getDisplayId ( ) const
inline

References displayId.

◆ getDisplayIdForScreen()

static CGDirectDisplayID juce::ScopedDisplayLink::getDisplayIdForScreen ( NSScreen *  screen)
inlinestatic

◆ getNominalVideoRefreshPeriodS()

double juce::ScopedDisplayLink::getNominalVideoRefreshPeriodS ( ) const
inline

References link.

Member Data Documentation

◆ displayId

CGDirectDisplayID juce::ScopedDisplayLink::displayId
private

Referenced by getDisplayId().

◆ link

std::unique_ptr<std::remove_pointer_t<CVDisplayLinkRef>, DisplayLinkDestructor> juce::ScopedDisplayLink::link
private

◆ onCallback

std::function<void (double)> juce::ScopedDisplayLink::onCallback
private

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