Fcitx
|
Public Member Functions | |
LibUVSourceAsync (EventCallback callback, std::shared_ptr< UVLoop > loop) | |
bool | setup (uv_loop_t *loop, uv_async_t *async) override |
void | send () override |
Trigger the event from other thread. More... | |
![]() | |
LibUVSource (std::shared_ptr< UVLoop > loop) | |
bool | isEnabled () const override |
void | setEnabled (bool enabled) override |
void | setOneShot () override |
bool | isOneShot () const override |
uv_async_t * | handle () |
void | init (uv_loop_t *loop) override |
![]() | |
LibUVSourceBase (const std::shared_ptr< UVLoop > &loop) | |
void | cleanup () |
void | resetEvent () |
![]() | |
TrackableObject (const TrackableObject &)=delete | |
TrackableObjectReference< LibUVSourceAsync > | watch () |
TrackableObjectReference< const LibUVSourceAsync > | watch () const |
Public Attributes | |
std::shared_ptr< EventCallback > | callback_ |
Additional Inherited Members | |
![]() | |
void | setState (LibUVSourceEnableState state) |
![]() | |
std::weak_ptr< UVLoop > | loop_ |
uv_handle_t * | handle_ = nullptr |
LibUVSourceEnableState | state_ = LibUVSourceEnableState::Disabled |
Definition at line 222 of file event_libuv.h.
|
overridevirtual |
Trigger the event from other thread.
The callback is guranteed to be called send() if it is enabled. Multiple call to send() may only trigger the callback once.
Implements fcitx::EventSourceAsync.
Definition at line 148 of file event_libuv.cpp.