Fcitx
Public Member Functions | List of all members
fcitx::EventLoopSDEvent Class Reference
Inheritance diagram for fcitx::EventLoopSDEvent:
Inheritance graph
[legend]
Collaboration diagram for fcitx::EventLoopSDEvent:
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...
 
std::unique_ptr< EventSourceIOaddIOEvent (int fd, IOEventFlags flags, IOCallback callback) override
 
std::unique_ptr< EventSourceTimeaddTimeEvent (clockid_t clock, uint64_t usec, uint64_t accuracy, TimeCallback callback) override
 
std::unique_ptr< EventSourceaddExitEvent (EventCallback callback) override
 
std::unique_ptr< EventSourceaddDeferEvent (EventCallback callback) override
 
std::unique_ptr< EventSourceaddPostEvent (EventCallback callback) override
 
std::unique_ptr< EventSourceAsyncaddAsyncEvent (EventCallback callback) override
 

Detailed Description

Definition at line 62 of file event_sdevent.cpp.

Member Function Documentation

◆ exec()

bool fcitx::EventLoopSDEvent::exec ( )
overridevirtual

Execute event loop.

Returns
true if event loop is exited successfully.

Implements fcitx::EventLoopInterface.

Definition at line 256 of file event_sdevent.cpp.

◆ exit()

void fcitx::EventLoopSDEvent::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 261 of file event_sdevent.cpp.

◆ implementation()

const char * fcitx::EventLoopSDEvent::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 252 of file event_sdevent.cpp.

◆ nativeHandle()

void * fcitx::EventLoopSDEvent::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 254 of file event_sdevent.cpp.


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