18 #ifndef SHEVEK_CLOSURE_HH
19 #define SHEVEK_CLOSURE_HH
39 enum state_t { EMPTY, BLOCKING, RUNNING } state;
40 sigc::slot0 <void> callback,
function;
44 void do_write (
int *fds);
45 void do_read (
int *fds);
46 static void *start_wrapper (
void *me);
52 static Glib::RefPtr <closure>
create ()
53 {
return Glib::RefPtr <closure> (
new closure ()); }
58 bool empty ()
const {
return state == EMPTY; }
64 void set_function (sigc::slot0 <void> func,
bool run =
true,
65 sigc::slot0 <void> cb = sigc::slot0 <void> ());