LMMS
Loading...
Searching...
No Matches
juce::InternalRunLoop Struct Reference

Public Member Functions

 InternalRunLoop ()=default
void registerFdCallback (int fd, std::function< void()> &&cb, short eventMask)
void unregisterFdCallback (int fd)
bool dispatchPendingEvents ()
void dispatchEvent (int fd) const
bool sleepUntilNextEvent (int timeoutMs)
std::vector< intgetRegisteredFds ()
void addListener (LinuxEventLoopInternal::Listener &listener)
void removeListener (LinuxEventLoopInternal::Listener &listener)

Private Types

using SharedCallback = std::shared_ptr<std::function<void()>>

Private Member Functions

void getFunctionsToCallThisTime (std::vector< SharedCallback > &functions)
std::vector< pollfd >::iterator getPollfd (int fd)
bool pfdsAreSorted () const

Private Attributes

CriticalSection lock
std::map< int, SharedCallbackcallbacks
std::vector< SharedCallbackcallbackStorage
std::vector< pollfd > pfds
ListenerList< LinuxEventLoopInternal::Listenerlisteners

Member Typedef Documentation

◆ SharedCallback

using juce::InternalRunLoop::SharedCallback = std::shared_ptr<std::function<void()>>
private

Constructor & Destructor Documentation

◆ InternalRunLoop()

juce::InternalRunLoop::InternalRunLoop ( )
default

Member Function Documentation

◆ addListener()

void juce::InternalRunLoop::addListener ( LinuxEventLoopInternal::Listener & listener)
inline

◆ dispatchEvent()

void juce::InternalRunLoop::dispatchEvent ( int fd) const
inline

◆ dispatchPendingEvents()

bool juce::InternalRunLoop::dispatchPendingEvents ( )
inline

◆ getFunctionsToCallThisTime()

void juce::InternalRunLoop::getFunctionsToCallThisTime ( std::vector< SharedCallback > & functions)
inlineprivate

◆ getPollfd()

std::vector< pollfd >::iterator juce::InternalRunLoop::getPollfd ( int fd)
inlineprivate

◆ getRegisteredFds()

std::vector< int > juce::InternalRunLoop::getRegisteredFds ( )
inline

◆ pfdsAreSorted()

bool juce::InternalRunLoop::pfdsAreSorted ( ) const
inlineprivate

◆ registerFdCallback()

void juce::InternalRunLoop::registerFdCallback ( int fd,
std::function< void()> && cb,
short eventMask )
inline

◆ removeListener()

void juce::InternalRunLoop::removeListener ( LinuxEventLoopInternal::Listener & listener)
inline

◆ sleepUntilNextEvent()

bool juce::InternalRunLoop::sleepUntilNextEvent ( int timeoutMs)
inline

◆ unregisterFdCallback()

void juce::InternalRunLoop::unregisterFdCallback ( int fd)
inline

Member Data Documentation

◆ callbacks

std::map<int, SharedCallback> juce::InternalRunLoop::callbacks
private

◆ callbackStorage

std::vector<SharedCallback> juce::InternalRunLoop::callbackStorage
private

◆ listeners

ListenerList<LinuxEventLoopInternal::Listener> juce::InternalRunLoop::listeners
private

◆ lock

CriticalSection juce::InternalRunLoop::lock
private

◆ pfds

std::vector<pollfd> juce::InternalRunLoop::pfds
private

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