GNotifier.cpp 332 B

123456789101112131415
  1. #include <LibGUI/GNotifier.h>
  2. #include <LibGUI/GEventLoop.h>
  3. GNotifier::GNotifier(int fd, unsigned event_mask)
  4. : m_fd(fd)
  5. , m_event_mask(event_mask)
  6. {
  7. GEventLoop::main().register_notifier(Badge<GNotifier>(), *this);
  8. }
  9. GNotifier::~GNotifier()
  10. {
  11. GEventLoop::main().unregister_notifier(Badge<GNotifier>(), *this);
  12. }