DALI_TYPE_REGISTRATION_END()
-static void OnSurfaceUpdate( struct tizen_remote_surface* surface, wl_buffer* buffer, uint32_t time, void* data )
+static void OnBufferUpdate( struct tizen_remote_surface* surface, wl_buffer* buffer, uint32_t time, void* data )
{
Dali::WidgetView::Internal::WidgetView* widgetView = static_cast< Dali::WidgetView::Internal::WidgetView* >( data );
static void OnSurfaceMissing( struct tizen_remote_surface* surface, void* data )
{
- //ToDo: WidgetDeletedSignal
+ Dali::WidgetView::Internal::WidgetView* widgetView = static_cast< Dali::WidgetView::Internal::WidgetView* >( data );
+
+ if( widgetView )
+ {
+ widgetView->CloseRemoteSurface();
+ }
}
static struct aul_rsm_handler_s remoteSurfaceHandler = {
- OnSurfaceUpdate,
+ OnBufferUpdate,
OnSurfaceMissing,
};
mInstanceId(),
mContentInfo(),
mTitle(),
- mBundle( NULL ),
mWidth( 0 ),
mHeight( 0 ),
mPid( 0 ),
mUpdatePeriod( 0.0 ),
mPreviewVisible( true ),
mStateTextVisible( true ),
- mPermanentDelete( true ),
+ mPermanentDelete( false ),
mRemoteSurface( NULL )
{
}
mInstanceId(),
mContentInfo( contentInfo ),
mTitle(),
- mBundle( NULL ),
mWidth( width ),
mHeight( height ),
mPid( 0 ),
mUpdatePeriod( updatePeriod ),
mPreviewVisible( true ),
mStateTextVisible( true ),
- mPermanentDelete( true ),
+ mPermanentDelete( false ),
mRemoteSurface( NULL )
{
}
widget_instance_destroy( mInstanceId.c_str() );
}
}
-
- if( mBundle )
- {
- bundle_free( mBundle );
- }
}
bool WidgetView::PauseWidget()
void WidgetView::ConnectSignal( tizen_remote_surface* surface )
{
- if( mWidgetImageView )
+ if( mWidgetImageView && surface )
{
mRemoteSurface = surface;
{
tizen_remote_surface_event_type type = TIZEN_REMOTE_SURFACE_EVENT_TYPE_NONE;
- if( event.GetPointCount() == 0 )
+ if( event.GetPointCount() == 0 || mRemoteSurface == NULL )
{
return false;
}
bool WidgetView::OnWheelEvent( Dali::Actor actor, const Dali::WheelEvent& event )
{
+ if( mRemoteSurface == NULL )
+ {
+ return false;
+ }
//ToDo: We should check TIZEN_INPUT_DEVICE_CLAS_MOUSE
tizen_remote_surface_transfer_mouse_wheel( mRemoteSurface,
event.direction,
}
}
+void WidgetView::CloseRemoteSurface()
+{
+ aul_rsm_viewer_unset_surface_handler( mInstanceId.c_str() );
+ mRemoteSurface = NULL;
+}
+
} // namespace Internal
} // namespace WidgetView