libev.pxd 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. cdef extern from "libev_vfd.h":
  2. #ifdef _WIN32
  3. #ifdef _WIN64
  4. ctypedef long long vfd_socket_t
  5. #else
  6. ctypedef long vfd_socket_t
  7. #endif
  8. #else
  9. ctypedef int vfd_socket_t
  10. #endif
  11. long vfd_get(int)
  12. int vfd_open(long) except -1
  13. void vfd_free(int)
  14. cdef extern from "libev.h":
  15. int EV_MINPRI
  16. int EV_MAXPRI
  17. int EV_VERSION_MAJOR
  18. int EV_VERSION_MINOR
  19. int EV_USE_FLOOR
  20. int EV_USE_CLOCK_SYSCALL
  21. int EV_USE_REALTIME
  22. int EV_USE_MONOTONIC
  23. int EV_USE_NANOSLEEP
  24. int EV_USE_SELECT
  25. int EV_USE_POLL
  26. int EV_USE_EPOLL
  27. int EV_USE_KQUEUE
  28. int EV_USE_PORT
  29. int EV_USE_INOTIFY
  30. int EV_USE_SIGNALFD
  31. int EV_USE_EVENTFD
  32. int EV_USE_4HEAP
  33. int EV_USE_IOCP
  34. int EV_SELECT_IS_WINSOCKET
  35. int EV_UNDEF
  36. int EV_NONE
  37. int EV_READ
  38. int EV_WRITE
  39. int EV__IOFDSET
  40. int EV_TIMER
  41. int EV_PERIODIC
  42. int EV_SIGNAL
  43. int EV_CHILD
  44. int EV_STAT
  45. int EV_IDLE
  46. int EV_PREPARE
  47. int EV_CHECK
  48. int EV_EMBED
  49. int EV_FORK
  50. int EV_CLEANUP
  51. int EV_ASYNC
  52. int EV_CUSTOM
  53. int EV_ERROR
  54. int EVFLAG_AUTO
  55. int EVFLAG_NOENV
  56. int EVFLAG_FORKCHECK
  57. int EVFLAG_NOINOTIFY
  58. int EVFLAG_SIGNALFD
  59. int EVFLAG_NOSIGMASK
  60. int EVBACKEND_SELECT
  61. int EVBACKEND_POLL
  62. int EVBACKEND_EPOLL
  63. int EVBACKEND_KQUEUE
  64. int EVBACKEND_DEVPOLL
  65. int EVBACKEND_PORT
  66. int EVBACKEND_IOCP
  67. int EVBACKEND_ALL
  68. int EVBACKEND_MASK
  69. int EVRUN_NOWAIT
  70. int EVRUN_ONCE
  71. int EVBREAK_CANCEL
  72. int EVBREAK_ONE
  73. int EVBREAK_ALL
  74. struct ev_loop:
  75. int activecnt
  76. int sig_pending
  77. int backend_fd
  78. int sigfd
  79. unsigned int origflags
  80. struct ev_io:
  81. int fd
  82. int events
  83. struct ev_timer:
  84. double at
  85. struct ev_signal:
  86. pass
  87. struct ev_idle:
  88. pass
  89. struct ev_prepare:
  90. pass
  91. struct ev_check:
  92. pass
  93. struct ev_fork:
  94. pass
  95. struct ev_async:
  96. pass
  97. struct ev_child:
  98. int pid
  99. int rpid
  100. int rstatus
  101. struct stat:
  102. int st_nlink
  103. struct ev_stat:
  104. stat attr
  105. stat prev
  106. double interval
  107. int ev_version_major()
  108. int ev_version_minor()
  109. unsigned int ev_supported_backends()
  110. unsigned int ev_recommended_backends()
  111. unsigned int ev_embeddable_backends()
  112. double ev_time()
  113. void ev_set_syserr_cb(void *)
  114. int ev_priority(void*)
  115. void ev_set_priority(void*, int)
  116. int ev_is_pending(void*)
  117. int ev_is_active(void*)
  118. void ev_io_init(ev_io*, void* callback, int fd, int events)
  119. void ev_io_start(ev_loop*, ev_io*)
  120. void ev_io_stop(ev_loop*, ev_io*)
  121. void ev_feed_event(ev_loop*, void*, int)
  122. void ev_timer_init(ev_timer*, void* callback, double, double)
  123. void ev_timer_start(ev_loop*, ev_timer*)
  124. void ev_timer_stop(ev_loop*, ev_timer*)
  125. void ev_timer_again(ev_loop*, ev_timer*)
  126. void ev_signal_init(ev_signal*, void* callback, int)
  127. void ev_signal_start(ev_loop*, ev_signal*)
  128. void ev_signal_stop(ev_loop*, ev_signal*)
  129. void ev_idle_init(ev_idle*, void* callback)
  130. void ev_idle_start(ev_loop*, ev_idle*)
  131. void ev_idle_stop(ev_loop*, ev_idle*)
  132. void ev_prepare_init(ev_prepare*, void* callback)
  133. void ev_prepare_start(ev_loop*, ev_prepare*)
  134. void ev_prepare_stop(ev_loop*, ev_prepare*)
  135. void ev_check_init(ev_check*, void* callback)
  136. void ev_check_start(ev_loop*, ev_check*)
  137. void ev_check_stop(ev_loop*, ev_check*)
  138. void ev_fork_init(ev_fork*, void* callback)
  139. void ev_fork_start(ev_loop*, ev_fork*)
  140. void ev_fork_stop(ev_loop*, ev_fork*)
  141. void ev_async_init(ev_async*, void* callback)
  142. void ev_async_start(ev_loop*, ev_async*)
  143. void ev_async_stop(ev_loop*, ev_async*)
  144. void ev_async_send(ev_loop*, ev_async*)
  145. int ev_async_pending(ev_async*)
  146. void ev_child_init(ev_child*, void* callback, int, int)
  147. void ev_child_start(ev_loop*, ev_child*)
  148. void ev_child_stop(ev_loop*, ev_child*)
  149. void ev_stat_init(ev_stat*, void* callback, char*, double)
  150. void ev_stat_start(ev_loop*, ev_stat*)
  151. void ev_stat_stop(ev_loop*, ev_stat*)
  152. ev_loop* ev_default_loop(unsigned int flags)
  153. ev_loop* ev_loop_new(unsigned int flags)
  154. void ev_loop_destroy(ev_loop*)
  155. void ev_loop_fork(ev_loop*)
  156. int ev_is_default_loop(ev_loop*)
  157. unsigned int ev_iteration(ev_loop*)
  158. unsigned int ev_depth(ev_loop*)
  159. unsigned int ev_backend(ev_loop*)
  160. void ev_verify(ev_loop*)
  161. void ev_run(ev_loop*, int flags) nogil
  162. double ev_now(ev_loop*)
  163. void ev_now_update(ev_loop*)
  164. void ev_ref(ev_loop*)
  165. void ev_unref(ev_loop*)
  166. void ev_break(ev_loop*, int)
  167. unsigned int ev_pending_count(ev_loop*)
  168. ev_loop* gevent_ev_default_loop(unsigned int flags)
  169. void gevent_install_sigchld_handler()
  170. void gevent_reset_sigchld_handler()