Files
rtorrent/src/input/input_event.h
T
2026-06-01 20:11:02 +09:00

35 lines
771 B
C++

#ifndef RTORRENT_INPUT_INPUT_EVENT_H
#define RTORRENT_INPUT_INPUT_EVENT_H
#include <functional>
#include <torrent/event.h>
#include <torrent/system/poll.h>
namespace input {
class InputEvent : public torrent::Event {
public:
typedef std::function<void (int)> slot_int;
InputEvent(int fd) { m_fileDesc = fd; }
const char* type_name() const override { return "input"; }
void insert(torrent::system::Poll* p);
void remove(torrent::system::Poll* p);
void event_read() override;
void event_write() override;
void event_error() override;
void slot_pressed(slot_int s) { m_slotPressed = s; }
private:
slot_int m_slotPressed;
};
}
#endif