Ecore also lets you have functions called when file descriptors become active
for reading or writing, allowing for streamlined, non-blocking IO.
-Here is an exmaple of a simple program and its basic event loop flow:
+Here is an example of a simple program and its basic event loop flow:
@image html prog_flow.png
-dnl use: ECORE_CHECK_MODULE(Foo, default-enabled, description[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
+dnl use: ECORE_CHECK_MODULE(Foo, default-enabled, description[, dependency[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
AC_DEFUN([ECORE_CHECK_MODULE],
[
m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
#define ECORE_EXE_PRIORITY_INHERIT 9999
EAPI extern int ECORE_EXE_EVENT_ADD; /**< A child process has been added */
- EAPI extern int ECORE_EXE_EVENT_DEL; /**< A child process has been deleted (it exited, naming consistant with the rest of ecore). */
+ EAPI extern int ECORE_EXE_EVENT_DEL; /**< A child process has been deleted (it exited, naming consistent with the rest of ecore). */
EAPI extern int ECORE_EXE_EVENT_DATA; /**< Data from a child process. */
EAPI extern int ECORE_EXE_EVENT_ERROR; /**< Errors from a child process. */
struct _Ecore_Exe_Event_Data /** Data from a child process event */
{
Ecore_Exe *exe; /**< The handle to the process */
- void *data; /**< the raw binary data from the child process that was recieved */
+ void *data; /**< the raw binary data from the child process that was received */
int size; /**< the size of this data in bytes */
Ecore_Exe_Event_Data_Line *lines; /**< an array of line data if line buffered, the last one has it's line member set to NULL */
};
* Set the animator call interval in seconds.
* @param frametime The time in seconds in between animator ticks.
*
- * This function sets the time interval (in seconds) inbetween animator ticks.
+ * This function sets the time interval (in seconds) between animator ticks.
*/
EAPI void
ecore_animator_frametime_set(double frametime)
* Get the animator call interval in seconds.
* @return The time in second in between animator ticks.
*
- * this function retrieves the time inbetween animator ticks, in seconds.
+ * this function retrieves the time between animator ticks, in seconds.
*/
EAPI double
ecore_animator_frametime_get(void)
* state that it cannot regenerate by just killing it and starting it again.
* This includes state that the user code knows about, as the respawn is
* transparent to that code. On the other hand, maybe a respawn event might
- * be useful, or maybe resend the currently non existant add event. For
+ * be useful, or maybe resend the currently non existent add event. For
* consistancy with ecore_con, an add event is good anyway.
*
* The Ecore_exe structure is reused for respawning, so that the (opaque)
* cmd = ecore_exe_comand_parameter_append(cmd, "firefox");
* cmd = ecore_exe_comand_parameter_append(cmd, "http://www.foo.com/bar.html?baz=yes");
* each parameter appended is one argument, and it gets escaped, quoted, and
- * appended with a preceeding space. The first is the command off course.
+ * appended with a preceding space. The first is the command off course.
*/
struct _ecore_exe_dead_exe
{
/* Setup the status pipe. */
E_NO_ERRNO(result, close(statusPipe[0]), ok);
- E_IF_NO_ERRNO(result, fcntl(statusPipe[1], F_SETFD, FD_CLOEXEC), ok) /* close on exec shows sucess */
+ E_IF_NO_ERRNO(result, fcntl(statusPipe[1], F_SETFD, FD_CLOEXEC), ok) /* close on exec shows success */
{
/* Run the actual command. */
_ecore_exe_exec_it(exe_cmd, flags); /* no return */
}
/**
- * Sends data to the given child process which it recieves on stdin.
+ * Sends data to the given child process which it receives on stdin.
*
* This function writes to a child processes standard in, with unlimited
* buffering. This call will never block. It may fail if the system runs out
* Spank programmer for freeing the event data if it came from the event system, as that autofrees.
* Spank the programmer if they try to set the limits bigger than what has been gathered & ignored already, coz they just lost data.
* Spank onefang and raster for opening this can of worms.
- * Should we have seperate out/err limits?
+ * Should we have separate out/err limits?
* Should we remove from the internal buffer the data that was delivered already?
* If so, what to do about limits, start, and end? They could loose their meaning.
*/
{
Ecore_Exe *exe = NULL;
- /* FIXME: There is no nice, safe, OS independant way to tell if a
+ /* FIXME: There is no nice, safe, OS independent way to tell if a
* particular PID is still alive. I have written code to do so
* for my urunlevel busybox applet (http://urunlevel.sourceforge.net/),
* but it's for linux only, and still not guaranteed.
if ((exe = _ecore_exe_is_it_alive(dead->pid)))
{
if (dead->cmd)
- INF("Sending KILL signal to alledgedly dead %s (%d).",
+ INF("Sending KILL signal to allegedly dead %s (%d).",
dead->cmd, dead->pid);
else
- INF("Sending KILL signal to alledgedly dead PID %d.",
+ INF("Sending KILL signal to allegedly dead PID %d.",
dead->pid);
exe->doomsday_clock =
ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead,
/* if these calls caused any buffered events to appear - deal with them */
_ecore_main_fd_handlers_buf_call();
- /* if ther are any - jump to processing them */
+ /* if there are any - jump to processing them */
if (_ecore_event_exist())
{
have_event = 1;
else
{
ERR("An unhandled error (ret: %zd errno: %d)"
- "occured while writing to the pipe the length",
+ "occurred while writing to the pipe the length",
ret, errno);
}
}
else
{
ERR("An unhandled error (ret: %zd errno: %d)"
- "occured while writing to the pipe the length",
+ "occurred while writing to the pipe the length",
ret, errno);
}
}
else
{
ERR("An unhandled error (ret: %zd errno: %d)"
- "occured while reading from the pipe the length",
+ "occurred while reading from the pipe the length",
ret, errno);
return ECORE_CALLBACK_RENEW;
}
else
{
ERR("An unhandled error (ret: %zd errno: %d)"
- "occured while reading from the pipe the data",
+ "occurred while reading from the pipe the data",
ret, errno);
return ECORE_CALLBACK_RENEW;
}
*/
/**
- * @brief Run some blocking code in a parrallel thread to avoid locking the main loop.
+ * @brief Run some blocking code in a parallel thread to avoid locking the main loop.
* @param func_blocking The function that should run in another thread.
* @param func_end The function that will be called in the main loop if the thread terminate correctly.
* @param func_cancel The function that will be called in the main loop if the thread is cancelled.
* ecore_thread_run provide a facility for easily managing blocking task in a
* parallel thread. You should provide three function. The first one, func_blocking,
* that will do the blocking work in another thread (so you should not use the
- * EFL in it except Eina if you are carefull). The second one, func_end,
+ * EFL in it except Eina if you are careful). The second one, func_end,
* that will be called in Ecore main loop when func_blocking is done. So you
* can use all the EFL inside this function. The last one, func_cancel, will
* be called in the main loop if the thread is cancelled or could not run at all.
}
/**
- * @brief Run some heavy code in a parrallel thread to avoid locking the main loop.
+ * @brief Run some heavy code in a parallel thread to avoid locking the main loop.
* @param func_heavy The function that should run in another thread.
* @param func_notify The function that will receive the data send by func_heavy in the main loop.
* @param func_end The function that will be called in the main loop if the thread terminate correctly.
* ecore_long_run provide a facility for easily managing heavy task in a
* parallel thread. You should provide four functions. The first one, func_heavy,
* that will do the heavy work in another thread (so you should not use the
- * EFL in it except Eina and Eet if you are carefull). The second one, func_notify,
+ * EFL in it except Eina and Eet if you are careful). The second one, func_notify,
* will receive the data send from the thread function (func_heavy) by ecore_thread_notify
* in the main loop (and so, can use all the EFL). Tje third, func_end,
* that will be called in Ecore main loop when func_heavy is done. So you
* host CPU can handle.
*
* If you set try_no_queue, it will try to run outside of the thread pool, this can bring
- * the CPU down, so be carefull with that. Of course if it can't start a new thread, it will
+ * the CPU down, so be careful with that. Of course if it can't start a new thread, it will
* try to use one from the pool.
*/
EAPI Ecore_Thread *ecore_long_run(Ecore_Thread_Heavy_Cb func_heavy,
}
/**
- * Add some delay for the next occurence of a timer.
+ * Add some delay for the next occurrence of a timer.
* This doesn't affect the interval of a timer.
*
* @param timer The timer to change.
*
* The Ecore Connection Library ( @c Ecore_Con ) provides simple mechanisms
* for communications between programs using reliable sockets. It saves
- * the programmer from having to worry about file descripters and waiting
+ * the programmer from having to worry about file descriptors and waiting
* for incoming connections.
*
* There are two main objects in the @c Ecore_Con library: the @c
* data within this object is transient, so it must be duplicated in order to be
* retained. This event will continue to occur until the client has stopped sending its
* message, so a good option for storing this data is an Eina_Strbuf. Once the message has
- * been recieved in full, the client object must be freed with @ref ecore_con_client_free.
+ * been received in full, the client object must be freed with @ref ecore_con_client_free.
* @li @ref ECORE_CON_EVENT_SERVER_DATA: Whenever your server object connects to its destination
* and receives data, an event of this type is emitted. The data will contain both
* the size and contents of the message sent by the server. It should be noted that
* data within this object is transient, so it must be duplicated in order to be
* retained. This event will continue to occur until the server has stopped sending its
* message, so a good option for storing this data is an Eina_Strbuf. Once the message has
- * been recieved in full, the server object must be freed with @ref ecore_con_server_free.
+ * been received in full, the server object must be freed with @ref ecore_con_server_free.
*
*/
{
snprintf(buf, PATH_MAX, "%s/.e/config.eet", p);
if (ecore_config_file_load(buf) != 0) {
- /* even if this file (system.eet) dosen't exist we can
+ /* even if this file (system.eet) doesn't exist we can
* continue without it as it isn't striclty necessary.
*/
ecore_config_file_load(PACKAGE_DATA_DIR "/system.eet");
static IDirectFBEventBuffer *_window_event; // the main event buffer (all windows are attached to this)
static IDirectFBEventBuffer *_input_event; // the main event buffer (all windows are attached to this)
static IDirectFBDisplayLayer *_layer; // the main layer
-static DFBResult _err; // usefull for DFBCHECK
+static DFBResult _err; // useful for DFBCHECK
/*******************/
/* local functions */
/**
* Query if a particular renginering engine target has support
* @param engine The engine to check support for
- * @return 1 if the particualr engine is supported, 0 if it is not
+ * @return 1 if the particular engine is supported, 0 if it is not
*
* Query if engine @param engine is supported by ecore_evas. 1 is returned if
* it is, and 0 is returned if it is not supported.
#include "Ecore_Cocoa.h"
#include "Evas_Engine_Quartz.h"
-// FIXME: this engine has lots of problems. only 1 window at a time, drawRect looks wrong, doesnt handle resizes and more
+// FIXME: this engine has lots of problems. only 1 window at a time, drawRect looks wrong, doesn't handle resizes and more
static int _ecore_evas_init_count = 0;
static Ecore_Evas *ecore_evases = NULL;
// Create our main window, and embed an EvasView in it
main_window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,w,h) styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask | NSMiniaturizableWindowMask) backing:NSBackingStoreBuffered defer:NO screen:nil];
- /* FIXME: manage the case where main_window is NULL witht a goto free_evas; */
+ /* FIXME: manage the case where main_window is NULL with a goto free_evas; */
[main_window makeKeyAndOrderFront:NSApp];
[main_window setTitle:[NSString stringWithUTF8String:name]];
[main_window makeMainWindow];
/* modes[e->mode], */
/* details[e->detail]); */
/* } */
- // disable. causes mroe problems than it fixes
+ // disable. causes more problems than it fixes
// if ((e->mode == ECORE_X_EVENT_MODE_GRAB) ||
// (e->mode == ECORE_X_EVENT_MODE_UNGRAB))
// return 0;
/*
* FIXME: there are some round trips. Especially, we can split
- * ecore_x_init in 2 functions and supress some round trips.
+ * ecore_x_init in 2 functions and suppress some round trips.
*/
#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_OPENGL_X11) || defined (BUILD_ECORE_EVAS_XRENDER_X11) || defined (BUILD_ECORE_EVAS_XRENDER_XCB) || defined (BUILD_ECORE_EVAS_SOFTWARE_16_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
* maybe a new module?
* - code to get battery info
* - code to get thermal info
- * ecore evas fb isnt good enough for weird things, like multiple fb's, same happens here.
+ * ecore evas fb isn't good enough for weird things, like multiple fb's, same happens here.
* backlight support using new kernel interface
* absolute axis
* joystick
snprintf(buf, sizeof(buf), "/dev/tty%i", _ecore_fb_vt_current_vt);
if((_ecore_fb_vt_tty_fd = open(buf, O_RDWR)) < 0)
{
- printf("[ecore_fb:vt_setup] cant open tty %d\n", _ecore_fb_vt_current_vt);
+ printf("[ecore_fb:vt_setup] can't open tty %d\n", _ecore_fb_vt_current_vt);
return 0;
}
close(_ecore_fb_vt_tty0_fd);
if(ioctl(_ecore_fb_vt_tty_fd, KDSETMODE, KD_GRAPHICS) < 0)
{
- perror("[ecore_fb:vt_setup] cant set the mode to KD_GRAPHICS");
+ perror("[ecore_fb:vt_setup] can't set the mode to KD_GRAPHICS");
close(_ecore_fb_vt_tty_fd);
return 0;
}
new_vtmode.acqsig = SIGUSR2;
if(ioctl(_ecore_fb_vt_tty_fd, VT_SETMODE, &new_vtmode) < 0)
{
- perror("[ecore_fb:vt_setup] cant set the tty mode");
+ perror("[ecore_fb:vt_setup] can't set the tty mode");
close(_ecore_fb_vt_tty_fd);
return 0;
}
close(_ecore_fb_vt_tty_fd);
return 0;
}
- /* FIXME assign the fb to the tty in case isnt setup */
+ /* FIXME assign the fb to the tty in case isn't setup */
return 1;
}
_ecore_fb_vt_do_switch = 1;
if((_ecore_fb_vt_tty0_fd = open("/dev/tty0", O_RDONLY)) < 0)
{
- printf("[ecore_fb:init] cant open /dev/tty0\n");
+ printf("[ecore_fb:init] can't open /dev/tty0\n");
return 0;
}
/* query current vt state */
if((ioctl(_ecore_fb_vt_tty0_fd, VT_GETSTATE, &vtstat)) < 0)
{
- printf("[ecore_fb:init] cant get current tty state\n");
+ printf("[ecore_fb:init] can't get current tty state\n");
return 0;
}
_ecore_fb_vt_prev_vt = vtstat.v_active;
if ((ioctl(_ecore_fb_vt_tty0_fd, VT_OPENQRY, &vtno) < 0))
{
- printf("[ecore_fb:init] cant query for a vt\n");
+ printf("[ecore_fb:init] can't query for a vt\n");
return 0;
}
_ecore_fb_vt_current_vt = vtno;
_ecore_fb_vt_current_vt = _ecore_fb_vt_prev_vt;
if(!_ecore_fb_vt_setup())
{
- printf("[ecore_fb:init] cant setup the vt, restoring previous mode...\n");
+ printf("[ecore_fb:init] can't setup the vt, restoring previous mode...\n");
/* TODO finish this */
if(_ecore_fb_vt_do_switch)
{
/**
* Initialize Ecore_File and the services it will use. Call this function
* once before you use any of the ecore file functions.
- * @return Return the number howoften ecore_file_init() was call succesfully;
- * 0 if it failed.
+ * @return Number of times ecore_file_init() was called successfully or 0 if
+ * this call failed.
*/
EAPI int
ecore_file_init()
/**
* Create a new directory
* @param dir The name of the directory to create
- * @return EINA_TRUE on successfull creation, EINA_FALSE on failure
+ * @return EINA_TRUE on successful creation, EINA_FALSE on failure
*
* The directory is created with the mode: S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
*/
* Create complete directory in a batch.
*
* @param dirs list of directories, null terminated.
- * @return number of successfull directories created, -1 if dirs is NULL.
+ * @return number of successful directories created, -1 if dirs is NULL.
*
* @see ecore_file_mkdir() and ecore_file_mkpaths()
*/
* path to that point must exists. So if creating base/a/b/c,
* provide subdirs with "a", "a/b" and "a/b/c" in that order!
*
- * @return number of successfull directories created, -1 if subdirs or
+ * @return number of successful directories created, -1 if subdirs or
* base is NULL or invalid.
*
* @see ecore_file_mkdir() and ecore_file_mkpaths()
* Create complete paths in a batch.
*
* @param paths list of paths, null terminated.
- * @return number of successfull paths created, -1 if paths is NULL.
+ * @return number of successful paths created, -1 if paths is NULL.
*
* @see ecore_file_mkpath() and ecore_file_mkdirs()
*/
Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
Ecore_IMF_Mouse_Flags flags; /**< The flags corresponding the mouse click (single, double or triple click) */
- unsigned int timestamp; /**< The timestamp when the event occured */
+ unsigned int timestamp; /**< The timestamp when the event occurred */
};
struct _Ecore_IMF_Event_Mouse_Up
Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
Ecore_IMF_Mouse_Flags flags; /**< The flags corresponding the mouse click (single, double or triple click) */
- unsigned int timestamp; /**< The timestamp when the event occured */
+ unsigned int timestamp; /**< The timestamp when the event occurred */
};
struct _Ecore_IMF_Event_Mouse_In
} canvas;
Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
- unsigned int timestamp; /**< The timestamp when the event occured */
+ unsigned int timestamp; /**< The timestamp when the event occurred */
};
struct _Ecore_IMF_Event_Mouse_Out
} canvas;
Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
- unsigned int timestamp; /**< The timestamp when the event occured */
+ unsigned int timestamp; /**< The timestamp when the event occurred */
};
struct _Ecore_IMF_Event_Mouse_Move
} cur, prev;
Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
- unsigned int timestamp; /**< The timestamp when the event occured */
+ unsigned int timestamp; /**< The timestamp when the event occurred */
};
struct _Ecore_IMF_Event_Mouse_Wheel
} canvas;
Ecore_IMF_Keyboard_Modifiers modifiers; /**< The keyboard modifiers active when the event has been emitted */
Ecore_IMF_Keyboard_Locks locks; /**< The keyboard locks active when the event has been emitted */
- unsigned int timestamp; /**< The timestamp when the event occured */
+ unsigned int timestamp; /**< The timestamp when the event occurred */
};
struct _Ecore_IMF_Event_Key_Down
const char *key; /**< The logical key : (eg shift+1 == exclamation) */
const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */
- unsigned int timestamp; /**< The timestamp when the event occured */
+ unsigned int timestamp; /**< The timestamp when the event occurred */
};
struct _Ecore_IMF_Event_Key_Up
const char *key; /**< The logical key : (eg shift+1 == exclamation) */
const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */
- unsigned int timestamp; /**< The timestamp when the event occured */
+ unsigned int timestamp; /**< The timestamp when the event occurred */
};
union _Ecore_IMF_Event
EAPI extern Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_SECONDARY;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD;
-/* currenly E specific virtual keyboard extension, aim to submit to netwm spec
+/* currently E specific virtual keyboard extension, aim to submit to netwm spec
* later */
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD;
} /* ecore_x_region_intersect */
/**
- * Make the substraction of two regions.
+ * Make the subtraction of two regions.
* @param dest The destination region.
* @param source1 The first source region.
* @param source2 The second source region.
*
- * Replace the contents of @p dest with the substraction of @p source1 by
+ * Replace the contents of @p dest with the subtraction of @p source1 by
* @p source2.
* @ingroup Ecore_X_Fixes_Group
*/
} /* ecore_x_region_subtract */
/**
- * Make the substraction of regions by bounds.
+ * Make the subtraction of regions by bounds.
* @param dest The destination region.
* @param bounds The bounds.
* @param source The source region.
* @return 1 on success, 0 otherwise.
*
* Retriee the opacity value of @p window and store it in
- * @p opacity. This function returns 1 on sucess, 0 otherwise.
+ * @p opacity. This function returns 1 on success, 0 otherwise.
*
* To use this function, you must call before, and in order,
* ecore_x_netwm_opacity_get_prefetch(), which sends the GetProperty request,
* Retrieves the coordinates of the pointer.
* If the window used in
* ecore_x_query_pointer_prefetch() is not on the same screen than
- * the root window or if an error occured, @p x and @p y are set
+ * the root window or if an error occurred, @p x and @p y are set
* to 0. Otherwise, they are respectively set to the X and Y
* coordinates of the pointer.
*
* @return The parent window of @p window.
*
* Retrieves the parent window of the given window. If
- * an error occured, @c 0 is returned.
+ * an error occurred, @c 0 is returned.
*
* To use this function, you must call before, and in order,
* ecore_x_query_tree_prefetch(), which sends the QueryTree request,
* @return The children windows.
*
* Retrieves the children windows of the given window. If
- * an error occured, @c 0 is returned.
+ * an error occurred, @c 0 is returned.
*
* To use this function, you must call before, and in order,
* ecore_x_query_tree_prefetch(), which sends the QueryTree request,
* Ecore_X_Randr_Unset (or -1) to use currently used outputs.
* @para mode XID of the mode to be set. If set to 0 the CRTC will be disabled.
* If set to -1 the call will fail.
- * @return EINA_TRUE if mode setting was successfull. Else EINA_FALSE
+ * @return EINA_TRUE if mode setting was successful. Else EINA_FALSE
*/
EAPI Eina_Bool
ecore_x_randr_crtc_mode_set(Ecore_X_Window root,
}
/*
- * @Brief move given CRTCs belonging to the given root window's screen dx/dy pixels relative to their current position. The screen size will be automatically adjusted if neccessary and possible.
+ * @Brief move given CRTCs belonging to the given root window's screen dx/dy pixels relative to their current position. The screen size will be automatically adjusted if necessary and possible.
* @param root window which's screen's resources are used
* @param crtcs list of CRTCs to be moved
* @param ncrtc number of CRTCs in array