diff options
Diffstat (limited to 'src/cam/event_loop.h')
-rw-r--r-- | src/cam/event_loop.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/cam/event_loop.h b/src/cam/event_loop.h index 581c7cba..b1c6bd10 100644 --- a/src/cam/event_loop.h +++ b/src/cam/event_loop.h @@ -9,26 +9,27 @@ #include <atomic> -#include <libcamera/event_notifier.h> - -namespace libcamera { -class EventDispatcher; -} +struct event_base; class EventLoop { public: - EventLoop(libcamera::EventDispatcher *dispatcher); + EventLoop(); ~EventLoop(); + static EventLoop *instance(); + int exec(); void exit(int code = 0); private: - libcamera::EventDispatcher *dispatcher_; + static EventLoop *instance_; + struct event_base *event_; std::atomic<bool> exit_; int exitCode_; + + void interrupt(); }; #endif /* __CAM_EVENT_LOOP_H__ */ |