2 This file is part of libmspframework
3 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
4 Distributed under the LGPL
6 #ifndef MSP_FRAMEWORK_EVENT_H_
7 #define MSP_FRAMEWORK_EVENT_H_
9 #include <sigc++/sigc++.h>
17 Events can be used in multi-threaded applictions to trigger actions in the main
26 sigc::signal<void> signal_triggered;
28 Event(EventManager &m, unsigned i): mgr(m), id(i) { }
29 unsigned get_id() const { return id; }
36 EventManager(Application &);
37 Event &create_event();
39 class Pipe: public Pollable
43 int write(char *, unsigned);
44 int read(char *, unsigned);
48 int get_fd() { return fd[0]; }
54 std::list<Event> events;
56 void data_available(short);