Ecore_Wl2_Input* ecoreWlInput = NULL;
Ecore_Wl2_Display *wl2_display = ecore_wl2_connected_display_get(NULL);
+ if( !wl2_display )
+ {
+ DALI_LOG_ERROR( "Failed to get Ecore_Wl2_Display in WidgetView\n" );
+ return false;
+ }
+
ecoreWlInput = ecore_wl2_input_default_input_get(wl2_display);
if( !ecoreWlInput )
{
mTitle(),
mWidth( 0 ),
mHeight( 0 ),
- mPid( 0 ),
+ mPid( -1 ),
mUpdatePeriod( 0.0 ),
- mPreviewVisible( true ),
- mLoadingTextVisible( true ),
mLoadingTextString(),
- mRetryTextVisible( true ),
mRetryTextString(),
mRetryState( false ),
mPermanentDelete( false ),
mTitle(),
mWidth( width ),
mHeight( height ),
- mPid( 0 ),
+ mPid( -1 ),
mUpdatePeriod( updatePeriod ),
- mPreviewVisible( true ),
- mLoadingTextVisible( true ),
mLoadingTextString(),
- mRetryTextVisible( true ),
mRetryTextString(),
mRetryState( false ),
mPermanentDelete( false ),
{
tizen_remote_surface_transfer_visibility( mRemoteSurface, TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_INVISIBLE);
}
+ else
+ {
+ DALI_LOG_ERROR("WidgetView::PauseWidget: RemoteSurface is NULL (%s, %s) [%d]\n", mWidgetId.c_str(), mInstanceId.c_str(), ret );
+ return false;
+ }
DALI_LOG_RELEASE_INFO("WidgetView::PauseWidget: Widget is paused (%s, %s)\n", mWidgetId.c_str(), mInstanceId.c_str() );
{
tizen_remote_surface_transfer_visibility( mRemoteSurface, TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_VISIBLE);
}
+ else
+ {
+ DALI_LOG_ERROR("WidgetView::ResumeWidget: RemoteSurface is NULL (%s, %s) [%d]\n", mWidgetId.c_str(), mInstanceId.c_str(), ret );
+ return false;
+ }
DALI_LOG_RELEASE_INFO("WidgetView::ResumeWidget: Widget is resumed (%s, %s)\n", mWidgetId.c_str(), mInstanceId.c_str() );
if( mWidgetId.empty() || mInstanceId.empty() )
{
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::GetContentInfo: Widget id (%s) or instance id (%s) is invalid.\n", mWidgetId.c_str(), mInstanceId.c_str() );
+ DALI_LOG_ERROR("WidgetView::GetContentInfo: Widget id (%s) or instance id (%s) is invalid.\n", mWidgetId.c_str(), mInstanceId.c_str() );
return mContentInfo;
}
instance = widget_instance_get_instance( mWidgetId.c_str(), mInstanceId.c_str() );
if( !instance )
{
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::GetContentInfo: widget_instance_get_instance is failed. [%s]\n", mInstanceId.c_str() );
+ DALI_LOG_ERROR("WidgetView::GetContentInfo: widget_instance_get_instance is failed. [%s]\n", mInstanceId.c_str() );
return mContentInfo;
}
if( widget_instance_get_content( instance, &contentInfo ) < 0 )
{
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::GetContentInfo: Failed to get content of widget. [%s]\n", mInstanceId.c_str() );
+ DALI_LOG_ERROR("WidgetView::GetContentInfo: Failed to get content of widget. [%s]\n", mInstanceId.c_str() );
widget_instance_unref( instance );
return mContentInfo;
}
return true;
}
+ DALI_LOG_ERROR("WidgetView::CancelTouchEvent: RemoteSurface is NULL \n");
return false;
}
void WidgetView::SetPreviewVisible( bool visible )
{
- if( mPreviewImage && mPreviewVisible != visible )
+ if( mPreviewImage && IsPreviewVisible() != visible )
{
- mPreviewVisible = visible;
mPreviewImage.SetProperty( Actor::Property::VISIBLE, visible );
}
}
bool WidgetView::IsPreviewVisible()
{
- return mPreviewVisible;
+ return mPreviewImage.GetProperty<bool>( Actor::Property::VISIBLE );
}
void WidgetView::SetLoadingTextVisible( bool visible )
{
- if( mLoadingText && mLoadingTextVisible != visible )
+ if( mLoadingText && IsLoadingTextVisible() != visible )
{
- mLoadingTextVisible = visible;
-
if( visible )
{
mLoadingText.SetProperty( Toolkit::TextLabel::Property::TEXT,
}
}
+bool WidgetView::IsLoadingTextVisible()
+{
+ return mLoadingText.GetProperty<bool>( Actor::Property::VISIBLE );
+}
+
void WidgetView::SetRetryTextVisible( bool visible )
{
- if( mRetryText && mRetryTextVisible != visible )
+ if( mRetryText && IsRetryTextVisible() != visible )
{
- mRetryTextVisible = visible;
-
if( visible )
{
mRetryText.SetProperty( Toolkit::TextLabel::Property::TEXT,
}
}
-bool WidgetView::IsLoadingTextVisible()
-{
- return mLoadingTextVisible;
-}
-
bool WidgetView::IsRetryTextVisible()
{
- return mRetryTextVisible;
+ return mRetryText.GetProperty<bool>( Actor::Property::VISIBLE );
}
void WidgetView::ActivateFaultedWidget()
ShowRetryState( false );
ShowLoadingState( true );
- // launch widget again
- mPid = widget_instance_launch( mInstanceId.c_str(), (char *)mContentInfo.c_str(), mWidth, mHeight );
- if( mPid < 0)
- {
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::ActivateFaultedWidget: widget_instance_launch is failed. [%s]\n", mWidgetId.c_str() );
-
- ShowLoadingState( false );
- ShowRetryState( true );
-
- // Emit signal
- Dali::WidgetView::WidgetView handle( GetOwner() );
- mWidgetCreationAbortedSignal.Emit( handle );
-
- return;
- }
-
- screen_connector_toolkit_ops ops;
- ops.updated_cb = OnBufferUpdated;
- ops.removed_cb = OnSurfaceRemoved;
- ops.added_cb = OnBufferAdded;
- mWatcherHandle = screen_connector_toolkit_add(&ops, (char *)mInstanceId.c_str(), static_cast<screen_connector_screen_type_e>(static_cast<screen_connector_screen_type_e>(SCREEN_CONNECTOR_SCREEN_TYPE_WIDGET | SCREEN_CONNECTOR_SCREEN_TYPE_COMPONENT_BASED)), this);
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::ActivateFaultedWidget: widget_instance_launch is called. [%s, mPid = %d]\n", mWidgetId.c_str(), mPid );
+ // launch widget
+ LaunchWidget();
}
}
}
bool WidgetView::TerminateWidget()
+{
+ DALI_LOG_WARNING("TerminateWidget() will be depreceated. Please use RemoveWidget() in WidgetViewManager instead.\n");
+ return RemoveWidget();
+}
+
+bool WidgetView::RemoveWidget()
{
if( !mWidgetId.empty() && !mInstanceId.empty() )
{
int ret = 0;
- // Destroy widget instance because it will be not used anymore.
- ret = widget_instance_destroy( mInstanceId.c_str() );
- if( ret < 0 )
+ if( !mCreated )
+ {
+ // If it is not created, it skips creation.
+ ret = widget_instance_terminate_app( mInstanceId.c_str() );
+ if( ret < 0 )
+ {
+ DALI_LOG_ERROR("widget_instance_terminate_app() is failed. ret:%d, id:%s \n",ret, mInstanceId.c_str());
+ }
+ }
+ else
{
- DALI_LOG_ERROR("widget_instance_destroy() is failed. ret:%d, id:%s \n",ret, mInstanceId.c_str());
+ // Destroy widget instance because it will be not used anymore.
+ ret = widget_instance_destroy( mInstanceId.c_str() );
+ if( ret < 0 )
+ {
+ DALI_LOG_ERROR("widget_instance_destroy() is failed. ret:%d, id:%s \n",ret, mInstanceId.c_str());
+ }
}
+ // To do : These signals will be deleted after removing TerminateWidget()
Dali::WidgetView::WidgetView handle( GetOwner() );
mWidgetTerminatedSignal.Emit( handle );
mWidgetDeletedSignal.Emit( handle );
}
case WIDGET_INSTANCE_EVENT_CREATE_ABORTED:
{
+ // Set RetryState
+ DALI_LOG_ERROR("widget aborted. please re-run widget.");
+ ShowLoadingState( false );
+ ShowRetryState( true );
+ CloseRemoteSurface();
mWidgetCreationAbortedSignal.Emit( handle );
break;
}
char* previewPath = NULL;
std::string previewImage;
widget_size_type_e sizeType;
- screen_connector_toolkit_ops ops;
int ret = widget_instance_create( mWidgetId.c_str(), &instanceId );
if( ret < 0 || !instanceId )
{
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_create is failed [%s].\n", mWidgetId.c_str() );
+ DALI_LOG_ERROR("WidgetView::OnInitialize: widget_instance_create is failed [%s].\n", mWidgetId.c_str() );
return;
}
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_create is called. [widget id = %s, instance id = %s]\n",
+ DALI_LOG_RELEASE_INFO("WidgetView::OnInitialize: widget_instance_create is called. [widget id = %s, instance id = %s]\n",
mWidgetId.c_str(), instanceId );
mInstanceId = instanceId;
widget_instance_h instance = widget_instance_get_instance( mWidgetId.c_str(), mInstanceId.c_str() );
if( !instance )
{
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_get_instance is failed. [%s]\n", mInstanceId.c_str() );
+ DALI_LOG_ERROR("WidgetView::OnInitialize: widget_instance_get_instance is failed. [%s]\n", mInstanceId.c_str() );
return;
}
ret = widget_instance_set_period( instance, mUpdatePeriod );
widget_instance_unref(instance);
if( ret < 0 )
{
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_set_period is failed [%s].\n", mWidgetId.c_str() );
+ DALI_LOG_ERROR("WidgetView::OnInitialize: widget_instance_set_period is failed [%s].\n", mWidgetId.c_str() );
return;
}
}
mRetryText.SetProperty( Actor::Property::VISIBLE, false );
// launch widget
- mPid = widget_instance_launch( instanceId, (char *)mContentInfo.c_str(), mWidth, mHeight );
- if( mPid < 0)
- {
-
- ShowLoadingState( false );
- ShowRetryState( true );
-
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_launch is failed. [%s]\n", mWidgetId.c_str() );
-
- // Emit signal
- Dali::WidgetView::WidgetView handle( GetOwner() );
- mWidgetCreationAbortedSignal.Emit( handle );
-
- return;
- }
-
- ops.updated_cb = OnBufferUpdated;
- ops.removed_cb = OnSurfaceRemoved;
- ops.added_cb = OnBufferAdded;
- mWatcherHandle = screen_connector_toolkit_add(&ops, (char *)instanceId, static_cast<screen_connector_screen_type_e>(SCREEN_CONNECTOR_SCREEN_TYPE_WIDGET | SCREEN_CONNECTOR_SCREEN_TYPE_COMPONENT_BASED), this);
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_launch is called. [%s, mPid = %d]\n", mWidgetId.c_str(), mPid );
+ LaunchWidget();
+ Self().TouchedSignal().Connect( this, &WidgetView::OnTouch );
+ Self().WheelEventSignal().Connect( this, &WidgetView::OnWheelEvent );
+ // Add Accessibility
Toolkit::DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
return std::unique_ptr<Dali::Accessibility::Accessible>(
new Toolkit::DevelControl::AccessibleImpl(actor, Dali::Accessibility::Role::EMBEDDED));
if( mPausedManually )
{
mPaused = ( needPaused || !mWindowVisible );
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "Do not resume widget, because widget is paued manually \n");
+ DALI_LOG_RELEASE_INFO("Do not resume widget, because widget is paued manually \n");
return;
}
if( mPausedManually )
{
mPaused = needPaused;
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "Do not resume widget, because widget is paued manually \n");
+ DALI_LOG_RELEASE_INFO("Do not resume widget, because widget is paued manually \n");
return;
}
}
}
-void WidgetView::ConnectSignal( tizen_remote_surface* surface )
-{
- if( mRenderer && surface )
- {
- mRemoteSurface = surface;
-
- Self().TouchedSignal().Connect( this, &WidgetView::OnTouch );
- Self().WheelEventSignal().Connect( this, &WidgetView::OnWheelEvent );
- }
-}
-
bool WidgetView::OnTouch( Dali::Actor actor, const Dali::TouchEvent& event )
{
if( event.GetPointCount() == 0 )
return false;
}
- if( mRemoteSurface == NULL )
- {
- return false;
- }
-
Device::Class::Type deviceType = event.GetDeviceClass( 0 );
if( deviceType == Device::Class::MOUSE )
{
{
if( mRemoteSurface == NULL )
{
+ DALI_LOG_ERROR("There is no RemoteSurface so it can not use WheelEvent");
return false;
}
//ToDo: We should check TIZEN_INPUT_DEVICE_CLAS_MOUSE
{
if( mRemoteSurface == NULL )
{
+ DALI_LOG_ERROR("There is no RemoteSurface so it can not use KeyEvent");
return false;
}
void WidgetView::ShowLoadingState( bool show )
{
- if( mPreviewImage && mPreviewVisible )
+ if( mPreviewImage && IsPreviewVisible() )
{
mPreviewImage.SetProperty( Actor::Property::VISIBLE, show );
}
- if( mLoadingText && mLoadingTextVisible )
+ if( mLoadingText && IsLoadingTextVisible() )
{
mLoadingText.SetProperty( Toolkit::TextLabel::Property::TEXT,
( mLoadingTextString.empty() )? GET_LOCALE_TEXT( "IDS_ST_POP_LOADING_ING" ) : mLoadingTextString );
void WidgetView::ShowRetryState( bool show )
{
- if( mPreviewImage && mPreviewVisible )
+ if( mPreviewImage && IsPreviewVisible() )
{
mPreviewImage.SetProperty( Actor::Property::VISIBLE, false );
}
- if( mRetryText && mRetryTextVisible )
+ if( mRetryText && IsRetryTextVisible() )
{
mRetryText.SetProperty( Toolkit::TextLabel::Property::TEXT,
( mRetryTextString.empty() )? GET_LOCALE_TEXT( "IDS_HS_BODY_UNABLE_TO_LOAD_DATA_TAP_TO_RETRY" ) : mRetryTextString );
void WidgetView::MouseIn( const Dali::TouchEvent& event )
{
Vector2 localPos = event.GetLocalPosition( 0 );
-
- tizen_remote_surface_transfer_mouse_event( mRemoteSurface,
+ if( mRemoteSurface )
+ {
+ tizen_remote_surface_transfer_mouse_event( mRemoteSurface,
TIZEN_REMOTE_SURFACE_EVENT_TYPE_MOUSE_IN,
0,
0,
"",
event.GetTime()
);
+ }
}
void WidgetView::MouseOut( const Dali::TouchEvent& event )
{
- tizen_remote_surface_transfer_mouse_event( mRemoteSurface,
+ if( mRemoteSurface )
+ {
+ tizen_remote_surface_transfer_mouse_event( mRemoteSurface,
TIZEN_REMOTE_SURFACE_EVENT_TYPE_MOUSE_OUT,
0,
0,
"",
event.GetTime()
);
+
+ }
}
bool WidgetView::MouseEvent( const Dali::TouchEvent& event )
}
}
+ if( mRemoteSurface == NULL )
+ {
+ DALI_LOG_ERROR("There is no RemoteSurface so it can not use MouseEvent");
+ return false;
+ }
+
Vector2 localPos = event.GetLocalPosition( 0 );
tizen_remote_surface_transfer_mouse_event( mRemoteSurface,
}
}
+ if( mRemoteSurface == NULL )
+ {
+ DALI_LOG_ERROR("There is no RemoteSurface so it can not use TouchEvent");
+ return false;
+ }
+
Vector2 localPos = event.GetLocalPosition( 0 );
tizen_remote_surface_transfer_touch_event( mRemoteSurface,
tizen_remote_surface_transfer_visibility( surface, TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_VISIBLE);
CreateWidgetRenderer();
- ConnectSignal( surface );
}
if( !buffer )
mBuffer = buffer;
}
+bool WidgetView::LaunchWidget()
+{
+ screen_connector_toolkit_ops ops;
+ ops.updated_cb = OnBufferUpdated;
+ ops.removed_cb = OnSurfaceRemoved;
+ ops.added_cb = OnBufferAdded;
+ mWatcherHandle = screen_connector_toolkit_add(&ops, (char *)mInstanceId.c_str(), static_cast<screen_connector_screen_type_e>(SCREEN_CONNECTOR_SCREEN_TYPE_WIDGET | SCREEN_CONNECTOR_SCREEN_TYPE_COMPONENT_BASED), this);
+
+ mPid = widget_instance_launch( mInstanceId.c_str(), (char *)mContentInfo.c_str(), mWidth, mHeight );
+ if( mPid < 0)
+ {
+ ShowLoadingState( false );
+ ShowRetryState( true );
+
+ // Emit signal
+ Dali::WidgetView::WidgetView handle( GetOwner() );
+ mWidgetCreationAbortedSignal.Emit( handle );
+ DALI_LOG_RELEASE_INFO("WidgetView::LaunchWidget: widget_instance_launch is failed. [%s]\n", mWidgetId.c_str() );
+ return false;
+ }
+ return true;
+}
+
void WidgetView::ReloadWidget()
{
std::string text;
text = GetContentInfo();
if( text == mContentInfo )
{
- screen_connector_toolkit_ops ops;
- ops.updated_cb = OnBufferUpdated;
- ops.removed_cb = OnSurfaceRemoved;
- ops.added_cb = OnBufferAdded;
- mWatcherHandle = screen_connector_toolkit_add(&ops, (char *)mInstanceId.c_str(), static_cast<screen_connector_screen_type_e>(SCREEN_CONNECTOR_SCREEN_TYPE_WIDGET | SCREEN_CONNECTOR_SCREEN_TYPE_COMPONENT_BASED), this);
-
- // launch widget again
- mPid = widget_instance_launch( mInstanceId.c_str(), (char *)mContentInfo.c_str(), mWidth, mHeight );
- if( mPid < 0)
+ if(!LaunchWidget())
{
- DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::ActivateFaultedWidget: widget_instance_launch is failed. [%s]\n", mWidgetId.c_str() );
ActivateFaultedWidget();
}
}
*/
void ActivateFaultedWidget();
- void SendWidgetEvent( int event );
-
public: // Internal API
/**
*/
static bool DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes );
+ /**
+ * @brief Connects a callback function with the object's signals.
+ * @param[in] object The object providing the signal.
+ * @param[in] tracker Used to disconnect the signal.
+ * @param[in] signalName The signal to connect to.
+ * @param[in] functor A newly allocated FunctorDelegate.
+ * @return True if the signal was connected.
+ * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
+ */
static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+ /**
+ * @brief Gets the Widget Id
+ */
const std::string& GetWidgetId() const;
+ /**
+ * @brief Gets the Instance Id
+ */
const std::string& GetInstanceId() const;
+ /**
+ * @brief Gets the ContentInfo
+ */
const std::string& GetContentInfo();
+ /**
+ * @brief Gets the Title
+ */
const std::string& GetTitle();
+ /**
+ * @brief Gets the update interval of the widget
+ */
float GetUpdatePeriod() const;
+ /**
+ * @brief Sets the preview image is visible or not
+ */
void SetPreviewVisible( bool visible );
+ /**
+ * @brief Returns the preview visible status
+ */
bool IsPreviewVisible();
+ /**
+ * @brief Sets the Loading Text is visible or not
+ */
void SetLoadingTextVisible( bool visible );
- void SetRetryTextVisible( bool visible );
-
+ /**
+ * @brief Returns the LoadingText visible status
+ */
bool IsLoadingTextVisible();
+ /**
+ * @brief Sets the RetryText is visible status
+ */
+ void SetRetryTextVisible( bool visible );
+
+ /**
+ * @brief Returns the RetryText visible status
+ */
bool IsRetryTextVisible();
+ /**
+ * @brief Returns the status of widget is faulted
+ */
bool IsWidgetFaulted();
- void SetPermanentDelete( bool permanentDelete );
+ /**
+ * @brief Creates a Widget Renderer
+ */
+ void CreateWidgetRenderer();
+ /**
+ * @brief Removes a Widget Renderer
+ */
void RemoveWidgetRenderer();
+ /**
+ * @brief Sets the flag to permanently delete the widget
+ * @DEPRECATED It will be deprecated.
+ */
+ void SetPermanentDelete( bool permanentDelete );
+
+ /**
+ * @brief Returns the flag about permanently delete the widget
+ * @DEPRECATED It will be deprecated.
+ */
bool IsPermanentDelete();
+ /**
+ * @brief Checks Widget Renderer exist
+ */
bool IsWidgetRenderer();
+ /**
+ * @brief Updates image source when buffer is updated
+ */
void UpdateImageSource( tbm_surface_h source );
- void CreateWidgetRenderer();
-
- void ConnectSignal( tizen_remote_surface* surface );
-
+ /**
+ * @brief Callback for touch event
+ */
bool OnTouch( Dali::Actor actor, const Dali::TouchEvent& event );
+ /**
+ * @brief Callback for wheel event
+ */
bool OnWheelEvent( Dali::Actor actor, const Dali::WheelEvent& event );
+ /**
+ * @brief Close remote surface and release related resources
+ */
void CloseRemoteSurface();
- void SetReloadFlag( bool reload );
-
+ /**
+ * @brief Sets the Loading Text Property Map
+ */
void SetLoadingTextPropertyMap( Dali::Property::Map map );
+ /**
+ * @brief Sets the Retry Text Property Map
+ */
void SetRetryTextPropertyMap( Dali::Property::Map map );
+ /**
+ * @brief Sets the Effect Property Map
+ */
void SetEffectPropertyMap( Dali::Property::Map map );
+ /**
+ * @brief Sets the Loading status
+ */
void ShowLoadingState( bool show );
+ /**
+ * @brief Sets the Retry status
+ */
void ShowRetryState( bool show );
+ /**
+ * @brief Terminate a widget
+ * @DEPRECATED it will be deprecated. plase instead RemoveWidget()
+ */
bool TerminateWidget();
void MouseIn( const Dali::TouchEvent& event );
bool TouchEvent( const Dali::TouchEvent& event );
+ /**
+ * @brief Update Buffer for rendering. this api is called when surface is updated from widget
+ */
void UpdateBuffer( struct tizen_remote_surface *surface, struct wl_buffer *buffer, int32_t fd);
+public: // Internal API for WidgetViewManager
+
+ /**
+ * @brief Send a event from WidgetViewManager to WidgetView
+ *
+ * @param[in] event The event for widget
+ */
+ void SendWidgetEvent( int event );
+
+ /**
+ * @brief Reload the Widget when widget instance is dead
+ */
void ReloadWidget();
+ /**
+ * @brief Remove the Widget from WidgetViewManager
+ */
+ bool RemoveWidget();
+
public: //Signals
/**
bool ResumeWidgetInternally();
/**
- * @brief check WidgetView is out of screen.
+ * @brief check WidgetView is out of screen
*/
bool IsOutOfScreen();
+ /**
+ * @brief Call a widget_instance_launch and add it to screen connector
+ */
+ bool LaunchWidget();
+
/**
* @brief Callback when the visibility of the window is changed.
*/
private:
- Toolkit::ImageView mPreviewImage; ///< Preview image
- Toolkit::TextLabel mLoadingText; ///< Loading text
- Toolkit::TextLabel mRetryText; ///< Retry text
- Dali::Actor mPreviewActor;
- Dali::Actor mStateTextActor;
- Dali::NativeImageSourcePtr mImageSource;
- Dali::Texture mNativeTexture;
- Dali::TextureSet mTextureSet;
Dali::Renderer mRenderer;
std::string mWidgetId;
int mPid;
float mUpdatePeriod;
- bool mPreviewVisible;
-
- bool mLoadingTextVisible;
- std::string mLoadingTextString;
-
- bool mRetryTextVisible;
- std::string mRetryTextString;
- bool mRetryState;
-
- bool mPermanentDelete;
- screen_connector_toolkit_h mWatcherHandle;
- tizen_remote_surface* mRemoteSurface;
- wl_buffer* mBuffer;
- bool mCreated;
- bool mResizeRequired;
- bool mPaused;
- bool mPausedManually;
- bool mWindowVisible;
-
- Dali::Property::Map mEffectPropertyMap;
+ Toolkit::ImageView mPreviewImage; ///< Preview image
+ Toolkit::TextLabel mLoadingText; ///< Loading text
+ Toolkit::TextLabel mRetryText; ///< Retry text
+ Dali::Actor mPreviewActor; ///< Preview Actor
+ Dali::Actor mStateTextActor; ///< StateText Actor
+ std::string mLoadingTextString; ///< Loading text
+ std::string mRetryTextString; ///< Retry text
+ bool mRetryState; ///< Status requiring re-launch
+
+ Dali::NativeImageSourcePtr mImageSource; ///< ImageSource for rendenerer
+ bool mPermanentDelete; ///< Check whether widget is deleted permanently.
+ screen_connector_toolkit_h mWatcherHandle; ///< Handle for screen connector
+ tizen_remote_surface* mRemoteSurface; ///< RemoteSurface for controlling events and visibillity
+ wl_buffer* mBuffer; ///< Buffer for screen_connector. WidgetView need to release previous buffer
+ bool mCreated; ///< Check whether widget instance is created or not
+ bool mResizeRequired; ///< Check whether widget instance need to resize.
+ bool mPaused; ///< Check whether widget is paused or not
+ bool mPausedManually; ///< Check whether widget is paused or not by application
+ bool mWindowVisible; ///< Check whether window is visible or not
+
+ Dali::Property::Map mEffectPropertyMap; ///< Shader for effect
+
+ // Notification for property change confirmation
Dali::PropertyNotification mPositionUpdateNotification;
Dali::PropertyNotification mSizeUpdateNotification;
Dali::PropertyNotification mScaleUpdateNotification;