Mike McCormack <mj.mccormack@samsung.com>
Sangho Park <gouache95@gmail.com>
Jihoon Kim <jihoon48.kim@samsung.com> <imfine98@gmail.com>
+PnB <Poor.NewBie@gmail.com>
2011-01-31 Carsten Haitzler (The Rasterman)
- * Fix: ecore-evas CAN send "render done" messages even if not
+ * Fix ecore-evas CAN send "render done" messages even if not
waiting for sync counter when using gl engine. new semi-sync
mode to account for that.
* Ecore_Win32: improve resize of windows and fix key up event for
the 'space' key.
- * Ecore_WinCE: do not erase a window background
+ * Ecore_WinCE do not erase a window background
2011-02-21 Jihoon Kim
2011-02-22 Carsten Haitzler (The Rasterman)
- * Fix: ecore-file inotify fd would be duplicated in children
+ * Fix ecore-file inotify fd would be duplicated in children
on fork. Have it detecti this on next monitor add and re-init the
inotify fd and fd handler.
2011-02-24 Vincent Torri
- * Ecore_File: fix compilation when ecore_con and curl are not
+ * Ecore_File fix compilation when ecore_con and curl are not
available
2011-02-27 Jihoon Kim
* 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.
+
+2011-03-29 PnB
+
+ * Add ecore_con_url_ssl_ca_set to manually set a certificate authority.
+
+2011-03-30 Carsten Haitzler (The Rasterman)
+
+ * Ecore_X gains some more x sync counter controls and Ecore_Evas
+ now uses the netwm sync protocol to get wm's to only configure
+ as fast as it can keep drawing.
dnl m4_define([v_rel], [-release relname])
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
-m4_define([lt_rev], m4_eval(v_maj + v_min))
-m4_define([lt_cur], v_mic)
+m4_define([lt_cur], m4_eval(v_maj + v_min))
+m4_define([lt_rev], v_mic)
m4_define([lt_age], v_min)
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
AC_DEFINE_UNQUOTED(VERS_MIN, [v_min], [Minor version])
AC_DEFINE_UNQUOTED(VERS_MIC, [v_mic], [Micro version])
AC_DEFINE_UNQUOTED(VERS_REV, [v_rev], [Revison])
-version_info="lt_rev:lt_cur:lt_age"
+version_info="lt_cur:lt_rev:lt_age"
release_info="v_rel"
AC_SUBST(version_info)
AC_SUBST(release_info)
@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?
-
-This section has to be documented. Below is just a quick line to handle all
-Ecore modules at once.
+pkgconfig (.pc) files are installed for every ecore module.
+Thus, to compile using any of them, you can use something like the following:
@verbatim
-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`
+gcc *.c $(pkg-config ecore ecore-$x ecore-$y [...] --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
+#BuildSuggests: xorg-x11-devel, XFree86-devel, libX11-devel, c-ares-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_Fd_Win32_Cb Ecore_Fd_Win32_Cb
+ * @typedef Ecore_Win32_Handle_Cb Ecore_Win32_Handle_Cb
* A callback used by an @ref Ecore_Win32_Handler.
*/
- typedef Eina_Bool (*Ecore_Fd_Win32_Cb) (void *data, Ecore_Win32_Handler *wh);
+ typedef Eina_Bool (*Ecore_Win32_Handle_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_Fd_Win32_Cb func, const void *data);
+ EAPI Ecore_Win32_Handler *ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_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_Fd_Win32_Cb func;
- void *data;
- int references;
- Eina_Bool delete_me : 1;
+ HANDLE h;
+ Ecore_Win32_Handle_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_Fd_Win32_Cb func, const void *data)
+ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_Cb func, const void *data)
{
Ecore_Win32_Handler *wh;
}
#else
EAPI Ecore_Win32_Handler *
-ecore_main_win32_handler_add(void *h __UNUSED__, Ecore_Fd_Win32_Cb func __UNUSED__,
+ecore_main_win32_handler_add(void *h __UNUSED__, Ecore_Win32_Handle_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);
- ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
+ 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 *));
+ }
}
}
if (!work->cancel)
work->u.feedback_run.func_heavy((void *) work->data, (Ecore_Thread *) work);
- ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
+ 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 *));
+ }
}
}
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.
*/
- 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);
+ 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);
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_notify
+ * will receive the data send from the thread function (func_heavy) by ecore_thread_feedback
* 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;
- func_heavy((void *)data, (Ecore_Thread *) &worker);
+ do {
+ worker.reschedule = EINA_FALSE;
- if (worker.cancel) func_cancel((void *)data, (Ecore_Thread *) &worker);
- else func_end((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);
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
EAPI void ecore_con_url_ssl_verify_peer_set(Ecore_Con_Url *url_con,
Eina_Bool verify);
+EAPI int ecore_con_url_ssl_ca_set(Ecore_Con_Url *url_con,
+ const char *ca_path);
/**
* @}
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;
- unsigned int size = sizeof(int);
+ socklen_t 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];
- unsigned int client_addr_len = sizeof(client_addr);
+ socklen_t 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, buf, sizeof(buf), 0,
+ num = recvfrom(svr->fd, (char *)buf, sizeof(buf), 0,
(struct sockaddr *)&client_addr,
&client_addr_len);
*/
#include <string.h>
-#include <arpa/inet.h>
+
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
+
#include <ares.h>
#include "Ecore.h"
static void
_ecore_con_info_cares_state_cb(void *data,
- int fd,
+ ares_socket_t fd,
int read,
int write);
static int
static void
_ecore_con_info_cares_state_cb(void *data __UNUSED__,
- int fd,
+ ares_socket_t 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)svr->fd);
+ gnutls_transport_set_ptr(svr->session, (gnutls_transport_ptr_t)((intptr_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)cl->fd);
+ gnutls_transport_set_ptr(cl->session, (gnutls_transport_ptr_t)((intptr_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);
*/
EAPI void
ecore_con_url_ssl_verify_peer_set(Ecore_Con_Url *url_con,
- Eina_Bool verify)
+ Eina_Bool verify)
{
#ifdef HAVE_CURL
if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
}
/**
+ * Set a custom CA to trust for SSL/TLS connections.
+ *
+ * Specify the path of a file (in PEM format) containing one or more
+ * CA certificate(s) to use for the validation of the server certificate.
+ *
+ * This function can also disable CA validation if @p ca_path is @c NULL.
+ * However, the server certificate still needs to be valid for the connection
+ * to succeed (i.e., the certificate must concern the server the
+ * connection is made to).
+ *
+ * @param url_con Connection object that will use the custom CA.
+ * @param ca_path Path to a CA certificate(s) file or @c NULL to disable
+ * CA validation.
+ *
+ * @return @c 0 on success. When cURL is used, non-zero return values
+ * are equal to cURL error codes.
+ */
+EAPI int
+ecore_con_url_ssl_ca_set(Ecore_Con_Url *url_con, const char *ca_path)
+{
+ int res = -1;
+
+#ifdef HAVE_CURL
+ if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
+ {
+ ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_ssl_ca_set");
+ return -1;
+ }
+
+ if (url_con->active) return -1;
+ if (!url_con->url) return -1;
+ if (ca_path == NULL)
+ res = curl_easy_setopt(url_con->curl_easy, CURLOPT_SSL_VERIFYPEER, 0);
+ else
+ {
+ res = curl_easy_setopt(url_con->curl_easy, CURLOPT_SSL_VERIFYPEER, 1);
+ if (!res)
+ res = curl_easy_setopt(url_con->curl_easy, CURLOPT_CAINFO, ca_path);
+ }
+#else
+ (void)url_con;
+ (void)ca_path;
+#endif
+
+ return res;
+}
+
+
+/**
* @}
*/
fclose(stream);
return CURL_READFUNC_ABORT;
}
- else if ((retcode == 0) || (retcode < nitems))
+ else if (retcode == 0)
{
fclose((FILE *)stream);
return 0;
Ecore_X_XRegion *damages;
Ecore_X_Sync_Counter sync_counter;
Ecore_X_Window leader;
+ Ecore_X_Sync_Counter netwm_sync_counter;
+ int netwm_sync_val_hi;
+ unsigned int netwm_sync_val_lo;
int sync_val; // bigger! this will screw up at 2 billion frames (414 days of continual rendering @ 60fps)
int screen_num;
int px, py, pw, ph;
unsigned char managed : 1;
unsigned char sync_began : 1;
unsigned char sync_cancel : 1;
+ unsigned char netwm_sync_set : 1;
struct {
unsigned char modal : 1;
unsigned char sticky : 1;
/* Interceptors Callbacks */
static void
-_ecore_evas_obj_intercept_move(void *data, Evas_Object *obj __UNUSED__, Evas_Coord x, Evas_Coord y)
+_ecore_evas_obj_intercept_move(void *data, Evas_Object *obj, 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
if (ee->func.fn_delete_request)
protos[num++] = ECORE_X_ATOM_WM_DELETE_WINDOW;
protos[num++] = ECORE_X_ATOM_NET_WM_PING;
+ protos[num++] = ECORE_X_ATOM_NET_WM_SYNC_REQUEST;
ecore_x_icccm_protocol_atoms_set(ee->prop.window, protos, num);
+
+ if (!ee->engine.x.netwm_sync_counter)
+ ee->engine.x.netwm_sync_counter = ecore_x_sync_counter_new(0);
+ ////////
+ {
+ unsigned int tmp = ee->engine.x.netwm_sync_counter;
+ ecore_x_window_prop_card32_set(ee->prop.window,
+ ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER,
+ &tmp, 1);
+ }
}
static void
ee->engine.x.sync_began = 0;
ee->engine.x.sync_cancel = 1;
}
+ else if ((e->message_type == ECORE_X_ATOM_WM_PROTOCOLS) &&
+ (e->data.l[0] == (int)ECORE_X_ATOM_NET_WM_SYNC_REQUEST))
+ {
+ ee = ecore_event_window_match(e->win);
+ if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
+ ee->engine.x.netwm_sync_val_lo = (unsigned int)e->data.l[2];
+ ee->engine.x.netwm_sync_val_hi = (int)e->data.l[3];
+ ee->engine.x.netwm_sync_set = 1;
+ }
return ECORE_CALLBACK_PASS_ON;
}
{
Ecore_Evas *ee = data;
- if (ee->no_comp_sync) return;
- if (!_ecore_evas_app_comp_sync) return;
- if (ee->gl_sync_draw_done) return; // added by gl77.lee
- if (ee->engine.x.sync_counter)
+ if ((!ee->no_comp_sync) &&
+ (_ecore_evas_app_comp_sync) &&
+ (!ee->gl_sync_draw_done)) // added by gl77.lee
{
- if (ee->engine.x.sync_began)
+ if (ee->engine.x.sync_counter)
{
- if (!ee->engine.x.sync_cancel)
+ if (ee->engine.x.sync_began)
{
- ecore_x_e_comp_sync_draw_done_send(ee->engine.x.win_root,
- ee->prop.window);
+ if (!ee->engine.x.sync_cancel)
+ {
+ ecore_x_e_comp_sync_draw_size_done_send
+ (ee->engine.x.win_root, ee->prop.window, ee->w, ee->h);
+ }
}
}
}
+ if (ee->engine.x.netwm_sync_set)
+ {
+ ecore_x_sync_counter_2_set(ee->engine.x.netwm_sync_counter,
+ ee->engine.x.netwm_sync_val_hi,
+ ee->engine.x.netwm_sync_val_lo);
+ ee->engine.x.netwm_sync_set = 0;
+ }
}
#endif
*
* 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
EAPI void ecore_x_e_comp_sync_draw_done_send(
Ecore_X_Window root,
Ecore_X_Window win);
+EAPI void ecore_x_e_comp_sync_draw_size_done_send(
+ Ecore_X_Window root,
+ Ecore_X_Window win,
+ int w,
+ int h);
EAPI void ecore_x_e_comp_sync_supported_set(
Ecore_X_Window root,
Eina_Bool enabled);
EAPI void ecore_x_sync_counter_val_wait(
Ecore_X_Sync_Counter counter,
int val);
-
+
+ EAPI void ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val);
+ EAPI void ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned int val_lo);
+ EAPI Eina_Bool ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, int *val_hi, unsigned int *val_lo);
+
EAPI void ecore_x_xinerama_query_screens_prefetch(
void);
EAPI void ecore_x_xinerama_query_screens_fetch(void);
xev.xclient.message_type = ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE;
xev.xclient.format = 32;
xev.xclient.data.l[0] = win;
- xev.xclient.data.l[1] = 0; // later
+ xev.xclient.data.l[1] = 0; // version
xev.xclient.data.l[2] = 0; // later
xev.xclient.data.l[3] = 0; // later
xev.xclient.data.l[4] = 0; // later
} /* ecore_x_e_comp_sync_draw_done_send */
EAPI void
+ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, Ecore_X_Window win, int w, int h)
+{
+ XEvent xev;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!root)
+ root = DefaultRootWindow(_ecore_x_disp);
+
+ xev.xclient.type = ClientMessage;
+ xev.xclient.display = _ecore_x_disp;
+ xev.xclient.window = win;
+ xev.xclient.message_type = ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE;
+ xev.xclient.format = 32;
+ xev.xclient.data.l[0] = win;
+ xev.xclient.data.l[1] = 1; // version
+ xev.xclient.data.l[2] = w; // win width at draw time
+ xev.xclient.data.l[3] = h; // win height at draw time
+ xev.xclient.data.l[4] = 0; // later
+
+ XSendEvent(_ecore_x_disp, root, False,
+ SubstructureRedirectMask | SubstructureNotifyMask,
+ &xev);
+} /* ecore_x_e_comp_sync_draw_done_send */
+
+EAPI void
ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled)
{
Ecore_X_Window win;
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
// XSync(_ecore_x_disp, False); // dont need this
} /* ecore_x_sync_counter_val_wait */
+EAPI void
+ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val)
+{
+ XSyncValue v;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ XSyncIntToValue(&v, val);
+ XSyncSetCounter(_ecore_x_disp, counter, v);
+}
+
+EAPI void
+ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned int val_lo)
+{
+ XSyncValue v;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ XSyncIntsToValue(&v, val_lo, val_hi);
+ XSyncSetCounter(_ecore_x_disp, counter, v);
+}
+
+EAPI Eina_Bool
+ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, int *val_hi, unsigned int *val_lo)
+{
+ XSyncValue value;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (XSyncQueryCounter(_ecore_x_disp, counter, &value))
+ {
+ *val_lo = (unsigned int)XSyncValueLow32(value);
+ *val_hi = (int)XSyncValueHigh32(value);
+ return EINA_TRUE;
+ }
+ return EINA_FALSE;
+}
+
} /* ecore_x_xinerama_screen_count_get */
EAPI Eina_Bool
-ecore_x_xinerama_screen_geometry_get(int screen __UNUSED__, int *x, int *y, int *w, int *h)
+ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
#ifdef ECORE_XINERAMA
*h = DisplayHeight(_ecore_x_disp, 0);
return EINA_FALSE;
+ screen = 0;
} /* ecore_x_xinerama_screen_geometry_get */