EAPI void *ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter);
EAPI void ecore_main_loop_iterate(void);
+
+ EAPI void ecore_main_loop_select_func_set(int (*func)(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout));
+ EAPI void *ecore_main_loop_select_func_get(void);
+
EAPI void ecore_main_loop_begin(void);
EAPI void ecore_main_loop_quit(void);
EAPI Ecore_Fd_Handler *ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, int (*func) (void *data, Ecore_Fd_Handler *fd_handler), const void *data, int (*buf_func) (void *buf_data, Ecore_Fd_Handler *fd_handler), const void *buf_data);
static int do_quit = 0;
static Ecore_Fd_Handler *fd_handlers = NULL;
static int fd_handlers_delete_me = 0;
+static int (*main_loop_select)(int , fd_set *, fd_set *, fd_set *, struct timeval *) = select;
static double t1 = 0.0;
static double t2 = 0.0;
}
/**
+ * Sets the function to use when monitoring multiple file descriptors,
+ * and waiting until one of more of the file descriptors before ready
+ * for some class of I/O operation.
+ *
+ * This function will be used instead of the system call select and
+ * could possible be used to integrate the Ecore event loop with an
+ * external event loop.
+ *
+ * @warning you don't know how to use, don't even try to use it.
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ */
+EAPI void
+ecore_main_loop_select_func_set(int (*func)(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout))
+{
+ main_loop_select = func;
+}
+
+/**
+ * Gets the select function set by ecore_select_func_set(),
+ * or the native select function if none was set.
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ */
+EAPI void *
+ecore_main_loop_select_func_get(void)
+{
+ return main_loop_select;
+}
+
+/**
* @defgroup Ecore_FD_Handler_Group File Event Handling Functions
*
* Functions that deal with file descriptor handlers.
}
if (_ecore_signal_count_get()) return -1;
- ret = select(max_fd + 1, &rfds, &wfds, &exfds, t);
+ ret = main_loop_select(max_fd + 1, &rfds, &wfds, &exfds, t);
_ecore_loop_time = ecore_time_get();
if (ret < 0)
{