directfb says bye...

After agreement in the mail list, core developers agree to remove this
engine that was not being supported for a long time.

Given that most operations Evas uses are not accelerated in DirectFB,
or at least hardware that exclusively supports DirectFB, it's better
for those people to just use Evas/Ecore software (buffer) rendering
and expose DirectFB's framebuffer as destination surface.



SVN revision: 80232
devs/devilhorns/wayland_egl
Gustavo Sverzut Barbieri 11 years ago
parent aa53580814
commit dfe93a7f0a
  1. 2
      .gitignore
  2. 4
      ChangeLog
  3. 10
      Makefile.am
  4. 6
      NEWS
  5. 63
      configure.ac
  6. 34
      m4/evas_check_engine.m4
  7. 12
      pc/ecore-directfb.pc.in
  8. 3
      pc/evas-directfb.pc.in
  9. 4
      src/Makefile.am
  10. 34
      src/Makefile_Ecore_DirectFB.am
  11. 13
      src/Makefile_Ecore_Evas.am
  12. 37
      src/Makefile_Evas.am
  13. 181
      src/lib/ecore_directfb/Ecore_DirectFB.h
  14. 758
      src/lib/ecore_directfb/ecore_directfb.c
  15. 184
      src/lib/ecore_directfb/ecore_directfb_keys.h
  16. 52
      src/lib/ecore_directfb/ecore_directfb_private.h
  17. 6
      src/lib/ecore_evas/Ecore_Evas.h
  18. 28
      src/lib/ecore_evas/ecore_evas.c
  19. 586
      src/lib/ecore_evas/ecore_evas_directfb.c
  20. 13
      src/lib/ecore_evas/ecore_evas_private.h
  21. 3
      src/lib/evas/Evas.h
  22. 4
      src/lib/evas/file/evas_module.c
  23. 25
      src/modules/evas/engines/directfb/Evas_Engine_DirectFB.h
  24. 1755
      src/modules/evas/engines/directfb/evas_engine.c
  25. 71
      src/modules/evas/engines/directfb/evas_engine.h
  26. 269
      src/modules/evas/engines/directfb/polygon.c

2
.gitignore vendored

@ -41,7 +41,6 @@ Makefile.in
/pc/evil.pc
/pc/embryo.pc
/pc/evas-direct3d.pc
/pc/evas-directfb.pc
/pc/evas-fb.pc
/pc/evas-opengl-cocoa.pc
/pc/evas-opengl-sdl.pc
@ -99,7 +98,6 @@ m4/wint_t.m4
m4/xsize.m4
pc/ecore-cocoa.pc
pc/ecore-con.pc
pc/ecore-directfb.pc
pc/ecore-evas.pc
pc/ecore-fb.pc
pc/ecore-file.pc

@ -1,3 +1,7 @@
2012-12-05 Gustavo Sverzut Barbieri (k-s)
* Removed DirectFB support (both ecore_directfb, evas and ecore_evas).
2012-12-04 Gwanglim Lee
* Add window profile support:

@ -67,7 +67,6 @@ pc/eina.pc \
pc/eet.pc \
pc/eo.pc \
pc/evas.pc \
pc/evas-directfb.pc \
pc/evas-fb.pc \
pc/evas-opengl-x11.pc \
pc/evas-opengl-sdl.pc \
@ -85,7 +84,6 @@ pc/ecore-file.pc \
pc/ecore-input.pc \
pc/ecore-input-evas.pc \
pc/ecore-cocoa.pc \
pc/ecore-directfb.pc \
pc/ecore-fb.pc \
pc/ecore-psl1ght.pc \
pc/ecore-sdl.pc \
@ -131,10 +129,6 @@ if BUILD_ENGINE_SOFTWARE_X11
pkgconfig_DATA += pc/evas-software-x11.pc
endif
if BUILD_ENGINE_DIRECTFB
pkgconfig_DATA += pc/evas-directfb.pc
endif
if BUILD_ENGINE_FB
pkgconfig_DATA += pc/evas-fb.pc
endif
@ -179,10 +173,6 @@ if HAVE_ECORE_COCOA
pkgconfig_DATA += pc/ecore-cocoa.pc
endif
if HAVE_ECORE_DIRECTFB
pkgconfig_DATA += pc/ecore-directfb.pc
endif
if HAVE_ECORE_FB
pkgconfig_DATA += pc/ecore-fb.pc
endif

@ -46,6 +46,10 @@ Deprecations:
ECORE_X_ATOM_E_PROFILE_LIST
ecore_x_e_window_profile_list_set()
ecore_x_e_window_profile_list_get()
* ecore_evas: deprecate directfb engine.
Removed:
* directfb support: ecore_directfb and evas directfb engine.
Improvements:
* Single EFL tree covering all EFL library components.
@ -63,4 +67,4 @@ Fixes:
to properly handle GL_SCISSOR_BOX and GL_VIEWPORT parameters.
* Fixed textblock textprop leak.
* Fixed evas_object_box to reset size_hint_min to zero when no child.
* Fix build of Ecore_Evas_Extn on Solaris.
* Fix build of Ecore_Evas_Extn on Solaris.

@ -99,7 +99,6 @@ requirements_libs_ecore_ipc=""
requirements_libs_ecore_file=""
requirements_libs_ecore_input=""
requirements_libs_ecore_cocoa=""
requirements_libs_ecore_directfb=""
requirements_libs_ecore_fb=""
requirements_libs_ecore_psl1ght=""
requirements_libs_ecore_sdl=""
@ -129,7 +128,6 @@ requirements_pc_ecore_file=""
requirements_pc_ecore_input=""
requirements_pc_ecore_input_evas=""
requirements_pc_ecore_cocoa=""
requirements_pc_ecore_directfb=""
requirements_pc_ecore_fb=""
requirements_pc_ecore_psl1ght=""
requirements_pc_ecore_sdl=""
@ -178,7 +176,6 @@ AC_SUBST([requirements_libs_ecore_ipc])
AC_SUBST([requirements_libs_ecore_file])
AC_SUBST([requirements_libs_ecore_input])
AC_SUBST([requirements_libs_ecore_cocoa])
AC_SUBST([requirements_libs_ecore_directfb])
AC_SUBST([requirements_libs_ecore_fb])
AC_SUBST([requirements_libs_ecore_psl1ght])
AC_SUBST([requirements_libs_ecore_sdl])
@ -208,7 +205,6 @@ AC_SUBST([requirements_pc_ecore_file])
AC_SUBST([requirements_pc_ecore_input])
AC_SUBST([requirements_pc_ecore_input_evas])
AC_SUBST([requirements_pc_ecore_cocoa])
AC_SUBST([requirements_pc_ecore_directfb])
AC_SUBST([requirements_pc_ecore_fb])
AC_SUBST([requirements_pc_ecore_psl1ght])
AC_SUBST([requirements_pc_ecore_sdl])
@ -1323,7 +1319,6 @@ want_evas_engine_gl_xcb="no"
want_evas_engine_gl_sdl="no"
want_evas_engine_gl_cocoa="no"
want_evas_engine_fb="no"
want_evas_engine_directfb="no"
want_evas_engine_psl1ght="no"
want_evas_engine_wayland_shm="no"
want_evas_engine_wayland_egl="no"
@ -1502,7 +1497,6 @@ fi
## Engines
EVAS_CHECK_ENGINE([buffer], [${want_evas_engine_buffer}], [yes], [Buffer])
EVAS_CHECK_ENGINE([directfb], [${want_evas_engine_directfb}], [no], [DirectFB])
EVAS_CHECK_ENGINE([fb], [${want_evas_engine_fb}], [no], [Framebuffer])
EVAS_CHECK_ENGINE([gl-cocoa], [${want_evas_engine_gl_cocoa}], [no], [OpenGL Cocoa])
EVAS_CHECK_ENGINE([gl-sdl], [${want_evas_engine_gl_sdl}], [no], [OpenGL SDL])
@ -2726,47 +2720,6 @@ AM_CONDITIONAL([HAVE_ECORE_COCOA], [test "x${have_ecore_cocoa}" = "xyes"])
#### End of Ecore_Cocoa
#### Ecore_DirectFB
AC_MSG_NOTICE([Ecore_DirectFB checks])
### Additional options to configure
### Default values
### Checks for programs
### Checks for libraries
## Eina, Ecore
requirements_pc_ecore_directfb="ecore >= ${PACKAGE_VERSION} eina >= ${PACKAGE_VERSION} ${requirements_pc_ecore_directfb}"
## DirectFB
PKG_CHECK_MODULES([ECORE_DIRECTFB],
[directfb >= 0.9.16],
[
have_ecore_directfb="yes"
requirements_pc_ecore_directfb="directfb >= 0.9.16 ${requirements_pc_ecore_directfb}"
],
[have_ecore_directfb="no"])
AM_CONDITIONAL([HAVE_ECORE_DIRECTFB], [test "x${have_ecore_directfb}" = "xyes"])
### Checks for header files
### Checks for types
### Checks for structures
### Checks for compiler characteristics
### Checks for linker characteristics
### Checks for library functions
#### End of Ecore_Directfb
#### Ecore_FB
@ -3781,7 +3734,6 @@ want_ecore_evas_software_ddraw="no"
want_ecore_evas_software_sdl="no"
want_ecore_evas_gl_sdl="no"
want_ecore_evas_gl_cocoa="no"
want_ecore_evas_directfb="no"
want_ecore_evas_fb="no"
want_ecore_evas_ews="yes"
want_ecore_evas_extn="yes"
@ -3811,7 +3763,6 @@ case "$host_os" in
want_ecore_evas_software_sdl="yes"
want_ecore_evas_gl_sdl="yes"
want_ecore_evas_gl_cocoa="no"
want_ecore_evas_directfb="yes"
want_ecore_evas_fb="yes"
want_ecore_evas_wayland_shm="yes"
want_ecore_evas_wayland_egl="yes"
@ -3845,15 +3796,6 @@ ECORE_EVAS_CHECK_MODULE_FULL([opengl-cocoa],
[${have_ecore_cocoa}],
[requirements_pc_ecore_evas="ecore-cocoa >= ${PACKAGE_VERSION} ${requirements_pc_ecore_evas}"])
# ecore_evas_directfb
ECORE_EVAS_CHECK_MODULE_FULL([directfb],
[${have_evas_engine_directfb}],
[${want_ecore_evas_directfb}],
[DirectFB],
[${have_ecore_directfb}],
[requirements_pc_ecore_evas="ecore-directfb >= ${PACKAGE_VERSION} ${requirements_pc_ecore_evas}"])
# ecore_evas_ews
ECORE_EVAS_CHECK_MODULE_FULL([ews],
@ -4187,7 +4129,6 @@ pc/escape.pc
pc/eina.pc
pc/eet.pc
pc/eo.pc
pc/evas-directfb.pc
pc/evas-fb.pc
pc/evas-opengl-x11.pc
pc/evas-opengl-sdl.pc
@ -4208,7 +4149,6 @@ pc/ecore-file.pc
pc/ecore-input.pc
pc/ecore-input-evas.pc
pc/ecore-cocoa.pc
pc/ecore-directfb.pc
pc/ecore-fb.pc
pc/ecore-psl1ght.pc
pc/ecore-sdl.pc
@ -4271,7 +4211,6 @@ else
fi
echo " OpenGL Cocoa...............: $have_evas_engine_gl_cocoa"
echo " Software Framebuffer.......: $have_evas_engine_fb"
echo " DirectFB...................: $have_evas_engine_directfb"
echo " PSL1GHT....................: $have_evas_engine_psl1ght"
echo " Wayland Shm................: $have_evas_engine_wayland_shm"
echo " Wayland Egl................: $have_evas_engine_wayland_egl"
@ -4413,7 +4352,6 @@ echo " Ecore_FB...................: $have_ecore_fb"
if test "x${have_ecore_fb}" = "xyes" ; then
echo " Touchscreen..............: $have_tslib"
fi
echo " Ecore_DirectFB.............: $have_ecore_directfb"
echo " Ecore_WinCE................: $have_wince"
echo " Ecore_PSL1GHT..............: $have_ps3"
echo " Ecore_Wayland..............: $have_ecore_wayland"
@ -4436,7 +4374,6 @@ echo " Ecore_Evas...................: $have_ecore_evas"
echo " Software SDL...............: $have_ecore_evas_software_sdl"
echo " OpenGL SDL.................: $have_ecore_evas_opengl_sdl"
echo " OpenGL Cocoa...............: $have_ecore_evas_opengl_cocoa"
echo " DirectFB...................: $have_ecore_evas_directfb"
echo " PSL1GHT....................: $have_ecore_evas_psl1ght"
echo " Software Framebuffer.......: $have_ecore_evas_fb"
echo " Sing.Proc. Windowing System: $have_ecore_evas_ews"

@ -599,40 +599,6 @@ AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
])
dnl use: EVAS_CHECK_ENGINE_DEP_DIRECTFB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_DIRECTFB],
[
requirement=""
have_dep="no"
evas_engine_[]$1[]_cflags=""
evas_engine_[]$1[]_libs=""
PKG_CHECK_EXISTS([directfb >= 0.9.16],
[
have_dep="yes"
requirement="directfb >= 0.9.16"
],
[have_dep="no"])
if test "x${have_dep}" = "xyes" ; then
if test "x$3" = "xstatic" ; then
requirements_pc_evas="${requirement} ${requirements_pc_evas}"
requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}"
else
PKG_CHECK_MODULES([DIRECTFB], [${requirement}])
evas_image_loader_[]$1[]_cflags="${DIRECTFB_CFLAGS}"
evas_image_loader_[]$1[]_libs="${DIRECTFB_LIBS}"
fi
fi
AC_SUBST([evas_engine_$1_cflags])
AC_SUBST([evas_engine_$1_libs])
AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
])
dnl use: EVAS_CHECK_ENGINE_DEP_PSL1GHT(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])

@ -1,12 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: ecore-directfb
Description: E core library, DirectFB module
Requires.private: @requirements_pc_ecore_directfb@
Version: @VERSION@
Libs: -L${libdir} -lecore_directfb
Libs.private: @requirements_libs_ecore_directfb@
Cflags: -I${includedir}/ecore-@VMAJ@

@ -1,3 +0,0 @@
Name: evas-directfb
Description: Evas DirectFB engine
Version: @VERSION@

@ -29,9 +29,6 @@ include Makefile_Ecore_Input.am
if HAVE_ECORE_COCOA
include Makefile_Ecore_Cocoa.am
endif
if HAVE_ECORE_DIRECTFB
include Makefile_Ecore_DirectFB.am
endif
if HAVE_ECORE_FB
include Makefile_Ecore_FB.am
endif
@ -92,7 +89,6 @@ clean-local:
rm -rf modules/eina/mp/chained_pool/*.gcno
rm -rf modules/evas/engines/buffer/*.gcno
rm -rf modules/evas/engines/direct3d/*.gcno
rm -rf modules/evas/engines/directfb/*.gcno
rm -rf modules/evas/engines/fb/*.gcno
rm -rf modules/evas/engines/gl_cocoa/*.gcno
rm -rf modules/evas/engines/gl_common/*.gcno

@ -1,34 +0,0 @@
### Library
lib_LTLIBRARIES += lib/ecore_directfb/libecore_directfb.la
installed_ecoredirectfbmainheadersdir = $(includedir)/ecore-@VMAJ@
dist_installed_ecoredirectfbmainheaders_DATA = \
lib/ecore_directfb/Ecore_DirectFB.h
lib_ecore_directfb_libecore_directfb_la_SOURCES = \
lib/ecore_directfb/ecore_directfb.c \
lib/ecore_directfb/ecore_directfb_keys.h \
lib/ecore_directfb/ecore_directfb_private.h
lib_ecore_directfb_libecore_directfb_la_CPPFLAGS = \
-I$(top_srcdir)/src/lib/eina \
-I$(top_srcdir)/src/lib/eo \
-I$(top_srcdir)/src/lib/ecore \
-I$(top_srcdir)/src/lib/ecore_directfb \
-I$(top_builddir)/src/lib/eina \
-I$(top_builddir)/src/lib/eo \
-I$(top_builddir)/src/lib/ecore \
-I$(top_builddir)/src/lib/ecore_directfb \
@EFL_CFLAGS@ \
@EFL_COV_CFLAGS@ \
@ECORE_DIRECTFB_CFLAGS@
lib_ecore_directfb_libecore_directfb_la_LIBADD = \
lib/ecore/libecore.la \
lib/eo/libeo.la \
lib/eina/libeina.la \
@ECORE_DIRECTFB_LIBS@
lib_ecore_directfb_libecore_directfb_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@

@ -61,14 +61,6 @@ lib_ecore_evas_libecore_evas_la_CPPFLAGS += \
-I$(top_builddir)/src/modules/evas/engines/gl_cocoa
endif
if HAVE_ECORE_DIRECTFB
lib_ecore_evas_libecore_evas_la_CPPFLAGS += \
-I$(top_srcdir)/src/lib/ecore_directfb \
-I$(top_srcdir)/src/modules/evas/engines/directfb \
-I$(top_builddir)/src/lib/ecore_directfb \
-I$(top_builddir)/src/modules/evas/engines/directfb
endif
if HAVE_ECORE_FB
lib_ecore_evas_libecore_evas_la_CPPFLAGS += \
-I$(top_srcdir)/src/lib/ecore_fb \
@ -144,11 +136,6 @@ lib_ecore_evas_libecore_evas_la_LIBADD += \
lib/ecore_cocoa/libecore_cocoa.la
endif
if HAVE_ECORE_DIRECTFB
lib_ecore_evas_libecore_evas_la_LIBADD += \
lib/ecore_directfb/libecore_directfb.la
endif
if HAVE_ECORE_FB
lib_ecore_evas_libecore_evas_la_LIBADD += \
lib/ecore_fb/libecore_fb.la

@ -439,43 +439,6 @@ modules_evas_engines_buffer_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_ENGINE_DIRECTFB
dist_installed_evasmainheaders_DATA += modules/evas/engines/directfb/Evas_Engine_DirectFB.h
DIRECTFB_SOURCES = \
modules/evas/engines/directfb/evas_engine.c \
modules/evas/engines/directfb/polygon.c \
modules/evas/engines/directfb/evas_engine.h
if EVAS_STATIC_BUILD_DIRECTFB
lib_evas_libevas_la_SOURCES += $(DIRECTFB_SOURCES)
lib_evas_libevas_la_CPPFLAGS += @evas_engine_directfb_cflags@
lib_evas_libevas_la_LIBADD += @evas_engine_directfb_libs@
else
enginedirectfbpkgdir = $(libdir)/evas/modules/engines/directfb/$(MODULE_ARCH)
enginedirectfbpkg_LTLIBRARIES = modules/evas/engines/directfb/module.la
modules_evas_engines_directfb_module_la_SOURCES = $(DIRECTFB_SOURCES)
modules_evas_engines_directfb_module_la_CPPFLAGS = \
-I$(top_srcdir)/src/lib/eina \
-I$(top_builddir)/src/lib/eina \
-I$(top_srcdir)/src/lib/eo \
-I$(top_builddir)/src/lib/eo \
-I$(top_srcdir)/src/lib/evas \
-I$(top_builddir)/src/lib/evas \
-I$(top_srcdir)/src/lib/evas/include \
-I$(top_builddir)/src/lib/evas/include \
-I$(top_srcdir)/src/lib/evas/cserve2 \
-I$(top_builddir)/src/lib/evas/cserve2 \
@evas_engine_directfb_cflags@ \
@EFL_CFLAGS@ \
@EVAS_CFLAGS@
modules_evas_engines_directfb_module_la_LIBADD = \
lib/evas/libevas.la \
@EFL_LIBS@ \
@evas_engine_directfb_libs@
modules_evas_engines_directfb_module_la_LDFLAGS = -no-undefined -module -avoid-version
modules_evas_engines_directfb_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
endif
if BUILD_ENGINE_FB
dist_installed_evasmainheaders_DATA += modules/evas/engines/fb/Evas_Engine_FB.h
FB_SOURCES = \

@ -1,181 +0,0 @@
#ifndef _ECORE_DIRECTFB_H
#define _ECORE_DIRECTFB_H
#include <Eina.h>
#include <directfb.h>
#ifdef EAPI
# undef EAPI
#endif /* ifdef EAPI */
#ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else /* if __GNUC__ >= 4 */
# define EAPI
# endif /* if __GNUC__ >= 4 */
#else /* ifdef __GNUC__ */
# define EAPI
#endif /* ifdef __GNUC__ */
#ifdef __cplusplus
extern "C" {
#endif /* ifdef __cplusplus */
EAPI extern int ECORE_DIRECTFB_EVENT_POSITION;
EAPI extern int ECORE_DIRECTFB_EVENT_SIZE;
EAPI extern int ECORE_DIRECTFB_EVENT_CLOSE;
EAPI extern int ECORE_DIRECTFB_EVENT_DESTROYED;
EAPI extern int ECORE_DIRECTFB_EVENT_GOT_FOCUS;
EAPI extern int ECORE_DIRECTFB_EVENT_LOST_FOCUS;
EAPI extern int ECORE_DIRECTFB_EVENT_KEY_DOWN;
EAPI extern int ECORE_DIRECTFB_EVENT_KEY_UP;
EAPI extern int ECORE_DIRECTFB_EVENT_BUTTON_DOWN;
EAPI extern int ECORE_DIRECTFB_EVENT_BUTTON_UP;
EAPI extern int ECORE_DIRECTFB_EVENT_MOTION;
EAPI extern int ECORE_DIRECTFB_EVENT_ENTER;
EAPI extern int ECORE_DIRECTFB_EVENT_LEAVE;
EAPI extern int ECORE_DIRECTFB_EVENT_WHEEL;
#ifndef _ECORE_DIRECTFB_WINDOW_PREDEF
typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
#endif /* ifndef _ECORE_DIRECTFB_WINDOW_PREDEF */
typedef struct _Ecore_DirectFB_Cursor Ecore_DirectFB_Cursor;
typedef struct _Ecore_DirectFB_Event_Key_Down Ecore_DirectFB_Event_Key_Down;
typedef struct _Ecore_DirectFB_Event_Key_Up Ecore_DirectFB_Event_Key_Up;
typedef struct _Ecore_DirectFB_Event_Button_Down Ecore_DirectFB_Event_Button_Down;
typedef struct _Ecore_DirectFB_Event_Button_Up Ecore_DirectFB_Event_Button_Up;
typedef struct _Ecore_DirectFB_Event_Motion Ecore_DirectFB_Event_Motion;
typedef struct _Ecore_DirectFB_Event_Enter Ecore_DirectFB_Event_Enter;
typedef struct _Ecore_DirectFB_Event_Leave Ecore_DirectFB_Event_Leave;
typedef struct _Ecore_DirectFB_Event_Wheel Ecore_DirectFB_Event_Wheel;
typedef struct _Ecore_DirectFB_Event_Got_Focus Ecore_DirectFB_Event_Got_Focus;
typedef struct _Ecore_DirectFB_Event_Lost_Focus Ecore_DirectFB_Event_Lost_Focus;
/* this struct is to keep windows data (id, window itself and surface) in memory as every call
* to DirectFB for this values (e.g window->GetSurface(window,&surface)) will increment the
* reference count, then we will have to release N times the data, so better we just ask for
them once */
struct _Ecore_DirectFB_Window
{
DFBWindowID id;
IDirectFBWindow *window;
IDirectFBSurface *surface;
Ecore_DirectFB_Cursor *cursor;
};
struct _Ecore_DirectFB_Cursor
{
IDirectFBSurface *surface;
int hot_x;
int hot_y;
};
struct _Ecore_DirectFB_Event_Key_Down /** DirectFB Key Down event */
{
char *name; /**< The name of the key that was released */
char *string; /**< The logical symbol of the key that was pressed */
char *key_compose; /**< The UTF-8 string conversion if any */
unsigned int time;
DFBWindowID win;
};
struct _Ecore_DirectFB_Event_Key_Up /** DirectFB Key Up event */
{
char *name; /**< The name of the key that was released */
char *string; /**< The logical symbol of the key that was pressed */
char *key_compose; /**< The UTF-8 string conversion if any */
unsigned int time;
DFBWindowID win;
};
struct _Ecore_DirectFB_Event_Button_Down
{
int button;
int modifiers;
int x, y;
unsigned int time;
int double_click : 1;
int triple_click : 1;
DFBWindowID win;
};
struct _Ecore_DirectFB_Event_Button_Up
{
int button;
int modifiers;
int x, y;
unsigned int time;
DFBWindowID win;
int double_click : 1;
int triple_click : 1;
};
struct _Ecore_DirectFB_Event_Motion
{
int modifiers;
int x, y;
unsigned int time;
DFBWindowID win;
};
struct _Ecore_DirectFB_Event_Enter
{
int modifiers;
int x, y;
unsigned int time;
DFBWindowID win;
};
struct _Ecore_DirectFB_Event_Leave
{
int modifiers;
int x, y;
unsigned int time;
DFBWindowID win;
};
struct _Ecore_DirectFB_Event_Wheel
{
int direction;
int z;
int modifiers;
unsigned int time;
DFBWindowID win;
};
struct _Ecore_DirectFB_Event_Got_Focus
{
unsigned int time;
DFBWindowID win;
};
struct _Ecore_DirectFB_Event_Lost_Focus
{
unsigned int time;
DFBWindowID win;
};
/* main functions */
EAPI int ecore_directfb_init(const char *name);
EAPI int ecore_directfb_shutdown(void);
EAPI IDirectFB * ecore_directfb_interface_get(void);
/* window operations */
EAPI Ecore_DirectFB_Window *ecore_directfb_window_new(int x, int y, int w, int h);
EAPI void ecore_directfb_window_free(Ecore_DirectFB_Window *window);
EAPI void ecore_directfb_window_move(Ecore_DirectFB_Window *window, int x, int y);
EAPI void ecore_directfb_window_resize(Ecore_DirectFB_Window *window, int w, int h);
EAPI void ecore_directfb_window_focus(Ecore_DirectFB_Window *window);
EAPI void ecore_directfb_window_show(Ecore_DirectFB_Window *window);
EAPI void ecore_directfb_window_hide(Ecore_DirectFB_Window *window);
EAPI void ecore_directfb_window_shaped_set(Ecore_DirectFB_Window *window, Eina_Bool set);
EAPI void ecore_directfb_window_fullscreen_set(Ecore_DirectFB_Window *window, Eina_Bool set);
EAPI void ecore_directfb_window_size_get(Ecore_DirectFB_Window *window, int *w, int *h);
EAPI void ecore_directfb_window_cursor_show(Ecore_DirectFB_Window *window, Eina_Bool show);
#ifdef __cplusplus
}
#endif /* ifdef __cplusplus */
#endif /* ifndef _ECORE_DIRECTFB_H */

@ -1,758 +0,0 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif /* ifdef HAVE_CONFIG_H */
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "Ecore_DirectFB.h"
#include "ecore_directfb_private.h"
#include "ecore_directfb_keys.h"
#include "Ecore.h"
#include "ecore_private.h"
/* ecore_directfb */
/******************/
/* About */
/* with this you can create windows of directfb and handle events through ecore
* TODO:
* - handle all event types
* -
* */
int _ecore_directfb_log_dom = -1;
static int _ecore_directfb_init_count = 0;
static int _window_event_fd = 0;
static int _input_event_fd = 0;
static int _ecore_directfb_fullscreen_window_id = 0;
static int _cursor_x = 0;
static int _cursor_y = 0;
EAPI int ECORE_DIRECTFB_EVENT_POSITION = 0;
EAPI int ECORE_DIRECTFB_EVENT_SIZE = 0;
EAPI int ECORE_DIRECTFB_EVENT_CLOSE = 0;
EAPI int ECORE_DIRECTFB_EVENT_DESTROYED = 0;
EAPI int ECORE_DIRECTFB_EVENT_GOT_FOCUS = 0;
EAPI int ECORE_DIRECTFB_EVENT_LOST_FOCUS = 0;
EAPI int ECORE_DIRECTFB_EVENT_KEY_DOWN = 0;
EAPI int ECORE_DIRECTFB_EVENT_KEY_UP = 0;
EAPI int ECORE_DIRECTFB_EVENT_BUTTON_DOWN = 0;
EAPI int ECORE_DIRECTFB_EVENT_BUTTON_UP = 0;
EAPI int ECORE_DIRECTFB_EVENT_MOTION = 0;
EAPI int ECORE_DIRECTFB_EVENT_ENTER = 0;
EAPI int ECORE_DIRECTFB_EVENT_LEAVE = 0;
EAPI int ECORE_DIRECTFB_EVENT_WHEEL = 0;
static Ecore_Fd_Handler *_window_event_fd_handler_handle = NULL;
static Ecore_Fd_Handler *_input_event_fd_handler_handle = NULL;
/* this hash is to store all the possible key names for fast lookup */
static Eina_Hash *_ecore_directfb_key_symbols_hash = NULL;
static IDirectFB *_dfb = NULL; // the main interface
static IDirectFBEventBuffer *_window_event; // the main event buffer (all windows are attached to this)
static IDirectFBEventBuffer *_input_event; // the main event buffer (all windows are attached to this)
static IDirectFBDisplayLayer *_layer; // the main layer
static DFBResult _err; // useful for DFBCHECK
/*******************/
/* local functions */
/*******************/
/* free ecore directfb events functions */
/****************************************/
static void
_ecore_directfb_event_free_key_down(void *data EINA_UNUSED, void *ev)
{
Ecore_DirectFB_Event_Key_Down *e;
e = ev;
if(e->name)
free(e->name);
if (e->string)
free(e->string);
if (e->key_compose)
free(e->key_compose);
free(e);
}
static void
_ecore_directfb_event_free_key_up(void *data EINA_UNUSED, void *ev)
{
Ecore_DirectFB_Event_Key_Up *e;
e = ev;
if(e->name)
free(e->name);
if (e->string)
free(e->string);
if (e->key_compose)
free(e->key_compose);
free(e);
}
/* directfb window input events handler */
/****************************************/
static void
_ecore_directfb_event_handle_motion(DFBEvent *evt)
{
Ecore_DirectFB_Event_Motion *e;
e = calloc(1, sizeof(Ecore_DirectFB_Event_Motion));
switch(evt->clazz)
{
case DFEC_INPUT:
e->modifiers = 0;
switch(evt->input.axis)
{
case DIAI_X:
e->x = _cursor_x = evt->input.axisabs;
e->y = _cursor_y;
break;
case DIAI_Y:
e->y = _cursor_y = evt->input.axisabs;
e->x = _cursor_x;
break;
case DIAI_Z:
//_ecore_directfb_event_handle_wheel(evt);
return;
default:
return;
}
e->win = _ecore_directfb_fullscreen_window_id;
e->time = 0;
break;
case DFEC_WINDOW:
e->modifiers = 0;
e->x = evt->window.x;
e->y = evt->window.y;
e->win = evt->window.window_id;
e->time = 0;
break;
default:
break;
}
ecore_event_add(ECORE_DIRECTFB_EVENT_MOTION, e, NULL, NULL);
}
static void
_ecore_directfb_event_handle_key_down(DFBEvent *evt)
{
Ecore_DirectFB_Event_Key_Down *e;
unsigned int key_symbol;
struct keymap *k;
e = calloc(1, sizeof(Ecore_DirectFB_Event_Key_Down));
switch(evt->clazz)
{
case DFEC_INPUT:
key_symbol = evt->input.key_symbol;
k = eina_hash_find(_ecore_directfb_key_symbols_hash, &key_symbol);
if(!k)
{
ERR("Symbol %0X of class DFEC_INPUT not found.", evt->input.key_symbol);
return;
}
e->name = strdup(k->name);
e->string = strdup(k->string);
e->key_compose = NULL;
e->win = _ecore_directfb_fullscreen_window_id;
e->time = 0;
break;
case DFEC_WINDOW:
key_symbol = evt->window.key_symbol;
k = eina_hash_find(_ecore_directfb_key_symbols_hash, &key_symbol);
if(!k)
{
ERR("Symbol %0X of class DFEC_WINDOW not found.", evt->window.key_symbol);
return;
}
e->name = strdup(k->name);
e->string = strdup(k->string);
e->key_compose = NULL;
e->win = evt->window.window_id;
e->time = 0;
break;
default:
break;
}
ecore_event_add(ECORE_DIRECTFB_EVENT_KEY_DOWN, e, _ecore_directfb_event_free_key_down, NULL);
}
static void
_ecore_directfb_event_handle_key_up(DFBEvent *evt)
{
Ecore_DirectFB_Event_Key_Up *e;
unsigned int key_symbol;
struct keymap *k;
e = calloc(1, sizeof(Ecore_DirectFB_Event_Key_Up));
switch(evt->clazz)
{
case DFEC_INPUT:
key_symbol = evt->input.key_symbol;
k = eina_hash_find(_ecore_directfb_key_symbols_hash, &key_symbol);
if(!k)
{
ERR("Symbol %0X of class DFEC_INPUT not found.", evt->input.key_symbol);
return;
}
e->name = strdup(k->name);
e->string = strdup(k->string);
e->key_compose = NULL;
e->win = _ecore_directfb_fullscreen_window_id;
e->time = 0;
break;
case DFEC_WINDOW:
key_symbol = evt->window.key_symbol;
k = eina_hash_find(_ecore_directfb_key_symbols_hash, &key_symbol);
if(!k)
{
ERR("Symbol %0X of class DFEC_WINDOW not found.", evt->window.key_symbol);
return;
}
e->name = strdup(k->name);
e->string = strdup(k->string);
e->key_compose = NULL;
e->win = evt->window.window_id;
e->time = 0;
break;
default:
break;
}
ecore_event_add(ECORE_DIRECTFB_EVENT_KEY_UP, e, _ecore_directfb_event_free_key_up, NULL);
}
static void
_ecore_directfb_event_handle_button_down(DFBEvent *evt)
{
Ecore_DirectFB_Event_Button_Down *e;
e = calloc(1, sizeof(Ecore_DirectFB_Event_Button_Down));
switch(evt->clazz)
{
case DFEC_INPUT:
e->button = evt->input.button + 1;
e->modifiers = 0;
DFBCHECK(_layer->GetCursorPosition(_layer,&e->x,&e->y));
e->x = _cursor_x;
e->y = _cursor_y;
e->win = _ecore_directfb_fullscreen_window_id;
e->time = 0;
break;
case DFEC_WINDOW:
e->button = evt->window.button + 1;
e->modifiers = 0;
e->x = evt->window.x;
e->y = evt->window.y;
e->win = evt->window.window_id;
e->time = 0;
break;
default:
break;
}
ecore_event_add(ECORE_DIRECTFB_EVENT_BUTTON_DOWN, e, NULL, NULL);
}
static void
_ecore_directfb_event_handle_button_up(DFBEvent *evt)
{
Ecore_DirectFB_Event_Button_Up *e;
e = calloc(1, sizeof(Ecore_DirectFB_Event_Button_Up));
switch(evt->clazz)
{
case DFEC_INPUT:
e->button = evt->input.button + 1;
e->modifiers = 0;
e->x = _cursor_x;
e->y = _cursor_y;
e->win = _ecore_directfb_fullscreen_window_id;
e->time = 0;
break;
case DFEC_WINDOW:
e->button = evt->window.button + 1;
e->modifiers = 0;
e->x = evt->window.x;
e->y = evt->window.y;
e->win = evt->window.window_id;
e->time = 0;
break;
default:
break;
}
ecore_event_add(ECORE_DIRECTFB_EVENT_BUTTON_UP, e, NULL, NULL);
}
static void
_ecore_directfb_event_handle_enter(DFBWindowEvent *evt)
{
Ecore_DirectFB_Event_Enter *e;
e = calloc(1, sizeof(Ecore_DirectFB_Event_Enter));
e->modifiers = 0;
e->x = evt->x;
e->y = evt->y;
e->win = evt->window_id;
e->time = 0;
ecore_event_add(ECORE_DIRECTFB_EVENT_ENTER, e, NULL, NULL);
}
static void
_ecore_directfb_event_handle_leave(DFBWindowEvent *evt)
{
Ecore_DirectFB_Event_Leave *e;
e = calloc(1, sizeof(Ecore_DirectFB_Event_Leave));
e->modifiers = 0;
e->x = evt->x;
e->y = evt->y;
e->win = evt->window_id;
e->time = 0;
ecore_event_add(ECORE_DIRECTFB_EVENT_LEAVE, e, NULL, NULL);
}
static void
_ecore_directfb_event_handle_wheel(DFBWindowEvent *evt)
{
Ecore_DirectFB_Event_Wheel *e;
e = calloc(1, sizeof(Ecore_DirectFB_Event_Wheel));
// currently there's no direction (only up/down);
e->direction = 0;
e->z = evt->step;
e->modifiers = 0;
e->win = evt->window_id;
e->time = 0;
ecore_event_add(ECORE_DIRECTFB_EVENT_WHEEL, e, NULL, NULL);
}
static void
_ecore_directfb_event_handle_got_focus(DFBWindowEvent *evt)
{
Ecore_DirectFB_Event_Got_Focus *e;
e = calloc(1, sizeof(Ecore_DirectFB_Event_Got_Focus));
e->win = evt->window_id;
e->time = 0;
ecore_event_add(ECORE_DIRECTFB_EVENT_GOT_FOCUS, e, NULL, NULL);
}
static void
_ecore_directfb_event_handle_lost_focus(DFBWindowEvent *evt)
{
Ecore_DirectFB_Event_Lost_Focus *e;
e = calloc(1, sizeof(Ecore_DirectFB_Event_Lost_Focus));
e->win = evt->window_id;
e->time = 0;
ecore_event_add(ECORE_DIRECTFB_EVENT_LOST_FOCUS, e, NULL, NULL);
}
/* inputs and windows fds handlers */
/***********************************/
/* TODO fix this to handle windows and input events (fullscreen/window mode)
* in fullscreen theres no window_id so get the id from a global var (only one fullscreen
* window at a time */
static Eina_Bool
_ecore_directfb_input_event_fd_handler(void *data EINA_UNUSED,Ecore_Fd_Handler *fd_handler EINA_UNUSED)
{
DFBEvent evt;
int v = 0;
v = read(_input_event_fd, &evt, sizeof(DFBEvent));
if (v < 0)
return EINA_TRUE;
if (v < 1)
return EINA_TRUE;
/* we are getting duplicate events, only parse if we are in fullscreen */
//if(_ecore_directfb_fullscreen_window_id == 0) break;
if(evt.input.type == DIET_KEYPRESS)
_ecore_directfb_event_handle_key_down(&evt);
if(evt.input.type == DIET_KEYRELEASE)
_ecore_directfb_event_handle_key_up(&evt);
if(evt.input.type == DIET_BUTTONPRESS)
_ecore_directfb_event_handle_button_down(&evt);
if(evt.input.type == DIET_BUTTONRELEASE)
_ecore_directfb_event_handle_button_up(&evt);
if(evt.input.type == DIET_AXISMOTION)
_ecore_directfb_event_handle_motion(&evt);
return EINA_TRUE;
}
static Eina_Bool
_ecore_directfb_window_event_fd_handler(void *data EINA_UNUSED,Ecore_Fd_Handler *fd_handler EINA_UNUSED)
{
DFBEvent evt;
int v = 0;
v = read(_window_event_fd, &evt, sizeof(DFBEvent));
if (v < 0)
return EINA_TRUE;
if (v < 1)
return EINA_TRUE;
if(evt.window.type & DWET_POSITION)
INF("position");
if(evt.window.type & DWET_SIZE)
INF("size");
if(evt.window.type & DWET_CLOSE)
INF("close");
if(evt.window.type & DWET_DESTROYED)
INF("destroyed");
if(evt.window.type & DWET_GOTFOCUS)
_ecore_directfb_event_handle_got_focus(&evt.window);
if(evt.window.type & DWET_LOSTFOCUS)
_ecore_directfb_event_handle_lost_focus(&evt.window);
if(evt.window.type & DWET_KEYDOWN)
_ecore_directfb_event_handle_key_down(&evt);
if(evt.window.type & DWET_KEYUP)
_ecore_directfb_event_handle_key_up(&evt);
if(evt.window.type & DWET_BUTTONDOWN)
_ecore_directfb_event_handle_button_down(&evt);
if(evt.window.type & DWET_BUTTONUP)
_ecore_directfb_event_handle_button_up(&evt);
if(evt.window.type & DWET_MOTION)
_ecore_directfb_event_handle_motion(&evt);
if(evt.window.type & DWET_ENTER)
_ecore_directfb_event_handle_enter(&evt.window);
if(evt.window.type & DWET_LEAVE)
_ecore_directfb_event_handle_leave(&evt.window);
if(evt.window.type & DWET_WHEEL)
_ecore_directfb_event_handle_wheel(&evt.window);
return EINA_TRUE;
}
/* api functions */
/*****************/
EAPI IDirectFB *
ecore_directfb_interface_get(void)
{
return _dfb;
}
EAPI Ecore_DirectFB_Window *
ecore_directfb_window_new(int x, int y, int w, int h)
{
Ecore_DirectFB_Window *window;
IDirectFBWindow *dfb_window;
IDirectFBSurface *dfb_surface = NULL;
DFBWindowDescription desc;
DFBWindowID id;
memset(&desc, 0, sizeof(DFBWindowDescription));
desc.flags = (DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_CAPS);
desc.posx = x;
desc.posy = y;
desc.width = w;
desc.height = h;
desc.caps = DWCAPS_ALPHACHANNEL;
DFBCHECK(_layer->CreateWindow(_layer, &desc, &dfb_window));
dfb_window->AttachEventBuffer(dfb_window, _window_event);
dfb_window->SetOptions(dfb_window,DWOP_NONE);
dfb_window->SetOpacity(dfb_window, 0xFF);
DFBCHECK(dfb_window->GetID(dfb_window, &id));
DFBCHECK(dfb_window->GetSurface(dfb_window,&dfb_surface));
window = malloc(sizeof(Ecore_DirectFB_Window));
window->id = id;
window->window = dfb_window;
window->surface = dfb_surface;
window->cursor = NULL;
return window;
}
EAPI void
ecore_directfb_window_free(Ecore_DirectFB_Window *ecore_window)
{
DFBCHECK(ecore_window->surface->Release(ecore_window->surface));
DFBCHECK(ecore_window->window->Release(ecore_window->window));
free(ecore_window);
}
EAPI void
ecore_directfb_window_move(Ecore_DirectFB_Window *ecore_window, int x, int y)
{
DFBCHECK(ecore_window->window->MoveTo(ecore_window->window, x, y));
}
EAPI void
ecore_directfb_window_resize(Ecore_DirectFB_Window *ecore_window, int w, int h)
{
DFBCHECK(ecore_window->window->Resize(ecore_window->window, w, h));
}
EAPI void
ecore_directfb_window_focus(Ecore_DirectFB_Window *ecore_window)
{
DFBCHECK(ecore_window->window->RequestFocus(ecore_window->window));
}
EAPI void
ecore_directfb_window_hide(Ecore_DirectFB_Window *ecore_window)
{
DFBCHECK(ecore_window->window->SetOpacity(ecore_window->window, 0));
}
EAPI void
ecore_directfb_window_show(Ecore_DirectFB_Window *ecore_window)
{
DFBCHECK(ecore_window->window->SetOpacity(ecore_window->window, 0xFF));
}
EAPI void
ecore_directfb_window_shaped_set(Ecore_DirectFB_Window *ecore_window, Eina_Bool set)
{
DFBWindowOptions opts;
DFBCHECK(ecore_window->window->GetOptions(ecore_window->window, &opts));
if(set)
{
opts |= DWOP_SHAPED;
opts |= DWOP_ALPHACHANNEL;
DFBCHECK(ecore_window->window->SetOptions(ecore_window->window, opts));
}
else
{
opts &= ~DWOP_SHAPED;
opts &= ~DWOP_ALPHACHANNEL;
DFBCHECK(ecore_window->window->SetOptions(ecore_window->window, opts));
}
}
EAPI void
ecore_directfb_window_cursor_show(Ecore_DirectFB_Window *ecore_window, Eina_Bool show)
{
if(!show)
{
/* create an empty cursor and set it */
IDirectFBSurface *cursor;
DFBSurfaceDescription desc;
memset(&desc, 0, sizeof(DFBSurfaceDescription));
desc.flags = (DSDESC_HEIGHT | DSDESC_WIDTH | DSDESC_PIXELFORMAT);
desc.width = 1;
desc.height = 1;
desc.pixelformat = DSPF_A1;
DFBCHECK(_dfb->CreateSurface(_dfb,&desc,&cursor));
DFBCHECK(cursor->Clear(cursor,0,0,0,0));
DFBCHECK(ecore_window->window->SetCursorShape(ecore_window->window, cursor, 0, 0));
}
else
{
/* we already have a cursor surface so set it*/
if(ecore_window->cursor)
{
DFBCHECK(ecore_window->window->SetCursorShape(ecore_window->window, ecore_window->cursor->surface, ecore_window->cursor->hot_x, ecore_window->cursor->hot_y));
}
/* or just set the default directfb cursor */
else
{
DFBCHECK(ecore_window->window->SetCursorShape(ecore_window->window, NULL, 0, 0));
}
}
}
EAPI void
ecore_directfb_window_cursor_set(Ecore_DirectFB_Window *ecore_window, Ecore_DirectFB_Cursor *cursor)
{
if((!cursor) && (ecore_window->cursor))
{
ecore_window->cursor = NULL;
DFBCHECK(ecore_window->window->SetCursorShape(ecore_window->window, NULL, 0, 0));
return;
}
if(cursor)
{
ecore_window->cursor = cursor;
DFBCHECK(ecore_window->window->SetCursorShape(ecore_window->window, cursor->surface, cursor->hot_x, cursor->hot_y));
}
}
EAPI void
ecore_directfb_window_fullscreen_set(Ecore_DirectFB_Window *ecore_window, Eina_Bool on)
{
// always release the surface (we are going to get a new one in both cases)
DFBCHECK(ecore_window->surface->Release(ecore_window->surface));
if(on)
{
DFBCHECK(_layer->SetCooperativeLevel(_layer,DLSCL_EXCLUSIVE));
DFBCHECK(_layer->GetSurface(_layer,&ecore_window->surface));
DFBCHECK(_dfb->CreateInputEventBuffer(_dfb, DICAPS_ALL, DFB_FALSE, &_input_event));
DFBCHECK(_input_event->CreateFileDescriptor(_input_event,&_input_event_fd));
/* the event of axismove sends one axis at a time, so we must store both */
DFBCHECK(_layer->GetCursorPosition(_layer,&_cursor_x,&_cursor_y));
_input_event_fd_handler_handle = ecore_main_fd_handler_add(_input_event_fd,ECORE_FD_READ,_ecore_directfb_input_event_fd_handler, NULL,NULL,NULL);
_ecore_directfb_fullscreen_window_id = ecore_window->id;
}
else
{
ecore_main_fd_handler_del(_input_event_fd_handler_handle);
DFBCHECK(_input_event->Release(_input_event));
DFBCHECK(_layer->SetCooperativeLevel(_layer,DLSCL_SHARED));
DFBCHECK(ecore_window->window->GetSurface(ecore_window->window, &ecore_window->surface));
_ecore_directfb_fullscreen_window_id = 0;
}
}
EAPI void
ecore_directfb_window_size_get(Ecore_DirectFB_Window *ecore_window, int *w, int *h)
{
DFBCHECK(ecore_window->surface->GetSize(ecore_window->surface,w,h));
return;
}
EAPI int
ecore_directfb_init(const char *name EINA_UNUSED)
{
int i = 0;
if (++_ecore_directfb_init_count != 1)
return _ecore_directfb_init_count;
_ecore_directfb_log_dom = eina_log_domain_register
("ecore_directfb", ECORE_DIRECTFB_DEFAULT_LOG_COLOR);
if(_ecore_directfb_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for the Ecore directFB module.");
return _ecore_directfb_init_count--;
}
DFBCHECK(DirectFBInit(NULL,NULL));
DFBCHECK(DirectFBCreate(&_dfb));
DFBCHECK(_dfb->GetDisplayLayer(_dfb, DLID_PRIMARY, &_layer));
DFBCHECK(_layer->SetCooperativeLevel(_layer, DLSCL_SHARED));
/* window events and fd */
DFBCHECK(_dfb->CreateEventBuffer(_dfb, &_window_event));
DFBCHECK(_window_event->CreateFileDescriptor(_window_event,&_window_event_fd));
_window_event_fd_handler_handle = ecore_main_fd_handler_add(_window_event_fd,ECORE_FD_READ,_ecore_directfb_window_event_fd_handler, NULL,NULL,NULL);
/* register ecore directfb events */
ECORE_DIRECTFB_EVENT_POSITION = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_SIZE = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_CLOSE = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_DESTROYED = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_GOT_FOCUS = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_LOST_FOCUS = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_KEY_DOWN = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_KEY_UP = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_BUTTON_DOWN = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_BUTTON_UP = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_MOTION = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_ENTER = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_LEAVE = ecore_event_type_new();
ECORE_DIRECTFB_EVENT_WHEEL = ecore_event_type_new();
/* create the hash table for the keynames */
_ecore_directfb_key_symbols_hash = eina_hash_int32_new(free);
for(i = 0; i < _ecore_directfb_key_symbols_count; i++)
{
struct keymap *k;
k = malloc(sizeof(struct keymap));
k->name = _ecore_directfb_key_symbols[i].name;
k->string = _ecore_directfb_key_symbols[i].string;
eina_hash_add(_ecore_directfb_key_symbols_hash, &_ecore_directfb_key_symbols[i].id, k);
}
/* create the hash for the windows(key = windowid, val = Ecore_DirectFB_Window struct) */
return _ecore_directfb_init_count;
}
EAPI int
ecore_directfb_shutdown(void)
{
if (--_ecore_directfb_init_count != 0)
return _ecore_directfb_init_count;
ecore_main_fd_handler_del(_window_event_fd_handler_handle);
eina_hash_free(_ecore_directfb_key_symbols_hash);
if