#include "e.h"
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
# include "e_comp_wl.h"
#endif
#ifndef HAVE_WAYLAND_ONLY
Eina_List *images_cache;
#endif
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
E_Comp_Wl_Buffer_Ref buffer_ref;
struct wl_listener buffer_destroy_listener;
void *data;
Eina_Bool image_argb : 1;
};
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
static void
_e_pixmap_cb_buffer_destroy(struct wl_listener *listener, void *data EINA_UNUSED)
{
#endif
break;
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
if (cp->buffer_destroy_listener.notify)
{
wl_list_remove(&cp->buffer_destroy_listener.link);
#endif
break;
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
#endif
break;
default:
#ifndef HAVE_WAYLAND_ONLY
Ecore_X_Window xwin;
#endif
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
uintptr_t id;
#endif
#endif
break;
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
id = va_arg(*l, uintptr_t);
return eina_hash_find(pixmaps[type], &id);
#endif
#ifndef HAVE_WAYLAND_ONLY
Ecore_X_Window xwin;
#endif
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
uintptr_t id;
#endif
#endif
break;
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
id = va_arg(l, uintptr_t);
if (pixmaps[type])
{
#endif
break;
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
success = ((cp->w > 0) && (cp->h > 0));
#endif
break;
CRI("ACK");
return NULL;
}
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
return cp->buffer_ref.buffer;
#endif
return NULL;
e_pixmap_resource_set(E_Pixmap *cp, void *resource)
{
if ((!cp) || (cp->type != E_PIXMAP_TYPE_WL)) return;
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
{
E_Comp_Wl_Buffer *buffer;
struct wl_shm_buffer *shm_buffer;
#endif
break;
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
ns->type = EVAS_NATIVE_SURFACE_OPENGL;
ns->version = EVAS_NATIVE_SURFACE_VERSION;
ns->data.opengl.texture_id = 0;
#endif
break;
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
if (cache)
{
E_Comp_Wl_Client_Data *cd;
#endif
break;
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
/* FIXME */
return EINA_TRUE;
#endif
if (cp->type == E_PIXMAP_TYPE_X)
return !!cp->image;
#endif
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
return (cp->buffer_ref.buffer != NULL);
#endif
return cp->image && cp->image_argb;
#endif
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
return ((cp->buffer_ref.buffer != NULL) && (cp->image_argb));
#endif
default: break;
#endif
break;
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
return cp->data;
#endif
break;
break;
case E_PIXMAP_TYPE_WL:
if (cp->image_argb) return EINA_TRUE;
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
if (cp->buffer_ref.buffer)
{
struct wl_shm_buffer *shm_buffer;
#endif
break;
case E_PIXMAP_TYPE_WL:
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
#endif
(void) r;
return EINA_TRUE;
{
EINA_SAFETY_ON_NULL_RETURN(cp);
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
struct wl_shm_buffer *shm_buffer;
shm_buffer = wl_shm_buffer_get(cp->buffer_ref.buffer->resource);
e_pixmap_image_opaque_set(E_Pixmap *cp, int x, int y, int w, int h)
{
EINA_SAFETY_ON_NULL_RETURN(cp);
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
EINA_RECTANGLE_SET(&cp->opaque, x, y, w, h);
#else
(void)x;
e_pixmap_image_opaque_get(E_Pixmap *cp, int *x, int *y, int *w, int *h)
{
EINA_SAFETY_ON_NULL_RETURN(cp);
-#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+#ifdef HAVE_WAYLAND
if (x) *x = cp->opaque.x;
if (y) *y = cp->opaque.y;
if (w) *w = cp->opaque.w;