Ecore.h File Reference

Data Structures

struct  _Ecore_Event_Signal_User
 User signal event. More...
struct  _Ecore_Event_Signal_Hup
 Hup signal event. More...
struct  _Ecore_Event_Signal_Exit
 Exit request event. More...
struct  _Ecore_Event_Signal_Power
 Power event. More...
struct  _Ecore_Event_Signal_Realtime
 Realtime event. More...
struct  _Ecore_Exe_Event_Add
 Process add event. More...
struct  _Ecore_Exe_Event_Del
 Process exit event. More...
struct  _Ecore_Exe_Event_Data_Line
 < Lines from a child process More...
struct  _Ecore_Exe_Event_Data
 Data from a child process event. More...

Defines

#define ECORE_CALLBACK_CANCEL   EINA_FALSE
 Return value to remove a callback.
#define ECORE_CALLBACK_RENEW   EINA_TRUE
 Return value to keep a callback.
#define ECORE_CALLBACK_PASS_ON   EINA_TRUE
 Return value to pass event to next handler.
#define ECORE_CALLBACK_DONE   EINA_FALSE
 Return value to stop event handling.
#define ECORE_EVENT_SIGNAL_USER   1
 User signal event.
#define ECORE_EVENT_SIGNAL_HUP   2
 Hup signal event.
#define ECORE_EVENT_SIGNAL_EXIT   3
 Exit signal event.
#define ECORE_EVENT_SIGNAL_POWER   4
 Power signal event.
#define ECORE_EVENT_SIGNAL_REALTIME   5
 Realtime signal event.

Typedefs

typedef struct _Ecore_Exe Ecore_Exe
 A handle for spawned processes.
typedef struct _Ecore_Timer Ecore_Timer
 A handle for timers.
typedef struct _Ecore_Idler Ecore_Idler
 A handle for idlers.
typedef struct _Ecore_Idle_Enterer Ecore_Idle_Enterer
 A handle for idle enterers.
typedef struct _Ecore_Idle_Exiter Ecore_Idle_Exiter
 A handle for idle exiters.
typedef struct _Ecore_Fd_Handler Ecore_Fd_Handler
 A handle for Fd handlers.
typedef struct _Ecore_Win32_Handler Ecore_Win32_Handler
 A handle for HANDLE handlers on Windows.
typedef struct _Ecore_Event_Handler Ecore_Event_Handler
 A handle for an event handler.
typedef struct _Ecore_Event_Filter Ecore_Event_Filter
 A handle for an event filter.
typedef struct _Ecore_Event Ecore_Event
 A handle for an event.
typedef struct _Ecore_Animator Ecore_Animator
 A handle for animators.
typedef struct _Ecore_Pipe Ecore_Pipe
 A handle for pipes.
typedef struct _Ecore_Poller Ecore_Poller
 A handle for pollers.
typedef struct
_Ecore_Event_Signal_User 
Ecore_Event_Signal_User
 User signal event.
typedef struct
_Ecore_Event_Signal_Hup 
Ecore_Event_Signal_Hup
 Hup signal event.
typedef struct
_Ecore_Event_Signal_Exit 
Ecore_Event_Signal_Exit
 Exit signal event.
typedef struct
_Ecore_Event_Signal_Power 
Ecore_Event_Signal_Power
 Power signal event.
typedef struct
_Ecore_Event_Signal_Realtime 
Ecore_Event_Signal_Realtime
 Realtime signal event.
typedef struct _Ecore_Exe_Event_Add Ecore_Exe_Event_Add
 Spawned Exe add event.
typedef struct _Ecore_Exe_Event_Del Ecore_Exe_Event_Del
 Spawned Exe exit event.
typedef struct
_Ecore_Exe_Event_Data_Line 
Ecore_Exe_Event_Data_Line
 Lines from a child process.
typedef struct
_Ecore_Exe_Event_Data 
Ecore_Exe_Event_Data
 Data from a child process.
typedef void *(* Ecore_Data_Cb )(void *data)
 A callback which is used to return data to the main function.
typedef Eina_Bool(* Ecore_Filter_Cb )(void *data, void *loop_data, int type, void *event)
 A callback used for filtering events from the main loop.
typedef void(* Ecore_End_Cb )(void *user_data, void *func_data)
 This is the callback which is called at the end of a function, usually for cleanup purposes.
typedef void(* Ecore_Pipe_Cb )(void *data, void *buffer, unsigned int nbyte)
 The callback that data written to the pipe is sent to.
typedef void(* Ecore_Exe_Cb )(void *data, const Ecore_Exe *exe)
 A callback to run with the associated Ecore_Exe, usually for cleanup purposes.
typedef Eina_Bool(* Ecore_Event_Handler_Cb )(void *data, int type, void *event)
 A callback used by the main loop to handle events of a specified type.
typedef void(* Ecore_Thread_Cb )(void *data, Ecore_Thread *thread)
 A callback used by Ecore_Thread helper.
typedef void(* Ecore_Thread_Notify_Cb )(void *data, Ecore_Thread *thread, void *msg_data)
 A callback used by the main loop to receive data sent by an Ecore Thread functions.
typedef Eina_Bool(* Ecore_Task_Cb )(void *data)
 A callback run for a task (timer, idler, poller, animater, etc).
typedef void(* Ecore_Cb )(void *data)
 A generic callback called as a hook when a certain point in execution is reached.
typedef Eina_Bool(* Ecore_Fd_Cb )(void *data, Ecore_Fd_Handler *fd_handler)
 A callback used by an Ecore_Fd_Handler.
typedef void(* Ecore_Fd_Prep_Cb )(void *data, Ecore_Fd_Handler *fd_handler)
 A callback used by an Ecore_Fd_Handler.
typedef Eina_Bool(* Ecore_Win32_Handle_Cb )(void *data, Ecore_Win32_Handler *wh)
 A callback used by an Ecore_Win32_Handler.
typedef struct _Ecore_Job Ecore_Job
 A job handle.

Enumerations

enum  _Ecore_Fd_Handler_Flags {
  ECORE_FD_READ = 1,
  ECORE_FD_WRITE = 2,
  ECORE_FD_ERROR = 4
}
enum  _Ecore_Exe_Flags {
  ECORE_EXE_NONE = 0,
  ECORE_EXE_PIPE_READ = 1,
  ECORE_EXE_PIPE_WRITE = 2,
  ECORE_EXE_PIPE_ERROR = 4,
  ECORE_EXE_PIPE_READ_LINE_BUFFERED = 8,
  ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16,
  ECORE_EXE_PIPE_AUTO = 32,
  ECORE_EXE_RESPAWN = 64,
  ECORE_EXE_USE_SH = 128,
  ECORE_EXE_NOT_LEADER = 256
}
enum  _Ecore_Exe_Win32_Priority {
  ECORE_EXE_WIN32_PRIORITY_IDLE,
  ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL,
  ECORE_EXE_WIN32_PRIORITY_NORMAL,
  ECORE_EXE_WIN32_PRIORITY_ABOVE_NORMAL,
  ECORE_EXE_WIN32_PRIORITY_HIGH,
  ECORE_EXE_WIN32_PRIORITY_REALTIME
}
enum  _Ecore_Poller_Type { ECORE_POLLER_CORE = 0 }

Functions

EAPI int ecore_init (void)
 Set up connections, signal handlers, sockets etc.
EAPI int ecore_shutdown (void)
 Shut down connections, signal handlers sockets etc.
EAPI void ecore_app_args_set (int argc, const char **argv)
 Set up the programs command-line arguments.
EAPI void ecore_app_args_get (int *argc, char ***argv)
 Return the programs stored command-line arguments.
EAPI void ecore_app_restart (void)
 Restart the program executable with the command-line arguments stored.
EAPI Ecore_Event_Handlerecore_event_handler_add (int type, Ecore_Event_Handler_Cb func, const void *data)
 Add an event handler.
EAPI void * ecore_event_handler_del (Ecore_Event_Handler *event_handler)
 Delete an event handler.
EAPI Ecore_Eventecore_event_add (int type, void *ev, Ecore_End_Cb func_free, void *data)
 Add an event to the event queue.
EAPI void * ecore_event_del (Ecore_Event *event)
 Delete an event from the queue.
EAPI void * ecore_event_handler_data_get (Ecore_Event_Handler *eh)
 Get the data associated with an Ecore_Event_Handler.
EAPI void * ecore_event_handler_data_set (Ecore_Event_Handler *eh, void *data)
 Set the data associated with an Ecore_Event_Handler.
EAPI int ecore_event_type_new (void)
 Allocate a new event type id sensibly and return the new id.
EAPI Ecore_Event_Filterecore_event_filter_add (Ecore_Data_Cb func_start, Ecore_Filter_Cb func_filter, Ecore_End_Cb func_end, const void *data)
 Add a filter the current event queue.
EAPI void * ecore_event_filter_del (Ecore_Event_Filter *ef)
 Delete an event filter.
EAPI int ecore_event_current_type_get (void)
 Return the current event type being handled.
EAPI void * ecore_event_current_event_get (void)
 Return the current event type pointer handled.
EAPI void ecore_exe_run_priority_set (int pri)
 Sets the priority at which to launch processes.
EAPI int ecore_exe_run_priority_get (void)
 Gets the priority at which to launch processes.
EAPI Ecore_Exeecore_exe_run (const char *exe_cmd, const void *data)
 Spawns a child process.
EAPI Ecore_Exeecore_exe_pipe_run (const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
 Spawns a child process with its stdin/out available for communication.
EAPI void ecore_exe_callback_pre_free_set (Ecore_Exe *exe, Ecore_Exe_Cb func)
 Defines a function to be called before really freeing the handle data.
EAPI Eina_Bool ecore_exe_send (Ecore_Exe *exe, const void *data, int size)
 Sends data to the given child process which it receives on stdin.
EAPI void ecore_exe_close_stdin (Ecore_Exe *exe)
 The stdin of the given child process will close when the write buffer is empty.
EAPI void ecore_exe_auto_limits_set (Ecore_Exe *exe, int start_bytes, int end_bytes, int start_lines, int end_lines)
 Sets the auto pipe limits for the given process handle.
EAPI Ecore_Exe_Event_Dataecore_exe_event_data_get (Ecore_Exe *exe, Ecore_Exe_Flags flags)
 Gets the auto pipe data for the given process handle.
EAPI void ecore_exe_event_data_free (Ecore_Exe_Event_Data *e)
 Frees the given event data.
EAPI void * ecore_exe_free (Ecore_Exe *exe)
 Frees the given process handle.
EAPI pid_t ecore_exe_pid_get (const Ecore_Exe *exe)
 Retrieves the process ID of the given spawned process.
EAPI void ecore_exe_tag_set (Ecore_Exe *exe, const char *tag)
 Sets the string tag for the given process handle.
EAPI const char * ecore_exe_tag_get (const Ecore_Exe *exe)
 Retrieves the tag attached to the given process handle.
EAPI const char * ecore_exe_cmd_get (const Ecore_Exe *exe)
 Retrieves the command of the given spawned process.
EAPI void * ecore_exe_data_get (const Ecore_Exe *exe)
 Retrieves the data attached to the given process handle.
EAPI Ecore_Exe_Flags ecore_exe_flags_get (const Ecore_Exe *exe)
 Retrieves the flags attached to the given process handle.
EAPI void ecore_exe_pause (Ecore_Exe *exe)
 Pauses the given process by sending it a SIGSTOP signal.
EAPI void ecore_exe_continue (Ecore_Exe *exe)
 Continues the given paused process by sending it a SIGCONT signal.
EAPI void ecore_exe_interrupt (Ecore_Exe *exe)
 Sends the given spawned process a interrupt (SIGINT) signal.
EAPI void ecore_exe_quit (Ecore_Exe *exe)
 Sends the given spawned process a quit (SIGQUIT) signal.
EAPI void ecore_exe_terminate (Ecore_Exe *exe)
 Sends the given spawned process a terminate (SIGTERM) signal.
EAPI void ecore_exe_kill (Ecore_Exe *exe)
 Kills the given spawned process by sending it a SIGKILL signal.
EAPI void ecore_exe_signal (Ecore_Exe *exe, int num)
 Sends a SIGUSR signal to the given spawned process.
EAPI void ecore_exe_hup (Ecore_Exe *exe)
 Sends a SIGHUP signal to the given spawned process.
EAPI Ecore_Idlerecore_idler_add (Ecore_Task_Cb func, const void *data)
 Add an idler handler.
EAPI void * ecore_idler_del (Ecore_Idler *idler)
 Delete an idler callback from the list to be executed.
EAPI Ecore_Idle_Entererecore_idle_enterer_add (Ecore_Task_Cb func, const void *data)
 Add an idle enterer handler.
EAPI Ecore_Idle_Entererecore_idle_enterer_before_add (Ecore_Task_Cb func, const void *data)
 Add an idle enterer handler at the start of the list so it gets called earlier than others.
EAPI void * ecore_idle_enterer_del (Ecore_Idle_Enterer *idle_enterer)
 Delete an idle enterer callback.
EAPI Ecore_Idle_Exiterecore_idle_exiter_add (Ecore_Task_Cb func, const void *data)
 Add an idle exiter handler.
EAPI void * ecore_idle_exiter_del (Ecore_Idle_Exiter *idle_exiter)
 Delete an idle exiter handler from the list to be run on exiting idle state.
EAPI void ecore_main_loop_iterate (void)
 Runs a single iteration of the main loop to process everything on the queue.
EAPI void ecore_main_loop_select_func_set (Ecore_Select_Function func)
 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.
EAPI Ecore_Select_Function ecore_main_loop_select_func_get (void)
 Gets the select function set by ecore_select_func_set(), or the native select function if none was set.
EAPI Eina_Bool ecore_main_loop_glib_integrate (void)
 Request ecore to integrate GLib's main loop.
EAPI void ecore_main_loop_glib_always_integrate_disable (void)
 Disable always integrating glib.
EAPI void ecore_main_loop_begin (void)
 Runs the application main loop.
EAPI void ecore_main_loop_quit (void)
 Quits the main loop once all the events currently on the queue have been processed.
EAPI Ecore_Fd_Handlerecore_main_fd_handler_add (int fd, Ecore_Fd_Handler_Flags flags, Ecore_Fd_Cb func, const void *data, Ecore_Fd_Cb buf_func, const void *buf_data)
 Adds a callback for activity on the given file descriptor.
EAPI void ecore_main_fd_handler_prepare_callback_set (Ecore_Fd_Handler *fd_handler, Ecore_Fd_Prep_Cb func, const void *data)
 Set the prepare callback with data for a given Ecore_Fd_Handler.
EAPI void * ecore_main_fd_handler_del (Ecore_Fd_Handler *fd_handler)
 Deletes the given FD handler.
EAPI int ecore_main_fd_handler_fd_get (Ecore_Fd_Handler *fd_handler)
 Retrieves the file descriptor that the given handler is handling.
EAPI Eina_Bool ecore_main_fd_handler_active_get (Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags)
 Return if read, write or error, or a combination thereof, is active on the file descriptor of the given FD handler.
EAPI void ecore_main_fd_handler_active_set (Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags)
 Set what active streams the given FD handler should be monitoring.
EAPI Ecore_Pipeecore_pipe_add (Ecore_Pipe_Cb handler, const void *data)
 Create two file descriptors (sockets on Windows).
EAPI void * ecore_pipe_del (Ecore_Pipe *p)
 Free an Ecore_Pipe object created with ecore_pipe_add().
EAPI Eina_Bool ecore_pipe_write (Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
 Write on the file descriptor the data passed as parameter.
EAPI void ecore_pipe_write_close (Ecore_Pipe *p)
 Close the write end of an Ecore_Pipe object created with ecore_pipe_add().
EAPI void ecore_pipe_read_close (Ecore_Pipe *p)
 Close the read end of an Ecore_Pipe object created with ecore_pipe_add().
EAPI Ecore_Thread * ecore_thread_run (Ecore_Thread_Cb func_blocking, Ecore_Thread_Cb func_end, Ecore_Thread_Cb func_cancel, const void *data)
 Run some blocking code in a parallel thread to avoid locking the main loop.
EAPI Ecore_Thread * ecore_thread_feedback_run (Ecore_Thread_Cb func_heavy, Ecore_Thread_Notify_Cb func_notify, Ecore_Thread_Cb func_end, Ecore_Thread_Cb func_cancel, const void *data, Eina_Bool try_no_queue)
 Run some heavy code in a parallel thread to avoid locking the main loop.
EAPI Eina_Bool ecore_thread_cancel (Ecore_Thread *thread)
 Cancel a running thread.
EAPI Eina_Bool ecore_thread_check (Ecore_Thread *thread)
 Tell if a thread was canceled or not.
EAPI Eina_Bool ecore_thread_feedback (Ecore_Thread *thread, const void *data)
 Send data to main loop from worker thread.
EAPI int ecore_thread_active_get (void)
 Get number of active thread jobs.
EAPI int ecore_thread_pending_get (void)
 Get number of pending (short) thread jobs.
EAPI int ecore_thread_pending_feedback_get (void)
 Get number of pending feedback thread jobs.
EAPI int ecore_thread_pending_total_get (void)
 Get number of pending thread jobs.
EAPI int ecore_thread_max_get (void)
 Get the max number of threads that can run simultaneously.
EAPI void ecore_thread_max_set (int num)
 Set the max number of threads that can run simultaneously.
EAPI void ecore_thread_max_reset (void)
 Reset the max number of threads that can run simultaneously This resets the maximum number of threads that ecore will try to run simultaneously to the number of active cpus.
EAPI int ecore_thread_available_get (void)
 Get the number of threads which are available to be used.
EAPI Eina_Bool ecore_thread_local_data_add (Ecore_Thread *thread, const char *key, void *value, Eina_Free_Cb cb, Eina_Bool direct)
 Add data to the thread for subsequent use.
EAPI void * ecore_thread_local_data_set (Ecore_Thread *thread, const char *key, void *value, Eina_Free_Cb cb)
 Modify data in the thread, or add if not found.
EAPI void * ecore_thread_local_data_find (Ecore_Thread *thread, const char *key)
 Find data in the thread's data.
EAPI Eina_Bool ecore_thread_local_data_del (Ecore_Thread *thread, const char *key)
 Delete data from the thread's data.
EAPI Eina_Bool ecore_thread_global_data_add (const char *key, void *value, Eina_Free_Cb cb, Eina_Bool direct)
 Add data to the global data.
EAPI void * ecore_thread_global_data_set (const char *key, void *value, Eina_Free_Cb cb)
 Add data to the global data.
EAPI void * ecore_thread_global_data_find (const char *key)
 Find data in the global data.
EAPI Eina_Bool ecore_thread_global_data_del (const char *key)
 Delete data from the global data.
EAPI void * ecore_thread_global_data_wait (const char *key, double seconds)
 Find data in the global data and optionally wait for the data if not found.
EAPI double ecore_time_get (void)
 Retrieves the current system time as a floating point value in seconds.
EAPI double ecore_time_unix_get (void)
 Retrieves the current UNIX time as a floating point value in seconds.
EAPI double ecore_loop_time_get (void)
 Retrieves the time at which the last loop stopped waiting for timeouts or events.
EAPI Ecore_Timerecore_timer_add (double in, Ecore_Task_Cb func, const void *data)
 Creates a timer to call the given function in the given period of time.
EAPI Ecore_Timerecore_timer_loop_add (double in, Ecore_Task_Cb func, const void *data)
 Creates a timer to call the given function in the given period of time.
EAPI void * ecore_timer_del (Ecore_Timer *timer)
 Delete the specified timer from the timer list.
EAPI void ecore_timer_interval_set (Ecore_Timer *timer, double in)
 Change the interval the timer ticks of.
EAPI double ecore_timer_interval_get (Ecore_Timer *timer)
 Get the interval the timer ticks on.
EAPI void ecore_timer_delay (Ecore_Timer *timer, double add)
 Add some delay for the next occurrence of a timer.
EAPI double ecore_timer_pending_get (Ecore_Timer *timer)
 Get the pending time regarding a timer.
EAPI double ecore_timer_precision_get (void)
 Retrieves the current precision used by timer infrastructure.
EAPI void ecore_timer_precision_set (double value)
 Sets the precision to be used by timer infrastructure.
EAPI Ecore_Animatorecore_animator_add (Ecore_Task_Cb func, const void *data)
 Add a animator to tick off at every animaton tick during main loop execution.
EAPI void * ecore_animator_del (Ecore_Animator *animator)
 Delete the specified animator from the animator list.
EAPI void ecore_animator_freeze (Ecore_Animator *animator)
 Suspend the specified animator.
EAPI void ecore_animator_thaw (Ecore_Animator *animator)
 Restore execution of the specified animator.
EAPI void ecore_animator_frametime_set (double frametime)
 Set the animator call interval in seconds.
EAPI double ecore_animator_frametime_get (void)
 Get the animator call interval in seconds.
EAPI void ecore_poller_poll_interval_set (Ecore_Poller_Type type, double poll_time)
 Sets the time between ticks (in seconds) for the given ticker clock.
EAPI double ecore_poller_poll_interval_get (Ecore_Poller_Type type)
 Gets the time between ticks (in seconds) for the given ticker clock.
EAPI Eina_Bool ecore_poller_poller_interval_set (Ecore_Poller *poller, int interval)
 Changes the polling interval rate of poller.
EAPI int ecore_poller_poller_interval_get (Ecore_Poller *poller)
 Gets the polling interval rate of poller.
EAPI Ecore_Pollerecore_poller_add (Ecore_Poller_Type type, int interval, Ecore_Task_Cb func, const void *data)
 Creates a poller to call the given function at a particular tick interval.
EAPI void * ecore_poller_del (Ecore_Poller *poller)
 Delete the specified poller from the timer list.
EAPI Ecore_Jobecore_job_add (Ecore_Cb func, const void *data)
 Add a job to the event queue.
EAPI void * ecore_job_del (Ecore_Job *job)
 Delete a queued job that has not yet been executed.

Variables

EAPI int ECORE_EXE_EVENT_ADD
 A child process has been added.
EAPI int ECORE_EXE_EVENT_DEL
 A child process has been deleted (it exited, naming consistent with the rest of ecore).
EAPI int ECORE_EXE_EVENT_DATA
 Data from a child process.
EAPI int ECORE_EXE_EVENT_ERROR
 Errors from a child process.

Detailed Description