watcher_h->missing_cb(trs, watcher_h->data);
}
-#if 0
static void __buffer_changed(void *data, struct tizen_remote_surface *trs, uint32_t type, struct wl_buffer *tbm,
int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct wl_array *keys)
{
__buffer_missing,
__buffer_changed,
};
-#else
-static const struct tizen_remote_surface_listener __rs_listener = {
- __buffer_updated,
- __buffer_missing,
-};
-#endif
static void __app_removed(const char *appid, const int pid, void *data)
{
}
/* check type of given buffer */
- if (type == 0) {
+ if (type == TIZEN_REMOTE_SURFACE_BUFFER_TYPE_TBM) {
/* get tbm surface from buffer */
tbm_surface = wl_buffer_get_user_data(tbm);
width = tbm_surface_get_width(tbm_surface);
evas_object_image_size_set(watcher_evas_h->img_tbm, width, height);
evas_object_image_native_surface_set(watcher_evas_h->img_tbm, &ns); /* set native surface */
evas_object_image_pixels_dirty_set(watcher_evas_h->img_tbm, EINA_TRUE); /* set dirty for image updating */
- } else if (type == 1) {
+ } else if (type == TIZEN_REMOTE_SURFACE_BUFFER_TYPE_IMAGE_FILE) {
if (!watcher_evas_h->img_file)
watcher_evas_h->img_file = evas_object_image_filled_add(evas_object_evas_get(__viewer_win));
static void __watcher_update_cb(struct tizen_remote_surface *trs, struct wl_buffer *buffer, uint32_t time, void *data)
{
- __watcher_change_cb(trs, 0, buffer, 0, 0, 0, NULL, data);
+ __watcher_change_cb(trs, TIZEN_REMOTE_SURFACE_BUFFER_TYPE_TBM, buffer, 0, 0, 0, NULL, data);
}
static void __free_watcher_evas_h(screen_connector_watcher_evas_h watcher_evas_h)