* Fix detection of complete file write in ecore_file inotify.
-2011-03-16 Cedric Bail
-
- * Add ecore_thread_reschedule.
-
-2011-03-19 Mike Blumenkrantz
-
- * Fix crash in ecore_con_ssl related to attempted connections on a dead socket
-
-2011-03-23 Carsten Haitzler (The Rasterman)
-
- * Fix: ecore-evas interceptor didn't handle override-redirect
- windows correctly, expecting a feed-back event from x, which it didn't
- get.
-
-2011-03-23 Elixirious
-
- * Fix: ecore_con_url_ftp_upload upload the file until the end.
-
@image html e.png
@version @PACKAGE_VERSION@
-@author Carsten Haitzler <raster@rasterman.com>
-@author Tom Gilbert <tom@linuxbrit.co.uk>
-@author Burra <burra@colorado.edu>
-@author Chris Ross <chris@darkrock.co.uk>
-@author Term <term@twistedpath.org>
-@author Tilman Sauerbeck <tilman@code-monkey.de>
-@author Ibukun Olumuyiwa <ibukun@computer.org>
-@author Yuri <da2001@hotmail.ru>
-@author Nicholas Curran <quasar@bigblue.net.au>
-@author Howell Tam <pigeon@pigeond.net>
-@author Nathan Ingersoll <rbdpngn@users.sourceforge.net>
-@author Andrew Elcock <andy@elcock.org>
-@author Kim Woelders <kim@woelders.dk>
-@author Sebastian Dransfeld <sebastid@tango.flipp.net>
-@author Simon Poole <simon.armlinux@themalago.net>
-@author Jorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>
-@author dan sinclair <zero@everburning.com>
-@author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
-@author David 'onefang' Seikel <onefang@gmail.com>
-@author Hisham 'CodeWarrior' Mardam Bey <hisham@hisham.cc>
-@author Brian 'rephorm' Mattern <rephorm@rephorm.com>
-@author Tim Horton <hortont424@gmail.com>
-@author Arnaud de Turckheim 'quarium' <quarium@gmail.com>
-@author Matt Barclay <mbarclay@gmail.com>
-@author Peter Wehrfritz <peter.wehrfritz@web.de>
-@author Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>
-@author Vincent Torri <vincent.torri@gmail.com>
-@author Lars Munch <lars@segv.dk>
-@author Andre Dieb <andre.dieb@gmail.com>
-@author Mathieu Taillefumier <mathieu.taillefumier@free.fr>
-@author Rui Miguel Silva Seabra <rms@1407.org>
+@author Carsten Haitzler <raster@@rasterman.com>
+@author Tom Gilbert <tom@@linuxbrit.co.uk>
+@author Burra <burra@@colorado.edu>
+@author Chris Ross <chris@@darkrock.co.uk>
+@author Term <term@@twistedpath.org>
+@author Tilman Sauerbeck <tilman@@code-monkey.de>
+@author Ibukun Olumuyiwa <ibukun@@computer.org>
+@author Yuri <da2001@@hotmail.ru>
+@author Nicholas Curran <quasar@@bigblue.net.au>
+@author Howell Tam <pigeon@@pigeond.net>
+@author Nathan Ingersoll <rbdpngn@@users.sourceforge.net>
+@author Andrew Elcock <andy@@elcock.org>
+@author Kim Woelders <kim@@woelders.dk>
+@author Sebastian Dransfeld <sebastid@@tango.flipp.net>
+@author Simon Poole <simon.armlinux@@themalago.net>
+@author Jorge Luis Zapata Muga <jorgeluis.zapata@@gmail.com>
+@author dan sinclair <zero@@everburning.com>
+@author Michael 'Mickey' Lauer <mickey@@tm.informatik.uni-frankfurt.de>
+@author David 'onefang' Seikel <onefang@@gmail.com>
+@author Hisham 'CodeWarrior' Mardam Bey <hisham@@hisham.cc>
+@author Brian 'rephorm' Mattern <rephorm@@rephorm.com>
+@author Tim Horton <hortont424@@gmail.com>
+@author Arnaud de Turckheim 'quarium' <quarium@@gmail.com>
+@author Matt Barclay <mbarclay@@gmail.com>
+@author Peter Wehrfritz <peter.wehrfritz@@web.de>
+@author Albin "Lutin" Tonnerre <albin.tonnerre@@gmail.com>
+@author Vincent Torri <vincent.torri@@gmail.com>
+@author Lars Munch <lars@@segv.dk>
+@author Andre Dieb <andre.dieb@@gmail.com>
+@author Mathieu Taillefumier <mathieu.taillefumier@@free.fr>
+@author Rui Miguel Silva Seabra <rms@@1407.org>
@author Samsung Electronics
@author Samsung SAIT
-@author Nicolas Aguirre <aguirre.nicolas@gmail.com>
-@author Brett Nash <nash@nash.id.au>
-@author Mike Blumenkrantz <mike@zentific.com>
-@author Leif Middelschulte <leif.middelschulte@gmail.com>
-@author Mike McCormack <mj.mccormack@samsung.com>
+@author Nicolas Aguirre <aguirre.nicolas@@gmail.com>
+@author Brett Nash <nash@@nash.id.au>
+@author Mike Blumenkrantz <mike@@zentific.com>
+@author Leif Middelschulte <leif.middelschulte@@gmail.com>
+@author Mike McCormack <mj.mccormack@@samsung.com>
@author Sangho Park <gouache95@gmail.com>
@author Jihoon Kim <jihoon48.kim@samsung.com> <imfine98@gmail.com>
@date 2000-2011
@li @ref Ecore_WinCE_Group
@section compiling How to compile using Ecore?
-pkgconfig (.pc) files are installed for every ecore module.
-Thus, to compile using any of them, you can use something like the following:
+
+This section has to be documented. Below is just a quick line to handle all
+Ecore modules at once.
@verbatim
-gcc *.c $(pkg-config ecore ecore-$x ecore-$y [...] --cflags --libs)
+gcc *.c \
+-I/usr/local/include -I/usr/X11R6/include \
+-L/usr/local/lib -L/usr/X11R6/lib \
+-lecore -lecore_evas -lecore_x -lecore_fb \
+`pkg-config evas --cflags --libs`
@endverbatim
@section install How is it installed?
@todo (1.0) Document API
+*/
+
/*
@page Ecore_Main_Loop_Page The Ecore Main Loop
Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
-#BuildSuggests: xorg-x11-devel, XFree86-devel, libX11-devel, c-ares-devel
+#BuildSuggests: xorg-x11-devel, XFree86-devel, libX11-devel
BuildRequires: libjpeg-devel, openssl-devel %{?breq_lib_ecore_directfb}
BuildRequires: curl-devel, evas-devel, eet-devel %{?breq_lib_ecore_sdl}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
*/
typedef void (*Ecore_Fd_Prep_Cb) (void *data, Ecore_Fd_Handler *fd_handler);
/**
- * @typedef Ecore_Win32_Handle_Cb Ecore_Win32_Handle_Cb
+ * @typedef Ecore_Fd_Win32_Cb Ecore_Fd_Win32_Cb
* A callback used by an @ref Ecore_Win32_Handler.
*/
- typedef Eina_Bool (*Ecore_Win32_Handle_Cb) (void *data, Ecore_Win32_Handler *wh);
+ typedef Eina_Bool (*Ecore_Fd_Win32_Cb) (void *data, Ecore_Win32_Handler *wh);
typedef struct _Ecore_Job Ecore_Job; /**< A job handle */
EAPI Eina_Bool ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags);
EAPI void ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags);
- EAPI Ecore_Win32_Handler *ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_Cb func, const void *data);
+ EAPI Ecore_Win32_Handler *ecore_main_win32_handler_add(void *h, Ecore_Fd_Win32_Cb func, const void *data);
EAPI void *ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler);
/**
EAPI Eina_Bool ecore_thread_cancel(Ecore_Thread *thread);
EAPI Eina_Bool ecore_thread_check(Ecore_Thread *thread);
EAPI Eina_Bool ecore_thread_feedback(Ecore_Thread *thread, const void *msg_data);
- EAPI Eina_Bool ecore_thread_reschedule(Ecore_Thread *thread);
EAPI int ecore_thread_active_get(void);
EAPI int ecore_thread_pending_get(void);
EAPI int ecore_thread_pending_feedback_get(void);
{
EINA_INLIST;
ECORE_MAGIC;
- HANDLE h;
- Ecore_Win32_Handle_Cb func;
- void *data;
- int references;
- Eina_Bool delete_me : 1;
+ HANDLE h;
+ Ecore_Fd_Win32_Cb func;
+ void *data;
+ int references;
+ Eina_Bool delete_me : 1;
};
#endif
#ifdef _WIN32
EAPI Ecore_Win32_Handler *
-ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_Cb func, const void *data)
+ecore_main_win32_handler_add(void *h, Ecore_Fd_Win32_Cb func, const void *data)
{
Ecore_Win32_Handler *wh;
}
#else
EAPI Ecore_Win32_Handler *
-ecore_main_win32_handler_add(void *h __UNUSED__, Ecore_Win32_Handle_Cb func __UNUSED__,
+ecore_main_win32_handler_add(void *h __UNUSED__, Ecore_Fd_Win32_Cb func __UNUSED__,
const void *data __UNUSED__)
{
return NULL;
Eina_Bool cancel : 1;
Eina_Bool feedback_run : 1;
Eina_Bool kill : 1;
- Eina_Bool reschedule : 1;
};
#ifdef EFL_HAVE_THREADS
if (!work->cancel)
work->u.short_run.func_blocking((void *) work->data, (Ecore_Thread*) work);
- if (work->reschedule)
- {
- work->reschedule = EINA_FALSE;
-
- LKL(_ecore_pending_job_threads_mutex);
- _ecore_pending_job_threads = eina_list_append(_ecore_pending_job_threads, work);
- LKU(_ecore_pending_job_threads_mutex);
- }
- else
- {
- ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
- }
+ ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
}
}
if (!work->cancel)
work->u.feedback_run.func_heavy((void *) work->data, (Ecore_Thread *) work);
- if (work->reschedule)
- {
- work->reschedule = EINA_FALSE;
-
- LKL(_ecore_pending_job_threads_mutex);
- _ecore_pending_job_threads_feedback = eina_list_append(_ecore_pending_job_threads_feedback, work);
- LKU(_ecore_pending_job_threads_mutex);
- }
- else
- {
- ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
- }
+ ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
}
}
work->cancel = EINA_FALSE;
work->feedback_run = EINA_FALSE;
work->kill = EINA_FALSE;
- work->reschedule = EINA_FALSE;
work->data = data;
#ifdef EFL_HAVE_THREADS
If no thread and as we don't want to break app that rely on this
facility, we will lock the interface until we are done.
*/
- do {
- /* Handle reschedule by forcing it here. That would mean locking the app,
- * would be better with an idler, but really to complex for a case where
- * thread should really exist.
- */
- work->reschedule = EINA_FALSE;
-
- func_blocking((void *)data, (Ecore_Thread *) work);
- if (work->cancel == EINA_FALSE) func_end((void *)data, (Ecore_Thread *) work);
- else func_end((void *)data, (Ecore_Thread *) work);
-
- } while (work->reschedule == EINA_TRUE);
+ func_blocking((void *)data, (Ecore_Thread *) work);
+ if (work->cancel == EINA_FALSE) func_end((void *)data, (Ecore_Thread *) work);
+ else func_end((void *)data, (Ecore_Thread *) work);
free(work);
* 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 careful). The second one, func_notify,
- * will receive the data send from the thread function (func_heavy) by ecore_thread_feedback
+ * 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). The third, func_end,
* that will be called in Ecore main loop when func_heavy is done. So you
* can use all the EFL inside this function. The last one, func_cancel, will
worker->cancel = EINA_FALSE;
worker->feedback_run = EINA_TRUE;
worker->kill = EINA_FALSE;
- worker->reschedule = EINA_FALSE;
-
worker->u.feedback_run.send = 0;
worker->u.feedback_run.received = 0;
worker.feedback_run = EINA_TRUE;
worker.kill = EINA_FALSE;
- do {
- worker.reschedule = EINA_FALSE;
+ func_heavy((void *)data, (Ecore_Thread *) &worker);
- func_heavy((void *)data, (Ecore_Thread *) &worker);
-
- if (worker.cancel) func_cancel((void *)data, (Ecore_Thread *) &worker);
- else func_end((void *)data, (Ecore_Thread *) &worker);
- } while (worker.reschedule == EINA_FALSE);
+ if (worker.cancel) func_cancel((void *)data, (Ecore_Thread *) &worker);
+ else func_end((void *)data, (Ecore_Thread *) &worker);
return NULL;
#endif
}
/**
- * @brief Plan to recall the heavy function once it exist it.
- * @param thread The current Ecore_Thread context to reschedule
- * @return EINA_TRUE if data was successfully send to main loop,
- * EINA_FALSE if anything goes wrong.
- *
- * After a succesfull call, you can still do what you want in your thread, it
- * will only reschedule it once you exit the heavy loop.
- *
- * You should use this function only in the func_heavy call.
- */
-EAPI Eina_Bool
-ecore_thread_reschedule(Ecore_Thread *thread)
-{
- Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) thread;
-
- if (!worker) return EINA_FALSE;
-
-#ifdef EFL_HAVE_THREADS
- if (!PHE(worker->self, PHS())) return EINA_FALSE;
-#endif
-
- worker->reschedule = EINA_TRUE;
- return EINA_TRUE;
-}
-
-/**
* @brief Get number of active thread jobs
* @return Number of active threads running jobs
* This returns the number of threads currently running jobs through the
if (svr->path)
free(svr->path);
-
+#ifndef _WIN32
if (svr->fd_handler)
ecore_main_fd_handler_del(svr->fd_handler);
if (svr->ip)
eina_stringshare_del(svr->ip);
+#endif
ecore_con_ssl_server_shutdown(svr);
free(svr);
return NULL;
{
int res;
int so_err = 0;
- socklen_t size = sizeof(int);
+ unsigned int size = sizeof(int);
res = getsockopt(svr->fd, SOL_SOCKET, SO_ERROR, (void *)&so_err, &size);
#ifdef _WIN32
{
unsigned char buf[READBUFSIZ];
unsigned char client_addr[256];
- socklen_t client_addr_len = sizeof(client_addr);
+ unsigned int client_addr_len = sizeof(client_addr);
int num;
Ecore_Con_Server *svr;
Ecore_Con_Client *cl = NULL;
svr = data;
- if (svr->delete_me || svr->dead)
+ if (svr->delete_me || svr->dead)
return ECORE_CALLBACK_RENEW;
if (ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_WRITE))
#ifdef _WIN32
num = fcntl(svr->fd, F_SETFL, O_NONBLOCK);
if (num >= 0)
- num = recvfrom(svr->fd, (char *)buf, sizeof(buf), 0,
+ num = recvfrom(svr->fd, buf, sizeof(buf), 0,
(struct sockaddr *)&client_addr,
&client_addr_len);
*/
#include <string.h>
-
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
-
+#include <arpa/inet.h>
#include <ares.h>
#include "Ecore.h"
static void
_ecore_con_info_cares_state_cb(void *data,
- ares_socket_t fd,
+ int fd,
int read,
int write);
static int
static void
_ecore_con_info_cares_state_cb(void *data __UNUSED__,
- ares_socket_t fd,
+ int fd,
int read,
int write)
{
SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_credentials_set(svr->session, GNUTLS_CRD_ANON, svr->anoncred_c));
gnutls_dh_set_prime_bits(svr->session, 512);
- gnutls_transport_set_ptr(svr->session, (gnutls_transport_ptr_t)((intptr_t)svr->fd));
+ gnutls_transport_set_ptr(svr->session, (gnutls_transport_ptr_t)svr->fd);
svr->ssl_state = ECORE_CON_SSL_STATE_HANDSHAKING;
case ECORE_CON_SSL_STATE_HANDSHAKING:
gnutls_certificate_server_set_request(cl->session, GNUTLS_CERT_REQUEST);
gnutls_dh_set_prime_bits(cl->session, 2048);
- gnutls_transport_set_ptr(cl->session, (gnutls_transport_ptr_t)((intptr_t)cl->fd));
+ gnutls_transport_set_ptr(cl->session, (gnutls_transport_ptr_t)cl->fd);
cl->ssl_state = ECORE_CON_SSL_STATE_HANDSHAKING;
case ECORE_CON_SSL_STATE_HANDSHAKING:
{
int num;
- if (!svr->ssl) return -1;
num = SSL_read(svr->ssl, buf, size);
svr->ssl_err = SSL_get_error(svr->ssl, num);
{
int num;
- if (!cl->ssl) return -1;
num = SSL_read(cl->ssl, buf, size);
cl->ssl_err = SSL_get_error(cl->ssl, num);
fclose(stream);
return CURL_READFUNC_ABORT;
}
- else if (retcode == 0)
+ else if ((retcode == 0) || (retcode < nitems))
{
fclose((FILE *)stream);
return 0;
/* Interceptors Callbacks */
static void
-_ecore_evas_obj_intercept_move(void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y)
+_ecore_evas_obj_intercept_move(void *data, Evas_Object *obj __UNUSED__, Evas_Coord x, Evas_Coord y)
{
Ecore_Evas *ee = data;
// FIXME: account for frame
ecore_evas_move(ee, x, y);
- if (ecore_evas_override_get(ee)) evas_object_move(obj, x, y);
}
static void
*
* ECORE_IMF_EVENT_PREEDIT_START should be added when a new preedit sequence starts.
*
- * ECORE_IMF_EVENT_PREEDIT_START should be added when a new preedit sequence starts.
- *
* @param ctx An #Ecore_IMF_Context.
* @ingroup Ecore_IMF_Context_Module_Group
*/
*
* ECORE_IMF_EVENT_PREEDIT_END should be added when a new preedit sequence has been completed or canceled.
*
- * ECORE_IMF_EVENT_PREEDIT_END should be added when a new preedit sequence has been completed or canceled.
- *
* @param ctx An #Ecore_IMF_Context.
* @ingroup Ecore_IMF_Context_Module_Group
*/
* by adding the ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue.
* Note that offset and n_chars are in characters not in bytes.
*
- * Asks the widget that the input context is attached to to delete characters around the cursor position
- * by adding the ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue.
- * Note that offset and n_chars are in characters not in bytes.
- *
* @param ctx An #Ecore_IMF_Context.
* @param offset The start offset of surrounding to be deleted.
* @param n_chars The number of characters to be deleted.
#ifndef _ECORE_INPUT_H
#define _ECORE_INPUT_H
-#ifdef _WIN32
-# include <stddef.h>
-#else
-# include <inttypes.h>
-#endif
#ifdef EAPI
# undef EAPI
static Window _ecore_x_mouse_down_last_last_event_win = 0;
static Time _ecore_x_mouse_down_last_time = 0;
static Time _ecore_x_mouse_down_last_last_time = 0;
-// static int _ecore_x_mouse_up_count = 0;
+static int _ecore_x_mouse_up_count = 0;
static int _ecore_x_mouse_down_did_double = 0;
static int _ecore_x_mouse_down_did_triple = 0;
static int _ecore_x_last_event_mouse_move = 0;
}
}
-
- /* NB: Block commented out as _ecore_x_mouse_up_count appears to have
- * no use. The variable is also commented out above. This code block is
- * the only place that this variable is used, and appears to serve no
- * purpose. - dh
+
if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN
&& !e->double_click
&& !e->triple_click)
_ecore_x_mouse_up_count = 0;
- */
e->multi.device = dev;
e->multi.radius = (radx + rady) / 2;
xevent->xselectionrequest.time);
}
}
+
+ return;
} /* _ecore_x_event_handle_selection_request */
void