ecore_main_loop_quit();
}
+#if defined(OS_TIZEN_TV_PRODUCT)
+static void _create_mouse_cursor(Evas_Object* window) {
+#if TIZEN_VERSION_AT_LEAST(5, 0, 0)
+ Ecore_Wl2_Display* wl2_display = ecore_wl2_connected_display_get(NULL);
+ struct wl_display* display = ecore_wl2_display_get(wl2_display);
+ Eina_Iterator* globals = ecore_wl2_display_globals_get(wl2_display);
+ struct wl_registry* registry = ecore_wl2_display_registry_get(wl2_display);
+ struct wl_seat* seat =
+ ecore_wl2_input_seat_get(ecore_wl2_input_default_input_get(wl2_display));
+
+ Ecore_Wl2_Global* global;
+ EINA_ITERATOR_FOREACH(globals, global) {
+ if (!strcmp(global->interface, "tizen_cursor"))
+ if (!CursorModule_Initialize(display, registry, seat, global->id))
+ fprintf(stderr, "CursorModule_Initialize() Failed!\n");
+ }
+ eina_iterator_free(globals);
+
+ struct wl_surface* const surface =
+ ecore_wl2_window_surface_get(ecore_evas_wayland2_window_get(
+ ecore_evas_ecore_evas_get(evas_object_evas_get(window))));
+ ecore_wl2_sync();
+
+ if (!Cursor_Set_Config(surface, TIZEN_CURSOR_CONFIG_CURSOR_AVAILABLE, NULL))
+ fprintf(stderr, "Cursor_Set_Config() Failed!\n");
+ CursorModule_Finalize();
+#else
+ const char* t_cursor = "tizen_cursor";
+ Ecore_Wl_Global* global_data = NULL;
+ unsigned int cursormgr_id = 0;
+
+ EINA_INLIST_FOREACH(ecore_wl_globals_get(), global_data) {
+ if (0 == strncmp(global_data->interface, t_cursor, strlen(t_cursor))) {
+ cursormgr_id = global_data->id; // to get the id of cursormgr object
+ break;
+ }
+ }
+
+ struct wl_surface* const surface =
+ ecore_wl_window_surface_get(elm_win_wl_window_get(window));
+ ecore_wl_sync();
+
+ const int ret_cursormod = CursorModule_Initialize(
+ ecore_wl_display_get(), ecore_wl_registry_get(),
+ ecore_wl_input_seat_get(ecore_wl_input_get()), cursormgr_id);
+ if (ret_cursormod) {
+ Cursor_Set_Config(surface, TIZEN_CURSOR_CONFIG_CURSOR_AVAILABLE, NULL);
+ }
+ CursorModule_Finalize();
+#endif // TIZEN_VERSION_AT_LEAST(5, 0, 0)
+}
+#endif
+
int main(int argc, char** argv)
{
// Make sure this happens just once.
eina_strbuf_free(full_url);
}
+#if defined(OS_TIZEN_TV_PRODUCT)
+static void _create_mouse_cursor(Evas_Object* window) {
+#if TIZEN_VERSION_AT_LEAST(5, 0, 0)
+ Ecore_Wl2_Display* wl2_display = ecore_wl2_connected_display_get(NULL);
+ struct wl_display* display = ecore_wl2_display_get(wl2_display);
+ Eina_Iterator* globals = ecore_wl2_display_globals_get(wl2_display);
+ struct wl_registry* registry = ecore_wl2_display_registry_get(wl2_display);
+ struct wl_seat* seat =
+ ecore_wl2_input_seat_get(ecore_wl2_input_default_input_get(wl2_display));
+
+ Ecore_Wl2_Global* global;
+ EINA_ITERATOR_FOREACH(globals, global) {
+ if (!strcmp(global->interface, "tizen_cursor"))
+ if (!CursorModule_Initialize(display, registry, seat, global->id))
+ LOGE("CursorModule_Initialize() Failed!\n");
+ }
+ eina_iterator_free(globals);
+
+ struct wl_surface* const surface =
+ ecore_wl2_window_surface_get(ecore_evas_wayland2_window_get(
+ ecore_evas_ecore_evas_get(evas_object_evas_get(window))));
+ ecore_wl2_sync();
+
+ if (!Cursor_Set_Config(surface, TIZEN_CURSOR_CONFIG_CURSOR_AVAILABLE, NULL))
+ LOGE("Cursor_Set_Config() Failed!\n");
+ CursorModule_Finalize();
+#else
+ const char* t_cursor = "tizen_cursor";
+ unsigned int cursormgr_id = 0;
+ Ecore_Wl_Global* global_data = NULL;
+
+ EINA_INLIST_FOREACH(ecore_wl_globals_get(), global_data) {
+ if (0 == strncmp(global_data->interface, t_cursor, strlen(t_cursor))) {
+ cursormgr_id = global_data->id; // to get the id of cursormgr object
+ break;
+ }
+ }
+
+ struct wl_surface* const surface =
+ ecore_wl_window_surface_get(elm_win_wl_window_get(window));
+ ecore_wl_sync();
+
+ const int ret_cursormod = CursorModule_Initialize(
+ ecore_wl_display_get(), ecore_wl_registry_get(),
+ ecore_wl_input_seat_get(ecore_wl_input_get()), cursormgr_id);
+ if (ret_cursormod) {
+ Cursor_Set_Config(surface, TIZEN_CURSOR_CONFIG_CURSOR_AVAILABLE, NULL);
+ }
+ CursorModule_Finalize();
+#endif
+}
+#endif
+
static Evas_Object* _create_main_window(void *data)
{
Evas_Object *window = elm_win_add(NULL, "ChromiumEfl", ELM_WIN_BASIC);
thiz->is_fullscreen_ = false;
}
+#if defined(OS_TIZEN_TV_PRODUCT)
+void Window::CreateMouseCursor() {
+ log_trace("%s", __PRETTY_FUNCTION__);
+#if TIZEN_VERSION_AT_LEAST(5, 0, 0)
+ Ecore_Wl2_Display* wl2_display = ecore_wl2_connected_display_get(NULL);
+ struct wl_display* display = ecore_wl2_display_get(wl2_display);
+ Eina_Iterator* globals = ecore_wl2_display_globals_get(wl2_display);
+ struct wl_registry* registry = ecore_wl2_display_registry_get(wl2_display);
+ struct wl_seat* seat =
+ ecore_wl2_input_seat_get(ecore_wl2_input_default_input_get(wl2_display));
+
+ Ecore_Wl2_Global* global;
+ EINA_ITERATOR_FOREACH(globals, global) {
+ if (!strcmp(global->interface, "tizen_cursor"))
+ if (!CursorModule_Initialize(display, registry, seat, global->id))
+ log_error("CursorModule_Initialize() Failed!\n");
+ }
+ eina_iterator_free(globals);
+
+ struct wl_surface* const surface =
+ ecore_wl2_window_surface_get(ecore_evas_wayland2_window_get(
+ ecore_evas_ecore_evas_get(evas_object_evas_get(window_))));
+ ecore_wl2_sync();
+
+ if (!Cursor_Set_Config(surface, TIZEN_CURSOR_CONFIG_CURSOR_AVAILABLE, NULL))
+ log_error("Cursor_Set_Config() Failed!\n");
+ CursorModule_Finalize();
+#else
+ Ecore_Wl_Global* global_data = NULL;
+ unsigned int cursormgr_id = 0;
+
+ EINA_INLIST_FOREACH(ecore_wl_globals_get(), global_data) {
+ if (0 == strcmp(global_data->interface, "tizen_cursor")) {
+ cursormgr_id = global_data->id; // to get the id of cursormgr object
+ break;
+ }
+ }
+
+ wl_surface* surface =
+ ecore_wl_window_surface_get(elm_win_wl_window_get(window_));
+ ecore_wl_sync();
+
+ int ret_cursormod = CursorModule_Initialize(
+ ecore_wl_display_get(), ecore_wl_registry_get(),
+ ecore_wl_input_seat_get(ecore_wl_input_get()), cursormgr_id);
+ if (ret_cursormod) {
+ Cursor_Set_Config(surface, TIZEN_CURSOR_CONFIG_CURSOR_AVAILABLE, NULL);
+ }
+ CursorModule_Finalize();
+#endif // TIZEN_VERSION_AT_LEAST(5, 0, 0)
+}
+#endif
+
void Window::OnUserMediaPermissionRequest(void* data, Evas_Object*,
void* event_info) {
log_trace("%s", __PRETTY_FUNCTION__);