Fcitx
|
#include <fcitx-utils/eventloopinterface.h>
Public Member Functions | |
virtual bool | exec ()=0 |
Execute event loop. More... | |
virtual void | exit ()=0 |
Quit event loop. More... | |
virtual const char * | implementation () const =0 |
Return a static implementation name of event loop. More... | |
virtual void * | nativeHandle ()=0 |
Return the internal native handle to the event loop. More... | |
FCITX_NODISCARD virtual std::unique_ptr< EventSourceIO > | addIOEvent (int fd, IOEventFlags flags, IOCallback callback)=0 |
FCITX_NODISCARD virtual std::unique_ptr< EventSourceTime > | addTimeEvent (clockid_t clock, uint64_t usec, uint64_t accuracy, TimeCallback callback)=0 |
virtual FCITX_NODISCARD std::unique_ptr< EventSource > | addExitEvent (EventCallback callback)=0 |
virtual FCITX_NODISCARD std::unique_ptr< EventSource > | addDeferEvent (EventCallback callback)=0 |
virtual FCITX_NODISCARD std::unique_ptr< EventSource > | addPostEvent (EventCallback callback)=0 |
|
pure virtual |
Execute event loop.
Implemented in fcitx::EventLoopLibUV, and fcitx::EventLoopSDEvent.
|
pure virtual |
Quit event loop.
Request event loop to quit, pending event may still be executed before quit. Also execute exit event right before exiting.
Implemented in fcitx::EventLoopLibUV, and fcitx::EventLoopSDEvent.
|
pure virtual |
Return a static implementation name of event loop.
Fcitx right now supports sd-event and libuv as implementation. The library being used is decided at build time.
Implemented in fcitx::EventLoopLibUV, and fcitx::EventLoopSDEvent.
|
pure virtual |
Return the internal native handle to the event loop.
This can be useful if you want to use the underlying API against event loop.
For libuv, it will be uv_loop_t*. For sd-event, it will be sd_event*.
Implemented in fcitx::EventLoopLibUV, and fcitx::EventLoopSDEvent.