ECORE_EVAS_OBJECT_ASSOCIATE_DEL = 1 << 2
} Ecore_Evas_Object_Associate_Flags;
+#define ECORE_EVAS_OPT_NONE 0
+#define ECORE_EVAS_OPT_INDIRECT 1
+#define ECORE_EVAS_OPT_VSYNC 2
+#define ECORE_EVAS_OPT_SWAP_MODE 3
+#define ECORE_EVAS_OPT_GL_DEPTH 4
+#define ECORE_EVAS_OPT_GL_STENCIL 5
+#define ECORE_EVAS_OPT_GL_MSAA 6
+#define ECORE_EVAS_OPT_LAST 7
+
+#define ECORE_EVAS_SWAP_MODE_AUTO 0
+#define ECORE_EVAS_SWAP_MODE_FULL 1
+#define ECORE_EVAS_SWAP_MODE_COPY 2
+#define ECORE_EVAS_SWAP_MODE_DOUBLE 3
+#define ECORE_EVAS_SWAP_MODE_TRIPLE 4
+#define ECORE_EVAS_SWAP_MODE_QUADRUPLE 5
+
/* module setup/shutdown calls */
EAPI int ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine);
*/
EAPI Ecore_X_Pixmap ecore_evas_software_x11_pixmap_get(const Ecore_Evas *ee);
-#define ECORE_EVAS_GL_X11_OPT_NONE 0
-#define ECORE_EVAS_GL_X11_OPT_INDIRECT 1
-#define ECORE_EVAS_GL_X11_OPT_VSYNC 2
-#define ECORE_EVAS_GL_X11_OPT_SWAP_MODE 3
-#define ECORE_EVAS_GL_X11_OPT_GL_DEPTH 4
-#define ECORE_EVAS_GL_X11_OPT_GL_STENCIL 5
-#define ECORE_EVAS_GL_X11_OPT_GL_MSAA 6
-#define ECORE_EVAS_GL_X11_OPT_LAST 7
+#define ECORE_EVAS_GL_X11_OPT_NONE ECORE_EVAS_OPT_NONE
+#define ECORE_EVAS_GL_X11_OPT_INDIRECT ECORE_EVAS_OPT_INDIRECT
+#define ECORE_EVAS_GL_X11_OPT_VSYNC ECORE_EVAS_OPT_VSYNC
+#define ECORE_EVAS_GL_X11_OPT_SWAP_MODE ECORE_EVAS_OPT_SWAP_MODE
+#define ECORE_EVAS_GL_X11_OPT_GL_DEPTH ECORE_EVAS_OPT_GL_DEPTH
+#define ECORE_EVAS_GL_X11_OPT_GL_STENCIL ECORE_EVAS_OPT_GL_STENCIL
+#define ECORE_EVAS_GL_X11_OPT_GL_MSAA ECORE_EVAS_OPT_GL_MSAA
+#define ECORE_EVAS_GL_X11_OPT_LAST ECORE_EVAS_OPT_LAST
-#define ECORE_EVAS_GL_X11_SWAP_MODE_AUTO 0
-#define ECORE_EVAS_GL_X11_SWAP_MODE_FULL 1
-#define ECORE_EVAS_GL_X11_SWAP_MODE_COPY 2
-#define ECORE_EVAS_GL_X11_SWAP_MODE_DOUBLE 3
-#define ECORE_EVAS_GL_X11_SWAP_MODE_TRIPLE 4
+#define ECORE_EVAS_GL_X11_SWAP_MODE_AUTO ECORE_EVAS_SWAP_MODE_AUTO
+#define ECORE_EVAS_GL_X11_SWAP_MODE_FULL ECORE_EVAS_SWAP_MODE_FULL
+#define ECORE_EVAS_GL_X11_SWAP_MODE_COPY ECORE_EVAS_SWAP_MODE_COPY
+#define ECORE_EVAS_GL_X11_SWAP_MODE_DOUBLE ECORE_EVAS_SWAP_MODE_DOUBLE
+#define ECORE_EVAS_GL_X11_SWAP_MODE_TRIPLE ECORE_EVAS_SWAP_MODE_TRIPLE
/**
* @brief Creates Ecore_Evas using opengl x11.
* @see ecore_evas_wayland_shm_new()
*/
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);
+EAPI Ecore_Evas *ecore_evas_wayland_egl_options_new(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt);
/**
* @brief Begin resizing the Ecore_Evas window.
return ee;
}
+EAPI Ecore_Evas *
+ecore_evas_wayland_egl_options_new(const char *disp_name, unsigned int parent,
+ int x, int y, int w, int h, Eina_Bool frame, const int *opt)
+{
+ Ecore_Evas *ee;
+ Ecore_Evas *(*new)(const char *, unsigned int, int, int, int, int, Eina_Bool, const int *);
+ 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_options_new_internal");
+ EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
+
+ ee = new(disp_name, parent, x, y, w, h, frame, opt);
+ if (!_ecore_evas_cursors_init(ee))
+ {
+ ecore_evas_free(ee);
+ return NULL;
+ }
+ return ee;
+}
+
EAPI void
ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
{
else if (!strcmp(enginelist[i], ELM_WAYLAND_SHM))
tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, parent_id, 0, 0, 0, 0, 0);
else if (!strcmp(enginelist[i], ELM_WAYLAND_EGL))
- tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, parent_id, 0, 0, 0, 0, 0);
+ {
+ int opt[20], opt_i = 0;
+
+ if (_elm_config->vsync)
+ {
+ opt[opt_i++] = ECORE_EVAS_OPT_VSYNC;
+ opt[opt_i++] = 1;
+ }
+ if (_elm_config->gl_depth)
+ {
+ opt[opt_i++] = ECORE_EVAS_OPT_GL_DEPTH;
+ opt[opt_i++] = _elm_config->gl_depth;
+ }
+ if (_elm_config->gl_stencil)
+ {
+ opt[opt_i++] = ECORE_EVAS_OPT_GL_STENCIL;
+ opt[opt_i++] = _elm_config->gl_stencil;
+ }
+ if (_elm_config->gl_msaa)
+ {
+ opt[opt_i++] = ECORE_EVAS_OPT_GL_MSAA;
+ opt[opt_i++] = _elm_config->gl_msaa;
+ }
+ opt[opt_i] = 0;
+ if (opt_i > 0)
+ tmp_sd.ee = ecore_evas_wayland_egl_options_new(NULL, 0, 0, 0, 0, 0, 0, opt);
+ else
+ tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 0, 0, 0);
+ }
else if (!strcmp(enginelist[i], ELM_SOFTWARE_WIN32))
tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
else if (!strcmp(enginelist[i], ELM_SOFTWARE_DDRAW))
Ecore_Evas *
_ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame, const char *engine_name)
{
+ return _ecore_evas_wl_common_options_new_internal(disp_name, parent, x, y, w, h,
+ frame, NULL, engine_name);
+}
+
+Ecore_Evas *
+_ecore_evas_wl_common_options_new_internal(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt, const char *engine_name)
+{
Ecore_Wl2_Display *ewd;
Ecore_Wl2_Window *p = NULL;
Evas_Engine_Info_Wayland *einfo;
wdata->sync_done = EINA_TRUE;
if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
{
+ if (opt)
+ {
+ int op;
+
+ for (op = 0; opt[op]; op++)
+ {
+ if (opt[op] == ECORE_EVAS_OPT_GL_DEPTH)
+ {
+ op++;
+ einfo->depth_bits = opt[op];
+ }
+ else if (opt[op] == ECORE_EVAS_OPT_GL_STENCIL)
+ {
+ op++;
+ einfo->stencil_bits = opt[op];
+ }
+ else if (opt[op] == ECORE_EVAS_OPT_GL_MSAA)
+ {
+ op++;
+ einfo->msaa_bits = opt[op];
+ }
+ }
+ }
+
einfo->info.destination_alpha = EINA_TRUE;
einfo->info.rotation = ee->rotation;
einfo->info.depth = 32;
"wayland_egl");
}
+EAPI Ecore_Evas *
+ecore_evas_wayland_egl_options_new_internal(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt)
+{
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+ return _ecore_evas_wl_common_options_new_internal(disp_name, parent,
+ x, y, w, h, frame, opt,
+ "wayland_egl");
+}
+
#endif
*/
Ecore_Evas *_ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame, const char *engine_name);
+Ecore_Evas *_ecore_evas_wl_common_options_new_internal(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt, const char *engine_name);
#endif /* _ECORE_EVAS_WAYLAND_PRIVATE_H_ */