struct wl_buffer* preBuffer;
-static void OnBufferChanged( struct tizen_remote_surface *surface, uint32_t type, struct wl_buffer *buffer,
- int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct wl_array *keys, void *data)
+static void OnBufferUpdated( struct tizen_remote_surface *surface, uint32_t type, struct wl_buffer *buffer,
+ int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct wl_array *keys,
+ const char *appid, const char *instance_id, const int pid, void *data)
{
Dali::WidgetView::Internal::WidgetView* widgetView = static_cast< Dali::WidgetView::Internal::WidgetView* >( data );
close( img_file_fd );
}
-static void OnBufferUpdated( struct tizen_remote_surface* surface, wl_buffer* buffer, uint32_t time, void* data )
+static void OnBufferAdded( const char *appid, const char *instance_id, const int pid, void *data )
{
- Dali::WidgetView::Internal::WidgetView* widgetView = static_cast< Dali::WidgetView::Internal::WidgetView* >( data );
-
- if( widgetView )
- {
- if( !widgetView->IsWidgetImageView() )
- {
- tizen_remote_surface_transfer_visibility( surface, TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_VISIBLE);
-
- widgetView->CreateWidgetImageView();
- widgetView->ConnectSignal( surface );
- }
-
- //get tbm surface from buffer
- tbm_surface_h tbmSurface = static_cast< tbm_surface_h >( wl_buffer_get_user_data( buffer ) );
- widgetView->UpdateImageSource( tbmSurface );
- }
-
- if( preBuffer != NULL && tizen_remote_surface_get_version( surface ) >= TIZEN_REMOTE_SURFACE_RELEASE_SINCE_VERSION )
- {
- tizen_remote_surface_release( surface, preBuffer );
- }
-
- preBuffer = buffer;
}
-static void OnSurfaceMissing( struct tizen_remote_surface* surface, void* data )
+static void OnSurfaceRemoved( const char *appid, const char *instance_id, const int pid, void *data )
{
Dali::WidgetView::Internal::WidgetView* widgetView = static_cast< Dali::WidgetView::Internal::WidgetView* >( data );
char* previewPath = NULL;
std::string previewImage;
widget_size_type_e sizeType;
- screen_connector_watcher_ops ops;
+ screen_connector_toolkit_ops ops;
int ret = widget_instance_create( mWidgetId.c_str(), &instanceId );
if( ret < 0 || !instanceId )
return;
}
- ops.change_cb = OnBufferChanged;
- ops.missing_cb = OnSurfaceMissing;
- ops.update_cb = OnBufferUpdated;
- mWatcherHandle = screen_connector_watcher_add(&ops, (char *)mWidgetId.c_str(), this);
+ ops.updated_cb = OnBufferUpdated;
+ ops.removed_cb = OnSurfaceRemoved;
+ ops.added_cb = OnBufferAdded;
+ mWatcherHandle = screen_connector_toolkit_add(&ops, (char *)instanceId, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, this);
DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_launch is called. [%s, mPid = %d]\n", mWidgetId.c_str(), mPid );
}
void WidgetView::CloseRemoteSurface()
{
- screen_connector_watcher_remove( mWatcherHandle );
+ screen_connector_toolkit_remove( mWatcherHandle );
mRemoteSurface = NULL;
}