2008-05-25 22:16:34 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2011-12-06 08:09:05 -08:00
|
|
|
#include <stdlib.h>
|
2009-01-31 10:33:39 -08:00
|
|
|
#include <string.h>
|
2010-01-03 13:55:50 -08:00
|
|
|
#include <sys/types.h>
|
2010-02-28 15:27:47 -08:00
|
|
|
#include <errno.h>
|
2011-12-08 08:19:44 -08:00
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <fcntl.h>
|
2009-01-31 10:33:39 -08:00
|
|
|
|
2010-04-16 22:35:13 -07:00
|
|
|
#ifndef _MSC_VER
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
2011-12-08 08:19:44 -08:00
|
|
|
#ifdef HAVE_SYS_MMAN_H
|
|
|
|
# include <sys/mman.h>
|
|
|
|
#endif
|
|
|
|
|
2011-06-17 14:49:47 -07:00
|
|
|
#ifdef HAVE_EVIL
|
|
|
|
# include <Evil.h>
|
|
|
|
#endif
|
|
|
|
|
2003-09-23 01:09:32 -07:00
|
|
|
#include "Ecore.h"
|
2009-12-22 13:15:12 -08:00
|
|
|
#include "ecore_private.h"
|
2009-03-16 09:24:43 -07:00
|
|
|
#include "Ecore_Input.h"
|
|
|
|
|
2003-09-23 01:09:32 -07:00
|
|
|
#include "ecore_evas_private.h"
|
2009-04-11 06:56:18 -07:00
|
|
|
#include "Ecore_Evas.h"
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI Eina_Bool _ecore_evas_app_comp_sync = 1;
|
|
|
|
EAPI int _ecore_evas_log_dom = -1;
|
2003-09-23 01:09:32 -07:00
|
|
|
static int _ecore_evas_init_count = 0;
|
2008-09-16 09:22:00 -07:00
|
|
|
static Ecore_Fd_Handler *_ecore_evas_async_events_fd = NULL;
|
2010-06-24 09:15:56 -07:00
|
|
|
static Eina_Bool _ecore_evas_async_events_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2010-01-06 21:29:06 -08:00
|
|
|
static Ecore_Idle_Enterer *ecore_evas_idle_enterer = NULL;
|
|
|
|
static Ecore_Evas *ecore_evases = NULL;
|
|
|
|
static int _ecore_evas_fps_debug = 0;
|
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
static Eina_Bool
|
2012-11-25 01:55:32 -08:00
|
|
|
_ecore_evas_idle_enter(void *data EINA_UNUSED)
|
2010-01-06 21:29:06 -08:00
|
|
|
{
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
double t1 = 0.0;
|
|
|
|
double t2 = 0.0;
|
|
|
|
int rend = 0;
|
2011-04-20 07:15:33 -07:00
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
if (!ecore_evases) return ECORE_CALLBACK_RENEW;
|
2010-01-06 21:29:06 -08:00
|
|
|
if (_ecore_evas_fps_debug)
|
|
|
|
{
|
|
|
|
t1 = ecore_time_get();
|
|
|
|
}
|
|
|
|
EINA_INLIST_FOREACH(ecore_evases, ee)
|
|
|
|
{
|
|
|
|
if (!ee->manual_render)
|
|
|
|
{
|
|
|
|
if (ee->engine.func->fn_render)
|
|
|
|
rend |= ee->engine.func->fn_render(ee);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_ecore_evas_fps_debug)
|
|
|
|
{
|
|
|
|
t2 = ecore_time_get();
|
|
|
|
if (rend)
|
|
|
|
_ecore_evas_fps_debug_rendertime_add(t2 - t1);
|
|
|
|
}
|
2010-06-24 09:15:56 -07:00
|
|
|
return ECORE_CALLBACK_RENEW;
|
2010-01-06 21:29:06 -08:00
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI Ecore_Evas_Interface *
|
2012-12-05 13:15:42 -08:00
|
|
|
_ecore_evas_interface_get(const Ecore_Evas *ee, const char *iname)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Ecore_Evas_Interface *i;
|
|
|
|
|
2012-12-18 12:14:11 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ee, NULL);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iname, NULL);
|
2012-12-05 13:15:42 -08:00
|
|
|
|
|
|
|
EINA_LIST_FOREACH(ee->engine.ifaces, l, i)
|
|
|
|
{
|
|
|
|
if (!strcmp(i->name, iname))
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
2012-12-18 12:14:11 -08:00
|
|
|
CRIT("Ecore_Evas %p (engine: %s) does not have interface '%s'",
|
|
|
|
ee, ee->driver, iname);
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2004-10-21 20:41:49 -07:00
|
|
|
/**
|
2012-07-28 02:26:06 -07:00
|
|
|
* Query if a particular rendering engine target has support
|
2004-10-21 20:41:49 -07:00
|
|
|
* @param engine The engine to check support for
|
2010-09-08 04:23:42 -07:00
|
|
|
* @return 1 if the particular engine is supported, 0 if it is not
|
2007-08-26 04:17:21 -07:00
|
|
|
*
|
2004-10-21 20:41:49 -07:00
|
|
|
* 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.
|
|
|
|
*/
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI int
|
2004-10-21 20:41:49 -07:00
|
|
|
ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine)
|
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
/* It should be done reading the availables engines */
|
|
|
|
|
2004-10-21 20:41:49 -07:00
|
|
|
switch (engine)
|
|
|
|
{
|
2008-07-23 03:00:01 -07:00
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_BUFFER:
|
2012-12-07 09:18:17 -08:00
|
|
|
#ifdef BUILD_ECORE_EVAS_BUFFER
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2004-10-21 20:41:49 -07:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2007-08-26 04:17:21 -07:00
|
|
|
#endif
|
2009-07-14 14:18:27 -07:00
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_XLIB:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_SOFTWARE_XLIB
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2004-10-21 20:41:49 -07:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2007-08-26 04:17:21 -07:00
|
|
|
#endif
|
2005-10-02 23:45:45 -07:00
|
|
|
case ECORE_EVAS_ENGINE_XRENDER_X11:
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2008-07-23 03:00:01 -07:00
|
|
|
case ECORE_EVAS_ENGINE_OPENGL_X11:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_OPENGL_X11
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2007-06-21 15:49:36 -07:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2007-08-26 04:17:21 -07:00
|
|
|
#endif
|
2008-07-23 03:00:01 -07:00
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_XCB:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_SOFTWARE_XCB
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2005-01-08 10:40:32 -08:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2007-08-26 04:17:21 -07:00
|
|
|
#endif
|
2008-07-23 03:00:01 -07:00
|
|
|
case ECORE_EVAS_ENGINE_XRENDER_XCB:
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2009-04-22 20:24:16 -07:00
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_GDI:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2009-04-22 20:24:16 -07:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2007-08-27 03:20:12 -07:00
|
|
|
#endif
|
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_DDRAW:
|
2008-07-16 23:06:34 -07:00
|
|
|
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2007-08-27 03:20:12 -07:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2007-08-27 03:20:12 -07:00
|
|
|
#endif
|
|
|
|
case ECORE_EVAS_ENGINE_DIRECT3D:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_DIRECT3D
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2007-08-27 03:20:12 -07:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2008-06-26 02:56:08 -07:00
|
|
|
#endif
|
2008-07-16 23:06:34 -07:00
|
|
|
case ECORE_EVAS_ENGINE_OPENGL_GLEW:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_OPENGL_GLEW
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2008-06-26 02:56:08 -07:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2007-07-16 00:23:11 -07:00
|
|
|
#endif
|
2009-03-13 09:35:16 -07:00
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_SDL:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_SOFTWARE_SDL
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2007-07-16 00:23:11 -07:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2010-01-30 02:23:54 -08:00
|
|
|
#endif
|
|
|
|
case ECORE_EVAS_ENGINE_OPENGL_SDL:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_OPENGL_SDL
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2010-01-30 02:23:54 -08:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2008-07-23 03:00:01 -07:00
|
|
|
#endif
|
|
|
|
case ECORE_EVAS_ENGINE_DIRECTFB:
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2008-07-23 03:00:01 -07:00
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_FB:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_FB
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2008-07-23 03:00:01 -07:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2008-07-23 03:00:01 -07:00
|
|
|
#endif
|
|
|
|
|
2012-12-05 06:09:49 -08:00
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_8_X11:
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2008-07-23 03:00:01 -07:00
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_16_X11:
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2008-07-16 23:06:34 -07:00
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_16_DDRAW:
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2008-07-16 23:06:34 -07:00
|
|
|
case ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE:
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2012-10-15 06:02:39 -07:00
|
|
|
|
2011-11-02 12:20:09 -07:00
|
|
|
case ECORE_EVAS_ENGINE_OPENGL_COCOA:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_OPENGL_COCOA
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_TRUE;
|
2009-10-23 08:00:50 -07:00
|
|
|
#else
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2007-07-16 00:23:11 -07:00
|
|
|
#endif
|
2011-10-05 15:11:00 -07:00
|
|
|
case ECORE_EVAS_ENGINE_EWS:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_EWS
|
|
|
|
return EINA_TRUE;
|
|
|
|
#else
|
|
|
|
return EINA_FALSE;
|
|
|
|
#endif
|
2011-11-05 10:50:02 -07:00
|
|
|
case ECORE_EVAS_ENGINE_PSL1GHT:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_PSL1GHT
|
|
|
|
return EINA_TRUE;
|
|
|
|
#else
|
|
|
|
return EINA_FALSE;
|
2011-12-26 15:27:20 -08:00
|
|
|
#endif
|
|
|
|
case ECORE_EVAS_ENGINE_WAYLAND_SHM:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
|
|
|
|
return EINA_TRUE;
|
|
|
|
#else
|
|
|
|
return EINA_FALSE;
|
|
|
|
#endif
|
|
|
|
case ECORE_EVAS_ENGINE_WAYLAND_EGL:
|
|
|
|
#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
|
|
|
|
return EINA_TRUE;
|
|
|
|
#else
|
|
|
|
return EINA_FALSE;
|
2011-11-05 10:50:02 -07:00
|
|
|
#endif
|
2004-10-21 20:41:49 -07:00
|
|
|
default:
|
2011-08-29 14:47:07 -07:00
|
|
|
return EINA_FALSE;
|
2004-10-21 20:41:49 -07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2012-08-13 01:52:45 -07:00
|
|
|
static void
|
2012-11-25 01:55:32 -08:00
|
|
|
_ecore_evas_fork_cb(void *data EINA_UNUSED)
|
2012-08-13 01:52:45 -07:00
|
|
|
{
|
|
|
|
int fd;
|
|
|
|
|
|
|
|
if (_ecore_evas_async_events_fd)
|
|
|
|
ecore_main_fd_handler_del(_ecore_evas_async_events_fd);
|
|
|
|
fd = evas_async_events_fd_get();
|
|
|
|
if (fd >= 0)
|
|
|
|
_ecore_evas_async_events_fd =
|
|
|
|
ecore_main_fd_handler_add(fd, ECORE_FD_READ,
|
|
|
|
_ecore_evas_async_events_fd_handler, NULL,
|
|
|
|
NULL, NULL);
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI int
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_init(void)
|
|
|
|
{
|
2009-10-09 22:28:43 -07:00
|
|
|
int fd;
|
|
|
|
|
|
|
|
if (++_ecore_evas_init_count != 1)
|
|
|
|
return _ecore_evas_init_count;
|
|
|
|
|
|
|
|
if (!evas_init())
|
|
|
|
return --_ecore_evas_init_count;
|
|
|
|
|
|
|
|
if (!ecore_init())
|
|
|
|
goto shutdown_evas;
|
|
|
|
|
2010-10-07 15:31:46 -07:00
|
|
|
_ecore_evas_log_dom = eina_log_domain_register
|
|
|
|
("ecore_evas", ECORE_EVAS_DEFAULT_LOG_COLOR);
|
|
|
|
if(_ecore_evas_log_dom < 0)
|
2008-09-16 09:22:00 -07:00
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
EINA_LOG_ERR("Impossible to create a log domain for Ecore_Evas.");
|
|
|
|
goto shutdown_ecore;
|
2008-09-16 09:22:00 -07:00
|
|
|
}
|
2009-10-09 22:28:43 -07:00
|
|
|
|
2012-08-13 01:52:45 -07:00
|
|
|
ecore_fork_reset_callback_add(_ecore_evas_fork_cb, NULL);
|
2009-10-09 22:28:43 -07:00
|
|
|
fd = evas_async_events_fd_get();
|
2012-08-13 01:52:45 -07:00
|
|
|
if (fd >= 0)
|
|
|
|
_ecore_evas_async_events_fd =
|
|
|
|
ecore_main_fd_handler_add(fd, ECORE_FD_READ,
|
|
|
|
_ecore_evas_async_events_fd_handler, NULL,
|
|
|
|
NULL, NULL);
|
2011-04-20 07:15:33 -07:00
|
|
|
|
|
|
|
ecore_evas_idle_enterer =
|
2010-01-06 21:29:06 -08:00
|
|
|
ecore_idle_enterer_add(_ecore_evas_idle_enter, NULL);
|
|
|
|
if (getenv("ECORE_EVAS_FPS_DEBUG")) _ecore_evas_fps_debug = 1;
|
|
|
|
if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
|
2011-04-20 07:15:33 -07:00
|
|
|
|
2011-10-05 15:11:00 -07:00
|
|
|
#ifdef BUILD_ECORE_EVAS_EWS
|
|
|
|
_ecore_evas_ews_events_init();
|
|
|
|
#endif
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
_ecore_evas_engine_init();
|
2012-04-17 18:24:30 -07:00
|
|
|
|
2011-10-10 23:18:13 -07:00
|
|
|
if (getenv("ECORE_EVAS_COMP_NOSYNC"))
|
|
|
|
_ecore_evas_app_comp_sync = 0;
|
2009-10-09 22:28:43 -07:00
|
|
|
return _ecore_evas_init_count;
|
|
|
|
|
|
|
|
shutdown_ecore:
|
|
|
|
ecore_shutdown();
|
|
|
|
shutdown_evas:
|
|
|
|
evas_shutdown();
|
|
|
|
|
|
|
|
return --_ecore_evas_init_count;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI int
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_shutdown(void)
|
|
|
|
{
|
2010-02-24 14:48:55 -08:00
|
|
|
if (--_ecore_evas_init_count != 0)
|
|
|
|
return _ecore_evas_init_count;
|
|
|
|
|
2010-01-06 21:29:06 -08:00
|
|
|
while (ecore_evases) _ecore_evas_free(ecore_evases);
|
|
|
|
|
|
|
|
if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown();
|
|
|
|
ecore_idle_enterer_del(ecore_evas_idle_enterer);
|
|
|
|
ecore_evas_idle_enterer = NULL;
|
2009-10-09 22:28:43 -07:00
|
|
|
|
2011-10-05 15:11:00 -07:00
|
|
|
#ifdef BUILD_ECORE_EVAS_EWS
|
|
|
|
while (_ecore_evas_ews_shutdown());
|
|
|
|
#endif
|
2012-12-05 13:15:42 -08:00
|
|
|
_ecore_evas_engine_shutdown();
|
2009-10-09 22:28:43 -07:00
|
|
|
if (_ecore_evas_async_events_fd)
|
|
|
|
ecore_main_fd_handler_del(_ecore_evas_async_events_fd);
|
2012-08-13 01:52:45 -07:00
|
|
|
|
|
|
|
ecore_fork_reset_callback_del(_ecore_evas_fork_cb, NULL);
|
2009-10-09 22:28:43 -07:00
|
|
|
|
|
|
|
eina_log_domain_unregister(_ecore_evas_log_dom);
|
2009-12-21 09:32:19 -08:00
|
|
|
_ecore_evas_log_dom = -1;
|
2009-10-09 22:28:43 -07:00
|
|
|
ecore_shutdown();
|
|
|
|
evas_shutdown();
|
|
|
|
|
2003-09-23 01:09:32 -07:00
|
|
|
return _ecore_evas_init_count;
|
|
|
|
}
|
|
|
|
|
2010-02-01 06:13:48 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_app_comp_sync_set(Eina_Bool do_sync)
|
2010-02-01 06:13:48 -08:00
|
|
|
{
|
|
|
|
_ecore_evas_app_comp_sync = do_sync;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2010-02-01 06:13:48 -08:00
|
|
|
ecore_evas_app_comp_sync_get(void)
|
|
|
|
{
|
|
|
|
return _ecore_evas_app_comp_sync;
|
|
|
|
}
|
|
|
|
|
2008-09-09 22:13:29 -07:00
|
|
|
struct ecore_evas_engine {
|
|
|
|
const char *name;
|
|
|
|
Ecore_Evas *(*constructor)(int x, int y, int w, int h, const char *extra_options);
|
|
|
|
};
|
|
|
|
|
|
|
|
/* inline is just to avoid need to ifdef around it */
|
2008-10-26 13:05:59 -07:00
|
|
|
static inline const char *
|
2008-09-09 22:13:29 -07:00
|
|
|
_ecore_evas_parse_extra_options_str(const char *extra_options, const char *key, char **value)
|
|
|
|
{
|
|
|
|
int len = strlen(key);
|
|
|
|
|
|
|
|
while (extra_options)
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
const char *p;
|
|
|
|
|
|
|
|
if (strncmp(extra_options, key, len) != 0)
|
|
|
|
{
|
|
|
|
extra_options = strchr(extra_options, ';');
|
|
|
|
if (extra_options)
|
|
|
|
extra_options++;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
extra_options += len;
|
|
|
|
p = strchr(extra_options, ';');
|
|
|
|
if (p)
|
|
|
|
{
|
|
|
|
len = p - extra_options;
|
|
|
|
*value = malloc(len + 1);
|
|
|
|
memcpy(*value, extra_options, len);
|
|
|
|
(*value)[len] = '\0';
|
|
|
|
extra_options = p + 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*value = strdup(extra_options);
|
|
|
|
extra_options = NULL;
|
|
|
|
}
|
2008-09-09 22:13:29 -07:00
|
|
|
}
|
2008-10-26 13:05:59 -07:00
|
|
|
return extra_options;
|
2008-09-09 22:13:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/* inline is just to avoid need to ifdef around it */
|
2008-10-26 13:05:59 -07:00
|
|
|
static inline const char *
|
2008-09-09 22:13:29 -07:00
|
|
|
_ecore_evas_parse_extra_options_uint(const char *extra_options, const char *key, unsigned int *value)
|
|
|
|
{
|
|
|
|
int len = strlen(key);
|
|
|
|
|
|
|
|
while (extra_options)
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
const char *p;
|
2008-09-09 22:13:29 -07:00
|
|
|
|
2010-09-29 10:03:38 -07:00
|
|
|
if (strncmp(extra_options, key, len) != 0)
|
|
|
|
{
|
|
|
|
extra_options = strchr(extra_options, ';');
|
|
|
|
if (extra_options)
|
|
|
|
extra_options++;
|
|
|
|
continue;
|
|
|
|
}
|
2008-09-09 22:13:29 -07:00
|
|
|
|
2010-09-29 10:03:38 -07:00
|
|
|
extra_options += len;
|
|
|
|
*value = strtol(extra_options, NULL, 0);
|
2008-09-09 22:13:29 -07:00
|
|
|
|
2010-09-29 10:03:38 -07:00
|
|
|
p = strchr(extra_options, ';');
|
|
|
|
if (p)
|
|
|
|
extra_options = p + 1;
|
|
|
|
else
|
|
|
|
extra_options = NULL;
|
2008-09-09 22:13:29 -07:00
|
|
|
}
|
2008-10-26 13:05:59 -07:00
|
|
|
return extra_options;
|
2008-09-09 22:13:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/* inline is just to avoid need to ifdef around it */
|
|
|
|
static inline const char *
|
|
|
|
_ecore_evas_parse_extra_options_x(const char *extra_options, char **disp_name, unsigned int *parent)
|
|
|
|
{
|
|
|
|
_ecore_evas_parse_extra_options_str(extra_options, "display=", disp_name);
|
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "parent=", parent);
|
|
|
|
return extra_options;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Ecore_Evas *
|
|
|
|
_ecore_evas_constructor_software_x11(int x, int y, int w, int h, const char *extra_options)
|
|
|
|
{
|
|
|
|
unsigned int parent = 0;
|
|
|
|
char *disp_name = NULL;
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
|
|
|
|
_ecore_evas_parse_extra_options_x(extra_options, &disp_name, &parent);
|
|
|
|
ee = ecore_evas_software_x11_new(disp_name, parent, x, y, w, h);
|
|
|
|
free(disp_name);
|
|
|
|
|
|
|
|
return ee;
|
|
|
|
}
|
|
|
|
|
2009-10-23 08:00:50 -07:00
|
|
|
static Ecore_Evas *
|
2010-03-27 11:28:50 -07:00
|
|
|
_ecore_evas_constructor_cocoa(int x, int y, int w, int h, const char *extra_options)
|
2009-10-23 08:00:50 -07:00
|
|
|
{
|
|
|
|
char *name = NULL;
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
|
|
|
|
_ecore_evas_parse_extra_options_str(extra_options, "name=", &name);
|
2011-11-02 12:20:09 -07:00
|
|
|
ee = ecore_evas_cocoa_new(NULL, x, y, w, h);
|
2009-10-23 08:00:50 -07:00
|
|
|
free(name);
|
|
|
|
|
|
|
|
if (ee) ecore_evas_move(ee, x, y);
|
|
|
|
return ee;
|
|
|
|
}
|
|
|
|
|
2008-09-09 22:13:29 -07:00
|
|
|
static Ecore_Evas *
|
|
|
|
_ecore_evas_constructor_opengl_x11(int x, int y, int w, int h, const char *extra_options)
|
|
|
|
{
|
|
|
|
Ecore_X_Window parent = 0;
|
|
|
|
char *disp_name = NULL;
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
|
|
|
|
_ecore_evas_parse_extra_options_x(extra_options, &disp_name, &parent);
|
|
|
|
ee = ecore_evas_gl_x11_new(disp_name, parent, x, y, w, h);
|
|
|
|
free(disp_name);
|
|
|
|
|
|
|
|
return ee;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Ecore_Evas *
|
2012-11-25 01:55:32 -08:00
|
|
|
_ecore_evas_constructor_sdl(int x EINA_UNUSED, int y EINA_UNUSED, int w, int h, const char *extra_options)
|
2008-09-09 22:13:29 -07:00
|
|
|
{
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
unsigned int fullscreen = 0, hwsurface = 0, noframe = 0, alpha = 0;
|
|
|
|
char *name = NULL;
|
|
|
|
|
|
|
|
_ecore_evas_parse_extra_options_str(extra_options, "name=", &name);
|
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "fullscreen=", &fullscreen);
|
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "hwsurface=", &hwsurface);
|
2011-09-06 23:58:21 -07:00
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "noframe=", &noframe);
|
2008-09-09 22:13:29 -07:00
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "alpha=", &alpha);
|
|
|
|
|
|
|
|
ee = ecore_evas_sdl_new(name, w, h, fullscreen, hwsurface, noframe, alpha);
|
|
|
|
free(name);
|
|
|
|
|
|
|
|
return ee;
|
|
|
|
}
|
2010-01-30 02:23:54 -08:00
|
|
|
static Ecore_Evas *
|
2012-11-25 01:55:32 -08:00
|
|
|
_ecore_evas_constructor_opengl_sdl(int x EINA_UNUSED, int y EINA_UNUSED, int w, int h, const char *extra_options)
|
2010-01-30 02:23:54 -08:00
|
|
|
{
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
unsigned int fullscreen = 0, noframe = 0;
|
|
|
|
char *name = NULL;
|
|
|
|
|
|
|
|
_ecore_evas_parse_extra_options_str(extra_options, "name=", &name);
|
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "fullscreen=", &fullscreen);
|
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "noframe=", &noframe);
|
|
|
|
|
|
|
|
ee = ecore_evas_gl_sdl_new(name, w, h, fullscreen, noframe);
|
|
|
|
free(name);
|
|
|
|
|
|
|
|
return ee;
|
|
|
|
}
|
|
|
|
|
2008-09-09 22:13:29 -07:00
|
|
|
static Ecore_Evas *
|
2012-11-25 01:55:32 -08:00
|
|
|
_ecore_evas_constructor_fb(int x EINA_UNUSED, int y EINA_UNUSED, int w, int h, const char *extra_options)
|
2008-09-09 22:13:29 -07:00
|
|
|
{
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
char *disp_name = NULL;
|
|
|
|
unsigned int rotation = 0;
|
|
|
|
|
|
|
|
_ecore_evas_parse_extra_options_str(extra_options, "display=", &disp_name);
|
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "rotation=", &rotation);
|
|
|
|
|
|
|
|
ee = ecore_evas_fb_new(disp_name, rotation, w, h);
|
|
|
|
free(disp_name);
|
|
|
|
|
|
|
|
return ee;
|
|
|
|
}
|
|
|
|
|
2011-11-05 10:50:02 -07:00
|
|
|
static Ecore_Evas *
|
2012-11-25 01:55:32 -08:00
|
|
|
_ecore_evas_constructor_psl1ght(int x EINA_UNUSED, int y EINA_UNUSED, int w, int h, const char *extra_options)
|
2011-11-05 10:50:02 -07:00
|
|
|
{
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
char *name = NULL;
|
|
|
|
|
|
|
|
_ecore_evas_parse_extra_options_str(extra_options, "name=", &name);
|
|
|
|
ee = ecore_evas_psl1ght_new(name, w, h);
|
|
|
|
free(name);
|
|
|
|
|
|
|
|
if (ee) ecore_evas_move(ee, x, y);
|
|
|
|
return ee;
|
|
|
|
}
|
|
|
|
|
2011-12-26 15:27:20 -08:00
|
|
|
static Ecore_Evas *
|
|
|
|
_ecore_evas_constructor_wayland_shm(int x, int y, int w, int h, const char *extra_options)
|
|
|
|
{
|
|
|
|
char *disp_name = NULL;
|
2012-08-21 03:33:15 -07:00
|
|
|
unsigned int frame = 1, parent = 0;
|
2011-12-26 15:27:20 -08:00
|
|
|
Ecore_Evas *ee;
|
|
|
|
|
|
|
|
_ecore_evas_parse_extra_options_str(extra_options, "display=", &disp_name);
|
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "frame=", &frame);
|
2012-02-28 13:56:39 -08:00
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "parent=", &parent);
|
|
|
|
ee = ecore_evas_wayland_shm_new(disp_name, parent, x, y, w, h, frame);
|
2011-12-26 15:27:20 -08:00
|
|
|
free(disp_name);
|
|
|
|
|
|
|
|
return ee;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Ecore_Evas *
|
|
|
|
_ecore_evas_constructor_wayland_egl(int x, int y, int w, int h, const char *extra_options)
|
|
|
|
{
|
|
|
|
char *disp_name = NULL;
|
2012-08-21 03:33:15 -07:00
|
|
|
unsigned int frame = 1, parent = 0;
|
2012-01-11 05:03:48 -08:00
|
|
|
Ecore_Evas *ee;
|
2011-12-26 15:27:20 -08:00
|
|
|
|
|
|
|
_ecore_evas_parse_extra_options_str(extra_options, "display=", &disp_name);
|
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "frame=", &frame);
|
2012-02-28 13:56:39 -08:00
|
|
|
_ecore_evas_parse_extra_options_uint(extra_options, "parent=", &parent);
|
|
|
|
ee = ecore_evas_wayland_egl_new(disp_name, parent, x, y, w, h, frame);
|
2011-12-26 15:27:20 -08:00
|
|
|
free(disp_name);
|
|
|
|
|
2012-01-11 05:03:48 -08:00
|
|
|
return ee;
|
2011-12-26 15:27:20 -08:00
|
|
|
}
|
|
|
|
|
2009-04-22 20:24:16 -07:00
|
|
|
static Ecore_Evas *
|
2012-12-05 13:15:42 -08:00
|
|
|
_ecore_evas_constructor_software_gdi(int x, int y, int w, int h,
|
|
|
|
const char *extra_options EINA_UNUSED)
|
2009-04-22 20:24:16 -07:00
|
|
|
{
|
|
|
|
return ecore_evas_software_gdi_new(NULL, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
2008-09-09 22:13:29 -07:00
|
|
|
static Ecore_Evas *
|
2012-12-05 13:15:42 -08:00
|
|
|
_ecore_evas_constructor_software_ddraw(int x, int y, int w, int h,
|
|
|
|
const char *extra_options EINA_UNUSED)
|
2008-09-09 22:13:29 -07:00
|
|
|
{
|
|
|
|
return ecore_evas_software_ddraw_new(NULL, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Ecore_Evas *
|
2012-12-05 13:15:42 -08:00
|
|
|
_ecore_evas_constructor_direct3d(int x, int y, int w, int h,
|
|
|
|
const char *extra_options EINA_UNUSED)
|
2008-09-09 22:13:29 -07:00
|
|
|
{
|
|
|
|
return ecore_evas_direct3d_new(NULL, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Ecore_Evas *
|
2012-12-05 13:15:42 -08:00
|
|
|
_ecore_evas_constructor_opengl_glew(int x, int y, int w, int h,
|
|
|
|
const char *extra_options EINA_UNUSED)
|
2008-09-09 22:13:29 -07:00
|
|
|
{
|
|
|
|
return ecore_evas_gl_glew_new(NULL, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Ecore_Evas *
|
2012-11-25 01:55:32 -08:00
|
|
|
_ecore_evas_constructor_buffer(int x EINA_UNUSED, int y EINA_UNUSED, int w, int h, const char *extra_options EINA_UNUSED)
|
2008-09-09 22:13:29 -07:00
|
|
|
{
|
|
|
|
return ecore_evas_buffer_new(w, h);
|
|
|
|
}
|
|
|
|
|
2011-10-05 15:11:00 -07:00
|
|
|
#ifdef BUILD_ECORE_EVAS_EWS
|
|
|
|
static Ecore_Evas *
|
2012-11-25 01:55:32 -08:00
|
|
|
_ecore_evas_constructor_ews(int x, int y, int w, int h, const char *extra_options EINA_UNUSED)
|
2011-10-05 15:11:00 -07:00
|
|
|
{
|
|
|
|
return ecore_evas_ews_new(x, y, w, h);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-09-09 22:13:29 -07:00
|
|
|
/* note: keep sorted by priority, highest first */
|
|
|
|
static const struct ecore_evas_engine _engines[] = {
|
|
|
|
/* unix */
|
|
|
|
{"software_x11", _ecore_evas_constructor_software_x11},
|
|
|
|
{"opengl_x11", _ecore_evas_constructor_opengl_x11},
|
|
|
|
{"fb", _ecore_evas_constructor_fb},
|
2009-04-22 20:24:16 -07:00
|
|
|
{"software_gdi", _ecore_evas_constructor_software_gdi},
|
2008-09-09 22:13:29 -07:00
|
|
|
{"software_ddraw", _ecore_evas_constructor_software_ddraw},
|
|
|
|
{"direct3d", _ecore_evas_constructor_direct3d},
|
|
|
|
{"opengl_glew", _ecore_evas_constructor_opengl_glew},
|
2011-11-02 12:20:09 -07:00
|
|
|
{"opengl_cocoa", _ecore_evas_constructor_cocoa},
|
2011-11-05 10:50:02 -07:00
|
|
|
{"psl1ght", _ecore_evas_constructor_psl1ght},
|
2011-12-26 15:27:20 -08:00
|
|
|
{"wayland_shm", _ecore_evas_constructor_wayland_shm},
|
|
|
|
{"wayland_egl", _ecore_evas_constructor_wayland_egl},
|
2010-11-16 07:38:22 -08:00
|
|
|
{"opengl_sdl", _ecore_evas_constructor_opengl_sdl},
|
2008-09-11 07:48:34 -07:00
|
|
|
{"sdl", _ecore_evas_constructor_sdl},
|
2008-09-09 22:13:29 -07:00
|
|
|
{"buffer", _ecore_evas_constructor_buffer},
|
2011-10-05 15:11:00 -07:00
|
|
|
#ifdef BUILD_ECORE_EVAS_EWS
|
|
|
|
{"ews", _ecore_evas_constructor_ews},
|
|
|
|
#endif
|
2008-09-09 22:13:29 -07:00
|
|
|
{NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2008-10-21 08:54:55 -07:00
|
|
|
EAPI Eina_List *
|
2008-09-09 22:13:29 -07:00
|
|
|
ecore_evas_engines_get(void)
|
|
|
|
{
|
2012-12-06 12:39:20 -08:00
|
|
|
return eina_list_clone(_ecore_evas_available_engines_get());
|
2008-09-09 22:13:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2008-10-21 08:54:55 -07:00
|
|
|
ecore_evas_engines_free(Eina_List *engines)
|
2008-09-09 22:13:29 -07:00
|
|
|
{
|
2008-10-21 08:54:55 -07:00
|
|
|
eina_list_free(engines);
|
2008-09-09 22:13:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static Ecore_Evas *
|
|
|
|
_ecore_evas_new_auto_discover(int x, int y, int w, int h, const char *extra_options)
|
|
|
|
{
|
|
|
|
const struct ecore_evas_engine *itr;
|
|
|
|
|
2010-03-23 10:35:22 -07:00
|
|
|
DBG("auto discover engine");
|
|
|
|
|
2010-08-21 06:52:25 -07:00
|
|
|
for (itr = _engines; itr->constructor; itr++)
|
2008-09-09 22:13:29 -07:00
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
Ecore_Evas *ee = itr->constructor(x, y, w, h, extra_options);
|
|
|
|
if (ee)
|
|
|
|
{
|
|
|
|
INF("auto discovered '%s'", itr->name);
|
|
|
|
return ee;
|
|
|
|
}
|
2008-09-09 22:13:29 -07:00
|
|
|
}
|
|
|
|
|
2010-03-23 10:35:22 -07:00
|
|
|
WRN("could not auto discover.");
|
2008-09-09 22:13:29 -07:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_new(const char *engine_name, int x, int y, int w, int h, const char *extra_options)
|
|
|
|
{
|
|
|
|
const struct ecore_evas_engine *itr;
|
|
|
|
|
|
|
|
if (!engine_name)
|
2010-03-23 10:35:22 -07:00
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
engine_name = getenv("ECORE_EVAS_ENGINE");
|
|
|
|
if (engine_name)
|
|
|
|
DBG("no engine_name provided, using ECORE_EVAS_ENGINE='%s'",
|
|
|
|
engine_name);
|
2010-03-23 10:35:22 -07:00
|
|
|
}
|
2008-09-09 22:13:29 -07:00
|
|
|
if (!engine_name)
|
|
|
|
return _ecore_evas_new_auto_discover(x, y, w, h, extra_options);
|
|
|
|
|
2010-08-21 06:52:25 -07:00
|
|
|
for (itr = _engines; itr->name; itr++)
|
2008-09-09 22:13:29 -07:00
|
|
|
if (strcmp(itr->name, engine_name) == 0)
|
2010-03-23 10:35:22 -07:00
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
INF("using engine '%s', extra_options=%s",
|
|
|
|
engine_name, extra_options ? extra_options : "(null)");
|
|
|
|
return itr->constructor(x, y, w, h, extra_options);
|
2010-03-23 10:35:22 -07:00
|
|
|
}
|
2008-09-09 22:13:29 -07:00
|
|
|
|
2010-03-23 10:35:22 -07:00
|
|
|
WRN("unknown engine '%s'", engine_name);
|
2008-09-09 22:13:29 -07:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-10-29 12:31:05 -07:00
|
|
|
EAPI const char *
|
|
|
|
ecore_evas_engine_name_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ee)
|
|
|
|
return NULL;
|
|
|
|
return ee->driver;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI Ecore_Evas *
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_ecore_evas_get(const Evas *e)
|
2005-11-06 01:47:28 -08:00
|
|
|
{
|
2011-05-27 11:53:27 -07:00
|
|
|
Ecore_Evas *ee = evas_data_attach_get(e);
|
|
|
|
if (!ee) return NULL;
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_ecore_evas_get");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
return ee;
|
2005-11-06 01:47:28 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_free(Ecore_Evas *ee)
|
|
|
|
{
|
2012-12-24 01:35:56 -08:00
|
|
|
if (!ee) return;
|
2004-03-16 15:52:46 -08:00
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_free");
|
|
|
|
return;
|
2004-03-16 15:52:46 -08:00
|
|
|
}
|
2007-04-04 23:53:41 -07:00
|
|
|
_ecore_evas_free(ee);
|
2005-07-28 07:09:09 -07:00
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void *
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_data_get(const Ecore_Evas *ee, const char *key)
|
2004-09-02 09:50:18 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_data_get");
|
|
|
|
return NULL;
|
2004-09-02 09:50:18 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!key) return NULL;
|
2008-12-12 14:34:20 -08:00
|
|
|
if (!ee->data) return NULL;
|
2004-09-02 09:50:18 -07:00
|
|
|
|
2008-12-11 05:55:47 -08:00
|
|
|
return eina_hash_find(ee->data, key);
|
2004-09-02 09:50:18 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2004-09-02 09:50:18 -07:00
|
|
|
ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_data_set");
|
|
|
|
return;
|
2004-09-02 09:50:18 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!key) return;
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2008-12-12 14:34:20 -08:00
|
|
|
if (ee->data)
|
|
|
|
eina_hash_del(ee->data, key, NULL);
|
2005-10-30 22:21:40 -08:00
|
|
|
if (data)
|
2008-12-11 05:55:47 -08:00
|
|
|
{
|
|
|
|
if (!ee->data)
|
2010-09-29 10:03:38 -07:00
|
|
|
ee->data = eina_hash_string_superfast_new(NULL);
|
2008-12-11 05:55:47 -08:00
|
|
|
eina_hash_add(ee->data, key, data);
|
|
|
|
}
|
2004-09-02 09:50:18 -07:00
|
|
|
}
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
EAPI Evas *
|
|
|
|
ecore_evas_object_evas_get(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
|
|
|
|
ee = evas_object_data_get(obj, "Ecore_Evas");
|
|
|
|
if (!ee) return NULL;
|
|
|
|
|
|
|
|
return ecore_evas_get(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_object_ecore_evas_get(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
return evas_object_data_get(obj, "Ecore_Evas");
|
|
|
|
}
|
|
|
|
|
2003-09-23 01:09:32 -07:00
|
|
|
#define IFC(_ee, _fn) if (_ee->engine.func->_fn) {_ee->engine.func->_fn
|
|
|
|
#define IFE return;}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_resize_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_resize_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_resize_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_resize = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_move_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_move_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_move_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_move = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_show_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_show_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_show_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_show = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_hide_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_hide_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_hide_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_hide = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_delete_request_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_delete_request_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_delete_request = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_destroy_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_destroy_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_destroy_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_destroy = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_focus_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_focus_in_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_focus_in_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_focus_in = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_focus_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_focus_out_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_focus_out_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_focus_out = func;
|
|
|
|
}
|
|
|
|
|
2006-07-27 09:14:33 -07:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_sticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2006-07-27 09:14:33 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_sticky_set");
|
|
|
|
return;
|
2006-07-27 09:14:33 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_sticky_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_sticky = func;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_unsticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2006-07-27 09:14:33 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_unsticky_set");
|
|
|
|
return;
|
2006-07-27 09:14:33 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_unsticky_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_unsticky = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_mouse_in_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_mouse_in_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_mouse_in = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_mouse_out_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_mouse_out_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_mouse_out = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_pre_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_pre_render_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_pre_render_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_pre_render = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_post_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_post_render_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_callback_post_render_set) (ee, func);
|
|
|
|
IFE;
|
|
|
|
ee->func.fn_post_render = func;
|
|
|
|
}
|
|
|
|
|
2008-10-22 18:00:16 -07:00
|
|
|
EAPI void
|
2012-02-19 20:38:54 -08:00
|
|
|
ecore_evas_callback_pre_free_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
2008-10-22 18:00:16 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_pre_free_set");
|
|
|
|
return;
|
2008-10-22 18:00:16 -07:00
|
|
|
}
|
|
|
|
ee->func.fn_pre_free = func;
|
|
|
|
}
|
|
|
|
|
2012-02-27 22:43:59 -08:00
|
|
|
EAPI void
|
|
|
|
ecore_evas_callback_state_change_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_callback_state_change_set");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
ee->func.fn_state_change = func;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI Evas *
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_get");
|
|
|
|
return NULL;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
return ee->evas;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_move(Ecore_Evas *ee, int x, int y)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_move");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2008-12-19 05:11:21 -08:00
|
|
|
if (ee->prop.fullscreen) return;
|
2003-09-23 01:09:32 -07:00
|
|
|
IFC(ee, fn_move) (ee, x, y);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2005-11-03 03:32:59 -08:00
|
|
|
ecore_evas_managed_move(Ecore_Evas *ee, int x, int y)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_move");
|
|
|
|
return;
|
2005-11-03 03:32:59 -08:00
|
|
|
}
|
|
|
|
IFC(ee, fn_managed_move) (ee, x, y);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_resize(Ecore_Evas *ee, int w, int h)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_resize");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2008-12-19 05:11:21 -08:00
|
|
|
if (ee->prop.fullscreen) return;
|
2003-09-23 01:09:32 -07:00
|
|
|
if (w < 1) w = 1;
|
|
|
|
if (h < 1) h = 1;
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_resize) (ee, h, w);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_resize) (ee, w, h);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_move_resize");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2008-12-19 05:11:21 -08:00
|
|
|
if (ee->prop.fullscreen) return;
|
2003-09-23 01:09:32 -07:00
|
|
|
if (w < 1) w = 1;
|
|
|
|
if (h < 1) h = 1;
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_move_resize) (ee, x, y, h, w);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_move_resize) (ee, x, y, w, h);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_geometry_get");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
if (x) *x = ee->x;
|
|
|
|
if (y) *y = ee->y;
|
|
|
|
if (w) *w = ee->h;
|
|
|
|
if (h) *h = ee->w;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
if (x) *x = ee->x;
|
|
|
|
if (y) *y = ee->y;
|
|
|
|
if (w) *w = ee->w;
|
|
|
|
if (h) *h = ee->h;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-10-28 04:15:33 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_evas_request_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_request_geometry_get");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
|
|
|
if (x) *x = ee->req.x;
|
|
|
|
if (y) *y = ee->req.y;
|
|
|
|
if (w) *w = ee->req.h;
|
|
|
|
if (h) *h = ee->req.w;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (x) *x = ee->req.x;
|
|
|
|
if (y) *y = ee->req.y;
|
|
|
|
if (w) *w = ee->req.w;
|
|
|
|
if (h) *h = ee->req.h;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_rotation_set(Ecore_Evas *ee, int rot)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_rotation_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
rot = rot % 360;
|
|
|
|
while (rot < 0) rot += 360;
|
|
|
|
while (rot >= 360) rot -= 360;
|
2010-02-10 06:35:07 -08:00
|
|
|
IFC(ee, fn_rotation_set) (ee, rot, 0);
|
|
|
|
/* make sure everything gets redrawn */
|
|
|
|
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
|
|
|
evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_rotation_with_resize_set(Ecore_Evas *ee, int rot)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_rotation_set");
|
|
|
|
return;
|
2010-02-10 06:35:07 -08:00
|
|
|
}
|
|
|
|
rot = rot % 360;
|
|
|
|
while (rot < 0) rot += 360;
|
|
|
|
while (rot >= 360) rot -= 360;
|
|
|
|
IFC(ee, fn_rotation_set) (ee, rot, 1);
|
2009-06-11 22:32:01 -07:00
|
|
|
/* make sure everything gets redrawn */
|
|
|
|
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
|
|
|
evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
|
2003-09-23 01:09:32 -07:00
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI int
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_rotation_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_rotation_get");
|
|
|
|
return 0;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
return ee->rotation;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_shaped_set(Ecore_Evas *ee, Eina_Bool shaped)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_shaped_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_shaped_set) (ee, shaped);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_shaped_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_shaped_get");
|
|
|
|
return EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->shaped ? EINA_TRUE : EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-03-08 00:02:55 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_alpha_set(Ecore_Evas *ee, Eina_Bool alpha)
|
2006-03-08 00:02:55 -08:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_alpha_set");
|
|
|
|
return;
|
2006-03-08 00:02:55 -08:00
|
|
|
}
|
|
|
|
IFC(ee, fn_alpha_set) (ee, alpha);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_alpha_get(const Ecore_Evas *ee)
|
2006-03-08 00:02:55 -08:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_alpha_get");
|
|
|
|
return EINA_FALSE;
|
2006-03-08 00:02:55 -08:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->alpha ? EINA_TRUE : EINA_FALSE;
|
2006-03-08 00:02:55 -08:00
|
|
|
}
|
|
|
|
|
2010-02-11 21:31:26 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_transparent_set(Ecore_Evas *ee, Eina_Bool transparent)
|
2010-02-11 21:31:26 -08:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_transparent_set");
|
|
|
|
return;
|
2010-02-11 21:31:26 -08:00
|
|
|
}
|
|
|
|
IFC(ee, fn_transparent_set) (ee, transparent);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2010-02-11 21:31:26 -08:00
|
|
|
ecore_evas_transparent_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_transparent_get");
|
|
|
|
return EINA_FALSE;
|
2010-02-11 21:31:26 -08:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->transparent ? EINA_TRUE : 0;
|
2010-02-11 21:31:26 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_show(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_show");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_show) (ee);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_hide(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_hide");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_hide) (ee);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2011-08-03 07:39:01 -07:00
|
|
|
EAPI int
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_visibility_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_visibility_get");
|
|
|
|
return 0;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2004-01-19 19:26:05 -08:00
|
|
|
return ee->visible ? 1:0;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_raise(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_raise");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_raise) (ee);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_lower(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_lower");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_lower) (ee);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2008-06-30 01:39:36 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_evas_activate(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_activate");
|
|
|
|
return;
|
2008-06-30 01:39:36 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_activate) (ee);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_title_set(Ecore_Evas *ee, const char *t)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_title_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_title_set) (ee, t);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI const char *
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_title_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_title_get");
|
|
|
|
return NULL;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
return ee->prop.title;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, const char *c)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_name_class_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_name_class_set) (ee, n, c);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_name_class_get(const Ecore_Evas *ee, const char **n, const char **c)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_name_class_get");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
if (n) *n = ee->prop.name;
|
|
|
|
if (c) *c = ee->prop.clas;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_size_min_set(Ecore_Evas *ee, int w, int h)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_size_min_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
if (w < 0) w = 0;
|
|
|
|
if (h < 0) h = 0;
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_size_min_set) (ee, h, w);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_size_min_set) (ee, w, h);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_size_min_get(const Ecore_Evas *ee, int *w, int *h)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_size_min_get");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
if (w) *w = ee->prop.min.h;
|
|
|
|
if (h) *h = ee->prop.min.w;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
if (w) *w = ee->prop.min.w;
|
|
|
|
if (h) *h = ee->prop.min.h;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_size_max_set(Ecore_Evas *ee, int w, int h)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_size_max_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
if (w < 0) w = 0;
|
|
|
|
if (h < 0) h = 0;
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_size_max_set) (ee, h, w);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_size_max_set) (ee, w, h);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_size_max_get(const Ecore_Evas *ee, int *w, int *h)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_size_max_get");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
if (w) *w = ee->prop.max.h;
|
|
|
|
if (h) *h = ee->prop.max.w;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
if (w) *w = ee->prop.max.w;
|
|
|
|
if (h) *h = ee->prop.max.h;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_size_base_set(Ecore_Evas *ee, int w, int h)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_size_base_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
if (w < 0) w = 0;
|
|
|
|
if (h < 0) h = 0;
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_size_base_set) (ee, h, w);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_size_base_set) (ee, w, h);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_size_base_get(const Ecore_Evas *ee, int *w, int *h)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_size_base_get");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
if (w) *w = ee->prop.base.h;
|
|
|
|
if (h) *h = ee->prop.base.w;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
if (w) *w = ee->prop.base.w;
|
|
|
|
if (h) *h = ee->prop.base.h;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_size_step_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
if (w < 0) w = 0;
|
|
|
|
if (h < 0) h = 0;
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_size_step_set) (ee, h, w);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
IFC(ee, fn_size_step_set) (ee, w, h);
|
|
|
|
IFE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_size_step_get(const Ecore_Evas *ee, int *w, int *h)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_size_step_get");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
if ((ee->rotation == 90) || (ee->rotation == 270))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
if (w) *w = ee->prop.step.h;
|
|
|
|
if (h) *h = ee->prop.step.w;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
if (w) *w = ee->prop.step.w;
|
|
|
|
if (h) *h = ee->prop.step.h;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_cursor_set(Ecore_Evas *ee, const char *file, int layer, int hot_x, int hot_y)
|
2007-09-26 07:40:02 -07:00
|
|
|
{
|
|
|
|
Evas_Object *obj = NULL;
|
|
|
|
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_cursor_set");
|
|
|
|
return;
|
2007-09-26 07:40:02 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
if (file)
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
|
|
|
|
obj = evas_object_image_add(ee->evas);
|
|
|
|
evas_object_image_file_set(obj, file, NULL);
|
|
|
|
evas_object_image_size_get(obj, &x, &y);
|
|
|
|
evas_object_resize(obj, x, y);
|
|
|
|
evas_object_image_fill_set(obj, 0, 0, x, y);
|
|
|
|
}
|
|
|
|
|
|
|
|
IFC(ee, fn_object_cursor_set) (ee, obj, layer, hot_x, hot_y);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_cursor_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2007-09-26 07:40:02 -07:00
|
|
|
IFC(ee, fn_object_cursor_set) (ee, obj, layer, hot_x, hot_y);
|
2003-09-23 01:09:32 -07:00
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object **obj, int *layer, int *hot_x, int *hot_y)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_cursor_get");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2007-09-26 07:40:02 -07:00
|
|
|
if (obj) *obj = ee->prop.cursor.object;
|
2003-09-23 01:09:32 -07:00
|
|
|
if (layer) *layer = ee->prop.cursor.layer;
|
|
|
|
if (hot_x) *hot_x = ee->prop.cursor.hot.x;
|
|
|
|
if (hot_y) *hot_y = ee->prop.cursor.hot.y;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2003-09-23 01:09:32 -07:00
|
|
|
ecore_evas_layer_set(Ecore_Evas *ee, int layer)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_layer_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_layer_set) (ee, layer);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI int
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_layer_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_layer_get");
|
|
|
|
return 0;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
return ee->prop.layer;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_focus_set(Ecore_Evas *ee, Eina_Bool on)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_focus_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_focus_set) (ee, on);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_focus_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_focus_get");
|
|
|
|
return EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->prop.focused ? EINA_TRUE : EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_iconified_set(Ecore_Evas *ee, Eina_Bool on)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_iconified_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_iconified_set) (ee, on);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_iconified_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_iconified_get");
|
|
|
|
return EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->prop.iconified ? EINA_TRUE : EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_borderless_set(Ecore_Evas *ee, Eina_Bool on)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_borderless_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_borderless_set) (ee, on);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_borderless_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_borderless_get");
|
|
|
|
return EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->prop.borderless ? EINA_TRUE : EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_override_set(Ecore_Evas *ee, Eina_Bool on)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_override_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_override_set) (ee, on);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_override_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_override_get");
|
|
|
|
return EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->prop.override ? EINA_TRUE : EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_maximized_set(Ecore_Evas *ee, Eina_Bool on)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_maximized_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_maximized_set) (ee, on);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_maximized_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_maximized_get");
|
|
|
|
return EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->prop.maximized ? EINA_TRUE : EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2012-12-04 22:48:46 -08:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_window_profile_supported_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_window_profile_supported_get");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
return ee->profile_supported ? EINA_TRUE : EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_window_profile_set(Ecore_Evas *ee, const char *profile)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_window_profile_set");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
IFC(ee, fn_profile_set) (ee, profile);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
|
|
|
ecore_evas_window_profile_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_window_profile_get");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
return ee->prop.profile.name;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_window_available_profiles_set(Ecore_Evas *ee, const char **profiles, const unsigned int count)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_window_available_profiles_set");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
IFC(ee, fn_profiles_set) (ee, profiles, count);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_window_available_profiles_get(Ecore_Evas *ee, char ***profiles, unsigned int *count)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_window_available_profiles_get");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((ee->prop.profile.available_list) &&
|
|
|
|
(ee->prop.profile.count >= 1))
|
|
|
|
{
|
|
|
|
if (profiles) *profiles = ee->prop.profile.available_list;
|
|
|
|
if (count) *count = ee->prop.profile.count;
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_fullscreen_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_fullscreen_set) (ee, on);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_fullscreen_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_fullscreen_get");
|
|
|
|
return EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->prop.fullscreen ? EINA_TRUE : EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2007-10-02 23:31:05 -07:00
|
|
|
ecore_evas_avoid_damage_set(Ecore_Evas *ee, Ecore_Evas_Avoid_Damage_Type on)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_avoid_damage_set");
|
|
|
|
return;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
IFC(ee, fn_avoid_damage_set) (ee, on);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2007-10-02 23:31:05 -07:00
|
|
|
EAPI Ecore_Evas_Avoid_Damage_Type
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_avoid_damage_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_avoid_damage_get");
|
|
|
|
return ECORE_EVAS_AVOID_DAMAGE_NONE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
2007-10-02 23:31:05 -07:00
|
|
|
return ee->prop.avoid_damage;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_withdrawn_set(Ecore_Evas *ee, Eina_Bool withdrawn)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
2010-01-06 21:29:06 -08:00
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_withdrawn_set");
|
|
|
|
return;
|
|
|
|
}
|
2011-04-20 07:15:33 -07:00
|
|
|
|
2003-09-23 01:09:32 -07:00
|
|
|
IFC(ee, fn_withdrawn_set) (ee, withdrawn);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_withdrawn_get(const Ecore_Evas *ee)
|
2003-09-23 01:09:32 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
2010-01-06 21:29:06 -08:00
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_withdrawn_get");
|
2010-09-25 00:03:02 -07:00
|
|
|
return EINA_FALSE;
|
2011-12-26 15:27:20 -08:00
|
|
|
}
|
|
|
|
return ee->prop.withdrawn ? EINA_TRUE : EINA_FALSE;
|
2003-09-23 01:09:32 -07:00
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_sticky_set(Ecore_Evas *ee, Eina_Bool sticky)
|
2003-11-15 18:29:10 -08:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
2010-01-06 21:29:06 -08:00
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_sticky_set");
|
|
|
|
return;
|
|
|
|
}
|
2011-04-20 07:15:33 -07:00
|
|
|
|
2003-11-15 18:29:10 -08:00
|
|
|
IFC(ee, fn_sticky_set) (ee, sticky);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_sticky_get(const Ecore_Evas *ee)
|
2003-11-15 18:29:10 -08:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
2010-01-06 21:29:06 -08:00
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_sticky_get");
|
2010-09-25 00:03:02 -07:00
|
|
|
return EINA_FALSE;
|
2011-12-26 15:27:20 -08:00
|
|
|
}
|
|
|
|
return ee->prop.sticky ? EINA_TRUE : EINA_FALSE;
|
2003-11-15 18:29:10 -08:00
|
|
|
}
|
2004-03-16 21:14:13 -08:00
|
|
|
|
2012-02-27 22:43:59 -08:00
|
|
|
EAPI void
|
|
|
|
ecore_evas_window_group_set(Ecore_Evas *ee, const Ecore_Evas *ee_group)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IFC(ee, fn_window_group_set) (ee, ee_group);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const Ecore_Evas *
|
|
|
|
ecore_evas_window_group_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
return ee->prop.group_ee;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_aspect_set(Ecore_Evas *ee, double aspect)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IFC(ee, fn_aspect_set) (ee, aspect);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI double
|
|
|
|
ecore_evas_aspect_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
return ee->prop.aspect;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_urgent_set(Ecore_Evas *ee, Eina_Bool urgent)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IFC(ee, fn_urgent_set) (ee, urgent);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_urgent_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
return ee->prop.urgent ? EINA_TRUE : EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_modal_set(Ecore_Evas *ee, Eina_Bool modal)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IFC(ee, fn_modal_set) (ee, modal);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_modal_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
return ee->prop.modal ? EINA_TRUE : EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_demand_attention_set(Ecore_Evas *ee, Eina_Bool demand)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IFC(ee, fn_demands_attention_set) (ee, demand);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_demand_attention_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
return ee->prop.demand_attention ? EINA_TRUE : EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_focus_skip_set(Ecore_Evas *ee, Eina_Bool skip)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IFC(ee, fn_focus_skip_set) (ee, skip);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_focus_skip_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"XXX");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
return ee->prop.focus_skip ? EINA_TRUE : EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_ignore_events_set(Ecore_Evas *ee, Eina_Bool ignore)
|
2005-10-08 05:41:59 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
2010-01-06 21:29:06 -08:00
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_ignore_events_set");
|
|
|
|
return;
|
|
|
|
}
|
2011-04-20 07:15:33 -07:00
|
|
|
|
2005-10-08 05:41:59 -07:00
|
|
|
IFC(ee, fn_ignore_events_set) (ee, ignore);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_ignore_events_get(const Ecore_Evas *ee)
|
2005-10-08 05:41:59 -07:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
2010-01-06 21:29:06 -08:00
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_ignore_events_get");
|
2010-09-25 00:03:02 -07:00
|
|
|
return EINA_FALSE;
|
2010-01-06 21:29:06 -08:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->ignore_events ? EINA_TRUE : EINA_FALSE;
|
2010-01-06 21:29:06 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_manual_render_set(Ecore_Evas *ee, Eina_Bool manual_render)
|
2010-01-06 21:29:06 -08:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_manual_render_set");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
ee->manual_render = manual_render;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2010-01-06 21:29:06 -08:00
|
|
|
ecore_evas_manual_render_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_manual_render_get");
|
2010-09-25 00:03:02 -07:00
|
|
|
return EINA_FALSE;
|
2010-01-06 21:29:06 -08:00
|
|
|
}
|
2010-09-25 00:03:02 -07:00
|
|
|
return ee->manual_render ? EINA_TRUE : EINA_FALSE;
|
2010-01-06 21:29:06 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_manual_render(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_manual_render");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (ee->engine.func->fn_render)
|
|
|
|
ee->engine.func->fn_render(ee);
|
2005-10-08 05:41:59 -07:00
|
|
|
}
|
|
|
|
|
2010-02-01 06:13:48 -08:00
|
|
|
EAPI void
|
2010-09-25 00:03:02 -07:00
|
|
|
ecore_evas_comp_sync_set(Ecore_Evas *ee, Eina_Bool do_sync)
|
2010-02-01 06:13:48 -08:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_comp_sync_set");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
ee->no_comp_sync = !do_sync;
|
|
|
|
}
|
|
|
|
|
2010-09-25 00:03:02 -07:00
|
|
|
EAPI Eina_Bool
|
2010-02-01 06:13:48 -08:00
|
|
|
ecore_evas_comp_sync_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_comp_sync_get");
|
2010-09-25 00:03:02 -07:00
|
|
|
return EINA_FALSE;
|
2010-02-01 06:13:48 -08:00
|
|
|
}
|
|
|
|
return !ee->no_comp_sync;
|
|
|
|
}
|
|
|
|
|
2009-03-16 09:24:43 -07:00
|
|
|
EAPI Ecore_Window
|
2008-10-29 13:12:45 -07:00
|
|
|
ecore_evas_window_get(const Ecore_Evas *ee)
|
2007-11-19 10:27:11 -08:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_window_get");
|
2009-03-16 09:24:43 -07:00
|
|
|
return 0;
|
2007-11-19 10:27:11 -08:00
|
|
|
}
|
|
|
|
|
2009-03-16 09:24:43 -07:00
|
|
|
return ee->prop.window;
|
2007-11-19 10:27:11 -08:00
|
|
|
}
|
|
|
|
|
2011-05-27 12:31:11 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_evas_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h)
|
|
|
|
{
|
|
|
|
if (x) *x = 0;
|
|
|
|
if (y) *y = 0;
|
|
|
|
if (w) *w = 0;
|
|
|
|
if (h) *h = 0;
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_screen_geometry_get");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IFC(ee, fn_screen_geometry_get) (ee, x, y, w, h);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2012-07-05 05:51:05 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_evas_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi)
|
|
|
|
{
|
|
|
|
if (xdpi) *xdpi = 0;
|
|
|
|
if (ydpi) *ydpi = 0;
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_screen_geometry_get");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IFC(ee, fn_screen_dpi_get) (ee, xdpi, ydpi);
|
|
|
|
IFE;
|
|
|
|
}
|
|
|
|
|
2012-04-17 18:24:30 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_evas_draw_frame_set(Ecore_Evas *ee, Eina_Bool draw_frame)
|
2011-12-26 15:27:20 -08:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_draw_frame_set");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
ee->prop.draw_frame = draw_frame;
|
|
|
|
}
|
|
|
|
|
2012-04-17 18:24:30 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_draw_frame_get(const Ecore_Evas *ee)
|
2011-12-26 15:27:20 -08:00
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_draw_frame_get");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
return ee->prop.draw_frame;
|
|
|
|
}
|
|
|
|
|
2004-03-16 21:14:13 -08:00
|
|
|
/* fps debug calls - for debugging how much time your app actually spends */
|
|
|
|
/* rendering graphics... :) */
|
|
|
|
|
2004-03-18 06:29:59 -08:00
|
|
|
static int _ecore_evas_fps_debug_init_count = 0;
|
2004-03-16 21:14:13 -08:00
|
|
|
static int _ecore_evas_fps_debug_fd = -1;
|
|
|
|
unsigned int *_ecore_evas_fps_rendertime_mmap = NULL;
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2004-03-16 21:14:13 -08:00
|
|
|
_ecore_evas_fps_debug_init(void)
|
|
|
|
{
|
|
|
|
char buf[4096];
|
2011-06-17 14:49:47 -07:00
|
|
|
const char *tmp;
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2004-03-16 21:14:13 -08:00
|
|
|
_ecore_evas_fps_debug_init_count++;
|
|
|
|
if (_ecore_evas_fps_debug_init_count > 1) return;
|
2011-06-17 14:49:47 -07:00
|
|
|
|
|
|
|
#ifndef HAVE_EVIL
|
|
|
|
tmp = "/tmp";
|
|
|
|
#else
|
|
|
|
tmp = evil_tmpdir_get ();
|
|
|
|
#endif /* HAVE_EVIL */
|
|
|
|
snprintf(buf, sizeof(buf), "%s/.ecore_evas_fps_debug-%i", tmp, (int)getpid());
|
2007-08-18 07:26:49 -07:00
|
|
|
_ecore_evas_fps_debug_fd = open(buf, O_CREAT | O_TRUNC | O_RDWR, 0644);
|
2004-03-16 21:14:13 -08:00
|
|
|
if (_ecore_evas_fps_debug_fd < 0)
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
unlink(buf);
|
|
|
|
_ecore_evas_fps_debug_fd = open(buf, O_CREAT | O_TRUNC | O_RDWR, 0644);
|
2004-03-16 21:14:13 -08:00
|
|
|
}
|
|
|
|
if (_ecore_evas_fps_debug_fd >= 0)
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
unsigned int zero = 0;
|
2011-08-18 03:59:24 -07:00
|
|
|
char *buf2 = (char *)&zero;
|
2010-09-29 10:03:38 -07:00
|
|
|
ssize_t todo = sizeof(unsigned int);
|
|
|
|
|
|
|
|
while (todo > 0)
|
|
|
|
{
|
2011-08-18 03:59:24 -07:00
|
|
|
ssize_t r = write(_ecore_evas_fps_debug_fd, buf2, todo);
|
2010-09-29 10:03:38 -07:00
|
|
|
if (r > 0)
|
|
|
|
{
|
|
|
|
todo -= r;
|
2011-08-18 03:59:24 -07:00
|
|
|
buf2 += r;
|
2010-09-29 10:03:38 -07:00
|
|
|
}
|
|
|
|
else if ((r < 0) && (errno == EINTR))
|
|
|
|
continue;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ERR("could not write to file '%s' fd %d: %s",
|
|
|
|
buf, _ecore_evas_fps_debug_fd, strerror(errno));
|
|
|
|
close(_ecore_evas_fps_debug_fd);
|
|
|
|
_ecore_evas_fps_debug_fd = -1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_ecore_evas_fps_rendertime_mmap = mmap(NULL, sizeof(unsigned int),
|
|
|
|
PROT_READ | PROT_WRITE,
|
|
|
|
MAP_SHARED,
|
|
|
|
_ecore_evas_fps_debug_fd, 0);
|
|
|
|
if (_ecore_evas_fps_rendertime_mmap == MAP_FAILED)
|
|
|
|
_ecore_evas_fps_rendertime_mmap = NULL;
|
2004-03-16 21:14:13 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2004-03-16 21:14:13 -08:00
|
|
|
_ecore_evas_fps_debug_shutdown(void)
|
|
|
|
{
|
|
|
|
_ecore_evas_fps_debug_init_count--;
|
|
|
|
if (_ecore_evas_fps_debug_init_count > 0) return;
|
|
|
|
if (_ecore_evas_fps_debug_fd >= 0)
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
char buf[4096];
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2010-09-29 10:03:38 -07:00
|
|
|
snprintf(buf, sizeof(buf), "/tmp/.ecore_evas_fps_debug-%i", (int)getpid());
|
|
|
|
unlink(buf);
|
|
|
|
if (_ecore_evas_fps_rendertime_mmap)
|
|
|
|
{
|
|
|
|
munmap(_ecore_evas_fps_rendertime_mmap, sizeof(int));
|
|
|
|
_ecore_evas_fps_rendertime_mmap = NULL;
|
|
|
|
}
|
|
|
|
close(_ecore_evas_fps_debug_fd);
|
|
|
|
_ecore_evas_fps_debug_fd = -1;
|
2004-03-16 21:14:13 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2004-03-16 21:14:13 -08:00
|
|
|
_ecore_evas_fps_debug_rendertime_add(double t)
|
|
|
|
{
|
2009-02-27 23:54:47 -08:00
|
|
|
static double rtime = 0.0;
|
|
|
|
static double rlapse = 0.0;
|
|
|
|
static int frames = 0;
|
|
|
|
static int flapse = 0;
|
|
|
|
double tim;
|
2009-03-19 00:59:59 -07:00
|
|
|
|
2009-02-27 23:54:47 -08:00
|
|
|
tim = ecore_time_get();
|
|
|
|
rtime += t;
|
|
|
|
frames++;
|
|
|
|
if (rlapse == 0.0)
|
|
|
|
{
|
|
|
|
rlapse = tim;
|
|
|
|
flapse = frames;
|
|
|
|
}
|
|
|
|
else if ((tim - rlapse) >= 0.5)
|
|
|
|
{
|
2009-10-30 06:08:54 -07:00
|
|
|
printf("FRAME: %i, FPS: %3.1f, RTIME %3.0f%%\n",
|
2009-02-27 23:54:47 -08:00
|
|
|
frames,
|
|
|
|
(frames - flapse) / (tim - rlapse),
|
|
|
|
(100.0 * rtime) / (tim - rlapse)
|
|
|
|
);
|
|
|
|
rlapse = tim;
|
|
|
|
flapse = frames;
|
|
|
|
rtime = 0.0;
|
2004-03-16 21:14:13 -08:00
|
|
|
}
|
|
|
|
}
|
2005-07-28 07:09:09 -07:00
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2010-01-06 21:29:06 -08:00
|
|
|
_ecore_evas_register(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
ee->registered = 1;
|
|
|
|
ecore_evases = (Ecore_Evas *)eina_inlist_prepend
|
|
|
|
(EINA_INLIST_GET(ecore_evases), EINA_INLIST_GET(ee));
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2011-10-05 15:11:00 -07:00
|
|
|
_ecore_evas_ref(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
ee->refcount++;
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2011-10-05 15:11:00 -07:00
|
|
|
_ecore_evas_unref(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
ee->refcount--;
|
|
|
|
if (ee->refcount == 0)
|
|
|
|
{
|
|
|
|
if (ee->deleted) _ecore_evas_free(ee);
|
|
|
|
}
|
|
|
|
else if (ee->refcount < -1)
|
|
|
|
ERR("Ecore_Evas %p->refcount=%d < 0", ee, ee->refcount);
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2005-07-28 07:09:09 -07:00
|
|
|
_ecore_evas_free(Ecore_Evas *ee)
|
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas_Interface *iface;
|
|
|
|
|
2011-10-05 15:11:00 -07:00
|
|
|
ee->deleted = EINA_TRUE;
|
|
|
|
if (ee->refcount > 0) return;
|
|
|
|
|
2008-10-22 18:00:16 -07:00
|
|
|
if (ee->func.fn_pre_free) ee->func.fn_pre_free(ee);
|
2005-07-28 07:09:09 -07:00
|
|
|
while (ee->sub_ecore_evas)
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
_ecore_evas_free(ee->sub_ecore_evas->data);
|
2005-07-28 07:09:09 -07:00
|
|
|
}
|
2008-12-11 05:55:47 -08:00
|
|
|
if (ee->data) eina_hash_free(ee->data);
|
2005-07-28 07:09:09 -07:00
|
|
|
ee->data = NULL;
|
2010-06-03 05:33:27 -07:00
|
|
|
if (ee->name) free(ee->name);
|
2005-07-28 07:09:09 -07:00
|
|
|
ee->name = NULL;
|
2010-06-03 05:33:27 -07:00
|
|
|
if (ee->prop.title) free(ee->prop.title);
|
2005-07-28 07:09:09 -07:00
|
|
|
ee->prop.title = NULL;
|
2010-06-03 05:33:27 -07:00
|
|
|
if (ee->prop.name) free(ee->prop.name);
|
2005-07-28 07:09:09 -07:00
|
|
|
ee->prop.name = NULL;
|
2010-06-03 05:33:27 -07:00
|
|
|
if (ee->prop.clas) free(ee->prop.clas);
|
2005-07-28 07:09:09 -07:00
|
|
|
ee->prop.clas = NULL;
|
2012-12-04 22:48:46 -08:00
|
|
|
_ecore_evas_window_profile_free(ee);
|
|
|
|
ee->prop.profile.name = NULL;
|
|
|
|
_ecore_evas_window_available_profiles_free(ee);
|
|
|
|
ee->prop.profile.available_list = NULL;
|
2010-06-03 05:33:27 -07:00
|
|
|
if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object);
|
2005-07-28 07:09:09 -07:00
|
|
|
ee->prop.cursor.object = NULL;
|
2010-06-03 05:33:27 -07:00
|
|
|
if (ee->evas) evas_free(ee->evas);
|
2005-07-28 07:09:09 -07:00
|
|
|
ee->evas = NULL;
|
2010-06-03 05:33:27 -07:00
|
|
|
ECORE_MAGIC_SET(ee, ECORE_MAGIC_NONE);
|
|
|
|
ee->driver = NULL;
|
2007-06-16 20:41:43 -07:00
|
|
|
if (ee->engine.idle_flush_timer)
|
|
|
|
ecore_timer_del(ee->engine.idle_flush_timer);
|
2005-07-28 07:09:09 -07:00
|
|
|
if (ee->engine.func->fn_free) ee->engine.func->fn_free(ee);
|
2010-01-06 21:29:06 -08:00
|
|
|
if (ee->registered)
|
|
|
|
{
|
|
|
|
ecore_evases = (Ecore_Evas *)eina_inlist_remove
|
|
|
|
(EINA_INLIST_GET(ecore_evases), EINA_INLIST_GET(ee));
|
|
|
|
}
|
2012-12-05 13:15:42 -08:00
|
|
|
|
|
|
|
EINA_LIST_FREE(ee->engine.ifaces, iface)
|
|
|
|
free(iface);
|
|
|
|
|
|
|
|
ee->engine.ifaces = NULL;
|
2005-07-28 07:09:09 -07:00
|
|
|
free(ee);
|
|
|
|
}
|
2007-06-16 20:41:43 -07:00
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
static Eina_Bool
|
2007-06-16 20:41:43 -07:00
|
|
|
_ecore_evas_cb_idle_flush(void *data)
|
|
|
|
{
|
|
|
|
Ecore_Evas *ee;
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2007-06-16 20:41:43 -07:00
|
|
|
ee = (Ecore_Evas *)data;
|
2007-06-17 02:23:51 -07:00
|
|
|
evas_render_idle_flush(ee->evas);
|
2007-06-16 20:41:43 -07:00
|
|
|
ee->engine.idle_flush_timer = NULL;
|
2010-06-24 09:15:56 -07:00
|
|
|
return ECORE_CALLBACK_CANCEL;
|
2007-06-16 20:41:43 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
static Eina_Bool
|
2012-11-25 01:55:32 -08:00
|
|
|
_ecore_evas_async_events_fd_handler(void *data EINA_UNUSED, Ecore_Fd_Handler *fd_handler EINA_UNUSED)
|
2008-09-16 09:22:00 -07:00
|
|
|
{
|
|
|
|
evas_async_events_process();
|
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
return ECORE_CALLBACK_RENEW;
|
2008-09-16 09:22:00 -07:00
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2007-06-16 20:41:43 -07:00
|
|
|
_ecore_evas_idle_timeout_update(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (ee->engine.idle_flush_timer)
|
|
|
|
ecore_timer_del(ee->engine.idle_flush_timer);
|
|
|
|
ee->engine.idle_flush_timer = ecore_timer_add(IDLE_FLUSH_TIME,
|
2010-09-29 10:03:38 -07:00
|
|
|
_ecore_evas_cb_idle_flush,
|
|
|
|
ee);
|
2007-06-16 20:41:43 -07:00
|
|
|
}
|
2009-03-19 06:06:16 -07:00
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2009-03-20 17:39:02 -07:00
|
|
|
_ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y, unsigned int timestamp)
|
2009-03-19 06:06:16 -07:00
|
|
|
{
|
|
|
|
ee->mouse.x = x;
|
|
|
|
ee->mouse.y = y;
|
|
|
|
if (ee->prop.cursor.object)
|
|
|
|
{
|
2012-11-07 08:12:18 -08:00
|
|
|
int fx, fy;
|
|
|
|
evas_output_framespace_get(ee->evas, &fx, &fy, NULL, NULL);
|
2010-09-29 10:03:38 -07:00
|
|
|
evas_object_show(ee->prop.cursor.object);
|
|
|
|
if (ee->rotation == 0)
|
|
|
|
evas_object_move(ee->prop.cursor.object,
|
2012-11-07 08:12:18 -08:00
|
|
|
x - fx - ee->prop.cursor.hot.x,
|
|
|
|
y - fy - ee->prop.cursor.hot.y);
|
2010-09-29 10:03:38 -07:00
|
|
|
else if (ee->rotation == 90)
|
|
|
|
evas_object_move(ee->prop.cursor.object,
|
2012-11-07 08:12:18 -08:00
|
|
|
ee->h - y - fx - 1 - ee->prop.cursor.hot.x,
|
|
|
|
x - fy - ee->prop.cursor.hot.y);
|
2010-09-29 10:03:38 -07:00
|
|
|
else if (ee->rotation == 180)
|
|
|
|
evas_object_move(ee->prop.cursor.object,
|
2012-11-07 08:12:18 -08:00
|
|
|
ee->w - x - fx - 1 - ee->prop.cursor.hot.x,
|
|
|
|
ee->h - y - fy - 1 - ee->prop.cursor.hot.y);
|
2010-09-29 10:03:38 -07:00
|
|
|
else if (ee->rotation == 270)
|
|
|
|
evas_object_move(ee->prop.cursor.object,
|
2012-11-07 08:12:18 -08:00
|
|
|
y - fx - ee->prop.cursor.hot.x,
|
|
|
|
ee->w - x - fy - 1 - ee->prop.cursor.hot.y);
|
2009-03-19 06:06:16 -07:00
|
|
|
}
|
|
|
|
if (ee->rotation == 0)
|
|
|
|
evas_event_feed_mouse_move(ee->evas, x, y, timestamp, NULL);
|
|
|
|
else if (ee->rotation == 90)
|
|
|
|
evas_event_feed_mouse_move(ee->evas, ee->h - y - 1, x, timestamp, NULL);
|
|
|
|
else if (ee->rotation == 180)
|
|
|
|
evas_event_feed_mouse_move(ee->evas, ee->w - x - 1, ee->h - y - 1, timestamp, NULL);
|
|
|
|
else if (ee->rotation == 270)
|
|
|
|
evas_event_feed_mouse_move(ee->evas, y, ee->w - x - 1, timestamp, NULL);
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2010-12-07 19:25:23 -08:00
|
|
|
_ecore_evas_mouse_multi_move_process(Ecore_Evas *ee, int device,
|
2011-04-20 07:15:33 -07:00
|
|
|
int x, int y,
|
2010-12-07 19:25:23 -08:00
|
|
|
double radius,
|
|
|
|
double radius_x, double radius_y,
|
|
|
|
double pressure,
|
|
|
|
double angle,
|
|
|
|
double mx, double my,
|
|
|
|
unsigned int timestamp)
|
|
|
|
{
|
|
|
|
if (ee->rotation == 0)
|
|
|
|
evas_event_feed_multi_move(ee->evas, device,
|
2011-04-20 07:15:33 -07:00
|
|
|
x, y,
|
2010-12-07 19:25:23 -08:00
|
|
|
radius,
|
|
|
|
radius_x, radius_y,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
mx, my,
|
|
|
|
timestamp, NULL);
|
|
|
|
else if (ee->rotation == 90)
|
|
|
|
evas_event_feed_multi_move(ee->evas, device,
|
2011-04-20 07:15:33 -07:00
|
|
|
ee->h - y - 1, x,
|
2010-12-07 19:25:23 -08:00
|
|
|
radius,
|
|
|
|
radius_y, radius_x,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
ee->h - my - 1, mx,
|
|
|
|
timestamp, NULL);
|
|
|
|
else if (ee->rotation == 180)
|
|
|
|
evas_event_feed_multi_move(ee->evas, device,
|
2011-04-20 07:15:33 -07:00
|
|
|
ee->w - x - 1, ee->h - y - 1,
|
2010-12-07 19:25:23 -08:00
|
|
|
radius,
|
|
|
|
radius_x, radius_y,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
ee->w - mx - 1, ee->h - my - 1,
|
|
|
|
timestamp, NULL);
|
|
|
|
else if (ee->rotation == 270)
|
|
|
|
evas_event_feed_multi_move(ee->evas, device,
|
|
|
|
y, ee->w - x - 1,
|
|
|
|
radius,
|
|
|
|
radius_y, radius_x,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
my, ee->w - mx - 1,
|
|
|
|
timestamp, NULL);
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2010-12-07 19:25:23 -08:00
|
|
|
_ecore_evas_mouse_multi_down_process(Ecore_Evas *ee, int device,
|
2011-04-20 07:15:33 -07:00
|
|
|
int x, int y,
|
2010-12-07 19:25:23 -08:00
|
|
|
double radius,
|
|
|
|
double radius_x, double radius_y,
|
|
|
|
double pressure,
|
|
|
|
double angle,
|
|
|
|
double mx, double my,
|
|
|
|
Evas_Button_Flags flags,
|
|
|
|
unsigned int timestamp)
|
|
|
|
{
|
|
|
|
if (ee->rotation == 0)
|
|
|
|
evas_event_feed_multi_down(ee->evas, device,
|
2011-04-20 07:15:33 -07:00
|
|
|
x, y,
|
2010-12-07 19:25:23 -08:00
|
|
|
radius,
|
|
|
|
radius_x, radius_y,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
mx, my,
|
|
|
|
flags, timestamp, NULL);
|
|
|
|
else if (ee->rotation == 90)
|
|
|
|
evas_event_feed_multi_down(ee->evas, device,
|
2011-04-20 07:15:33 -07:00
|
|
|
ee->h - y - 1, x,
|
2010-12-07 19:25:23 -08:00
|
|
|
radius,
|
|
|
|
radius_y, radius_x,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
ee->h - my - 1, mx,
|
|
|
|
flags, timestamp, NULL);
|
|
|
|
else if (ee->rotation == 180)
|
|
|
|
evas_event_feed_multi_down(ee->evas, device,
|
2011-04-20 07:15:33 -07:00
|
|
|
ee->w - x - 1, ee->h - y - 1,
|
2010-12-07 19:25:23 -08:00
|
|
|
radius,
|
|
|
|
radius_x, radius_y,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
ee->w - mx - 1, ee->h - my - 1,
|
|
|
|
flags, timestamp, NULL);
|
|
|
|
else if (ee->rotation == 270)
|
|
|
|
evas_event_feed_multi_down(ee->evas, device,
|
|
|
|
y, ee->w - x - 1,
|
|
|
|
radius,
|
|
|
|
radius_y, radius_x,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
my, ee->w - mx - 1,
|
|
|
|
flags, timestamp, NULL);
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2010-12-07 19:25:23 -08:00
|
|
|
_ecore_evas_mouse_multi_up_process(Ecore_Evas *ee, int device,
|
2011-04-20 07:15:33 -07:00
|
|
|
int x, int y,
|
2010-12-07 19:25:23 -08:00
|
|
|
double radius,
|
|
|
|
double radius_x, double radius_y,
|
|
|
|
double pressure,
|
|
|
|
double angle,
|
|
|
|
double mx, double my,
|
|
|
|
Evas_Button_Flags flags,
|
|
|
|
unsigned int timestamp)
|
|
|
|
{
|
|
|
|
if (ee->rotation == 0)
|
|
|
|
evas_event_feed_multi_up(ee->evas, device,
|
2011-04-20 07:15:33 -07:00
|
|
|
x, y,
|
2010-12-07 19:25:23 -08:00
|
|
|
radius,
|
|
|
|
radius_x, radius_y,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
mx, my,
|
|
|
|
flags, timestamp, NULL);
|
|
|
|
else if (ee->rotation == 90)
|
|
|
|
evas_event_feed_multi_up(ee->evas, device,
|
2011-04-20 07:15:33 -07:00
|
|
|
ee->h - y - 1, x,
|
2010-12-07 19:25:23 -08:00
|
|
|
radius,
|
|
|
|
radius_y, radius_x,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
ee->h - my - 1, mx,
|
|
|
|
flags, timestamp, NULL);
|
|
|
|
else if (ee->rotation == 180)
|
|
|
|
evas_event_feed_multi_up(ee->evas, device,
|
2011-04-20 07:15:33 -07:00
|
|
|
ee->w - x - 1, ee->h - y - 1,
|
2010-12-07 19:25:23 -08:00
|
|
|
radius,
|
|
|
|
radius_x, radius_y,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
ee->w - mx - 1, ee->h - my - 1,
|
|
|
|
flags, timestamp, NULL);
|
|
|
|
else if (ee->rotation == 270)
|
|
|
|
evas_event_feed_multi_up(ee->evas, device,
|
|
|
|
y, ee->w - x - 1,
|
|
|
|
radius,
|
|
|
|
radius_y, radius_x,
|
2011-04-20 07:15:33 -07:00
|
|
|
pressure,
|
2010-12-07 19:25:23 -08:00
|
|
|
angle - ee->rotation,
|
|
|
|
my, ee->w - mx - 1,
|
|
|
|
flags, timestamp, NULL);
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2012-12-04 22:48:46 -08:00
|
|
|
_ecore_evas_window_profile_free(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (ee->prop.profile.name)
|
|
|
|
eina_stringshare_del(ee->prop.profile.name);
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI void
|
2012-12-04 22:48:46 -08:00
|
|
|
_ecore_evas_window_available_profiles_free(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (ee->prop.profile.available_list)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < ee->prop.profile.count; i++)
|
|
|
|
{
|
|
|
|
if (ee->prop.profile.available_list[i])
|
|
|
|
{
|
|
|
|
eina_stringshare_del(ee->prop.profile.available_list[i]);
|
|
|
|
ee->prop.profile.available_list[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free(ee->prop.profile.available_list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-12-05 15:11:46 -08:00
|
|
|
EAPI int
|
|
|
|
ecore_evas_buffer_render(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Buffer *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Buffer *)_ecore_evas_interface_get(ee, "buffer");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
|
|
|
|
|
|
|
|
return iface->render(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-01 17:32:56 -07:00
|
|
|
EAPI Eina_List *
|
2010-12-07 00:38:07 -08:00
|
|
|
ecore_evas_ecore_evas_list_get(void)
|
|
|
|
{
|
2010-07-01 17:32:56 -07:00
|
|
|
Ecore_Evas *ee;
|
|
|
|
Eina_List *l = NULL;
|
2011-04-20 07:15:33 -07:00
|
|
|
|
2010-07-01 17:32:56 -07:00
|
|
|
EINA_INLIST_FOREACH(ecore_evases, ee)
|
|
|
|
{
|
2010-09-29 10:03:38 -07:00
|
|
|
l = eina_list_append(l, ee);
|
2010-07-01 17:32:56 -07:00
|
|
|
}
|
2011-04-20 07:15:33 -07:00
|
|
|
|
2010-07-01 17:32:56 -07:00
|
|
|
return l;
|
|
|
|
}
|
2011-10-27 12:29:08 -07:00
|
|
|
|
2012-12-04 22:48:46 -08:00
|
|
|
EAPI Eina_List *
|
|
|
|
ecore_evas_sub_ecore_evas_list_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
|
|
|
|
{
|
|
|
|
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
|
|
|
|
"ecore_evas_sub_ecore_evas_list_get");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
return ee->sub_ecore_evas;
|
|
|
|
}
|
|
|
|
|
2011-10-27 12:29:08 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_evas_input_event_register(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
ecore_event_window_register((Ecore_Window)ee, ee, ee->evas,
|
|
|
|
(Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
|
|
|
|
(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
|
|
|
|
(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
|
|
|
|
(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_input_event_unregister(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
ecore_event_window_unregister((Ecore_Window)ee);
|
|
|
|
}
|
2012-01-12 01:07:22 -08:00
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
/**
|
|
|
|
* @brief Create Ecore_Evas using fb backend.
|
|
|
|
* @param disp_name The name of the display to be used.
|
|
|
|
* @param rotation The rotation to be used.
|
|
|
|
* @param w The width of the Ecore_Evas to be created.
|
|
|
|
* @param h The height of the Ecore_Evas to be created.
|
|
|
|
* @return The new Ecore_Evas.
|
|
|
|
*/
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(const char *, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("fb");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_fb_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(disp_name, rotation, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Create Ecore_Evas using software x11.
|
|
|
|
* @note If ecore is not compiled with support to x11 then nothing is done and NULL is returned.
|
|
|
|
* @param disp_name The name of the Ecore_Evas to be created.
|
|
|
|
* @param parent The parent of the Ecore_Evas to be created.
|
|
|
|
* @param x The X coordinate to be used.
|
|
|
|
* @param y The Y coordinate to be used.
|
|
|
|
* @param w The width of the Ecore_Evas to be created.
|
|
|
|
* @param h The height of the Ecore_Evas to be created.
|
|
|
|
* @return A handle to the created Ecore_Evas.
|
|
|
|
*/
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(const char *, Ecore_X_Window, int, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("x");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_software_x11_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(disp_name, parent, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Get the window from Ecore_Evas using software x11.
|
|
|
|
* @note If ecore is not compiled with support for x11 or if @p ee was not
|
|
|
|
* created with ecore_evas_software_x11_new() then nothing is done and
|
|
|
|
* 0 is returned.
|
|
|
|
* @param ee The Ecore_Evas from which to get the window.
|
|
|
|
* @return The window of type Ecore_X_Window.
|
|
|
|
*/
|
|
|
|
EAPI Ecore_X_Window
|
|
|
|
ecore_evas_software_x11_window_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Software_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Software_X11 *)_ecore_evas_interface_get(ee, "software_x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
|
|
|
|
|
|
|
|
return iface->window_get(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Set the direct_resize of Ecore_Evas using software x11.
|
|
|
|
* @note If ecore is not compiled with support to x11 then nothing is done.
|
|
|
|
* @param ee The Ecore_Evas in which to set direct resize.
|
|
|
|
* @param on Enables the resize of Ecore_Evas if equals EINA_TRUE, disables if equals EINA_FALSE.
|
|
|
|
*/
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Software_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Software_X11 *)_ecore_evas_interface_get(ee, "software_x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->resize_set(ee, on);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Gets if the Ecore_Evas is being directly resized using software x11.
|
|
|
|
* @note If ecore is not compiled with support to x11 then nothing is done and EINA_FALSE is returned.
|
|
|
|
* @param ee The Ecore_Evas from which to get direct resize.
|
|
|
|
* @return EINA_TRUE if the resize was managed directly, otherwise return EINA_FALSE.
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_software_x11_direct_resize_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Software_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Software_X11 *)_ecore_evas_interface_get(ee, "software_x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, EINA_FALSE);
|
|
|
|
|
|
|
|
return iface->resize_get(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Add extra window on Ecore_Evas using software x11.
|
|
|
|
* @note If ecore is not compiled with support to x11 then nothing is done.
|
|
|
|
* @param ee The Ecore_Evas on which to add the window.
|
|
|
|
* @param win The window to be added at the Ecore_Evas.
|
|
|
|
*/
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Software_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Software_X11 *)_ecore_evas_interface_get(ee, "software_x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->extra_event_window_add(ee, win);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Create Ecore_Evas using opengl x11.
|
|
|
|
* @note If ecore is not compiled with support to x11 then nothing is done and NULL is returned.
|
|
|
|
* @param disp_name The name of the display of the Ecore_Evas to be created.
|
|
|
|
* @param parent The parent of the Ecore_Evas to be created.
|
|
|
|
* @param x The X coordinate to be used.
|
|
|
|
* @param y The Y coordinate to be used.
|
|
|
|
* @param w The width of the Ecore_Evas to be created.
|
|
|
|
* @param h The height of the Ecore_Evas to be created.
|
|
|
|
* @return The new Ecore_Evas.
|
|
|
|
*/
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(const char *, Ecore_X_Window, int, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("x");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_gl_x11_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(disp_name, parent, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_gl_x11_options_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h, const int *opt)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(const char *, Ecore_X_Window, int, int, int, int, const int*);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("x");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_gl_x11_options_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(disp_name, parent, x, y, w, h, opt);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Get the window from Ecore_Evas using opengl x11.
|
|
|
|
* @note If ecore is not compiled with support for x11 or if @p ee was not
|
|
|
|
* created with ecore_evas_gl_x11_new() then nothing is done and
|
|
|
|
* 0 is returned.
|
|
|
|
* @param ee The Ecore_Evas from which to get the window.
|
|
|
|
* @return The window of type Ecore_X_Window of Ecore_Evas.
|
|
|
|
*/
|
|
|
|
EAPI Ecore_X_Window
|
|
|
|
ecore_evas_gl_x11_window_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Gl_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, "gl_x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
|
|
|
|
|
|
|
|
return iface->window_get(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Set direct_resize for Ecore_Evas using opengl x11.
|
|
|
|
* @note If ecore is not compiled with support to x11 then nothing is done.
|
|
|
|
* @param ee The Ecore_Evas in which to set direct resize.
|
|
|
|
* @param on Enables the resize of Ecore_Evas if equals EINA_TRUE, disables if equals EINA_FALSE.
|
|
|
|
*/
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_gl_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Gl_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, "gl_x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->resize_set(ee, on);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Gets if the Ecore_Evas is being directly resized using opengl x11.
|
|
|
|
* @note If ecore is not compiled with support to x11 then nothing is done and EINA_FALSE is returned.
|
|
|
|
* @param ee The Ecore_Evas from which to get direct resize.
|
|
|
|
* @return EINA_TRUE if the resize was managed directly, otherwise return EINA_FALSE.
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_gl_x11_direct_resize_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Gl_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, "gl_x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, EINA_FALSE);
|
|
|
|
|
|
|
|
return iface->resize_get(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Add extra window on Ecore_Evas using opengl x11.
|
|
|
|
* @note If ecore is not compiled with support to x11 then nothing is done.
|
|
|
|
* @param ee The Ecore_Evas for which to add the window.
|
|
|
|
* @param win The window to be added at the Ecore_Evas.
|
|
|
|
*/
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_gl_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Gl_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, "gl_x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->extra_event_window_add(ee, win);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Set the functions to be used before and after the swap callback.
|
|
|
|
* @note If ecore is not compiled with support to x11 then nothing is done and the function is returned.
|
|
|
|
* @param ee The Ecore_Evas for which to set the swap callback.
|
|
|
|
* @param data The data for which to set the swap callback.
|
|
|
|
* @param pre_cb The function to be called before the callback.
|
|
|
|
* @param post_cb The function to be called after the callback.
|
|
|
|
*/
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_gl_x11_pre_post_swap_callback_set(const Ecore_Evas *ee, void *data, void (*pre_cb) (void *data, Evas *e), void (*post_cb) (void *data, Evas *e))
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Gl_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, "gl_x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->pre_post_swap_callback_set(ee, data, pre_cb, post_cb);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_x11_leader_set(Ecore_Evas *ee, Ecore_X_Window win)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_X11 *)_ecore_evas_interface_get(ee, "x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->leader_set(ee, win);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_X_Window
|
|
|
|
ecore_evas_x11_leader_get(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_X11 *)_ecore_evas_interface_get(ee, "x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
|
|
|
|
|
|
|
|
return iface->leader_get(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_x11_leader_default_set(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_X11 *)_ecore_evas_interface_get(ee, "x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->leader_default_set(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_x11_shape_input_rectangle_set(Ecore_Evas *ee, int x, int y, int w, int h)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_X11 *)_ecore_evas_interface_get(ee, "x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->shape_input_rectangle_set(ee, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_x11_shape_input_rectangle_add(Ecore_Evas *ee, int x, int y, int w, int h)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_X11 *)_ecore_evas_interface_get(ee, "x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->shape_input_rectangle_add(ee, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_x11_shape_input_rectangle_subtract(Ecore_Evas *ee, int x, int y, int w, int h)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_X11 *)_ecore_evas_interface_get(ee, "x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->shape_input_rectangle_subtract(ee, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_x11_shape_input_empty(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_X11 *)_ecore_evas_interface_get(ee, "x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->shape_input_empty(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_x11_shape_input_reset(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_X11 *)_ecore_evas_interface_get(ee, "x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->shape_input_reset(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_x11_shape_input_apply(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_X11 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_X11 *)_ecore_evas_interface_get(ee, "x11");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->shape_input_apply(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_buffer_new(int w, int h)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("buffer");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_buffer_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const void *
|
|
|
|
ecore_evas_buffer_pixels_get(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Buffer *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Buffer *)_ecore_evas_interface_get(ee, "buffer");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL);
|
|
|
|
|
|
|
|
return iface->pixels_get(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_buffer_allocfunc_new(int w, int h,
|
|
|
|
void *(*alloc_func) (void *data, int size),
|
|
|
|
void (*free_func) (void *data, void *pix),
|
|
|
|
const void *data)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(int, int, void*(*)(void *, int), void(*)(void *, void *), const void *);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("buffer");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_buffer_allocfunc_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(w, h, alloc_func, free_func, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_extn_socket_new(int w, int h)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("buffer");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_extn_socket_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_extn_socket_listen(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Extn *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Extn *)_ecore_evas_interface_get(ee, "extn");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, EINA_FALSE);
|
|
|
|
|
|
|
|
return iface->listen(ee, svcname, svcnum, svcsys);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_extn_plug_object_data_lock(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Extn *iface;
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
|
|
|
|
ee = ecore_evas_object_ecore_evas_get(obj);
|
2012-12-18 12:10:48 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ee);
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
iface = (Ecore_Evas_Interface_Extn *)_ecore_evas_interface_get(ee, "extn");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->data_lock(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_extn_plug_object_data_unlock(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Extn *iface;
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
|
|
|
|
ee = ecore_evas_object_ecore_evas_get(obj);
|
2012-12-18 12:10:48 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ee);
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
iface = (Ecore_Evas_Interface_Extn *)_ecore_evas_interface_get(ee, "extn");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->data_unlock(ee);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
ecore_evas_extn_plug_new(Ecore_Evas *ee_target)
|
|
|
|
{
|
|
|
|
Evas_Object *(*new)(Ecore_Evas *);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("buffer");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_extn_plug_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(ee_target);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_evas_extn_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Extn *iface;
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
|
|
|
|
ee = ecore_evas_object_ecore_evas_get(obj);
|
2012-12-18 23:06:22 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ee, EINA_FALSE);
|
2012-12-18 12:10:48 -08:00
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
iface = (Ecore_Evas_Interface_Extn *)_ecore_evas_interface_get(ee, "extn");
|
2012-12-18 12:09:51 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, EINA_FALSE);
|
2012-12-05 13:15:42 -08:00
|
|
|
|
|
|
|
return iface->connect(ee, svcname, svcnum, svcsys);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
ecore_evas_object_image_new(Ecore_Evas *ee_target)
|
|
|
|
{
|
|
|
|
Evas_Object *(*new)(Ecore_Evas *ee_target);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("buffer");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_object_image_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(ee_target);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_sdl_new(const char* name, int w, int h, int fullscreen,
|
|
|
|
int hwsurface, int noframe, int alpha)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(const char *, int, int, int, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("sdl");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_sdl_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(name, w, h, fullscreen, hwsurface, noframe, alpha);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_sdl16_new(const char* name, int w, int h, int fullscreen,
|
|
|
|
int hwsurface, int noframe, int alpha)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(const char *, int, int, int, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("sdl");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_sdl16_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(name, w, h, fullscreen, hwsurface, noframe, alpha);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_gl_sdl_new(const char* name, int w, int h, int fullscreen, int noframe)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(const char *, int, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("sdl");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_gl_sdl_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(name, w, h, fullscreen, noframe);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_wayland_shm_new(const char *disp_name, unsigned int parent,
|
|
|
|
int x, int y, int w, int h, Eina_Bool frame)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(const char *, unsigned int, int, int, int, int, Eina_Bool);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("wayland");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_wayland_shm_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(disp_name, parent, x, y, w, h, frame);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent,
|
|
|
|
int x, int y, int w, int h, Eina_Bool frame)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(const char *, unsigned int, int, int, int, int, Eina_Bool);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("wayland");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_wayland_egl_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(disp_name, parent, x, y, w, h, frame);
|
|
|
|
}
|
|
|
|
|
2012-04-17 18:24:30 -07:00
|
|
|
EAPI void
|
2012-01-12 01:07:22 -08:00
|
|
|
ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
|
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas_Interface_Wayland *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->resize(ee, location);
|
2012-01-16 11:11:17 -08:00
|
|
|
}
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
EAPI void
|
2012-04-24 10:01:59 -07:00
|
|
|
ecore_evas_wayland_move(Ecore_Evas *ee, int x, int y)
|
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas_Interface_Wayland *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->move(ee, x, y);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
ecore_evas_wayland_pointer_set(Ecore_Evas *ee, int hot_x, int hot_y)
|
|
|
|
{
|
|
|
|
Ecore_Evas_Interface_Wayland *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->pointer_set(ee, hot_x, hot_y);
|
2012-04-24 10:01:59 -07:00
|
|
|
}
|
|
|
|
|
2012-04-17 18:24:30 -07:00
|
|
|
EAPI void
|
2012-03-26 19:17:22 -07:00
|
|
|
ecore_evas_wayland_type_set(Ecore_Evas *ee, int type)
|
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas_Interface_Wayland *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(iface);
|
|
|
|
|
|
|
|
iface->type_set(ee, type);
|
2012-03-26 19:17:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Ecore_Wl_Window *
|
|
|
|
ecore_evas_wayland_window_get(const Ecore_Evas *ee)
|
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas_Interface_Wayland *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL);
|
2012-05-28 05:24:30 -07:00
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
return iface->window_get(ee);
|
2012-03-26 19:17:22 -07:00
|
|
|
}
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_software_gdi_new(Ecore_Win32_Window *parent,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height)
|
2012-03-26 19:17:22 -07:00
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas *(*new)(Ecore_Win32_Window *, int, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("win32");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
2012-03-26 19:17:22 -07:00
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_software_gdi_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(parent, x, y, width, height);
|
2012-03-26 19:17:22 -07:00
|
|
|
}
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height)
|
2012-01-12 01:07:22 -08:00
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas *(*new)(Ecore_Win32_Window *, int, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("win32");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_software_ddraw_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
2012-01-12 01:07:22 -08:00
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
return new(parent, x, y, width, height);
|
2012-03-26 19:17:22 -07:00
|
|
|
}
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height)
|
2012-04-24 10:01:59 -07:00
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas *(*new)(Ecore_Win32_Window *, int, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("win32");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_direct3d_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
2012-04-24 10:01:59 -07:00
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
return new(parent, x, y, width, height);
|
2012-04-24 10:01:59 -07:00
|
|
|
}
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_gl_glew_new(Ecore_Win32_Window *parent,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height)
|
2012-03-26 19:17:22 -07:00
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas *(*new)(Ecore_Win32_Window *, int, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("win32");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_gl_glew_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
2012-03-26 19:17:22 -07:00
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
return new(parent, x, y, width, height);
|
2012-03-26 19:17:22 -07:00
|
|
|
}
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
EAPI Ecore_Win32_Window *
|
|
|
|
ecore_evas_win32_window_get(const Ecore_Evas *ee)
|
2012-03-26 19:17:22 -07:00
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas_Interface_Win32 *iface;
|
|
|
|
iface = (Ecore_Evas_Interface_Win32 *)_ecore_evas_interface_get(ee, "win32");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL);
|
|
|
|
|
|
|
|
return iface->window_get(ee);
|
2012-03-26 19:17:22 -07:00
|
|
|
}
|
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_cocoa_new(Ecore_Cocoa_Window *parent, int x, int y, int w, int h)
|
2012-03-26 19:17:22 -07:00
|
|
|
{
|
2012-12-05 13:15:42 -08:00
|
|
|
Ecore_Evas *(*new)(Ecore_Cocoa_Window *, int, int, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("cocoa");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
2012-03-26 19:17:22 -07:00
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_cocoa_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(parent, x, y, w, h);
|
2012-01-12 01:07:22 -08:00
|
|
|
}
|
2012-10-03 09:30:37 -07:00
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
EAPI Ecore_Evas *
|
|
|
|
ecore_evas_psl1ght_new(const char* name, int w, int h)
|
|
|
|
{
|
|
|
|
Ecore_Evas *(*new)(const char*, int, int);
|
|
|
|
Eina_Module *m = _ecore_evas_engine_load("psl1ght");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
|
|
|
|
|
|
|
new = eina_module_symbol_get(m, "ecore_evas_psl1ght_new_internal");
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
|
|
|
|
|
|
|
return new(name, w, h);
|
|
|
|
}
|