summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-05-14 10:45:47 +0100
committerChris Michael <cp.michael@samsung.com>2013-05-14 10:49:14 +0100
commitdd364de99d2eecc7835d61c4af378545345bfdbe (patch)
tree774f7ec78ad623c4843cd69f740a07b50f3959f2 /src/lib/ecore_evas/ecore_evas.c
parent817284fb9655869a26bbd6171d8e94cd4db60672 (diff)
Start on basic ecore_evas_drm code.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index eaccf72f74..8bac6ecbf0 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -253,6 +253,13 @@ ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine)
253#else 253#else
254 return EINA_FALSE; 254 return EINA_FALSE;
255#endif 255#endif
256 case ECORE_EVAS_ENGINE_DRM:
257#ifdef BUILD_ECORE_EVAS_DRM
258 return EINA_TRUE;
259#else
260 return EINA_FALSE;
261#endif
262
256 default: 263 default:
257 return EINA_FALSE; 264 return EINA_FALSE;
258 }; 265 };
@@ -596,6 +603,21 @@ _ecore_evas_constructor_wayland_egl(int x, int y, int w, int h, const char *extr
596} 603}
597 604
598static Ecore_Evas * 605static Ecore_Evas *
606_ecore_evas_constructor_drm(int x, int y, int w, int h, const char *extra_options)
607{
608 char *device = NULL;
609 unsigned int parent = 0;
610 Ecore_Evas *ee;
611
612 _ecore_evas_parse_extra_options_str(extra_options, "device=", &device);
613 _ecore_evas_parse_extra_options_uint(extra_options, "parent=", &parent);
614 ee = ecore_evas_drm_new(device, parent, x, y, w, h);
615 free(device);
616
617 return ee;
618}
619
620static Ecore_Evas *
599_ecore_evas_constructor_software_gdi(int x, int y, int w, int h, 621_ecore_evas_constructor_software_gdi(int x, int y, int w, int h,
600 const char *extra_options EINA_UNUSED) 622 const char *extra_options EINA_UNUSED)
601{ 623{
@@ -651,6 +673,7 @@ static const struct ecore_evas_engine _engines[] = {
651 {"psl1ght", _ecore_evas_constructor_psl1ght}, 673 {"psl1ght", _ecore_evas_constructor_psl1ght},
652 {"wayland_shm", _ecore_evas_constructor_wayland_shm}, 674 {"wayland_shm", _ecore_evas_constructor_wayland_shm},
653 {"wayland_egl", _ecore_evas_constructor_wayland_egl}, 675 {"wayland_egl", _ecore_evas_constructor_wayland_egl},
676 {"drm", _ecore_evas_constructor_drm},
654 {"opengl_sdl", _ecore_evas_constructor_opengl_sdl}, 677 {"opengl_sdl", _ecore_evas_constructor_opengl_sdl},
655 {"sdl", _ecore_evas_constructor_sdl}, 678 {"sdl", _ecore_evas_constructor_sdl},
656 {"buffer", _ecore_evas_constructor_buffer}, 679 {"buffer", _ecore_evas_constructor_buffer},
@@ -3336,6 +3359,20 @@ ecore_evas_wayland_window_get(const Ecore_Evas *ee)
3336} 3359}
3337 3360
3338EAPI Ecore_Evas * 3361EAPI Ecore_Evas *
3362ecore_evas_drm_new(const char *disp_name, unsigned int parent,
3363 int x, int y, int w, int h)
3364{
3365 Ecore_Evas *(*new)(const char *, unsigned int, int, int, int, int);
3366 Eina_Module *m = _ecore_evas_engine_load("drm");
3367 EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
3368
3369 new = eina_module_symbol_get(m, "ecore_evas_drm_new_internal");
3370 EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
3371
3372 return new(disp_name, parent, x, y, w, h);
3373}
3374
3375EAPI Ecore_Evas *
3339ecore_evas_software_gdi_new(Ecore_Win32_Window *parent, 3376ecore_evas_software_gdi_new(Ecore_Win32_Window *parent,
3340 int x, 3377 int x,
3341 int y, 3378 int y,