int screen_connector_toolkit_evas_fini(screen_connector_screen_type_e type);
screen_connector_toolkit_evas_h screen_connector_toolkit_evas_add(screen_connector_toolkit_evas_ops *ops, char *id,
screen_connector_screen_type_e type, void *data);
+int screen_connector_toolkit_evas_set_delayed_resuming_time(int ms);
int screen_connector_toolkit_evas_remove(screen_connector_toolkit_evas_h handle);
int screen_connector_toolkit_evas_update(const char *appid, const char *instance_id);
int screen_connector_toolkit_evas_start_visibility_notify(void);
uint32_t img_type;
struct wl_buffer *pre_buffer;
struct _screen_connector_type_evas_h *type_h;
+ guint resuming_timer;
void *data;
};
static GHashTable *__type_table = NULL;
static Ecore_Event_Handler *__visibility_listener;
+static int __delayed_resuming_time;
static void __destroy_type_h(gpointer data)
{
if (toolkit_evas_h->ops)
free(toolkit_evas_h->ops);
+ if (toolkit_evas_h->resuming_timer > 0)
+ g_source_remove(toolkit_evas_h->resuming_timer);
+
free(toolkit_evas_h);
}
__type_table = NULL;
}
+ __delayed_resuming_time = 0;
+
return screen_connector_toolkit_fini(type);
}
return false;
}
+static gboolean __resuming_timeout_cb(gpointer user_data)
+{
+ screen_connector_toolkit_evas_h toolkit_evas_h = user_data;
+ struct tizen_remote_surface *surface;
+
+ surface = screen_connector_toolkit_get_trs(toolkit_evas_h->toolkit_h);
+ if (surface) {
+ tizen_remote_surface_transfer_visibility(surface,
+ TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_VISIBLE);
+ }
+
+ toolkit_evas_h->resuming_timer = 0;
+
+ return G_SOURCE_REMOVE;
+}
+
static int __set_visibility(screen_connector_toolkit_evas_h toolkit_evas_h, visibility_type type)
{
int obscured;
}
surface = screen_connector_toolkit_get_trs(toolkit_evas_h->toolkit_h);
- if (surface)
+ if (!surface)
+ return -1;
+
+ if (__delayed_resuming_time == 0) {
tizen_remote_surface_transfer_visibility(surface, obscured);
+ return 0;
+ }
+
+ if (obscured == TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_INVISIBLE) {
+ if (toolkit_evas_h->resuming_timer > 0) {
+ g_source_remove(toolkit_evas_h->resuming_timer);
+ toolkit_evas_h->resuming_timer = 0;
+ }
+ tizen_remote_surface_transfer_visibility(surface, obscured);
+ } else {
+ if (toolkit_evas_h->resuming_timer == 0) {
+ toolkit_evas_h->resuming_timer = g_timeout_add(__delayed_resuming_time,
+ __resuming_timeout_cb, toolkit_evas_h);
+ }
+ }
+
return 0;
}
g_hash_table_remove(toolkit_evas_h->type_h->toolkit_table, instance_id);
}
+EXPORT_API int screen_connector_toolkit_evas_set_delayed_resuming_time(int ms)
+{
+ __delayed_resuming_time = ms;
+
+ return 0;
+}
+
EXPORT_API screen_connector_toolkit_evas_h screen_connector_toolkit_evas_add_with_win(screen_connector_toolkit_evas_ops *ops, char *id,
screen_connector_screen_type_e type, Evas_Object *win, void *data)
{