Fcitx
Public Member Functions | List of all members
fcitx::EventLoopLibUV Class Reference
Inheritance diagram for fcitx::EventLoopLibUV:
Inheritance graph
[legend]
Collaboration diagram for fcitx::EventLoopLibUV:
Collaboration graph
[legend]

Public Member Functions

bool exec () override
 Execute event loop. More...
 
void exit () override
 Quit event loop. More...
 
const char * implementation () const override
 Return a static implementation name of event loop. More...
 
void * nativeHandle () override
 Return the internal native handle to the event loop. More...
 
FCITX_NODISCARD std::unique_ptr< EventSourceIOaddIOEvent (int fd, IOEventFlags flags, IOCallback callback) override
 
FCITX_NODISCARD std::unique_ptr< EventSourceTimeaddTimeEvent (clockid_t clock, uint64_t usec, uint64_t accuracy, TimeCallback callback) override
 
FCITX_NODISCARD std::unique_ptr< EventSourceaddExitEvent (EventCallback callback) override
 
FCITX_NODISCARD std::unique_ptr< EventSourceaddDeferEvent (EventCallback callback) override
 
FCITX_NODISCARD std::unique_ptr< EventSourceaddPostEvent (EventCallback callback) override
 
FCITX_NODISCARD std::unique_ptr< EventSourceAsyncaddAsyncEvent (EventCallback callback) override
 

Detailed Description

Definition at line 238 of file event_libuv.h.

Member Function Documentation

◆ exec()

bool fcitx::EventLoopLibUV::exec ( )
overridevirtual

Execute event loop.

Returns
true if event loop is exited successfully.

Implements fcitx::EventLoopInterface.

Definition at line 174 of file event_libuv.cpp.

◆ exit()

void fcitx::EventLoopLibUV::exit ( )
overridevirtual

Quit event loop.

Request event loop to quit, pending event may still be executed before quit. Also execute exit event right before exiting.

See also
EventLoopInterface::addExitEvent

Implements fcitx::EventLoopInterface.

Definition at line 199 of file event_libuv.cpp.

◆ implementation()

const char * fcitx::EventLoopLibUV::implementation ( ) const
overridevirtual

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.

Returns
Name of event loop implementation

Implements fcitx::EventLoopInterface.

Definition at line 168 of file event_libuv.cpp.

◆ nativeHandle()

void * fcitx::EventLoopLibUV::nativeHandle ( )
overridevirtual

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*.

Returns
internal implementation
See also
implementation

Implements fcitx::EventLoopInterface.

Definition at line 170 of file event_libuv.cpp.


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