… | |
… | |
355 | |
355 | |
356 | private: |
356 | private: |
357 | void cancel () { GEventAPI->cancel ((pe_watcher *)pe); } // private |
357 | void cancel () { GEventAPI->cancel ((pe_watcher *)pe); } // private |
358 | }; |
358 | }; |
359 | |
359 | |
|
|
360 | struct iw : watcher<pe_idle>, callback<void (iw &)> |
|
|
361 | { |
|
|
362 | template<class O, class M> |
|
|
363 | iw (O object, M method) |
|
|
364 | : callback<void (iw &)> (object, method) |
|
|
365 | { |
|
|
366 | alloc (); |
|
|
367 | } |
|
|
368 | |
|
|
369 | private: |
|
|
370 | void alloc (); |
|
|
371 | }; |
|
|
372 | |
360 | struct iow : watcher<pe_io>, callback<void (iow &, int)> |
373 | struct iow : watcher<pe_io>, callback<void (iow &, int)> |
361 | { |
374 | { |
362 | template<class O, class M> |
375 | template<class O, class M> |
363 | iow (O object, M method) |
376 | iow (O object, M method) |
364 | : callback<void (iow &, int)> (object, method) |
377 | : callback<void (iow &, int)> (object, method) |
365 | { |
378 | { |
366 | alloc (); |
379 | alloc (); |
367 | } |
380 | } |
368 | |
381 | |
369 | iow &fd (int fd); |
382 | void fd (int fd); |
370 | int poll (); |
383 | int poll (); |
371 | iow &poll (int events); |
384 | void poll (int events); |
372 | |
385 | |
373 | private: |
386 | private: |
374 | void alloc (); |
387 | void alloc (); |
375 | }; |
388 | }; |
376 | |
389 | |