namespace Adaptor
{
#if defined(DEBUG_ENABLED)
-extern Debug::Filter* gIndicatorLogFilter;
+Debug::Filter* gServerConnectionLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_SERVER_CONNECTION");
#endif
ServerConnection::ServerConnection(
ipctype = ECORE_IPC_LOCAL_SYSTEM;
}
- DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "ServerConnection: Connecting to %s %d\n", mService.name, mService.num );
+ DALI_LOG_INFO( gServerConnectionLogFilter, Debug::General, "ServerConnection: Connecting to %s %d\n", mService.name, mService.num );
mIpcServer = ecore_ipc_server_connect( ipctype, (char *)mService.name, mService.num, this );
if( !mIpcServer )
{
- DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "mIpcServer is null\n" );
+ DALI_LOG_INFO( gServerConnectionLogFilter, Debug::General, "mIpcServer is null\n" );
ecore_ipc_shutdown();
}
else
Eina_Bool ServerConnection::IpcServerAdd( void *data, int /*type*/, void *event )
{
- DALI_LOG_INFO(gIndicatorLogFilter, Debug::General, "ServerConnection: IpcServerAdd\n" );
+ DALI_LOG_INFO(gServerConnectionLogFilter, Debug::General, "ServerConnection: IpcServerAdd\n" );
return ECORE_CALLBACK_PASS_ON;
}
Eina_Bool ServerConnection::IpcServerDel( void *data, int /*type*/, void *event )
{
- DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "ServerConnection: IpcServerDel\n" );
+ DALI_LOG_INFO( gServerConnectionLogFilter, Debug::General, "ServerConnection: IpcServerDel\n" );
Ecore_Ipc_Event_Server_Del *e = static_cast<Ecore_Ipc_Event_Server_Del *>( event );
ServerConnection* connection = static_cast<ServerConnection*>( data );
Eina_Bool ServerConnection::IpcServerData( void *data, int /*type*/, void *event )
{
- DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "ServerConnection: IpcServerData\n" );
+ DALI_LOG_INFO( gServerConnectionLogFilter, Debug::General, "ServerConnection: IpcServerData\n" );
Ecore_Ipc_Event_Server_Data *e = static_cast<Ecore_Ipc_Event_Server_Data *>( event );
ServerConnection* connection = static_cast<ServerConnection*>( data );
{
if( mConnected )
{
- DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "ServerConnection: CloseConnection\n" );
+ DALI_LOG_INFO( gServerConnectionLogFilter, Debug::General, "ServerConnection: CloseConnection\n" );
if( mIpcServer )
{
} // Dali
-#pragma GCC diagnostic pop
\ No newline at end of file
+#pragma GCC diagnostic pop
--- /dev/null
+#ifndef DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_FACTORY_H
+#define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_FACTORY_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali/public-api/adaptor-framework/window.h>
+#include <dali/internal/window-system/common/indicator-interface.h>
+
+// EXTERNAL INCLUDES
+#include <memory>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+
+class Adaptor;
+class WindowBase;
+class Window;
+class WindowRenderSurface;
+
+class WindowFactory
+{
+public:
+
+ WindowFactory() = default;
+ virtual ~WindowFactory() = default;
+
+ virtual std::unique_ptr< WindowBase > CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface ) = 0;
+
+ virtual std::unique_ptr< IndicatorInterface > CreateIndicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, IndicatorInterface::Observer* observer ) = 0;
+};
+
+extern std::unique_ptr< WindowFactory > GetWindowFactory();
+
+} // namespace Adaptor
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_FACTORY_H
// INTERNAL HEADERS
#include <dali/internal/input/common/drag-and-drop-detector-impl.h>
-#include <dali/internal/window-system/common/ecore-indicator-impl.h>
#include <dali/internal/window-system/common/window-visibility-observer.h>
#include <dali/internal/window-system/common/orientation-impl.h>
#include <dali/internal/window-system/common/render-surface-factory.h>
-#include <dali/internal/window-system/common/window-base-factory.h>
+#include <dali/internal/window-system/common/window-factory.h>
#include <dali/internal/window-system/common/window-base.h>
#include <dali/internal/window-system/common/window-render-surface.h>
mIconified( false ),
mOpaqueState( false ),
mResizeEnabled( false ),
- mIndicator( NULL ),
+ mIndicator(),
mIndicatorOrientation( Dali::Window::PORTRAIT ),
mNextIndicatorOrientation( Dali::Window::PORTRAIT ),
mIndicatorOpacityMode( Dali::Window::OPAQUE ),
Dali::RenderTask indicatorTask = taskList.GetTask(0);
mOverlay->GetOverlayRenderTasks().RemoveTask(indicatorTask);
mIndicator->Close();
- delete mIndicator;
}
if ( mAdaptor )
mSurface = windowRenderSurface.release();
// create a window base
- auto windowBaseFactory = Dali::Internal::Adaptor::GetWindowBaseFactory();
- mWindowBase = windowBaseFactory->CreateWindowBase( this, mSurface );
+ auto windowFactory = Dali::Internal::Adaptor::GetWindowFactory();
+ mWindowBase = windowFactory->CreateWindowBase( this, mSurface );
mWindowBase->Initialize();
{
if( mIndicatorVisible != Dali::Window::INVISIBLE )
{
- mIndicator = new Indicator( mAdaptor, mIndicatorOrientation, this );
- mIndicator->SetOpacityMode( mIndicatorOpacityMode );
- Dali::Actor actor = mIndicator->GetActor();
- SetIndicatorActorRotation();
- mOverlay->Add(actor);
+ auto windowFactory = Dali::Internal::Adaptor::GetWindowFactory();
+ mIndicator = windowFactory->CreateIndicator( mAdaptor, mIndicatorOrientation, this );
+ if( mIndicator )
+ {
+ mIndicator->SetOpacityMode( mIndicatorOpacityMode );
+ Dali::Actor actor = mIndicator->GetActor();
+ SetIndicatorActorRotation();
+ mOverlay->Add(actor);
+ }
}
// else don't create a hidden indicator
}
{
mShowRotatedIndicatorOnClose = true;
mNextIndicatorOrientation = orientation;
- mIndicator->Close(); // May synchronously call IndicatorClosed() callback
+ if( mIndicator )
+ {
+ mIndicator->Close(); // May synchronously call IndicatorClosed() callback
+ }
}
else
{
void Window::SetIndicatorActorRotation()
{
DALI_LOG_TRACE_METHOD( gWindowLogFilter );
- DALI_ASSERT_DEBUG( mIndicator != NULL );
-
- Dali::Actor actor = mIndicator->GetActor();
- switch( mIndicatorOrientation )
+ if( mIndicator )
{
- case Dali::Window::PORTRAIT:
- actor.SetParentOrigin( ParentOrigin::TOP_CENTER );
- actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
- actor.SetOrientation( Degree(0), Vector3::ZAXIS );
- break;
- case Dali::Window::PORTRAIT_INVERSE:
- actor.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
- actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
- actor.SetOrientation( Degree(180), Vector3::ZAXIS );
- break;
- case Dali::Window::LANDSCAPE:
- actor.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
- actor.SetOrientation( Degree(270), Vector3::ZAXIS );
- break;
- case Dali::Window::LANDSCAPE_INVERSE:
- actor.SetParentOrigin( ParentOrigin::CENTER_RIGHT );
- actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
- actor.SetOrientation( Degree(90), Vector3::ZAXIS );
- break;
+ Dali::Actor actor = mIndicator->GetActor();
+ switch( mIndicatorOrientation )
+ {
+ case Dali::Window::PORTRAIT:
+ actor.SetParentOrigin( ParentOrigin::TOP_CENTER );
+ actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
+ actor.SetOrientation( Degree(0), Vector3::ZAXIS );
+ break;
+ case Dali::Window::PORTRAIT_INVERSE:
+ actor.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+ actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
+ actor.SetOrientation( Degree(180), Vector3::ZAXIS );
+ break;
+ case Dali::Window::LANDSCAPE:
+ actor.SetParentOrigin( ParentOrigin::CENTER_LEFT );
+ actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
+ actor.SetOrientation( Degree(270), Vector3::ZAXIS );
+ break;
+ case Dali::Window::LANDSCAPE_INVERSE:
+ actor.SetParentOrigin( ParentOrigin::CENTER_RIGHT );
+ actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
+ actor.SetOrientation( Degree(90), Vector3::ZAXIS );
+ break;
+ }
}
}
mWindowBase->SetIndicatorProperties( isShow, lastOrientation );
}
-void Window::IndicatorTypeChanged(Indicator::Type type)
+void Window::IndicatorTypeChanged( IndicatorInterface::Type type )
{
mWindowBase->IndicatorTypeChanged( type );
}
if( mShowRotatedIndicatorOnClose )
{
Dali::Window::WindowOrientation currentOrientation = mIndicatorOrientation;
- mIndicator->Open( mNextIndicatorOrientation );
+ if( mIndicator )
+ {
+ mIndicator->Open( mNextIndicatorOrientation );
+ }
mIndicatorOrientation = mNextIndicatorOrientation;
SetIndicatorActorRotation();
DoShowIndicator( currentOrientation );
mIndicator->Close();
}
- delete mIndicator;
- mIndicator = NULL;
+ mIndicator.release();
}
void Window::OnDestroy()
-#ifndef __DALI_INTERNAL_WINDOW_H__
-#define __DALI_INTERNAL_WINDOW_H__
+#ifndef DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
+#define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
/*
* Copyright (c) 2018 Samsung Electronics Co., Ltd.
private:
- WindowRenderSurface* mSurface;
- std::unique_ptr< WindowBase > mWindowBase;
- Dali::Window::IndicatorVisibleMode mIndicatorVisible; ///< public state
- bool mIndicatorIsShown:1; ///< private state
- bool mShowRotatedIndicatorOnClose:1;
- bool mStarted:1;
- bool mIsTransparent:1;
- bool mIsFocusAcceptable:1;
- bool mVisible:1;
- bool mIconified:1;
- bool mOpaqueState:1;
- bool mResizeEnabled:1;
- IndicatorInterface* mIndicator;
- Dali::Window::WindowOrientation mIndicatorOrientation;
- Dali::Window::WindowOrientation mNextIndicatorOrientation;
- Dali::Window::IndicatorBgOpacity mIndicatorOpacityMode;
- Integration::SystemOverlay* mOverlay;
- Adaptor* mAdaptor;
- Dali::DragAndDropDetector mDragAndDropDetector;
- Dali::Window::Type mType;
+ WindowRenderSurface* mSurface;
+ std::unique_ptr< WindowBase > mWindowBase;
+ Dali::Window::IndicatorVisibleMode mIndicatorVisible; ///< public state
+ bool mIndicatorIsShown:1; ///< private state
+ bool mShowRotatedIndicatorOnClose:1;
+ bool mStarted:1;
+ bool mIsTransparent:1;
+ bool mIsFocusAcceptable:1;
+ bool mVisible:1;
+ bool mIconified:1;
+ bool mOpaqueState:1;
+ bool mResizeEnabled:1;
+ std::unique_ptr< IndicatorInterface > mIndicator;
+ Dali::Window::WindowOrientation mIndicatorOrientation;
+ Dali::Window::WindowOrientation mNextIndicatorOrientation;
+ Dali::Window::IndicatorBgOpacity mIndicatorOpacityMode;
+ Integration::SystemOverlay* mOverlay;
+ Adaptor* mAdaptor;
+ Dali::DragAndDropDetector mDragAndDropDetector;
+ Dali::Window::Type mType;
OrientationPtr mOrientation;
std::vector<Dali::Window::WindowOrientation> mAvailableOrientations;
} // namespace Dali
-#endif // __DALI_INTERNAL_WINDOW_H__
+#endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
# module: window-system, backend: common
adaptor_window_system_common_src_files=\
${adaptor_window_system_dir}/common/display-connection.cpp \
- ${adaptor_window_system_dir}/common/ecore-indicator-impl.cpp \
${adaptor_window_system_dir}/common/ecore-server-connection.cpp \
${adaptor_window_system_dir}/common/indicator-buffer.cpp \
${adaptor_window_system_dir}/common/native-render-surface-factory.cpp \
${adaptor_window_system_dir}/tizen-wayland/display-connection-factory-ecore-wl.cpp \
${adaptor_window_system_dir}/tizen-wayland/display-connection-impl-ecore-wl.cpp \
${adaptor_window_system_dir}/tizen-wayland/event-handler-ecore-wl.cpp \
+ ${adaptor_window_system_dir}/tizen-wayland/indicator-impl-ecore-wl.cpp \
${adaptor_window_system_dir}/tizen-wayland/native-render-surface-ecore-wl.cpp \
${adaptor_window_system_dir}/tizen-wayland/render-surface-factory-ecore-wl.cpp \
${adaptor_window_system_dir}/tizen-wayland/window-render-surface-ecore-wl.cpp \
${adaptor_window_system_dir}/tizen-wayland/window-base-ecore-wl.cpp \
- ${adaptor_window_system_dir}/tizen-wayland/window-base-factory-ecore-wl.cpp
+ ${adaptor_window_system_dir}/tizen-wayland/window-factory-ecore-wl.cpp
# module: window-system, backend: ubuntu-x11
adaptor_window_system_ubuntu_x11_src_files=\
${adaptor_window_system_dir}/ubuntu-x11/window-interface-ecore-x.cpp \
${adaptor_window_system_dir}/ubuntu-x11/window-render-surface-ecore-x.cpp \
${adaptor_window_system_dir}/ubuntu-x11/window-base-ecore-x.cpp \
- ${adaptor_window_system_dir}/ubuntu-x11/window-base-factory-ecore-x.cpp
+ ${adaptor_window_system_dir}/ubuntu-x11/window-factory-ecore-x.cpp
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
// CLASS HEADER
-#include <dali/internal/window-system/common/ecore-indicator-impl.h>
+#include <dali/internal/window-system/tizen-wayland/indicator-impl-ecore-wl.h>
// EXTERNAL INCLUDES
// Ecore is littered with C style cast
#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <Ecore.h>
#include <Evas.h>
-#ifdef WAYLAND
#include <Ecore_Wayland.h>
-#else
-#include <Ecore_X.h>
-#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
-#include <errno.h>
-#include <iomanip>
-#include <fstream>
#include <dali/public-api/images/native-image.h>
-#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/events/touch-point.h>
#include <dali/public-api/common/stage.h>
-#include <dali/public-api/images/buffer-image.h>
#include <dali/public-api/images/pixel.h>
#include <dali/integration-api/debug.h>
#include <dali/internal/accessibility/common/accessibility-adaptor-impl.h>
#include <dali/public-api/adaptor-framework/native-image-source.h>
-using Dali::Vector4;
-
#if defined(DEBUG_ENABLED)
#define STATE_DEBUG_STRING(state) (state==DISCONNECTED?"DISCONNECTED":state==CONNECTED?"CONNECTED":"UNKNOWN")
#endif
{
const float SLIDING_ANIMATION_DURATION( 0.2f ); // 200 milli seconds
-const float AUTO_INDICATOR_STAY_DURATION(3.0f); // 3 seconds
-const float SHOWING_DISTANCE_HEIGHT_RATE(0.34f); // 20 pixels
+const float AUTO_INDICATOR_STAY_DURATION( 3.0f ); // 3 seconds
enum
{
return quad;
}
-const float OPAQUE_THRESHOLD(0.99f);
-const float TRANSPARENT_THRESHOLD(0.05f);
-
// indicator service name
const char* INDICATOR_SERVICE_NAME("elm_indicator");
// Copied from ecore_evas_extn_engine.h
-#define NBUF 2
-
enum // opcodes
{
OP_RESIZE,
OP_EV_HOLD,
OP_MSG_PARENT,
OP_MSG,
- OP_PIXMAP_REF,
};
// Copied from elm_conform.c
const int MSG_ID_INDICATOR_TYPE( 0X1005 );
const int MSG_ID_INDICATOR_START_ANIMATION( 0X10006 );
-struct IpcDataUpdate
-{
- int x, w, y, h;
-};
-
struct IpcDataResize
{
int w, h;
// Impl to hide EFL implementation.
-struct Indicator::Impl
+struct IndicatorEcoreWl::Impl
{
enum // operation mode
{
/**
* Constructor
*/
- Impl(Indicator* indicator)
+ Impl(IndicatorEcoreWl* indicator)
: mIndicator(indicator),
mEcoreEventHandler(NULL)
{
#if defined(DALI_PROFILE_MOBILE)
-#if defined(WAYLAND)
mEcoreEventHandler = ecore_event_handler_add(ECORE_WL_EVENT_INDICATOR_FLICK, EcoreEventIndicator, this);
-#else
- mEcoreEventHandler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, EcoreEventClientMessage, this);
-#endif
-#endif // WAYLAND && DALI_PROFILE_MOBILE
+#endif // DALI_PROFILE_MOBILE
}
/**
static void SetIndicatorVisibility( void* data, int operation )
{
- Indicator::Impl* indicatorImpl((Indicator::Impl*)data);
+ IndicatorEcoreWl::Impl* indicatorImpl((IndicatorEcoreWl::Impl*)data);
if ( indicatorImpl == NULL || indicatorImpl->mIndicator == NULL)
{
}
}
}
+
#if defined(DALI_PROFILE_MOBILE)
-#if defined(WAYLAND)
/**
* Called when the Ecore indicator event is received.
*/
SetIndicatorVisibility( data, INDICATOR_STAY_WITH_DURATION );
return ECORE_CALLBACK_PASS_ON;
}
-#else
- /**
- * Called when the client messages (i.e. quick panel state) are received.
- */
- static Eina_Bool EcoreEventClientMessage( void* data, int type, void* event )
- {
- Ecore_X_Event_Client_Message* clientMessageEvent((Ecore_X_Event_Client_Message*)event);
-
- if ( clientMessageEvent != NULL )
- {
- if (clientMessageEvent->message_type == ECORE_X_ATOM_E_INDICATOR_FLICK_DONE)
- {
- SetIndicatorVisibility( data, INDICATOR_STAY_WITH_DURATION );
- }
- else if ( clientMessageEvent->message_type == ECORE_X_ATOM_E_MOVE_QUICKPANEL_STATE )
- {
- SetIndicatorVisibility( data, INDICATOR_HIDE );
- }
- }
- return ECORE_CALLBACK_PASS_ON;
- }
-#endif
-#endif // WAYLAND && DALI_PROFILE_MOBILE
+#endif // DALI_PROFILE_MOBILE
// Data
- Indicator* mIndicator;
+ IndicatorEcoreWl* mIndicator;
Ecore_Event_Handler* mEcoreEventHandler;
};
-Indicator::LockFile::LockFile(const std::string filename)
+IndicatorEcoreWl::LockFile::LockFile(const std::string filename)
: mFilename(filename),
mErrorThrown(false)
{
}
}
-Indicator::LockFile::~LockFile()
+IndicatorEcoreWl::LockFile::~LockFile()
{
// Closing file descriptor also unlocks file.
if( mFileDescriptor > 0 )
}
}
-bool Indicator::LockFile::Lock()
+bool IndicatorEcoreWl::LockFile::Lock()
{
DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
return locked;
}
-void Indicator::LockFile::Unlock()
+void IndicatorEcoreWl::LockFile::Unlock()
{
DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
}
}
-bool Indicator::LockFile::RetrieveAndClearErrorStatus()
+bool IndicatorEcoreWl::LockFile::RetrieveAndClearErrorStatus()
{
bool error = mErrorThrown;
mErrorThrown = false;
return error;
}
-Indicator::ScopedLock::ScopedLock(LockFile* lockFile)
+IndicatorEcoreWl::ScopedLock::ScopedLock(LockFile* lockFile)
: mLockFile(lockFile),
mLocked(false)
{
}
}
-Indicator::ScopedLock::~ScopedLock()
+IndicatorEcoreWl::ScopedLock::~ScopedLock()
{
if( mLockFile )
{
}
}
-bool Indicator::ScopedLock::IsLocked()
+bool IndicatorEcoreWl::ScopedLock::IsLocked()
{
return mLocked;
}
-Indicator::Indicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, IndicatorInterface::Observer* observer )
-: mPixmap( 0 ),
- mGestureDeltaY( 0.0f ),
- mGestureDetected( false ),
- mConnection( this ),
+IndicatorEcoreWl::IndicatorEcoreWl( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, IndicatorInterface::Observer* observer )
+: mConnection( this ),
mOpacityMode( Dali::Window::OPAQUE ),
mState( DISCONNECTED ),
mAdaptor(adaptor),
mIsShowing( true ),
mIsAnimationPlaying( false ),
mCurrentSharedFile( 0 ),
- mSharedBufferType( BUFFER_TYPE_SHM ),
mImpl( NULL ),
mBackgroundVisible( false ),
mTopMargin( 0 )
// Indicator image handles the touch event including "leave"
mIndicatorContentActor.SetLeaveRequired( true );
- mIndicatorContentActor.TouchSignal().Connect( this, &Indicator::OnTouch );
+ mIndicatorContentActor.TouchSignal().Connect( this, &IndicatorEcoreWl::OnTouch );
mIndicatorContentActor.SetColor( Color::BLACK );
mIndicatorActor = Dali::Actor::New();
// It can prevent the problem that scrollview gets pan gesture even indicator area is touched,
// since it consumes the pan gesture in advance.
mPanDetector = Dali::PanGestureDetector::New();
- mPanDetector.DetectedSignal().Connect( this, &Indicator::OnPan );
+ mPanDetector.DetectedSignal().Connect( this, &IndicatorEcoreWl::OnPan );
mPanDetector.Attach( mEventActor );
Open( orientation );
mImpl = new Impl(this);
}
-Indicator::~Indicator()
+IndicatorEcoreWl::~IndicatorEcoreWl()
{
if(mImpl)
{
if(mEventActor)
{
- mEventActor.TouchSignal().Disconnect( this, &Indicator::OnTouch );
+ mEventActor.TouchSignal().Disconnect( this, &IndicatorEcoreWl::OnTouch );
}
Disconnect();
}
-void Indicator::SetAdaptor(Adaptor* adaptor)
+void IndicatorEcoreWl::SetAdaptor(Adaptor* adaptor)
{
mAdaptor = adaptor;
mIndicatorBuffer->SetAdaptor( adaptor );
}
-Dali::Actor Indicator::GetActor()
+Dali::Actor IndicatorEcoreWl::GetActor()
{
return mIndicatorActor;
}
-void Indicator::Open( Dali::Window::WindowOrientation orientation )
+void IndicatorEcoreWl::Open( Dali::Window::WindowOrientation orientation )
{
DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
}
}
-void Indicator::Close()
+void IndicatorEcoreWl::Close()
{
DALI_LOG_TRACE_METHOD_FMT( gIndicatorLogFilter, "State: %s", STATE_DEBUG_STRING(mState) );
SetForegroundImage( emptyTexture );
}
-void Indicator::SetOpacityMode( Dali::Window::IndicatorBgOpacity mode )
+void IndicatorEcoreWl::SetOpacityMode( Dali::Window::IndicatorBgOpacity mode )
{
mOpacityMode = mode;
UpdateTopMargin();
}
-void Indicator::SetVisible( Dali::Window::IndicatorVisibleMode visibleMode, bool forceUpdate )
+void IndicatorEcoreWl::SetVisible( Dali::Window::IndicatorVisibleMode visibleMode, bool forceUpdate )
{
if ( visibleMode != mVisible || forceUpdate )
{
}
}
-bool Indicator::IsConnected()
+bool IndicatorEcoreWl::IsConnected()
{
return ( mState == CONNECTED );
}
-bool Indicator::SendMessage( int messageDomain, int messageId, const void *data, int size )
+bool IndicatorEcoreWl::SendMessage( int messageDomain, int messageId, const void *data, int size )
{
if(IsConnected())
{
}
}
-bool Indicator::OnTouch(Dali::Actor indicator, const Dali::TouchData& touchData)
+bool IndicatorEcoreWl::OnTouch(Dali::Actor indicator, const Dali::TouchData& touchData)
{
if( mServerConnection )
{
return false;
}
-bool Indicator::Connect()
+bool IndicatorEcoreWl::Connect()
{
DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
return connected;
}
-void Indicator::StartReconnectionTimer()
+void IndicatorEcoreWl::StartReconnectionTimer()
{
if( ! mReconnectTimer )
{
mReconnectTimer = Dali::Timer::New(1000);
mConnection.DisconnectAll();
- mReconnectTimer.TickSignal().Connect( mConnection, &Indicator::OnReconnectTimer );
+ mReconnectTimer.TickSignal().Connect( mConnection, &IndicatorEcoreWl::OnReconnectTimer );
}
mReconnectTimer.Start();
}
-bool Indicator::OnReconnectTimer()
+bool IndicatorEcoreWl::OnReconnectTimer()
{
bool retry = false;
return retry;
}
-void Indicator::Disconnect()
+void IndicatorEcoreWl::Disconnect()
{
DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
ClearSharedFileInfo();
}
-void Indicator::Resize( int width, int height )
+void IndicatorEcoreWl::Resize( int width, int height )
{
if( width < 1 )
{
}
}
-void Indicator::SetLockFileInfo( Ecore_Ipc_Event_Server_Data *epcEvent )
+void IndicatorEcoreWl::SetLockFileInfo( Ecore_Ipc_Event_Server_Data *epcEvent )
{
DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
}
}
-void Indicator::SetSharedImageInfo( Ecore_Ipc_Event_Server_Data *epcEvent )
+void IndicatorEcoreWl::SetSharedImageInfo( Ecore_Ipc_Event_Server_Data *epcEvent )
{
DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
}
}
-void Indicator::LoadSharedImage( Ecore_Ipc_Event_Server_Data *epcEvent )
+void IndicatorEcoreWl::LoadSharedImage( Ecore_Ipc_Event_Server_Data *epcEvent )
{
DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
// epcEvent->ref_to == sys
// epcEvent->response == buffer num
- if ( mSharedBufferType != BUFFER_TYPE_SHM )
- {
- return ;
- }
-
int n = epcEvent->response;
if( n >= 0 && n < SHARED_FILE_NUMBER )
mSharedFileInfo[n].mSharedFile = SharedFile::New( sharedFilename.c_str(), mSharedFileInfo[n].mImageWidth * mSharedFileInfo[n].mImageWidth * 4, true );
if( mSharedFileInfo[n].mSharedFile != NULL )
{
- mSharedFileInfo[n].mLock = new Indicator::LockFile( mSharedFileInfo[n].mLockFileName );
+ mSharedFileInfo[n].mLock = new IndicatorEcoreWl::LockFile( mSharedFileInfo[n].mLockFileName );
if( mSharedFileInfo[n].mLock->RetrieveAndClearErrorStatus() )
{
DALI_LOG_ERROR( "### Indicator error: Cannot open lock file %s ###\n", mSharedFileInfo[n].mLockFileName.c_str() );
}
}
-void Indicator::LoadPixmapImage( Ecore_Ipc_Event_Server_Data *epcEvent )
-{
- DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
-
- // epcEvent->ref == pixmap id
- // epcEvent->ref_to == type
- // epcEvent->response == buffer num
-
- if( (epcEvent->ref > 0) && (epcEvent->ref_to > 0) )
- {
- mSharedBufferType = (BufferType)(epcEvent->ref_to);
-
- ClearSharedFileInfo();
-
- mPixmap = static_cast<PixmapId>(epcEvent->ref);
- DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "mPixmap [%x]", mPixmap);
-
- CreateNewPixmapImage();
- UpdateVisibility();
- }
-}
-
-void Indicator::UpdateTopMargin()
+void IndicatorEcoreWl::UpdateTopMargin()
{
int newMargin = (mVisible == Dali::Window::VISIBLE && mOpacityMode == Dali::Window::OPAQUE) ? mImageHeight : 0;
if (mTopMargin != newMargin)
}
}
-void Indicator::UpdateVisibility()
+void IndicatorEcoreWl::UpdateVisibility()
{
if( CheckVisibleState() )
{
SetVisible(mVisible, true);
}
-void Indicator::UpdateImageData( int bufferNumber )
+void IndicatorEcoreWl::UpdateImageData( int bufferNumber )
{
DALI_LOG_TRACE_METHOD_FMT( gIndicatorLogFilter, "State: %s mVisible: %s", STATE_DEBUG_STRING(mState), mVisible?"T":"F" );
if( mState == CONNECTED && mVisible )
{
- if(mPixmap == 0)
- {
- // in case of shm indicator (not pixmap), not sure we can skip it when mIsShowing is false
- CopyToBuffer( bufferNumber );
- }
- else
- {
- if(mIsShowing)
- {
- mAdaptor->RequestUpdateOnce();
- }
- }
+ // not sure we can skip it when mIsShowing is false
+ CopyToBuffer( bufferNumber );
}
}
-bool Indicator::CopyToBuffer( int bufferNumber )
+bool IndicatorEcoreWl::CopyToBuffer( int bufferNumber )
{
bool success = false;
if( mSharedFileInfo[bufferNumber].mLock )
{
- Indicator::ScopedLock scopedLock(mSharedFileInfo[bufferNumber].mLock);
+ IndicatorEcoreWl::ScopedLock scopedLock(mSharedFileInfo[bufferNumber].mLock);
if( mSharedFileInfo[bufferNumber].mLock->RetrieveAndClearErrorStatus() )
{
// Do nothing here.
return success;
}
-void Indicator::CreateNewPixmapImage()
-{
- DALI_LOG_TRACE_METHOD_FMT( gIndicatorLogFilter, "W:%d H:%d", mImageWidth, mImageHeight );
- Dali::NativeImageSourcePtr nativeImageSource = Dali::NativeImageSource::New( mPixmap );
-
-#ifdef ENABLE_INDICATOR_IMAGE_SAVING
- SaveIndicatorImage( nativeImageSource );
-#endif
-
- if( nativeImageSource )
- {
- Dali::Texture texture = Dali::Texture::New( *nativeImageSource );
- SetForegroundImage( texture );
- mIndicatorContentActor.SetSize( mImageWidth, mImageHeight );
- mIndicatorActor.SetSize( mImageWidth, mImageHeight );
- mEventActor.SetSize( mImageWidth, mImageHeight );
- UpdateTopMargin();
- }
- else
- {
- DALI_LOG_WARNING("### Cannot create indicator image - disconnecting ###\n");
- Disconnect();
- if( mObserver != NULL )
- {
- mObserver->IndicatorClosed( this );
- }
- // Don't do connection in this callback - strange things happen!
- StartReconnectionTimer();
- }
-}
-
-void Indicator::CreateNewImage( int bufferNumber )
+void IndicatorEcoreWl::CreateNewImage( int bufferNumber )
{
DALI_LOG_TRACE_METHOD_FMT( gIndicatorLogFilter, "W:%d H:%d", mSharedFileInfo[bufferNumber].mImageWidth, mSharedFileInfo[bufferNumber].mImageHeight );
mIndicatorBuffer = new IndicatorBuffer( mAdaptor, mSharedFileInfo[bufferNumber].mImageWidth, mSharedFileInfo[bufferNumber].mImageHeight, Pixel::BGRA8888 );
}
}
-Dali::Geometry Indicator::CreateBackgroundGeometry()
+Dali::Geometry IndicatorEcoreWl::CreateBackgroundGeometry()
{
switch( mOpacityMode )
{
return Dali::Geometry();
}
-void Indicator::SetForegroundImage( Dali::Texture texture )
+void IndicatorEcoreWl::SetForegroundImage( Dali::Texture texture )
{
if( !mForegroundRenderer && texture )
{
}
}
-void Indicator::OnIndicatorTypeChanged( Type indicatorType )
+void IndicatorEcoreWl::OnIndicatorTypeChanged( Type indicatorType )
{
if( mObserver != NULL )
{
}
}
-void Indicator::DataReceived( void* event )
+void IndicatorEcoreWl::DataReceived( void* event )
{
DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
Ecore_Ipc_Event_Server_Data *epcEvent = static_cast<Ecore_Ipc_Event_Server_Data *>( event );
LoadSharedImage( epcEvent );
break;
}
- case OP_PIXMAP_REF:
- {
- DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "Indicator client received: OP_PIXMAP_REF\n" );
- LoadPixmapImage( epcEvent );
- break;
- }
case OP_RESIZE:
{
DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "Indicator client received: OP_RESIZE\n" );
}
}
-void Indicator::ConnectionClosed()
+void IndicatorEcoreWl::ConnectionClosed()
{
DALI_LOG_TRACE_METHOD( gIndicatorLogFilter );
Connect();
}
-bool Indicator::CheckVisibleState()
+bool IndicatorEcoreWl::CheckVisibleState()
{
if( mOrientation == Dali::Window::LANDSCAPE
|| mOrientation == Dali::Window::LANDSCAPE_INVERSE
return true;
}
-void Indicator::ClearSharedFileInfo()
+void IndicatorEcoreWl::ClearSharedFileInfo()
{
for( int i = 0; i < SHARED_FILE_NUMBER; i++ )
{
* HIDE_NOW = 0
* };
*/
-void Indicator::ShowIndicator(float duration)
+void IndicatorEcoreWl::ShowIndicator(float duration)
{
if( !mIndicatorAnimation )
{
mIndicatorAnimation = Dali::Animation::New(SLIDING_ANIMATION_DURATION);
- mIndicatorAnimation.FinishedSignal().Connect(this, &Indicator::OnAnimationFinished);
+ mIndicatorAnimation.FinishedSignal().Connect(this, &IndicatorEcoreWl::OnAnimationFinished);
}
if(mIsShowing && !EqualsZero(duration))
if(!mShowTimer)
{
mShowTimer = Dali::Timer::New(1000 * duration);
- mShowTimer.TickSignal().Connect(this, &Indicator::OnShowTimer);
+ mShowTimer.TickSignal().Connect(this, &IndicatorEcoreWl::OnShowTimer);
}
mShowTimer.SetInterval(1000* duration);
mShowTimer.Start();
if( mVisible == Dali::Window::AUTO )
{
// check the stage touch
- Dali::Stage::GetCurrent().TouchSignal().Connect( this, &Indicator::OnStageTouch );
+ Dali::Stage::GetCurrent().TouchSignal().Connect( this, &IndicatorEcoreWl::OnStageTouch );
}
}
else
if( mVisible == Dali::Window::AUTO )
{
// check the stage touch
- Dali::Stage::GetCurrent().TouchSignal().Disconnect( this, &Indicator::OnStageTouch );
+ Dali::Stage::GetCurrent().TouchSignal().Disconnect( this, &IndicatorEcoreWl::OnStageTouch );
}
}
}
-bool Indicator::OnShowTimer()
+bool IndicatorEcoreWl::OnShowTimer()
{
// after time up, hide indicator
ShowIndicator( HIDE_NOW );
return false;
}
-void Indicator::OnAnimationFinished(Dali::Animation& animation)
+void IndicatorEcoreWl::OnAnimationFinished(Dali::Animation& animation)
{
mIsAnimationPlaying = false;
// once animation is finished and indicator is hidden, take it off stage
}
}
-void Indicator::OnPan( Dali::Actor actor, const Dali::PanGesture& gesture )
+void IndicatorEcoreWl::OnPan( Dali::Actor actor, const Dali::PanGesture& gesture )
{
// Nothing to do, but we still want to consume pan
}
-void Indicator::OnStageTouch(const Dali::TouchData& touchData)
+void IndicatorEcoreWl::OnStageTouch(const Dali::TouchData& touchData)
{
// when stage is touched while indicator is showing temporary, hide it
if( mIsShowing && ( CheckVisibleState() == false || mVisible == Dali::Window::AUTO ) )
-#ifndef __DALI_INTERNAL_ECORE_INDICATOR_H__
-#define __DALI_INTERNAL_ECORE_INDICATOR_H__
+#ifndef DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_INDICATOR_IMPL_ECORE_WL_H
+#define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_INDICATOR_IMPL_ECORE_WL_H
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace Dali
{
-namespace Integration
-{
-class Core;
-}
-
namespace Internal
{
namespace Adaptor
{
-class Adaptor;
-typedef unsigned int PixmapId;
+class Adaptor;
/**
* The Indicator class connects to the indicator server, and gets and draws the indicator
* for the given orientation.
*/
-class Indicator : public ConnectionTracker, public ServerConnection::Observer, public IndicatorInterface
+class IndicatorEcoreWl : public ConnectionTracker, public ServerConnection::Observer, public IndicatorInterface
{
public:
CONNECTED
};
- /**
- * copied from ecore_evas_extn_engine.h
- */
- enum BufferType
- {
- BUFFER_TYPE_SHM = 0, ///< shared memory-based buffer backend
- BUFFER_TYPE_DRI2_PIXMAP, ///< dri2 pixmap-based buffer backend
- BUFFER_TYPE_EVASGL_PIXMAP, ///< pixmap backend for Evas GL only (DEPRECATED)
- BUFFER_TYPE_GL_PIXMAP, ///< double buffered GL pixmap backend
- };
-
protected:
/**
* Class to encapsulate lock file
/**
* @copydoc Dali::Internal::IndicatorInterface::IndicatorInterface
*/
- Indicator( Adaptor* adaptor,
+ IndicatorEcoreWl( Adaptor* adaptor,
Dali::Window::WindowOrientation orientation,
IndicatorInterface::Observer* observer );
/**
* @copydoc Dali::Internal::IndicatorInterface::~IndicatorInterface
*/
- virtual ~Indicator();
+ virtual ~IndicatorEcoreWl();
+ /**
+ * @copydoc Dali::Internal::IndicatorInterface::SetAdaptor
+ */
virtual void SetAdaptor(Adaptor* adaptor);
/**
void LoadSharedImage( Ecore_Ipc_Event_Server_Data *epcEvent );
/**
- * Load the pixmap indicator image
- * @param[in] epcEvent The event containing the image data
- */
- void LoadPixmapImage( Ecore_Ipc_Event_Server_Data *epcEvent );
-
- /**
* Update top margin of the stage as much as indicator height
*/
void UpdateTopMargin();
void CreateNewImage( int bufferNumber );
/**
- * Create a new pixmap image for the indicator, and set up signal handling for it.
- */
- void CreateNewPixmapImage();
-
- /**
* Indicator type has changed.
* Inform observer
* @param[in] type The new indicator type
Dali::Shader mBackgroundShader; ///< Shader used for rendering the background
IndicatorBufferPtr mIndicatorBuffer; ///< class which handles indicator rendering
- PixmapId mPixmap; ///< Pixmap including indicator content
Dali::Renderer mForegroundRenderer; ///< Renderer renders the indicator foreground
Dali::Renderer mBackgroundRenderer; ///< Renderer renders the indicator background
Dali::Actor mIndicatorActor; ///< Handle to topmost indicator actor
Dali::Actor mEventActor; ///< Handle to event
Dali::PanGestureDetector mPanDetector; ///< Pan detector to find flick gesture for hidden indicator
- float mGestureDeltaY; ///< Checking how much panning moved
- bool mGestureDetected; ///< Whether find the flick gesture
Dali::Timer mReconnectTimer; ///< Reconnection timer
- SlotDelegate< Indicator > mConnection;
+ SlotDelegate< IndicatorEcoreWl > mConnection;
Dali::Window::IndicatorBgOpacity mOpacityMode; ///< Opacity enum for background
- Indicator::State mState; ///< The connection state
+ IndicatorEcoreWl::State mState; ///< The connection state
Adaptor* mAdaptor;
ServerConnection* mServerConnection;
int mCurrentSharedFile; ///< Current shared file number
SharedFileInfo mSharedFileInfo[SHARED_FILE_NUMBER]; ///< Table to store shared file info
- BufferType mSharedBufferType; ///< Shared buffer type which is used to render indicator
-
struct Impl; ///< Contains Ecore specific information
Impl* mImpl; ///< Created on construction and destroyed on destruction.
} // Internal
} // Dali
-#endif
+#endif // DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_INDICATOR_IMPL_ECORE_WL_H
+++ /dev/null
-#ifndef DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_BASE_FACTORY_ECORE_WL_H
-#define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_BASE_FACTORY_ECORE_WL_H
-
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <dali/internal/window-system/common/window-base-factory.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace Adaptor
-{
-
-class WindowBaseFactoryEcoreWl : public WindowBaseFactory
-{
-public:
- std::unique_ptr< Dali::Internal::Adaptor::WindowBase > CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface ) override;
-};
-
-} // namespace Adaptor
-} // namespace Internal
-} // namespace Dali
-
-#endif // DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_BASE_FACTORY_ECORE_WL_H
*/
// CLASS HEADER
-#include <dali/internal/window-system/tizen-wayland/window-base-factory-ecore-wl.h>
+#include <dali/internal/window-system/tizen-wayland/window-factory-ecore-wl.h>
// INTERNAL HEADERS
#include <dali/internal/window-system/tizen-wayland/window-base-ecore-wl.h>
+#include <dali/internal/window-system/tizen-wayland/indicator-impl-ecore-wl.h>
#include <dali/internal/window-system/common/display-utils.h>
namespace Dali
namespace Adaptor
{
-std::unique_ptr< Dali::Internal::Adaptor::WindowBase > WindowBaseFactoryEcoreWl::CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface )
+std::unique_ptr< WindowBase > WindowFactoryEcoreWl::CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface )
{
return Utils::MakeUnique< WindowBaseEcoreWl >( window, windowRenderSurface );
}
-// this should be created from somewhere
-std::unique_ptr< WindowBaseFactory > GetWindowBaseFactory()
+std::unique_ptr< IndicatorInterface > WindowFactoryEcoreWl::CreateIndicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, IndicatorInterface::Observer* observer )
{
- // returns WindowBase factory
- return Utils::MakeUnique< WindowBaseFactoryEcoreWl >();
+ return Utils::MakeUnique< IndicatorEcoreWl >( adaptor, orientation, observer );
+}
+
+// this should be created from Window impl
+std::unique_ptr< WindowFactory > GetWindowFactory()
+{
+ // returns Window factory
+ return Utils::MakeUnique< WindowFactoryEcoreWl >();
}
} // namespace Adaptor
-#ifndef DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_FACTORY_H
-#define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_FACTORY_H
+#ifndef DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_FACTORY_ECORE_WL_H
+#define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_FACTORY_ECORE_WL_H
/*
* Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
*/
-// EXTERNAL INCLUDES
-#include <memory>
+#include <dali/internal/window-system/common/window-factory.h>
namespace Dali
{
namespace Adaptor
{
-class WindowBase;
-class Window;
-class WindowRenderSurface;
-
-class WindowBaseFactory
+class WindowFactoryEcoreWl : public WindowFactory
{
public:
+ std::unique_ptr< WindowBase > CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface ) override;
- WindowBaseFactory() = default;
- virtual ~WindowBaseFactory() = default;
-
- virtual std::unique_ptr< Dali::Internal::Adaptor::WindowBase > CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface ) = 0;
+ std::unique_ptr< IndicatorInterface > CreateIndicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, IndicatorInterface::Observer* observer ) override;
};
-extern std::unique_ptr< WindowBaseFactory > GetWindowBaseFactory();
-
} // namespace Adaptor
} // namespace Internal
} // namespace Dali
-#endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_FACTORY_H
+#endif // DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_FACTORY_ECORE_WL_H
*/
// CLASS HEADER
-#include <dali/internal/window-system/ubuntu-x11/window-base-factory-ecore-x.h>
+#include <dali/internal/window-system/ubuntu-x11/window-factory-ecore-x.h>
// INTERNAL HEADERS
#include <dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h>
namespace Adaptor
{
-std::unique_ptr< Dali::Internal::Adaptor::WindowBase > WindowBaseFactoryEcoreX::CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface )
+std::unique_ptr< WindowBase > WindowFactoryEcoreX::CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface )
{
return Utils::MakeUnique< WindowBaseEcoreX >( window, windowRenderSurface );
}
-// this should be created from somewhere
-std::unique_ptr< WindowBaseFactory > GetWindowBaseFactory()
+std::unique_ptr< IndicatorInterface > WindowFactoryEcoreX::CreateIndicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, IndicatorInterface::Observer* observer )
{
- // returns WindowBase factory
- return Utils::MakeUnique< WindowBaseFactoryEcoreX >();
+ return std::unique_ptr< IndicatorInterface >( nullptr );
+}
+
+// this should be created from Window impl
+std::unique_ptr< WindowFactory > GetWindowFactory()
+{
+ // returns Window factory
+ return Utils::MakeUnique< WindowFactoryEcoreX >();
}
} // namespace Adaptor
*
*/
-#include <dali/internal/window-system/common/window-base-factory.h>
+#include <dali/internal/window-system/common/window-factory.h>
namespace Dali
{
namespace Adaptor
{
-class WindowBaseFactoryEcoreX : public WindowBaseFactory
+class WindowFactoryEcoreX : public WindowFactory
{
public:
- std::unique_ptr< Dali::Internal::Adaptor::WindowBase > CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface ) override;
+ std::unique_ptr< WindowBase > CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface ) override;
+
+ std::unique_ptr< IndicatorInterface > CreateIndicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, IndicatorInterface::Observer* observer ) override;
};
} // namespace Adaptor