- int ev_version_major();
- int ev_version_minor();
-
- uint ev_supported_backends();
- uint ev_recommended_backends();
- uint ev_embeddable_backends();
-
- ev_tstamp ev_time();
- void ev_sleep(ev_tstamp delay); // sleep for a while
-
- // Sets the allocation function to use, works like realloc.
- // It is used to allocate and free memory.
- // If it returns zero when memory needs to be allocated, the library
- // might abort
- // or take some potentially destructive action.
- // The default is your system realloc function.
- void ev_set_allocator(void* function(void* ptr, int size));
-
- // set the callback function to call on a
- // retryable syscall error
- // (such as failed select, poll, epoll_wait)
- void ev_set_syserr_cb(void* function(char* msg));
-
- extern ev_loop_t* ev_default_loop_ptr;
-
- ev_loop_t* ev_default_loop_init(uint flags);
-
- // create and destroy alternative loops that don't handle signals
- ev_loop_t* ev_loop_new(uint flags);
- void ev_loop_destroy(ev_loop_t*);
- void ev_loop_fork(ev_loop_t*);
-
- ev_tstamp ev_now(ev_loop_t*);
- void ev_default_destroy();
- void ev_default_fork();
- uint ev_backend(ev_loop_t*);
- uint ev_loop_count(ev_loop_t*);
- void ev_loop(ev_loop_t*, int flags);
- void ev_unloop(ev_loop_t*, how);
- void ev_set_io_collect_interval(ev_loop_t*, ev_tstamp interval);
- void ev_set_timeout_collect_interval(ev_loop_t*, ev_tstamp interval);
- void ev_ref(ev_loop_t*);
- void ev_unref(ev_loop_t*);
- void ev_once(ev_loop_t*, int fd, int events, ev_tstamp timeout,
- void function(int revents, void* arg), void* arg);
-
- void ev_feed_event(ev_loop_t*, void *w, int revents);
- void ev_feed_fd_event(ev_loop_t*, int fd, int revents);
- void ev_feed_signal_event (ev_loop_t*, int signum);
- void ev_invoke(ev_loop_t*, void *w, int revents);
- int ev_clear_pending(ev_loop_t*, void *w);
-
- void ev_io_start(ev_loop_t*, ev_io *w);
- void ev_io_stop(ev_loop_t*, ev_io *w);
-
- void ev_timer_start(ev_loop_t*, ev_timer *w);
- void ev_timer_stop(ev_loop_t*, ev_timer *w);
- void ev_timer_again(ev_loop_t*, ev_timer *w);
-
- version (EV_PERIODIC_ENABLE)
- {
- void ev_periodic_start(ev_loop_t*, ev_periodic *w);
- void ev_periodic_stop(ev_loop_t*, ev_periodic *w);
- void ev_periodic_again(ev_loop_t*, ev_periodic *w);
- }