uvw  2.11.0
idle.h
1 #ifndef UVW_IDLE_INCLUDE_H
2 #define UVW_IDLE_INCLUDE_H
3 
4 
5 #include <uv.h>
6 #include "handle.hpp"
7 #include "loop.h"
8 
9 
10 namespace uvw {
11 
12 
18 struct IdleEvent {};
19 
20 
37 class IdleHandle final: public Handle<IdleHandle, uv_idle_t> {
38  static void startCallback(uv_idle_t *handle);
39 
40 public:
41  using Handle::Handle;
42 
47  bool init();
48 
55  void start();
56 
60  void stop();
61 };
62 
63 
64 }
65 
66 
67 #ifndef UVW_AS_LIB
68 #include "idle.cpp"
69 #endif
70 
71 #endif // UVW_IDLE_INCLUDE_H
Handle base class.
Definition: handle.hpp:30
The IdleHandle handle.
Definition: idle.h:37
bool init()
Initializes the handle.
void stop()
Stops the handle.
void start()
Starts the handle.
uvw default namespace.
Definition: async.h:10
IdleEvent event.
Definition: idle.h:18