#include <RunLoop.h>
|
| RunLoop (::Display *display) |
|
virtual | ~RunLoop () |
|
Steinberg::tresult PLUGIN_API | registerEventHandler (Steinberg::Linux::IEventHandler *handler, Steinberg::Linux::FileDescriptor fd) override |
|
Steinberg::tresult PLUGIN_API | unregisterEventHandler (Steinberg::Linux::IEventHandler *handler) override |
|
Steinberg::tresult PLUGIN_API | registerTimer (Steinberg::Linux::ITimerHandler *handler, Steinberg::Linux::TimerInterval milliseconds) override |
|
Steinberg::tresult PLUGIN_API | unregisterTimer (Steinberg::Linux::ITimerHandler *handler) override |
|
|
static gboolean | OnEvent (GIOChannel *source, GIOCondition condition, gpointer data) |
|
static gboolean | OnTimer (gpointer data) |
|
Definition at line 29 of file RunLoop.h.
◆ RunLoop()
RunLoop::RunLoop |
( |
::Display * |
display | ) |
|
Definition at line 60 of file RunLoop.cpp.
62{
63 FUNKNOWN_CTOR;
64}
◆ ~RunLoop()
Definition at line 66 of file RunLoop.cpp.
67{
68 FUNKNOWN_DTOR;
69}
◆ OnEvent()
gboolean RunLoop::OnEvent |
( |
GIOChannel * |
source, |
|
|
GIOCondition |
condition, |
|
|
gpointer |
data |
|
) |
| |
|
staticprivate |
◆ OnTimer()
gboolean RunLoop::OnTimer |
( |
gpointer |
data | ) |
|
|
staticprivate |
◆ registerEventHandler()
Steinberg::tresult RunLoop::registerEventHandler |
( |
Steinberg::Linux::IEventHandler * |
handler, |
|
|
Steinberg::Linux::FileDescriptor |
fd |
|
) |
| |
|
override |
Definition at line 71 of file RunLoop.cpp.
74{
76
78 return kInvalidArgument;
79
80 if(XConnectionNumber(
mDisplay) == fd)
81 return kResultOk;
82
83 auto eventHandler = std::make_unique<EventHandler>();
84 eventHandler->handler =
handler;
85
86 if(auto channel = g_io_channel_unix_new(fd))
87 {
88 eventHandler->channel = channel;
89 eventHandler->id = g_io_add_watch(
90 channel,
91 (GIOCondition)(G_IO_IN | G_IO_OUT | G_IO_ERR | G_IO_HUP),
94 );
96 return kResultTrue;
97 }
98 return kResultFalse;
99}
std::vector< std::unique_ptr< EventHandler > > mEventHandlers
static gboolean OnEvent(GIOChannel *source, GIOCondition condition, gpointer data)
References audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, mDisplay, mEventHandlers, and OnEvent().
◆ registerTimer()
Steinberg::tresult RunLoop::registerTimer |
( |
Steinberg::Linux::ITimerHandler * |
handler, |
|
|
Steinberg::Linux::TimerInterval |
milliseconds |
|
) |
| |
|
override |
◆ unregisterEventHandler()
Steinberg::tresult RunLoop::unregisterEventHandler |
( |
Steinberg::Linux::IEventHandler * |
handler | ) |
|
|
override |
◆ unregisterTimer()
Steinberg::tresult RunLoop::unregisterTimer |
( |
Steinberg::Linux::ITimerHandler * |
handler | ) |
|
|
override |
◆ mDisplay
Display* internal::x11::RunLoop::mDisplay { nullptr } |
|
private |
◆ mEventHandlers
std::vector<std::unique_ptr<EventHandler> > internal::x11::RunLoop::mEventHandlers |
|
private |
◆ mTimerHandlers
std::vector<std::unique_ptr<TimerHandler> > internal::x11::RunLoop::mTimerHandlers |
|
private |
The documentation for this class was generated from the following files: