AC_SUBST(ECORE_WL2_CFLAGS)
AC_SUBST(ECORE_WL2_LIBS)
+PKG_CHECK_MODULES(ELEMENTARY, elementary)
+AC_SUBST(ELEMENTARY_CFLAGS)
+AC_SUBST(ELEMENTARY_LIBS)
+
PKG_CHECK_MODULES(TIZEN_EXTENSION_CLIENT, tizen-extension-client)
AC_SUBST(TIZEN_EXTENSION_CLIENT_CFLAGS)
AC_SUBST(TIZEN_EXTENSION_CLIENT_LIBS)
Name: libmm-display
Summary: Multimedia framework display library
-Version: 0.0.13
+Version: 0.0.14
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
BuildRequires: pkgconfig(evas)
BuildRequires: pkgconfig(ecore-evas)
BuildRequires: pkgconfig(ecore-wl2)
+BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(tizen-extension-client)
BuildRequires: pkgconfig(mm-evas-renderer)
%if "%{gtests}" == "1"
int mm_display_get_type(mm_display_h handle, mm_display_type_e *type);
int mm_display_get_window_rect(mm_display_h handle, MMRectType *window_rect);
+int mm_display_get_screen_size(int *width, int *height);
#ifdef TIZEN_FEATURE_EVAS_RENDERER
int mm_display_evas_set_rotation(mm_display_h handle, int rotation);
int mm_display_interface_get_type(mm_display_interface_h handle, mm_display_type_e *type);
int mm_display_interface_get_window_rect(mm_display_interface_h handle, MMRectType *window_rect);
+int mm_display_interface_get_screen_size(mm_display_interface_h handle, int *width, int *height);
int mm_display_interface_evas_set_rotation(mm_display_interface_h handle, int rotation);
int mm_display_interface_evas_get_rotation(mm_display_interface_h handle, int *rotation);
int (*set_display_mainloop_sync)(void *, mm_display_type_e, void *, int *);
int (*get_type)(void *, mm_display_type_e *);
int (*get_window_rect)(void *, MMRectType *);
+ int (*get_screen_size)(int *, int *);
int (*evas_set_rotation)(void *, int);
int (*evas_get_rotation)(void *, int *);
int (*evas_set_visible)(void *, bool);
#include <Ecore_Evas.h>
#include <Ecore_Wl2.h>
#include <tizen-extension-client-protocol.h>
+#include <Elementary.h>
#ifdef TIZEN_FEATURE_EVAS_RENDERER
#include <mm_evas_renderer.h>
#endif /* TIZEN_FEATURE_EVAS_RENDERER */
return MM_ERROR_NONE;
}
+int mm_display_get_screen_size(int *width, int *height)
+{
+ Evas_Object *eo;
+
+ if (!width || !height) {
+ LOGE("invalid argument, width[%p] height[%p]", width, height);
+ return MM_ERROR_INVALID_ARGUMENT;
+ }
+
+ /* This function returns the resolution when the device rotation angle is "0" regardless of the actual rotation direction of the device. */
+ eo = elm_win_add(NULL, "get_screen_size", ELM_WIN_BASIC);
+ if (!eo) {
+ LOGE("failed to elm_win_add()");
+ return MM_ERROR_COMMON_INTERNAL; /* FIXME: this could be changed to another one after making MM_ERROR_DISPLAY_CLASS */
+ }
+
+ elm_win_screen_size_get(eo, NULL, NULL, width, height);
+ LOGD("screen size: %d x %d", *width, *height);
+
+ return MM_ERROR_NONE;
+}
#ifdef TIZEN_FEATURE_EVAS_RENDERER
int mm_display_evas_set_rotation(mm_display_h handle, int rotation)
sym_ret &= g_module_symbol(module, "mm_display_set_display_mainloop_sync", (gpointer *)&new_interface->set_display_mainloop_sync);
sym_ret &= g_module_symbol(module, "mm_display_get_type", (gpointer *)&new_interface->get_type);
sym_ret &= g_module_symbol(module, "mm_display_get_window_rect", (gpointer *)&new_interface->get_window_rect);
+ sym_ret &= g_module_symbol(module, "mm_display_get_screen_size", (gpointer *)&new_interface->get_screen_size);
#ifdef TIZEN_FEATURE_EVAS_RENDERER
sym_ret &= g_module_symbol(module, "mm_display_evas_set_rotation", (gpointer *)&new_interface->evas_set_rotation);
sym_ret &= g_module_symbol(module, "mm_display_evas_get_rotation", (gpointer *)&new_interface->evas_get_rotation);
return interface->get_window_rect(interface->dp_handle, window_rect);
}
+int mm_display_interface_get_screen_size(mm_display_interface_h handle, int *width, int *height)
+{
+ DECLARE_CHECK_INTERFACE_HANDLE(handle);
+
+ if (!interface->get_screen_size) {
+ LOGE("NULL function pointer");
+ return MM_ERROR_UNKNOWN;
+ }
+
+ return interface->get_screen_size(width, height);
+}
int mm_display_interface_evas_set_rotation(mm_display_interface_h handle, int rotation)
{