Fcitx
Public Member Functions | Public Attributes | List of all members
fcitx::LibUVSourceAsync Struct Referencefinal
Inheritance diagram for fcitx::LibUVSourceAsync:
Inheritance graph
[legend]
Collaboration diagram for fcitx::LibUVSourceAsync:
Collaboration graph
[legend]

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...
 
- Public Member Functions inherited from fcitx::LibUVSource< EventSourceAsync, uv_async_t >
 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
 
- Public Member Functions inherited from fcitx::LibUVSourceBase
 LibUVSourceBase (const std::shared_ptr< UVLoop > &loop)
 
void cleanup ()
 
void resetEvent ()
 
- Public Member Functions inherited from fcitx::TrackableObject< LibUVSourceAsync >
 TrackableObject (const TrackableObject &)=delete
 
TrackableObjectReference< LibUVSourceAsyncwatch ()
 
TrackableObjectReference< const LibUVSourceAsyncwatch () const
 

Public Attributes

std::shared_ptr< EventCallback > callback_
 

Additional Inherited Members

- Protected Member Functions inherited from fcitx::LibUVSourceBase
void setState (LibUVSourceEnableState state)
 
- Protected Attributes inherited from fcitx::LibUVSourceBase
std::weak_ptr< UVLooploop_
 
uv_handle_t * handle_ = nullptr
 
LibUVSourceEnableState state_ = LibUVSourceEnableState::Disabled
 

Detailed Description

Definition at line 222 of file event_libuv.h.

Member Function Documentation

◆ send()

void fcitx::LibUVSourceAsync::send ( )
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.


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