Name: libmm-display
Summary: Multimedia framework display library
-Version: 0.0.9
+Version: 0.0.10
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
int mm_display_init(mm_display_h *handle);
int mm_display_deinit(mm_display_h handle);
+
+/* NOTE: This function should be called in main thread. */
int mm_display_set_display(mm_display_h handle, mm_display_type_e type, void *display, int *parent_id);
+/* NOTE: This function is allowed to call in sub thread, but main thread could be blocked until it's being called. */
+int mm_display_set_display_mainloop_sync(mm_display_h handle, mm_display_type_e type, void *display, int *parent_id);
+
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);
+
#ifdef TIZEN_FEATURE_EVAS_RENDERER
int mm_display_evas_set_rotation(mm_display_h handle, int rotation);
int mm_display_evas_get_rotation(mm_display_h handle, int *rotation);
int mm_display_interface_init(mm_display_interface_h *handle);
int mm_display_interface_deinit(mm_display_interface_h handle);
+
+/* NOTE: This function should be called in main thread. */
int mm_display_interface_set_display(mm_display_interface_h handle, mm_display_type_e type, void *display, int *parent_id);
+/* NOTE: This function is allowed to call in sub thread, but main thread could be blocked until it's being called. */
+int mm_display_interface_set_display_mainloop_sync(mm_display_interface_h handle, mm_display_type_e type, void *display, int *parent_id);
+
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_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 mm_display_interface_evas_set_visible(mm_display_interface_h handle, bool visible);
int (*init)(void **);
int (*deinit)(void *);
int (*set_display)(void *, mm_display_type_e, void *, int *);
+ 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 (*evas_set_rotation)(void *, int);
}
+int mm_display_set_display_mainloop_sync(mm_display_h handle, mm_display_type_e type, void *display, int *parent_id)
+{
+ int ret = MM_ERROR_NONE;
+
+ LOGD("enter - type %d", type);
+
+ if (ecore_thread_main_loop_begin() < 0) {
+ LOGE("ecore_thread_main_loop_begin failed");
+ return MM_ERROR_COMMON_INTERNAL;
+ }
+
+ ret = mm_display_set_display(handle, type, display, parent_id);
+
+ LOGI("ret 0x%x", ret);
+
+ if (ecore_thread_main_loop_end() < 0)
+ LOGE("ecore_thread_main_loop_end failed");
+
+ return ret;
+}
+
+
int mm_display_get_type(mm_display_h handle, mm_display_type_e *type)
{
mm_display_t *dp_handle = (mm_display_t *)handle;
sym_ret = g_module_symbol(module, "mm_display_init", (gpointer *)&new_interface->init);
sym_ret &= g_module_symbol(module, "mm_display_deinit", (gpointer *)&new_interface->deinit);
sym_ret &= g_module_symbol(module, "mm_display_set_display", (gpointer *)&new_interface->set_display);
+ 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);
#ifdef TIZEN_FEATURE_EVAS_RENDERER
}
+int mm_display_interface_set_display_mainloop_sync(mm_display_interface_h handle, mm_display_type_e type, void *display, int *parent_id)
+{
+ DECLARE_CHECK_INTERFACE_HANDLE(handle);
+
+ if (!interface->set_display_mainloop_sync) {
+ LOGE("NULL function pointer");
+ return MM_ERROR_UNKNOWN;
+ }
+
+ return interface->set_display_mainloop_sync(interface->dp_handle, type, display, parent_id);
+}
+
+
int mm_display_interface_get_type(mm_display_interface_h handle, mm_display_type_e *type)
{
DECLARE_CHECK_INTERFACE_HANDLE(handle);