… | |
… | |
403 | evapi.child_start = ev_child_start; |
403 | evapi.child_start = ev_child_start; |
404 | evapi.child_stop = ev_child_stop; |
404 | evapi.child_stop = ev_child_stop; |
405 | evapi.stat_start = ev_stat_start; |
405 | evapi.stat_start = ev_stat_start; |
406 | evapi.stat_stop = ev_stat_stop; |
406 | evapi.stat_stop = ev_stat_stop; |
407 | evapi.stat_stat = ev_stat_stat; |
407 | evapi.stat_stat = ev_stat_stat; |
|
|
408 | evapi.clear_pending = ev_clear_pending; |
|
|
409 | evapi.invoke = ev_invoke; |
408 | |
410 | |
409 | sv_setiv (sv, (IV)&evapi); |
411 | sv_setiv (sv, (IV)&evapi); |
410 | SvREADONLY_on (sv); |
412 | SvREADONLY_on (sv); |
411 | } |
413 | } |
412 | #ifndef _WIN32 |
414 | #ifndef _WIN32 |
… | |
… | |
426 | |
428 | |
427 | void ev_loop (int flags = 0) |
429 | void ev_loop (int flags = 0) |
428 | |
430 | |
429 | void ev_unloop (int how = 1) |
431 | void ev_unloop (int how = 1) |
430 | |
432 | |
|
|
433 | void ev_feed_fd_event (int fd, int revents = EV_NONE) |
|
|
434 | |
|
|
435 | void ev_feed_signal_event (SV *signal) |
|
|
436 | CODE: |
|
|
437 | { |
|
|
438 | Signal signum = sv_signum (signal); |
|
|
439 | CHECK_SIG (signal, signum); |
|
|
440 | |
|
|
441 | ev_feed_signal_event (EV_DEFAULT_ signum); |
|
|
442 | } |
|
|
443 | |
431 | ev_io *io (SV *fh, int events, SV *cb) |
444 | ev_io *io (SV *fh, int events, SV *cb) |
432 | ALIAS: |
445 | ALIAS: |
433 | io_ns = 1 |
446 | io_ns = 1 |
434 | CODE: |
447 | CODE: |
435 | { |
448 | { |
… | |
… | |
554 | |
567 | |
555 | int ev_is_active (ev_watcher *w) |
568 | int ev_is_active (ev_watcher *w) |
556 | |
569 | |
557 | int ev_is_pending (ev_watcher *w) |
570 | int ev_is_pending (ev_watcher *w) |
558 | |
571 | |
|
|
572 | void ev_invoke (ev_watcher *w, int revents = EV_NONE) |
|
|
573 | |
|
|
574 | int ev_clear_pending (ev_watcher *w) |
|
|
575 | |
|
|
576 | void ev_feed_event (ev_watcher *w, int revents = EV_NONE) |
|
|
577 | |
559 | int keepalive (ev_watcher *w, int new_value = 0) |
578 | int keepalive (ev_watcher *w, int new_value = 0) |
560 | CODE: |
579 | CODE: |
561 | { |
580 | { |
562 | RETVAL = w->flags & WFLAG_KEEPALIVE; |
581 | RETVAL = w->flags & WFLAG_KEEPALIVE; |
563 | new_value = new_value ? WFLAG_KEEPALIVE : 0; |
582 | new_value = new_value ? WFLAG_KEEPALIVE : 0; |
… | |
… | |
594 | w->data = newSVsv (new_data); |
613 | w->data = newSVsv (new_data); |
595 | } |
614 | } |
596 | } |
615 | } |
597 | OUTPUT: |
616 | OUTPUT: |
598 | RETVAL |
617 | RETVAL |
599 | |
|
|
600 | void trigger (ev_watcher *w, int revents = EV_NONE) |
|
|
601 | CODE: |
|
|
602 | w->cb (w, revents); |
|
|
603 | |
618 | |
604 | int priority (ev_watcher *w, int new_priority = 0) |
619 | int priority (ev_watcher *w, int new_priority = 0) |
605 | CODE: |
620 | CODE: |
606 | { |
621 | { |
607 | RETVAL = w->priority; |
622 | RETVAL = w->priority; |