uvw  2.12.1
idle.h
1 #ifndef UVW_IDLE_INCLUDE_H
2 #define UVW_IDLE_INCLUDE_H
3 
4 #include <uv.h>
5 #include "handle.hpp"
6 #include "loop.h"
7 
8 namespace uvw {
9 
15 struct IdleEvent {};
16 
33 class IdleHandle final: public Handle<IdleHandle, uv_idle_t> {
34  static void startCallback(uv_idle_t *handle);
35 
36 public:
37  using Handle::Handle;
38 
43  bool init();
44 
51  void start();
52 
56  void stop();
57 };
58 
59 } // namespace uvw
60 
61 #ifndef UVW_AS_LIB
62 # include "idle.cpp"
63 #endif
64 
65 #endif // UVW_IDLE_INCLUDE_H
Handle base class.
Definition: handle.hpp:26
The IdleHandle handle.
Definition: idle.h:33
bool init()
Initializes the handle.
void stop()
Stops the handle.
void start()
Starts the handle.
uvw default namespace.
Definition: async.h:8
IdleEvent event.
Definition: idle.h:15