remove 8bpp evas engine support from e3core-evas as its now gone from

evas.



SVN revision: 78027
This commit is contained in:
Carsten Haitzler 2012-10-16 02:54:05 +00:00
parent 7e3479e2f8
commit 6912aba9db
14 changed files with 30 additions and 593 deletions

View File

@ -1007,3 +1007,7 @@
* Since evas has 16bit engines removed, remove support from ecore-evas.
2012-10-16 Carsten Haitzler (The Rasterman)
* Since evas has 8bit engines removed, remove support from ecore-evas.

View File

@ -41,6 +41,7 @@ Fixes:
Removal:
* 16bpp evas engine support removed (API still there, but inactive).
* 8bpp evas engine support removed (API still there, but inactive).
Improvements:

View File

@ -157,7 +157,6 @@ want_ecore_evas="yes"
want_ecore_evas_software_buffer="yes"
want_ecore_evas_software_x11="no"
want_ecore_evas_opengl_x11="no"
want_ecore_evas_software_8_x11="no"
want_ecore_evas_software_xcb="no"
want_ecore_evas_software_gdi="no"
want_ecore_evas_software_ddraw="no"
@ -229,7 +228,6 @@ case "$host_os" in
want_ecore_wayland="yes"
want_ecore_evas_software_x11="yes"
want_ecore_evas_opengl_x11="yes"
want_ecore_evas_software_8_x11="yes"
want_ecore_evas_software_xcb="no"
want_ecore_evas_software_sdl="yes"
want_ecore_evas_gl_sdl="yes"
@ -1820,17 +1818,8 @@ if test "x${have_ecore_evas_opengl_x11}" = "xyes" -o "x${have_ecore_evas_opengl_
fi
fi
# ecore_evas_software_x11 8 bits
ECORE_EVAS_CHECK_MODULE([software-8-x11],
[$want_ecore_evas_software_8_x11],
[Software 8bit X11],
$have_ecore_x_xcb)
if test "x$have_ecore_evas_software_x11" = "xyes" -o \
"x$have_ecore_evas_opengl_x11" = "xyes" -o \
"x$have_ecore_evas_software_8_x11" = "xyes" -o \
"x$have_ecore_evas_software_xcb" = "xyes"; then
AC_DEFINE(BUILD_ECORE_EVAS_X11, 1, [Support for X Window Engines in Ecore_Evas])
requirements_ecore_evas="ecore-x >= 1.6.99 ${requirements_ecore_evas}"
@ -2222,7 +2211,6 @@ if test "x${have_ecore_evas}" = "xyes" ; then
echo " DirectFB...................: $have_ecore_evas_directfb"
echo " PSL1GHT....................: $have_ecore_evas_psl1ght"
echo " Software Framebuffer.......: $have_ecore_evas_fb"
echo " Software 8bit grayscale XCB: $have_ecore_evas_software_8_x11"
echo " Sing.Proc. Windowing System: $have_ecore_evas_ews"
echo " Wayland Shm................: $have_ecore_evas_wayland_shm"
echo " Wayland Egl................: $have_ecore_evas_wayland_egl"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-08-27 19:14+0900\n"
"POT-Creation-Date: 2012-10-16 11:52+0900\n"
"PO-Revision-Date: 2011-10-23 01:28+0100\n"
"Last-Translator: Daniel Kolesa <quaker66@gmail.com>\n"
"Language-Team: Czech <kde-i18n-doc@kde.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ecore 0.9.9.063-2\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-08-27 19:14+0900\n"
"POT-Creation-Date: 2012-10-16 11:52+0900\n"
"PO-Revision-Date: 2010-01-03 21:52+GMT\n"
"Last-Translator: Fabian Nowak <timystery@arcor.de>\n"
"Language-Team: German <debian-l10n-german@lists.debian.org>\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-08-27 19:14+0900\n"
"POT-Creation-Date: 2012-10-16 11:52+0900\n"
"PO-Revision-Date: 2011-11-20 22:42+0200\n"
"Last-Translator: George Rizopoulos <george.rizopoulos.1@gmail.com>\n"
"Language-Team: Greek\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-08-27 19:14+0900\n"
"POT-Creation-Date: 2012-10-16 11:52+0900\n"
"PO-Revision-Date: 2010-07-11 11:01+0400\n"
"Last-Translator: batden <batden@orange.fr>\n"
"Language-Team: Enlightenment French Team <pourunmondesansgourou@gmail.com>\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-08-27 19:14+0900\n"
"POT-Creation-Date: 2012-10-16 11:52+0900\n"
"PO-Revision-Date: 2009-10-27 19:36+0100\n"
"Last-Translator: quaker66 <quaker66@gmail.com>\n"
"Language-Team: none\n"

View File

@ -6,11 +6,12 @@
msgid ""
msgstr ""
"Project-Id-Version: Enlightenment Ecore 1.7.0\n"
"Report-Msgid-Bugs-To: Enlightenment-Devel <enlightenment-devel@lists.sourceforge.net>\n"
"POT-Creation-Date: 2012-08-30 22:29+0900\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-10-16 11:52+0900\n"
"PO-Revision-Date: 2012-08-30 22:50+0900\n"
"Last-Translator: Seong-ho Cho <darkcircle.0426@gmail.com>\n"
"Language-Team: Enlightenment-Intl <enlightenment-intl@lists.sourceforge.net>\n"
"Language-Team: Enlightenment-Intl <enlightenment-intl@lists.sourceforge."
"net>\n"
"Language: ko\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -71,25 +72,19 @@ msgstr "오류: 알 수 없는 옵션 -%c 입니다.\n"
msgid "ERROR: "
msgstr "오류: "
#: src/lib/ecore/ecore_getopt.c:931
#: src/lib/ecore/ecore_getopt.c:1068
#: src/lib/ecore/ecore_getopt.c:1084
#: src/lib/ecore/ecore_getopt.c:1099
#: src/lib/ecore/ecore_getopt.c:1116
#: src/lib/ecore/ecore_getopt.c:1163
#: src/lib/ecore/ecore_getopt.c:1283
#: src/lib/ecore/ecore_getopt.c:1324
#: src/lib/ecore/ecore_getopt.c:931 src/lib/ecore/ecore_getopt.c:1068
#: src/lib/ecore/ecore_getopt.c:1084 src/lib/ecore/ecore_getopt.c:1099
#: src/lib/ecore/ecore_getopt.c:1116 src/lib/ecore/ecore_getopt.c:1163
#: src/lib/ecore/ecore_getopt.c:1283 src/lib/ecore/ecore_getopt.c:1324
msgid "value has no pointer set.\n"
msgstr "값에 포인터 집합이 없습니다.\n"
#: src/lib/ecore/ecore_getopt.c:963
#: src/lib/ecore/ecore_getopt.c:1183
#: src/lib/ecore/ecore_getopt.c:963 src/lib/ecore/ecore_getopt.c:1183
#, c-format
msgid "unknown boolean value %s.\n"
msgstr "알 수 없는 부울린 값 %s 입니다.\n"
#: src/lib/ecore/ecore_getopt.c:1014
#: src/lib/ecore/ecore_getopt.c:1271
#: src/lib/ecore/ecore_getopt.c:1014 src/lib/ecore/ecore_getopt.c:1271
#, c-format
msgid "invalid number format %s\n"
msgstr "잘못된 숫자 형식 %s 입니다\n"
@ -182,4 +177,3 @@ msgstr "오류: '%s' 값의 좌표가 올바르지 않습니다\n"
#, c-format
msgid "ERROR: incorrect size value '%s'\n"
msgstr "오류: '%s' 값의 크기가 올바르지 않습니다\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-08-27 19:14+0900\n"
"POT-Creation-Date: 2012-10-16 11:52+0900\n"
"PO-Revision-Date: 2011-09-03 15:48+0100\n"
"Last-Translator: Heimen Stoffels <vistausss@gmail.com>\n"
"Language-Team: <vistausss@gmail.com>\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-08-27 19:14+0900\n"
"POT-Creation-Date: 2012-10-16 11:52+0900\n"
"PO-Revision-Date: 2012-08-23 00:30+0100\n"
"Last-Translator: Sérgio Marques <smarquespt@gmail.com>\n"
"Language-Team: \n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ecore 1.0\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-08-27 19:14+0900\n"
"POT-Creation-Date: 2012-10-16 11:52+0900\n"
"PO-Revision-Date: 2011-02-24 16:54+0100\n"
"Last-Translator: r1to <renato.rener@gmail.com>\n"
"Language-Team: Slovenian <sl@li.org>\n"

View File

@ -29,10 +29,6 @@
# include <Evas_Engine_GL_X11.h>
#endif
#ifdef BUILD_ECORE_EVAS_SOFTWARE_8_X11
# include <Evas_Engine_Software_8_X11.h>
#endif
#ifdef BUILD_ECORE_EVAS_FB
# include <Evas_Engine_FB.h>
#endif

View File

@ -472,35 +472,6 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee)
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
}
if (!strcmp(ee->driver, "software_8_x11"))
{
#if defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
Evas_Engine_Info_Software_8_X11 *einfo;
einfo = (Evas_Engine_Info_Software_8_X11 *)evas_engine_info_get(ee->evas);
if (einfo)
{
unsigned int foreground;
Ecore_X_GC gc;
if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1);
foreground = 0;
gc = ecore_x_gc_new(ee->engine.x.mask,
ECORE_X_GC_VALUE_MASK_FOREGROUND,
&foreground);
ecore_x_drawable_rectangle_fill(ee->engine.x.mask, gc,
0, 0, ee->w, ee->h);
ecore_x_gc_free(gc);
einfo->info.mask = ee->engine.x.mask;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
{
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
}
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_8_X11 */
}
}
/* TODO: we need to make this work for all the states, not just sticky */
@ -1759,27 +1730,6 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize)
# endif
#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
}
else if (!strcmp(ee->driver, "software_8_x11"))
{
#if BUILD_ECORE_EVAS_SOFTWARE_8_X11
Evas_Engine_Info_Software_8_X11 *einfo;
einfo = (Evas_Engine_Info_Software_8_X11 *)evas_engine_info_get(ee->evas);
if (!einfo) return;
einfo->info.rotation = rotation;
_ecore_evas_x_rotation_set_internal(ee, rotation, resize,
(Evas_Engine_Info *)einfo);
# if _USE_WIN_ROT_EFFECT
ecore_x_window_prop_property_set(ee->prop.window,
ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
ECORE_X_ATOM_CARDINAL, 32, &angles, 2);
# else
ecore_x_window_prop_property_set(ee->prop.window,
ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
ECORE_X_ATOM_CARDINAL, 32, &rotation, 1);
# endif
#endif /* BUILD_ECORE_EVAS_SOFTWARE_8_X11 */
}
#if _USE_WIN_ROT_EFFECT
if ((ee->visible) &&
@ -1845,52 +1795,6 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
}
if (!strcmp(ee->driver, "software_8_x11"))
{
#if defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
Evas_Engine_Info_Software_8_X11 *einfo;
einfo = (Evas_Engine_Info_Software_8_X11 *)evas_engine_info_get(ee->evas);
ee->shaped = shaped;
if (einfo)
{
if (ee->shaped)
{
unsigned int foreground;
Ecore_X_GC gc;
if (!ee->engine.x.mask)
ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1);
foreground = 0;
gc = ecore_x_gc_new(ee->engine.x.mask,
ECORE_X_GC_VALUE_MASK_FOREGROUND,
&foreground);
ecore_x_drawable_rectangle_fill(ee->engine.x.mask, gc,
0, 0, ee->w, ee->h);
ecore_x_gc_free(gc);
einfo->info.mask = ee->engine.x.mask;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
{
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
}
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
ecore_x_window_shape_input_mask_set(ee->prop.window, 0);
}
else
{
if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = 0;
einfo->info.mask = 0;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
{
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
}
ecore_x_window_shape_mask_set(ee->prop.window, 0);
ecore_x_window_shape_input_mask_set(ee->prop.window, 0);
}
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_8_X11 */
}
}
/* FIXME, round trip */
@ -2107,90 +2011,6 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
// putenv((char*)"DESKTOP_STARTUP_ID=");
}
}
else if (!strcmp(ee->driver, "software_8_x11"))
{
#if defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
Evas_Engine_Info_Software_8_X11 *einfo;
einfo = (Evas_Engine_Info_Software_8_X11 *)evas_engine_info_get(ee->evas);
if (!einfo) return;
ee->shaped = 0;
ee->alpha = alpha;
ecore_x_window_free(ee->prop.window);
ecore_event_window_unregister(ee->prop.window);
if (ee->alpha)
{
if (ee->prop.override)
ee->prop.window = ecore_x_window_override_argb_new(ee->engine.x.win_root, ee->req.x, ee->req.y, ee->req.w, ee->req.h);
else
ee->prop.window = ecore_x_window_argb_new(ee->engine.x.win_root, ee->req.x, ee->req.y, ee->req.w, ee->req.h);
// if (!ee->engine.x.mask)
// ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->req.w, ee->req.h, 1);
}
else
{
if (ee->prop.override)
ee->prop.window = ecore_x_window_override_new(ee->engine.x.win_root, ee->req.x, ee->req.y, ee->req.w, ee->req.h);
else
ee->prop.window = ecore_x_window_new(ee->engine.x.win_root, ee->req.x, ee->req.y, ee->req.w, ee->req.h);
if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = 0;
ecore_x_window_shape_input_mask_set(ee->prop.window, 0);
}
einfo->info.destination_alpha = alpha;
ecore_x_window_attributes_get(ee->prop.window, &att);
einfo->info.visual = att.visual;
einfo->info.colormap = att.colormap;
einfo->info.depth = att.depth;
// if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
// ee->engine.x.mask = 0;
einfo->info.mask = ee->engine.x.mask;
einfo->info.drawable = ee->prop.window;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
{
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
}
evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
ecore_x_window_shape_mask_set(ee->prop.window, 0);
ecore_x_input_multi_select(ee->prop.window);
ecore_event_window_register(ee->prop.window, 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);
if (ee->prop.borderless)
ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
if (ee->visible) ecore_x_window_show(ee->prop.window);
if (ee->prop.focused) ecore_x_window_focus(ee->prop.window);
if (ee->prop.title)
{
ecore_x_icccm_title_set(ee->prop.window, ee->prop.title);
ecore_x_netwm_name_set(ee->prop.window, ee->prop.title);
}
if (ee->prop.name)
ecore_x_icccm_name_class_set(ee->prop.window,
ee->prop.name, ee->prop.clas);
_ecore_evas_x_hints_update(ee);
_ecore_evas_x_group_leader_update(ee);
ecore_x_window_defaults_set(ee->prop.window);
_ecore_evas_x_protocols_set(ee);
_ecore_evas_x_sync_set(ee);
_ecore_evas_x_size_pos_hints_update(ee);
if ((id = getenv("DESKTOP_STARTUP_ID")))
{
ecore_x_netwm_startup_id_set(ee->prop.window, id);
/* NB: on linux this may simply empty the env as opposed to completely
* unset it to being empty - unsure as solartis libc crashes looking
* for the '=' char */
// putenv((char*)"DESKTOP_STARTUP_ID=");
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_8_X11 */
}
}
static void
@ -2685,63 +2505,6 @@ _ecore_evas_x_avoid_damage_set(Ecore_Evas *ee, int on)
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
}
else if (!strcmp(ee->driver, "software_8_x11"))
{
#if BUILD_ECORE_EVAS_SOFTWARE_8_X11
Evas_Engine_Info_Software_8_X11 *einfo;
ee->prop.avoid_damage = on;
einfo = (Evas_Engine_Info_Software_8_X11 *)evas_engine_info_get(ee->evas);
if (einfo)
{
if (ee->prop.avoid_damage)
{
ee->engine.x.pmap = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, einfo->info.depth);
ee->engine.x.gc = ecore_x_gc_new(ee->engine.x.pmap, 0, NULL);
einfo->info.drawable = ee->engine.x.pmap;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
{
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
}
if ((ee->rotation == 90) || (ee->rotation == 270))
evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
else
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
if (ee->prop.avoid_damage == ECORE_EVAS_AVOID_DAMAGE_BUILT_IN)
{
ee->engine.x.using_bg_pixmap = 1;
ecore_x_window_pixmap_set(ee->prop.window, ee->engine.x.pmap);
ecore_x_window_area_expose(ee->prop.window, 0, 0, ee->w, ee->h);
}
if (ee->engine.x.direct_resize)
{
/* Turn this off for now
ee->engine.x.using_bg_pixmap = 1;
ecore_x_window_pixmap_set(ee->prop.window, ee->engine.x.pmap);
*/
}
}
else
{
if (ee->engine.x.pmap) ecore_x_pixmap_free(ee->engine.x.pmap);
if (ee->engine.x.gc) ecore_x_gc_free(ee->engine.x.gc);
if (ee->engine.x.using_bg_pixmap)
{
ecore_x_window_pixmap_set(ee->prop.window, 0);
ee->engine.x.using_bg_pixmap = 0;
ecore_x_window_area_expose(ee->prop.window, 0, 0, ee->w, ee->h);
}
ee->engine.x.pmap = 0;
ee->engine.x.gc = 0;
einfo->info.drawable = ee->prop.window;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
{
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
}
}
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_8_X11 */
}
}
static void
@ -2904,7 +2667,7 @@ static Ecore_Evas_Engine_Func _ecore_x_engine_func =
* ecore_x_init in 2 functions and suppress some round trips.
*/
#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_OPENGL_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_OPENGL_X11)
static void
_ecore_evas_x_flush_pre(void *data, Evas *e __UNUSED__, void *event_info __UNUSED__)
{
@ -3587,348 +3350,39 @@ ecore_evas_software_x11_16_extra_event_window_add(Ecore_Evas *ee __UNUSED__, Eco
{
}
/**
* @brief Create Ecore_Evas using software 8 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_software_x11_8_new(const char *disp_name, Ecore_X_Window parent,
int x, int y, int w, int h)
ecore_evas_software_x11_8_new(const char *disp_name __UNUSED__, Ecore_X_Window parent __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
{
#if defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
Evas_Engine_Info_Software_8_X11 *einfo;
Ecore_Evas *ee;
int argb = 0;
int rmethod;
static int redraw_debug = -1;
rmethod = evas_render_method_lookup("software_8_x11");
if (!rmethod) return NULL;
if (!ecore_x_init(disp_name)) return NULL;
ee = calloc(1, sizeof(Ecore_Evas));
if (!ee) return NULL;
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
_ecore_evas_x_init();
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_x_engine_func;
ee->driver = "software_8_x11";
if (disp_name) ee->name = strdup(disp_name);
if (w < 1) w = 1;
if (h < 1) h = 1;
ee->x = x;
ee->y = y;
ee->w = w;
ee->h = h;
ee->req.x = ee->x;
ee->req.y = ee->y;
ee->req.w = ee->w;
ee->req.h = ee->h;
ee->prop.max.w = 32767;
ee->prop.max.h = 32767;
ee->prop.layer = 4;
ee->prop.request_pos = 0;
ee->prop.sticky = 0;
ee->engine.x.state.sticky = 0;
/* init evas here */
ee->evas = evas_new();
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, _ecore_evas_x_flush_pre, ee);
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST, _ecore_evas_x_flush_post, ee);
evas_data_attach_set(ee->evas, ee);
evas_output_method_set(ee->evas, rmethod);
evas_output_size_set(ee->evas, w, h);
evas_output_viewport_set(ee->evas, 0, 0, w, h);
ee->engine.x.win_root = parent;
// if (parent != 0)
// {
// /* FIXME: round trip in ecore_x_window_argb_get */
// if (ecore_x_window_argb_get(parent))
// {
// ee->engine.x.win = ecore_x_window_argb_new(parent, x, y, w, h);
// argb = 1;
// }
// else
// ee->engine.x.win = ecore_x_window_new(parent, x, y, w, h);
// }
// else
ee->prop.window = ecore_x_window_new(parent, x, y, w, h);
if (getenv("DESKTOP_STARTUP_ID"))
{
ecore_x_netwm_startup_id_set(ee->prop.window,
getenv("DESKTOP_STARTUP_ID"));
/* NB: on linux this may simply empty the env as opposed to completely
* unset it to being empty - unsure as solartis libc crashes looking
* for the '=' char */
// putenv((char*)"DESKTOP_STARTUP_ID=");
}
einfo = (Evas_Engine_Info_Software_8_X11 *)evas_engine_info_get(ee->evas);
if (einfo)
{
xcb_screen_iterator_t iter;
xcb_screen_t *screen;
/* FIXME: this is inefficient as its a round trip */
//einfo->info.backend = 1;
screen = ecore_x_default_screen_get();
iter = xcb_setup_roots_iterator (xcb_get_setup (ecore_x_connection_get()));
if (iter.rem > 1)
{
xcb_get_geometry_cookie_t cookie;
xcb_get_geometry_reply_t *reply;
Ecore_X_Window *roots;
int num;
uint8_t i;
num = 0;
cookie = xcb_get_geometry_unchecked(ecore_x_connection_get(), parent);
roots = ecore_x_window_root_list(&num);
if (roots)
{
reply = xcb_get_geometry_reply(ecore_x_connection_get(), cookie, NULL);
if (reply)
{
for (i = 0; i < num; xcb_screen_next (&iter), i++)
{
if (reply->root == roots[i])
{
screen = iter.data;
break;
}
}
free(reply);
}
free(roots);
}
else
{
reply = xcb_get_geometry_reply(ecore_x_connection_get(), cookie, NULL);
if (reply) free(reply);
}
}
if (redraw_debug < 0)
{
if (getenv("REDRAW_DEBUG"))
redraw_debug = atoi(getenv("REDRAW_DEBUG"));
else
redraw_debug = 0;
}
einfo->info.connection = ecore_x_connection_get();
einfo->info.screen = screen;
einfo->info.drawable = ee->prop.window;
if (argb)
{
/* FIXME: round trip */
xcb_get_geometry_cookie_t cookie_geom;
xcb_get_window_attributes_cookie_t cookie_attr;
xcb_get_geometry_reply_t *reply_geom;
xcb_get_window_attributes_reply_t *reply_attr;
cookie_geom = xcb_get_geometry_unchecked(ecore_x_connection_get(), ee->prop.window);
cookie_attr = xcb_get_window_attributes_unchecked(ecore_x_connection_get(), ee->prop.window);
reply_geom = xcb_get_geometry_reply(ecore_x_connection_get(), cookie_geom, NULL);
reply_attr = xcb_get_window_attributes_reply(ecore_x_connection_get(), cookie_attr, NULL);
if (reply_attr && reply_geom)
{
einfo->info.visual = xcb_visualtype_get(ecore_x_default_screen_get(), reply_attr->visual);
einfo->info.colormap = reply_attr->colormap;
einfo->info.depth = reply_geom->depth;
einfo->info.destination_alpha = 1;
free(reply_geom);
free(reply_attr);
}
}
else
{
xcb_screen_t *screen;
screen = ecore_x_default_screen_get();
einfo->info.visual = xcb_visualtype_get(screen, screen->root_visual);
einfo->info.colormap = screen->default_colormap;
einfo->info.depth = screen->root_depth;
einfo->info.destination_alpha = 0;
}
einfo->info.rotation = 0;
einfo->info.debug = redraw_debug;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
{
ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
ecore_evas_free(ee);
return NULL;
}
}
else
{
ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
ecore_evas_free(ee);
return NULL;
}
_ecore_evas_x_hints_update(ee);
_ecore_evas_x_group_leader_set(ee);
ecore_x_window_defaults_set(ee->prop.window);
_ecore_evas_x_protocols_set(ee);
_ecore_evas_x_sync_set(ee);
ee->engine.func->fn_render = _ecore_evas_x_render;
_ecore_evas_register(ee);
ecore_x_input_multi_select(ee->prop.window);
ecore_event_window_register(ee->prop.window, 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);
return ee;
#else
return NULL;
(void)(disp_name);
(void)(parent);
(void)(x);
(void)(y);
(void)(w);
(void)(h);
#endif /* ! BUILD_ECORE_EVAS_SOFTWARE_8_X11 */
}
/**
* @brief Get window from Ecore_Evas using software 8 x11.
* @note If ecore is not compiled with support for x11 or if @p ee was not
* created with ecore_evas_software_x11_8_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_software_x11_8_window_get(const Ecore_Evas *ee)
ecore_evas_software_x11_8_window_get(const Ecore_Evas *ee __UNUSED__)
{
#if defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
if (!(!strcmp(ee->driver, "software_8_x11"))) return 0;
return (Ecore_X_Window) ecore_evas_window_get(ee);
#else
return 0;
(void)(ee);
#endif
}
/**
* @brief Get subwindow from Ecore_Evas using software 8 x11.
* @note If ecore is not compiled with support for x11 or if @p ee was not
* created with ecore_evas_software_x11_8_new() then nothing is done and
* 0 is returned.
* @param ee The Ecore_Evas from which to get the subwindow.
* @return The window of type Ecore_X_Window of Ecore_Evas.
*/
EAPI Ecore_X_Window
ecore_evas_software_x11_8_subwindow_get(const Ecore_Evas *ee)
ecore_evas_software_x11_8_subwindow_get(const Ecore_Evas *ee __UNUSED__)
{
#if defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
if (!(!strcmp(ee->driver, "software_8_x11"))) return 0;
return (Ecore_X_Window) ecore_evas_window_get(ee);
#else
return 0;
(void)(ee);
#endif
}
/**
* @brief Set direct_size for Ecore_Evas using software 8 x11.
* @note If ecore is not compiled with support to x11 then nothing is done and the function is returned.
* @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_8_direct_resize_set(Ecore_Evas *ee, Eina_Bool on)
ecore_evas_software_x11_8_direct_resize_set(Ecore_Evas *ee __UNUSED__, Eina_Bool on __UNUSED__)
{
#if defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
ee->engine.x.direct_resize = on;
if (ee->prop.avoid_damage)
{
if (ee->engine.x.direct_resize)
{
/* turn this off for now
ee->engine.x.using_bg_pixmap = 1;
ecore_x_window_pixmap_set(ee->engine.x.win, ee->engine.x.pmap);
*/
}
else
{
/* turn this off too- bg pixmap is controlled by avoid damage directly
ee->engine.x.using_bg_pixmap = 0;
ecore_x_window_pixmap_set(ee->engine.x.win, 0);
ecore_x_window_area_expose(ee->engine.x.win, 0, 0, ee->w, ee->h);
*/
}
}
#else
return;
(void)(ee);
(void)(on);
#endif
}
/**
* @brief Gets if the Ecore_Evas is being directly resized using software 8 x11.
* @note If ecore is not compiled with support to x11 then nothing is done and 0 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_8_direct_resize_get(const Ecore_Evas *ee)
ecore_evas_software_x11_8_direct_resize_get(const Ecore_Evas *ee __UNUSED__)
{
#if defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
return ee->engine.x.direct_resize;
#else
return 0;
(void)(ee);
#endif
}
/**
* @brief Add extra window on Ecore_Evas using software 8 x11.
* @note If ecore is not compiled with support to x11 then nothing is done and the function is returned.
* @param ee The Ecore_Evas on which to add the window.
* @param win The window to be added at Ecore_Evas.
*/
EAPI void
ecore_evas_software_x11_8_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win)
ecore_evas_software_x11_8_extra_event_window_add(Ecore_Evas *ee __UNUSED__, Ecore_X_Window win __UNUSED__)
{
#if defined (BUILD_ECORE_EVAS_SOFTWARE_8_X11)
Ecore_X_Window *winp;
winp = malloc(sizeof(Ecore_X_Window));
if (winp)
{
*winp = win;
ee->engine.x.win_extra = eina_list_append(ee->engine.x.win_extra, winp);
ecore_x_input_multi_select(win);
ecore_event_window_register(win, 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);
}
#else
return;
(void)(ee);
(void)(win);
#endif
}
EAPI void