Fix build errors 78/39178/1 submit/tizen_mobile/20150511.123737 submit/tizen_mobile/20150511.123926 submit/tizen_mobile/20150512.034625
authorSung-jae Park <nicesj.park@samsung.com>
Mon, 11 May 2015 08:35:53 +0000 (17:35 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Mon, 11 May 2015 08:36:26 +0000 (17:36 +0900)
Missing accessibilty symbols.
Wayland porting layer should be implemented.

Change-Id: I970583f1741c764617a210e174f515a9db19244a
Signed-off-by: Sung-jae Park <nicesj.park@samsung.com>
packaging/libwidget_viewer.spec
widget_viewer/src/fb_wayland.c
widget_viewer/src/widget.c
widget_viewer_evas/CMakeLists.txt
widget_viewer_evas/include/util.h [new file with mode: 0644]
widget_viewer_evas/src/util_wayland.c [new file with mode: 0644]
widget_viewer_evas/src/util_x11.c [new file with mode: 0644]
widget_viewer_evas/src/widget_viewer_evas.c

index b8cf41d..23631ad 100644 (file)
@@ -4,7 +4,7 @@ Name: libwidget_viewer
 Summary: Library for developing the application
 Version: 1.1.4
 Release: 1
-Group: HomeTF/widget
+Group: Applications/Core Applications
 License: Flora License, Version 1.1
 Source0: %{name}-%{version}.tar.gz
 Source1001: %{name}.manifest
@@ -19,7 +19,6 @@ BuildRequires: pkgconfig(db-util)
 BuildRequires: pkgconfig(widget_service)
 BuildRequires: pkgconfig(vconf)
 BuildRequires: pkgconfig(elementary)
-BuildRequires: model-build-features
 
 %if %{with wayland}
 %else
@@ -80,8 +79,8 @@ rm -rf %{buildroot}
 %files -n %{name}
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
-%{_libdir}/libwidget_viewer.so*
-%{_datarootdir}/license/libwidget_viewer
+%{_libdir}/%{name}.so*
+%{_datarootdir}/license/%{name}
 
 %files devel
 %manifest %{name}.manifest
@@ -91,31 +90,33 @@ rm -rf %{buildroot}
 
 #################################################
 # libwidget_viewer_evas
-%package -n libwidget_viewer_evas
+%package -n %{name}_evas
 Summary: Library for developing the widget viewer evas
-Group: HomeTF/widget
+Group: Applications/Core Applications
 License: Flora
-Requires: libwidget_viewer
 
-%description -n libwidget_viewer_evas
+%description -n %{name}_evas
 Provider APIs to develop the widget viewer EFL application.
 
-%package -n libwidget_viewer_evas-devel
-Summary: Header & package configuration files to support development of the widget viewer applications. (for EFL app)
+%package -n %{name}_evas-devel
+Summary: widget provider application development library (dev) (EFL version)
 Group: Development/Libraries
-Requires: libwidget_viewer_evas
+Requires: %{name}_evas
 
-%description -n libwidget_viewer_evas-devel
-widget provider application development library (dev) (EFL version)
+%description -n %{name}_evas-devel
+Header & package configuration files to support development of the widget viewer applications. (for EFL app)
 
-%files -n libwidget_viewer_evas
+%post -n %{name}_evas -p /sbin/ldconfig
+%postun -n %{name}_evas -p /sbin/ldconfig
+
+%files -n %{name}_evas
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
-%{_libdir}/libwidget_viewer_evas.so*
+%{_libdir}/%{name}_evas.so*
 %{_datadir}/widget_viewer_evas/*
-%{_datarootdir}/license/libwidget_viewer_evas
+%{_datarootdir}/license/%{name}_evas
 
-%files -n libwidget_viewer_evas-devel
+%files -n %{name}_evas-devel
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
 %{_includedir}/widget_viewer_evas/widget_viewer_evas.h
index d69d17c..c0b558d 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <dlog.h>
 #include <widget_errno.h> /* For error code */
-#include <widget_service.h>
+#include <widget_service.h> /* For buffer event data */
 #include <widget_buffer.h>
 
 #include "debug.h"
 
 int errno;
 
-static struct {
-} s_info = {
-};
-
 int fb_init(void *disp)
 {
        return WIDGET_ERROR_NONE;
@@ -57,10 +53,11 @@ static inline void update_fb_size(struct fb_info *info)
        info->bufsz = info->w * info->h * info->pixels;
 }
 
-static inline int sync_for_file(struct fb_info *info, int x, int y, int w, int h)
+static int sync_for_file(struct fb_info *info, int x, int y, int w, int h)
 {
        int fd;
        widget_fb_t buffer;
+       const char *path = NULL;
 
        buffer = info->buffer;
 
@@ -78,13 +75,20 @@ static inline int sync_for_file(struct fb_info *info, int x, int y, int w, int h
                return WIDGET_ERROR_NONE;
        }
 
-       fd = open(util_uri_to_path(info->id), O_RDONLY);
+       path = util_uri_to_path(info->id);
+
+       if (path == NULL) {
+               ErrPrint("Invalid parameter\n");
+               return WIDGET_ERROR_INVALID_PARAMETER;
+       }
+
+       fd = open(path, O_RDONLY);
        if (fd < 0) {
                ErrPrint("Failed to open a file (%s) because of (%d)\n",
                                util_uri_to_path(info->id), errno);
 
-               /*!
-                * \note
+               /**
+                * @note
                 * But return ZERO, even if we couldn't get a buffer file,
                 * the viewer can draw empty screen.
                 *
@@ -93,6 +97,10 @@ static inline int sync_for_file(struct fb_info *info, int x, int y, int w, int h
                return WIDGET_ERROR_NONE;
        }
 
+       /**
+        * @note
+        * Could we get some advantage if we load a part of file instead of loading all of them?
+        */
        if (x != 0 || y != 0 || info->w != w || info->h != h) {
                int iy;
                register int index;
@@ -138,8 +146,8 @@ static inline int sync_for_file(struct fb_info *info, int x, int y, int w, int h
                                ErrPrint("close: %d\n", errno);
                        }
 
-                       /*!
-                        * \note
+                       /**
+                        * @note
                         * But return ZERO, even if we couldn't get a buffer file,
                         * the viewer can draw empty screen.
                         *
@@ -170,9 +178,7 @@ int fb_sync(struct fb_info *info, int x, int y, int w, int h)
        if (!strncasecmp(info->id, SCHEMA_FILE, strlen(SCHEMA_FILE))) {
                return sync_for_file(info, x, y, w, h);
        } else if (!strncasecmp(info->id, SCHEMA_PIXMAP, strlen(SCHEMA_PIXMAP))) {
-               /**
-                * @note
-                */
+               return WIDGET_ERROR_NONE;
        } else if (!strncasecmp(info->id, SCHEMA_SHM, strlen(SCHEMA_SHM))) {
                /* No need to do sync */ 
                return WIDGET_ERROR_NONE;
@@ -209,9 +215,6 @@ struct fb_info *fb_create(const char *id, int w, int h)
                DbgPrint("SHMID: %d is gotten\n", info->handle);
        } else if (sscanf(info->id, SCHEMA_PIXMAP "%d:%d", &info->handle, &info->pixels) == 2) {
                DbgPrint("PIXMAP-SHMID: %d is gotten (%d)\n", info->handle, info->pixels);
-               ErrPrint("Unsupported\n");
-               free(info);
-               return NULL;
        } else {
                info->handle = WIDGET_ERROR_INVALID_PARAMETER;
        }
@@ -279,8 +282,8 @@ void *fb_acquire_buffer(struct fb_info *info)
 
        if (!info->buffer) {
                if (!strncasecmp(info->id, SCHEMA_PIXMAP, strlen(SCHEMA_PIXMAP))) {
-                       ErrPrint("Unsupported Type\n");
-                       set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
+                       /**
+                        */
                        return NULL;
                } else if (!strncasecmp(info->id, SCHEMA_FILE, strlen(SCHEMA_FILE))) {
                        update_fb_size(info);
@@ -319,10 +322,12 @@ void *fb_acquire_buffer(struct fb_info *info)
        buffer = info->buffer;
 
        switch (buffer->type) {
+       case WIDGET_FB_TYPE_PIXMAP:
+               buffer->refcnt++;
+               break;
        case WIDGET_FB_TYPE_FILE:
                buffer->refcnt++;
                break;
-       case WIDGET_BUFFER_TYPE_PIXMAP:
        default:
                DbgPrint("Unknwon FP: %d\n", buffer->type);
                set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
@@ -351,12 +356,14 @@ int fb_release_buffer(void *data)
        }
 
        switch (buffer->type) {
-       case WIDGET_BUFFER_TYPE_SHM:
+       case WIDGET_FB_TYPE_SHM:
                if (shmdt(buffer) < 0) {
                        ErrPrint("shmdt: %d\n", errno);
                }
                break;
-       case WIDGET_BUFFER_TYPE_FILE:
+       case WIDGET_FB_TYPE_PIXMAP:
+               break;
+       case WIDGET_FB_TYPE_FILE:
                buffer->refcnt--;
                if (buffer->refcnt == 0) {
                        struct fb_info *info;
@@ -371,7 +378,6 @@ int fb_release_buffer(void *data)
                        free(buffer);
                }
                break;
-       case WIDGET_BUFFER_TYPE_PIXMAP:
        default:
                ErrPrint("Unknwon buffer type\n");
                set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
@@ -392,7 +398,7 @@ int fb_refcnt(void *data)
                return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
-       buffer = container_of(data, struct buffer, data);
+       buffer = container_of(data, struct widget_fb, data);
 
        if (buffer->state != WIDGET_FB_STATE_CREATED) {
                ErrPrint("Invalid handle\n");
@@ -410,10 +416,12 @@ int fb_refcnt(void *data)
 
                ret = buf.shm_nattch;
                break;
+       case WIDGET_FB_TYPE_PIXMAP:
+               ret = 0;
+               break;
        case WIDGET_FB_TYPE_FILE:
                ret = buffer->refcnt;
                break;
-       case WIDGET_BUFFER_TYPE_PIXMAP:
        default:
                set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
                ret = WIDGET_ERROR_INVALID_PARAMETER;
@@ -457,7 +465,7 @@ int fb_type(struct fb_info *info)
        widget_fb_t buffer;
 
        if (!info) {
-               return WIDGET_BUFFER_TYPE_ERROR;
+               return WIDGET_FB_TYPE_ERROR;
        }
 
        buffer = info->buffer;
@@ -469,11 +477,11 @@ int fb_type(struct fb_info *info)
                 */
                if (info->id) {
                        if (!strncasecmp(info->id, SCHEMA_FILE, strlen(SCHEMA_FILE))) {
-                               type = WIDGET_BUFFER_TYPE_FILE;
+                               type = WIDGET_FB_TYPE_FILE;
                        } else if (!strncasecmp(info->id, SCHEMA_PIXMAP, strlen(SCHEMA_PIXMAP))) {
-                               /* Unsupported type */
+                               type = WIDGET_FB_TYPE_PIXMAP;
                        } else if (!strncasecmp(info->id, SCHEMA_SHM, strlen(SCHEMA_SHM))) {
-                               type = WIDGET_BUFFER_TYPE_SHM;
+                               type = WIDGET_FB_TYPE_SHM;
                        }
                }
 
index 01828b4..8d41e36 100644 (file)
@@ -30,9 +30,9 @@
 
 #include <com-core_packet.h>
 #include <packet.h>
+#include <widget_errno.h>
 #include <widget_service.h>
 #include <widget_service_internal.h>
-#include <widget_errno.h>
 #include <widget_cmd_list.h>
 #include <widget_buffer.h>
 
index 492e1dd..3d6c743 100644 (file)
@@ -22,6 +22,20 @@ SET(BUILD_SOURCE
        src/widget_viewer_evas.c
 )
 
+IF (X11_SUPPORT)
+SET(BUILD_SOURCE
+       ${BUILD_SOURCE}
+       src/util_x11.c
+)
+ENDIF (X11_SUPPORT)
+
+IF (WAYLAND_SUPPORT)
+SET(BUILD_SOURCE
+       ${BUILD_SOURCE}
+       src/util_wayland.c
+)
+ENDIF (WAYLAND_SUPPORT)
+
 FOREACH(flag ${viewer_evas_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
diff --git a/widget_viewer_evas/include/util.h b/widget_viewer_evas/include/util.h
new file mode 100644 (file)
index 0000000..21f7df3
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Samsung API
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __WIDGET_VIEWER_UTIL_H
+#define __WIDGET_VIEWER_UTIL_H
+
+extern int util_screen_size_get(int *w, int *h);
+extern int util_replace_native_surface(struct widget *handle, int gbar, Evas_Object *content, unsigned int pixmap);
+extern int util_set_native_surface(struct widget *handle, int gbar, Evas_Object *content, unsigned int pixmap);
+extern unsigned int util_get_resource_id_of_native_surface(Evas_Native_Surface *surface);
+extern void *util_display_get(void);
+
+#endif
+
+/* End of a file */
diff --git a/widget_viewer_evas/src/util_wayland.c b/widget_viewer_evas/src/util_wayland.c
new file mode 100644 (file)
index 0000000..4ad38d0
--- /dev/null
@@ -0,0 +1,35 @@
+#include <stdio.h>
+#include <Evas.h>
+
+#include <widget_errno.h>
+#include <widget_viewer.h>
+
+int util_screen_size_get(int *x, int *y)
+{
+       *x = 0;
+       *y = 0;
+
+       return 0;
+}
+
+int util_replace_native_surface(struct widget *handle, int gbar, Evas_Object *content, unsigned int pixmap)
+{
+       return 0;
+}
+
+int util_set_native_surface(struct widget *handle, int gbar, Evas_Object *content, unsigned int pixmap)
+{
+       return 1;
+}
+
+unsigned int util_get_resource_id_of_native_surface(Evas_Native_Surface *surface)
+{
+       return 0u;
+}
+
+void *util_display_get(void)
+{
+       return NULL;
+}
+
+/* End of a file */
diff --git a/widget_viewer_evas/src/util_x11.c b/widget_viewer_evas/src/util_x11.c
new file mode 100644 (file)
index 0000000..0ed3f25
--- /dev/null
@@ -0,0 +1,107 @@
+#include <stdio.h>
+#include <Evas.h>
+
+#include <Ecore_X.h>
+#include <widget_errno.h>
+#include <widget_viewer.h>
+
+int util_screen_size_get(int *w, int *h)
+{
+       int _w;
+       int _h;
+
+       if (!w) {
+               w = &_w;
+       }
+
+       if (!h) {
+               h = &_h;
+       }
+
+       ecore_x_window_size_get(0, w, h);
+       return 0;
+}
+
+int util_replace_native_surface(struct widget *handle, int gbar, Evas_Object *content, unsigned int pixmap)
+{
+       Evas_Native_Surface *old_surface;
+       Evas_Native_Surface surface;
+
+       surface.version = EVAS_NATIVE_SURFACE_VERSION;
+       surface.type = EVAS_NATIVE_SURFACE_X11;
+       surface.data.x11.pixmap = pixmap;
+
+       old_surface = evas_object_image_native_surface_get(content);
+       if (!old_surface) {
+               surface.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get());
+
+               evas_object_image_native_surface_set(content, &surface);
+
+               DbgPrint("Created: %u\n", surface.data.x11.pixmap);
+       } else {
+               unsigned int old_pixmap;
+
+               old_pixmap = old_surface->data.x11.pixmap;
+
+               if (old_pixmap != pixmap) {
+                       surface.data.x11.visual = old_surface->data.x11.visual;
+                       evas_object_image_native_surface_set(content, &surface);
+
+                       if (old_pixmap && handle) {
+                               if (!s_info.conf.field.skip_acquire) {
+                                       widget_viewer_release_resource_id(handle, gbar, old_pixmap);
+                               }
+                       }
+
+                       DbgPrint("Replaced: %u (%u)\n", pixmap, old_pixmap);
+               } else {
+                       DbgPrint("Same resource, reuse it [%u]\n", pixmap);
+               }
+       }
+}
+
+int util_set_native_surface(struct widget *handle, int gbar, Evas_Object *content, unsigned int pixmap)
+{
+       Evas_Native_Surface *old_surface;
+       Evas_Native_Surface surface;
+       int is_first = 0;
+
+       surface.version = EVAS_NATIVE_SURFACE_VERSION;
+       surface.type = EVAS_NATIVE_SURFACE_X11;
+       surface.data.x11.pixmap = (unsigned int)pixmap;
+
+       old_surface = evas_object_image_native_surface_get(content);
+       if (!old_surface) {
+               surface.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get());
+               evas_object_image_native_surface_set(acquire_data->content, &surface);
+
+               is_first = 1;
+       } else {
+               unsigned int old_pixmap = 0u;
+               old_pixmap = old_surface->data.x11.pixmap;
+               surface.data.x11.visual = old_surface->data.x11.visual;
+               evas_object_image_native_surface_set(acquire_data->content, &surface);
+
+               if (old_pixmap) {
+                       if (!s_info.conf.field.skip_acquire) {
+                               widget_viewer_release_resource_id(data->handle, gbar, old_pixmap);
+                       }
+               }
+
+               is_first = 0;
+       }
+
+       return is_first;
+}
+
+unsigned int util_get_resource_id_of_native_surface(Evas_Native_Surface *surface)
+{
+       return surface ? surface->data.x11.pixmap : 0u;
+}
+
+void *util_display_get(void)
+{
+       return ecore_x_display_get();
+}
+
+/* End of a file */
index 0951d4b..5feb92e 100644 (file)
 
 #include <Elementary.h>
 #include <Ecore.h>
-#include <Ecore_X.h>
 #include <Ecore_Evas.h>
 #include <Evas.h>
 #include <Edje.h>
 
+#include <widget_errno.h>
 #include <widget_viewer.h>
 #include <widget_viewer_internal.h>
-#include <widget_viewer.h>
-#include <widget_errno.h>
 #include <widget_conf.h>
 
+#include "util.h"
 
 #if defined(LOG_TAG)
 #undef LOG_TAG
@@ -1228,7 +1227,7 @@ static void __widget_destroy_gbar_cb(struct widget *handle, int ret, void *cbdat
                                        break;
                                }
 
-                               pixmap = surface->data.x11.pixmap;
+                               pixmap = util_get_resource_id_of_native_surface(surface);
                                evas_object_del(gbar_content);
 
                                if (!s_info.conf.field.skip_acquire) {
@@ -3462,7 +3461,7 @@ static void update_visibility(struct widget_data *data)
                        } else {
                                data->view_port.x = 0;
                                data->view_port.y = 0;
-                               ecore_x_window_size_get(0, &data->view_port.w, &data->view_port.h);
+                               util_screen_size_get(&data->view_port.w, &data->view_port.h);
                                ErrPrint("Failed to get view port info (Fallback: %dx%d - %dx%d\n",
                                                data->view_port.x, data->view_port.y, data->view_port.w, data->view_port.h);
                        }
@@ -4146,40 +4145,7 @@ static void acquire_gbar_extra_resource_cb(struct widget *handle, int pixmap, vo
 
 static void replace_pixmap(struct widget *handle, int gbar, Evas_Object *content, unsigned int pixmap)
 {
-       Evas_Native_Surface *old_surface;
-       Evas_Native_Surface surface;
-
-       surface.version = EVAS_NATIVE_SURFACE_VERSION;
-       surface.type = EVAS_NATIVE_SURFACE_X11;
-       surface.data.x11.pixmap = pixmap;
-
-       old_surface = evas_object_image_native_surface_get(content);
-       if (!old_surface) {
-               surface.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get());
-
-               evas_object_image_native_surface_set(content, &surface);
-
-               DbgPrint("Created: %u\n", surface.data.x11.pixmap);
-       } else {
-               unsigned int old_pixmap;
-
-               old_pixmap = old_surface->data.x11.pixmap;
-
-               if (old_pixmap != pixmap) {
-                       surface.data.x11.visual = old_surface->data.x11.visual;
-                       evas_object_image_native_surface_set(content, &surface);
-
-                       if (old_pixmap && handle) {
-                               if (!s_info.conf.field.skip_acquire) {
-                                       widget_viewer_release_resource_id(handle, gbar, old_pixmap);
-                               }
-                       }
-
-                       DbgPrint("Replaced: %u (%u)\n", pixmap, old_pixmap);
-               } else {
-                       DbgPrint("Same resource, reuse it [%u]\n", pixmap);
-               }
-       }
+       util_replace_native_surface(handle, gbar, content, pixmap);
 }
 
 static void acquire_widget_pixmap_cb(struct widget *handle, int pixmap, void *cbdata)
@@ -5293,8 +5259,6 @@ static void acquire_gbar_pixmap_cb(struct widget *handle, int pixmap, void *cbda
 {
        struct acquire_data *acquire_data = cbdata;
        struct widget_data *data = acquire_data->data;
-       Evas_Native_Surface *old_surface;
-       Evas_Native_Surface surface;
 
        data->is.field.gbar_pixmap_acquire_requested = 0;
 
@@ -5311,26 +5275,11 @@ static void acquire_gbar_pixmap_cb(struct widget *handle, int pixmap, void *cbda
        evas_object_image_size_set(acquire_data->content, acquire_data->w, acquire_data->h);
        evas_object_image_fill_set(acquire_data->content, 0, 0, acquire_data->w, acquire_data->h);
 
-       surface.version = EVAS_NATIVE_SURFACE_VERSION;
-       surface.type = EVAS_NATIVE_SURFACE_X11;
-       surface.data.x11.pixmap = (unsigned int)pixmap;
-
-       old_surface = evas_object_image_native_surface_get(acquire_data->content);
-       if (!old_surface) {
+       /**
+        * 1 means, First time.
+        */
+       if (util_set_native_surface(handle, 1, acquire_data->content, (unsigned int)pixmap) == 1) {
                gbar_overlay_disable(data);
-               surface.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get());
-               evas_object_image_native_surface_set(acquire_data->content, &surface);
-       } else {
-               unsigned int old_pixmap = 0u;
-               old_pixmap = old_surface->data.x11.pixmap;
-               surface.data.x11.visual = old_surface->data.x11.visual;
-               evas_object_image_native_surface_set(acquire_data->content, &surface);
-
-               if (old_pixmap) {
-                       if (!s_info.conf.field.skip_acquire) {
-                               widget_viewer_release_resource_id(data->handle, 1, old_pixmap);
-                       }
-               }
        }
 
        data->gbar_pixmap = (unsigned int)pixmap;
@@ -6084,11 +6033,11 @@ EAPI int widget_viewer_evas_init(Evas_Object *win)
                return WIDGET_ERROR_ALREADY_EXIST;
        }
 
-       ecore_x_window_size_get(0, &s_info.screen_width, &s_info.screen_height);
+       util_screen_size_get(&s_info.screen_width, &s_info.screen_height);
 
        s_info.conf.field.render_animator = 0;  // By default, use render animator for updating
 
-       ret = widget_viewer_init(ecore_x_display_get(), 1, 0.001f, 1);
+       ret = widget_viewer_init(util_display_get(), 1, 0.001f, 1);
        if (ret < 0) {
                return ret;
        }
@@ -6520,6 +6469,7 @@ EAPI void widget_viewer_evas_cancel_click_event(Evas_Object *widget)
        }
 }
 
+#if defined(ELM_ACCESS_ENABLED)
 static void access_ret_cb(struct widget *handle, int ret, void *data)
 {
        struct access_ret_cb_data *cb_data = data;
@@ -6551,6 +6501,7 @@ static void access_ret_cb(struct widget *handle, int ret, void *data)
 
        free(cb_data);
 }
+#endif
 
 EAPI int widget_viewer_evas_feed_mouse_up_event(Evas_Object *widget)
 {
@@ -6570,6 +6521,7 @@ EAPI int widget_viewer_evas_feed_mouse_up_event(Evas_Object *widget)
 
 EAPI int widget_viewer_evas_feed_access_event(Evas_Object *widget, int type, void *_info, void (*ret_cb)(Evas_Object *obj, int ret, void *data), void *cbdata)
 {
+#if defined(ELM_ACCESS_ENABLED)
        struct widget_data *data;
        Elm_Access_Action_Info *info = _info;
        int w;
@@ -6860,6 +6812,9 @@ EAPI int widget_viewer_evas_feed_access_event(Evas_Object *widget, int type, voi
        }
 
        return ret;
+#else
+       return WIDGET_ERROR_NOT_SUPPORTED;
+#endif
 }
 
 EAPI void widget_viewer_evas_disable_preview(Evas_Object *widget)