It is only for internal Tizen keyboard application.
To do that, default window should be initialized with wayland input surface
and one wayland API should be called pre rendering.
So, new APIs does not work for the other window and application.
Change-Id: I21a332d57ea939afa7059d1b9b222fea16985a93
END_TEST;
}
+int UtcDaliApplicationNew05(void)
+{
+ int argc(1);
+ const char* argList[1] = {"program"};
+ char** argv = const_cast<char**>(argList);
+
+ Application application = DevelApplication::New(&argc, &argv, "stylesheet", Application::WINDOW_MODE::OPAQUE, PositionSize(), WindowType::IME);
+
+ MyTestApp testApp(application);
+
+ DALI_TEST_CHECK(application);
+
+ END_TEST;
+}
+
int UtcDaliApplicationCopyAndAssignment(void)
{
Application application = Application::New();
END_TEST;
}
+int UtcDaliWindowSetPositionSizeWithOrientationN(void)
+{
+ Dali::Window window;
+ try
+ {
+ DevelWindow::SetPositionSizeWithOrientation(window, PositionSize(0, 0, 200, 100), Dali::WindowOrientation::PORTRAIT);
+ DALI_TEST_CHECK(false); // Should not reach here!
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true);
+ }
+
+ END_TEST;
+}
+
int UtcDaliWindowGetNativeHandleN(void)
{
Dali::Window window;
IF( enable_wayland )
IF( enable_ecore_wayland2 )
- PKG_CHECK_MODULES(WAYLAND ecore-wl2 egl wayland-egl wayland-egl-tizen wayland-client>=1.2.0 xkbcommon libtbm )
+ PKG_CHECK_MODULES(WAYLAND ecore-wl2 egl wayland-egl wayland-egl-tizen wayland-client>=1.2.0 input-method-client xkbcommon libtbm )
ELSE()
PKG_CHECK_MODULES(WAYLAND ecore-wayland egl wayland-egl wayland-client>=1.2.0 xkbcommon libtbm)
ENDIF()
{
namespace DevelApplication
{
+Application New(int* argc, char** argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize, WindowType type)
+{
+ Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
+ if(internal)
+ {
+ // Set Defaut Window type
+ internal->SetDefaultWindowType(type);
+
+ // pre-initialized application
+ internal->SetCommandLineOptions(argc, argv);
+ if(argc && (*argc > 0))
+ {
+ internal->GetWindow().SetClass((*argv)[0], "");
+ }
+ internal->SetStyleSheet(stylesheet);
+
+ internal->GetWindow().SetTransparency((windowMode == Application::OPAQUE ? false : true));
+
+ //Store only the value before adaptor is created
+ internal->StoreWindowPositionSize(positionSize);
+ }
+ else
+ {
+ internal = Internal::Adaptor::Application::New(argc, argv, stylesheet, windowMode, positionSize, Internal::Adaptor::Framework::NORMAL, type);
+ }
+ return Application(internal.Get());
+}
+
bool AddIdleWithReturnValue(Application application, CallbackBase* callback)
{
return Internal::Adaptor::GetImplementation(application).AddIdle(callback, true);
namespace DevelApplication
{
/**
+ * @brief This is the constructor for applications.
+ * Especially, it is for keyboard application.
+ * If you want to create Ime window, use this API with WindowType::IME.
+ *
+ * @param[in,out] argc A pointer to the number of arguments
+ * @param[in,out] argv A pointer to the argument list
+ * @param[in] stylesheet The path to user defined theme file
+ * @param[in] windowMode A member of WINDOW_MODE
+ * @param[in] positionSize A position and a size of the window
+ * @param[in] type It is window type for default window.
+ * @return A handle to the Application
+ * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
+ */
+DALI_ADAPTOR_API Application New(int* argc, char** argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize, WindowType type);
+
+/**
* @brief Ensures that the function passed in is called from the main loop when it is idle.
* @param[in] application A handle to the Application
* @param[in] callback The function to call
if(isNewWindowAllowed)
{
- Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(surface, windowPosition, name, className, isTransparent);
+ Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(surface, windowPosition, name, className, WindowType::NORMAL, isTransparent);
Integration::SceneHolder sceneHolder = Integration::SceneHolder(window);
if(isAdaptorAvailable)
GetImplementation(window).AddFramePresentedCallback(std::move(callback), frameId);
}
+void SetPositionSizeWithOrientation(Window window, PositionSize positionSize, WindowOrientation orientation)
+{
+ GetImplementation(window).SetPositionSizeWithOrientation(positionSize, orientation);
+}
+
} // namespace DevelWindow
} // namespace Dali
*/
DALI_ADAPTOR_API void AddFramePresentedCallback(Window window, std::unique_ptr<CallbackBase> callback, int32_t frameId);
+ /**
+ * @brief Sets window position and size for specific orientation.
+ * This api reserves the position and size per orientation to display server.
+ * When the device is rotated, the window is moved/resized with the reserved position/size by display server.
+ *
+ * @param[in] window The window instance
+ * @param[in] positionSize The reserved position and size for the orientation
+ * @param[in] orientation The orientation
+ *
+ * @note Currently, it only works when the window's type is WindowType::IME.
+ * @note To set WindowType::IME, use Application New(... WindowType type), not Window::SetType().
+ * @note This function is only useful in Tizen world.
+ */
+DALI_ADAPTOR_API void SetPositionSizeWithOrientation(Window window, PositionSize positionSize, WindowOrientation orientation);
+
} // namespace DevelWindow
} // namespace Dali
const std::string& stylesheet,
Dali::Application::WINDOW_MODE windowMode,
const PositionSize& positionSize,
- Framework::Type applicationType)
+ Framework::Type applicationType,
+ WindowType type)
{
- ApplicationPtr application(new Application(argc, argv, stylesheet, windowMode, positionSize, applicationType));
+ ApplicationPtr application(new Application(argc, argv, stylesheet, windowMode, positionSize, applicationType, type));
return application;
}
{
Dali::TextAbstraction::FontClientPreInitialize();
- gPreInitializedApplication = new Application(argc, argv, "", Dali::Application::OPAQUE, PositionSize(), Framework::NORMAL);
+ gPreInitializedApplication = new Application(argc, argv, "", Dali::Application::OPAQUE, PositionSize(), Framework::NORMAL, WindowType::NORMAL);
gPreInitializedApplication->CreateWindow(); // Only create window
gPreInitializedApplication->mLaunchpadState = Launchpad::PRE_INITIALIZED;
}
}
-Application::Application(int* argc, char** argv[], const std::string& stylesheet, Dali::Application::WINDOW_MODE windowMode, const PositionSize& positionSize, Framework::Type applicationType)
+Application::Application(int* argc, char** argv[], const std::string& stylesheet, Dali::Application::WINDOW_MODE windowMode, const PositionSize& positionSize, Framework::Type applicationType, WindowType type)
: mInitSignal(),
mTerminateSignal(),
mPauseSignal(),
mEnvironmentOptions(),
mWindowPositionSize(positionSize),
mLaunchpadState(Launchpad::NONE),
+ mDefaultWindowType(type),
mSlotDelegate(this)
{
// Get mName from environment options
const std::string& windowClassName = mEnvironmentOptions.GetWindowClassName();
- Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(mWindowPositionSize, mMainWindowName, windowClassName, mMainWindowMode == Dali::Application::TRANSPARENT);
+ Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(mWindowPositionSize, mMainWindowName, windowClassName, mDefaultWindowType, mMainWindowMode == Dali::Application::TRANSPARENT);
mMainWindow = Dali::Window(window);
// Quit the application when the window is closed
mFramework->SetCommandLineOptions(argc, argv);
}
+void Application::SetDefaultWindowType(WindowType type)
+{
+ mDefaultWindowType = type;
+ mMainWindow.SetType(type);
+}
+
ApplicationPtr Application::GetPreInitializedApplication()
{
return gPreInitializedApplication;
/**
* Create a new application
- * @param[in] argc A pointer to the number of arguments
- * @param[in] argv A pointer to the argument list
- * @param[in] stylesheet The path to user defined theme file
- * @param[in] windowMode A member of Dali::Application::WINDOW_MODE
- * @param[in] positionSize A position and a size of the window
- * @param[in] applicationType A member of Dali::Framework::Type
+ * @param[in] argc A pointer to the number of arguments
+ * @param[in] argv A pointer to the argument list
+ * @param[in] stylesheet The path to user defined theme file
+ * @param[in] windowMode A member of Dali::Application::WINDOW_MODE
+ * @param[in] positionSize A position and a size of the window
+ * @param[in] applicationType A member of Dali::Framework::Type
+ * @param[in] type It is window type for default window.
*/
- static ApplicationPtr New(int* argc, char** argv[], const std::string& stylesheet, WINDOW_MODE windowMode, const PositionSize& positionSize, Framework::Type applicationType);
+ static ApplicationPtr New(int* argc, char** argv[], const std::string& stylesheet, WINDOW_MODE windowMode, const PositionSize& positionSize, Framework::Type applicationType, WindowType type);
/**
* @copydoc Dali::DevelApplication::PreInitialize()
*/
void SetCommandLineOptions(int* argc, char** argv[]);
+ /**
+ * Sets default window type.
+ * This is used in case of the preinitialized application.
+ * @param[in] type the window type for default window
+ */
+ void SetDefaultWindowType(WindowType type);
+
public: // Signals
/**
* @copydoc Dali::Application::InitSignal()
protected:
/**
* Private Constructor
- * @param[in] argc A pointer to the number of arguments
- * @param[in] argv A pointer to the argument list
- * @param[in] stylesheet The path to user defined theme file
- * @param[in] windowMode A member of Dali::Application::WINDOW_MODE
- * @param[in] positionSize A position and a size of the window
- * @param[in] applicationType A member of Dali::Framework::Type
+ * @param[in] argc A pointer to the number of arguments
+ * @param[in] argv A pointer to the argument list
+ * @param[in] stylesheet The path to user defined theme file
+ * @param[in] windowMode A member of Dali::Application::WINDOW_MODE
+ * @param[in] positionSize A position and a size of the window
+ * @param[in] applicationType A member of Dali::Framework::Type
+ * @param[in] type The default window's type.
*/
- Application(int* argc, char** argv[], const std::string& stylesheet, WINDOW_MODE windowMode, const PositionSize& positionSize, Framework::Type applicationType);
+ Application(int* argc, char** argv[], const std::string& stylesheet, WINDOW_MODE windowMode, const PositionSize& positionSize, Framework::Type applicationType, WindowType type);
/**
* Destructor
Application& operator=(Application&);
/**
- * Creates the window
+ * Creates the default window
*/
void CreateWindow();
Dali::Application::WINDOW_MODE mMainWindowMode; ///< Window mode of the main window
std::string mMainWindowName; ///< Name of the main window as obtained from environment options
- std::string mStylesheet;
- EnvironmentOptions mEnvironmentOptions;
- PositionSize mWindowPositionSize;
- Launchpad::State mLaunchpadState;
- bool mUseRemoteSurface;
+ std::string mStylesheet;
+ EnvironmentOptions mEnvironmentOptions;
+ PositionSize mWindowPositionSize;
+ Launchpad::State mLaunchpadState;
+ bool mUseRemoteSurface;
+ WindowType mDefaultWindowType; ///< Default window's type. It is used when Application is created.
SlotDelegate<Application> mSlotDelegate;
}
ComponentApplication::ComponentApplication(int* argc, char** argv[], const std::string& stylesheet, Dali::Application::WINDOW_MODE windowMode)
-: Application(argc, argv, stylesheet, windowMode, PositionSize(), Framework::COMPONENT)
+: Application(argc, argv, stylesheet, windowMode, PositionSize(), Framework::COMPONENT, WindowType::NORMAL)
{
}
#ifdef COMPONENT_APPLICATION_SUPPORT
int AppComponentMain()
{
- int ret;
-
/*Crate component_based_app_base_lifecycle_callback*/
component_based_app_base_lifecycle_callback_s callback;
callback.init = AppInit;
}
WatchApplication::WatchApplication(int* argc, char** argv[], const std::string& stylesheet, Dali::Application::WINDOW_MODE windowMode)
-: Application(argc, argv, stylesheet, windowMode, PositionSize(), Framework::WATCH),
+: Application(argc, argv, stylesheet, windowMode, PositionSize(), Framework::WATCH, WindowType::NORMAL),
mState(UNINITIALIZED)
{
}
}
WidgetApplication::WidgetApplication(int* argc, char** argv[], const std::string& stylesheet)
-: Application(argc, argv, stylesheet, Dali::WidgetApplication::OPAQUE, PositionSize(), Framework::WIDGET)
+: Application(argc, argv, stylesheet, Dali::WidgetApplication::OPAQUE, PositionSize(), Framework::WIDGET, WindowType::NORMAL)
{
DALI_LOG_ERROR("WidgetApplication is not implemented in UBUNTU profile.\n");
}
{
}
+Dali::WindowType WindowBaseAndroid::GetType() const
+{
+ return Dali::WindowType::NORMAL;
+}
+
Dali::WindowOperationResult WindowBaseAndroid::SetNotificationLevel(Dali::WindowNotificationLevel level)
{
return Dali::WindowOperationResult::NOT_SUPPORTED;
return 0;
}
+void WindowBaseAndroid::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
+{
+}
+
+void WindowBaseAndroid::InitializeIme()
+{
+}
+
+void WindowBaseAndroid::ImeWindowReadyToRender()
+{
+}
+
} // namespace Adaptor
} // namespace Internal
void SetType(Dali::WindowType type) override;
/**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::GetType()
+ */
+ Dali::WindowType GetType() const override;
+
+ /**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
*/
int GetOrientation() const override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetPositionSizeWithAngle()
+ */
+ void SetPositionSizeWithAngle(PositionSize positionSize, int angle) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::InitializeIme()
+ */
+ void InitializeIme() override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::ImeWindowReadyToRender()
+ */
+ void ImeWindowReadyToRender() override;
+
private:
/**
* Second stage initialization
virtual void SetType(Dali::WindowType type) = 0;
/**
+ * @copydoc Dali::Window::GetType()
+ */
+ virtual Dali::WindowType GetType() const = 0;
+
+ /**
* @copydoc Dali::Window::SetNotificationLevel()
*/
virtual Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) = 0;
*/
virtual int CreateFramePresentedSyncFence() = 0;
+ /**
+ * @copydoc Dali::Window::SetPositionSizeWithAngle()
+ */
+ virtual void SetPositionSizeWithAngle(PositionSize positionSize, int angle) = 0;
+
+ /**
+ * @brief Initialize for Ime window.
+ * It should be called when the window is only used for Ime keyboard window.
+ */
+ virtual void InitializeIme() = 0;
+
+ /**
+ * @brief Send the signal to display server for Ime Window is ready to render.
+ * It is used for compositing by display server.
+ */
+ virtual void ImeWindowReadyToRender() = 0;
+
// Signals
/**
} // unnamed namespace
-Window* Window::New(const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent)
+Window* Window::New(const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent)
{
Any surface;
- return Window::New(surface, positionSize, name, className, isTransparent);
+ return Window::New(surface, positionSize, name, className, type, isTransparent);
}
-Window* Window::New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent)
+Window* Window::New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent)
{
Window* window = new Window();
window->mIsTransparent = isTransparent;
- window->Initialize(surface, positionSize, name, className);
+ window->Initialize(surface, positionSize, name, className, type);
return window;
}
mIsFocusAcceptable(true),
mIconified(false),
mOpaqueState(false),
- mType(WindowType::NORMAL),
mParentWindow(NULL),
mPreferredAngle(static_cast<int>(WindowOrientation::NO_ORIENTATION_PREFERENCE)),
mRotationAngle(0),
}
}
-void Window::Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className)
+void Window::Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, WindowType type)
{
// Create a window render surface
auto renderSurfaceFactory = Dali::Internal::Adaptor::GetRenderSurfaceFactory();
// Get a window base
mWindowBase = mWindowSurface->GetWindowBase();
+ // Set Window Type
+ mWindowBase->SetType(type);
+
+ // Initialize for Ime window type
+ if(type == WindowType::IME)
+ {
+ mWindowBase->InitializeIme();
+ mWindowSurface->InitializeImeSurface();
+ }
+
// Connect signals
mWindowBase->IconifyChangedSignal().Connect(this, &Window::OnIconifyChanged);
mWindowBase->FocusChangedSignal().Connect(this, &Window::OnFocusChanged);
return preferredOrientation;
}
+void Window::SetPositionSizeWithOrientation(PositionSize positionSize, WindowOrientation orientation)
+{
+ int angle = ConvertToAngle(orientation);
+ mWindowBase->SetPositionSizeWithAngle(positionSize, angle);
+}
+
void Window::SetAvailableAnlges(const std::vector<int>& angles)
{
if(angles.size() > 4)
void Window::SetType(WindowType type)
{
- if(type != mType)
- {
- mWindowBase->SetType(type);
-
- mType = type;
- }
+ mWindowBase->SetType(type);
}
WindowType Window::GetType() const
{
- return mType;
+ return mWindowBase->GetType();
}
WindowOperationResult Window::SetNotificationLevel(WindowNotificationLevel level)
{
- if(mType != WindowType::NOTIFICATION)
+ WindowType type = mWindowBase->GetType();
+ if(type != WindowType::NOTIFICATION)
{
- DALI_LOG_INFO(gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Not supported window type [%d]\n", mType);
+ DALI_LOG_INFO(gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Not supported window type [%d]\n", type);
return WindowOperationResult::INVALID_OPERATION;
}
WindowNotificationLevel Window::GetNotificationLevel() const
{
- if(mType != WindowType::NOTIFICATION)
+ WindowType type = mWindowBase->GetType();
+ if(type != WindowType::NOTIFICATION)
{
- DALI_LOG_INFO(gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: Not supported window type [%d]\n", mType);
+ DALI_LOG_INFO(gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: Not supported window type [%d]\n", type);
return WindowNotificationLevel::NONE;
}
* @param[in] positionSize The position and size of the window
* @param[in] name The window title
* @param[in] className The window class name
+ * @param[in] type Window type.
* @param[in] isTransparent Whether window is transparent
* @return A newly allocated Window
*/
- static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent = false);
+ static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent = false);
/**
* @brief Create a new Window. This should only be called once by the Application class
* @param[in] positionSize The position and size of the window
* @param[in] name The window title
* @param[in] className The window class name
+ * @param[in] type Window type.
* @param[in] isTransparent Whether window is transparent
* @return A newly allocated Window
*/
- static Window* New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent = false);
+ static Window* New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent = false);
/**
* @copydoc Dali::Window::SetClass()
*/
void SetAvailableOrientations(const Dali::Vector<WindowOrientation>& orientations);
+ /**
+ * @copydoc Dali::DevelWindow::SetPositionSizeWithOrientation()
+ */
+ void SetPositionSizeWithOrientation(PositionSize positionSize, WindowOrientation orientation);
+
public: // Dali::Internal::Adaptor::SceneHolder
/**
* @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle
/**
* Second stage initialization
*/
- void Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className);
+ void Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, WindowType type);
/**
* Called when the window becomes iconified or deiconified.
bool mIsFocusAcceptable : 1;
bool mIconified : 1;
bool mOpaqueState : 1;
- WindowType mType;
Dali::Window mParentWindow;
OrientationPtr mOrientation;
std::vector<int> mAvailableAngles;
int mPreferredAngle;
- int mRotationAngle; ///< The angle of the rotation
- int mWindowWidth; ///< The width of the window
- int mWindowHeight; ///< The height of the window
+ int mRotationAngle; ///< The angle of the rotation
+ int mWindowWidth; ///< The width of the window
+ int mWindowHeight; ///< The height of the window
- EventHandlerPtr mEventHandler; ///< The window events handler
+ EventHandlerPtr mEventHandler; ///< The window events handler
- OrientationMode mOrientationMode;
+ OrientationMode mOrientationMode; ///< The physical screen mode is portrait or landscape
- int mNativeWindowId; ///< The Native Window Id
+ int mNativeWindowId; ///< The Native Window Id
// Signals
SignalType mDeleteRequestSignal;
mWindowBase(),
mThreadSynchronization(nullptr),
mRenderNotification(nullptr),
- mRotationTrigger(nullptr),
+ mPostRenderTrigger(),
mFrameRenderedTrigger(),
mGraphics(nullptr),
mEGLSurface(nullptr),
mWindowRotationFinished(true),
mScreenRotationFinished(true),
mResizeFinished(true),
- mDefaultScreenRotationAvailable(false)
+ mDefaultScreenRotationAvailable(false),
+ mIsImeWindowSurface(false)
{
DALI_LOG_INFO(gWindowRenderSurfaceLogFilter, Debug::Verbose, "Creating Window\n");
Initialize(surface);
WindowRenderSurface::~WindowRenderSurface()
{
- if(mRotationTrigger)
- {
- delete mRotationTrigger;
- }
}
void WindowRenderSurface::Initialize(Any surface)
void WindowRenderSurface::RequestRotation(int angle, int width, int height)
{
- if(!mRotationTrigger)
+ if(!mPostRenderTrigger)
{
- mRotationTrigger = TriggerEventFactory::CreateTriggerEvent(MakeCallback(this, &WindowRenderSurface::ProcessRotationRequest), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER);
+ mPostRenderTrigger = std::unique_ptr<TriggerEventInterface>(TriggerEventFactory::CreateTriggerEvent(MakeCallback(this, &WindowRenderSurface::ProcessPostRender),
+ TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER));
}
mPositionSize.width = width;
mWindowRotationAngle = angle;
mWindowRotationFinished = false;
+ mResizeFinished = false;
mWindowBase->SetWindowRotationAngle(mWindowRotationAngle);
mWindowBase->ResizeEglWindow(positionSize);
mResizeFinished = true;
- DALI_LOG_RELEASE_INFO("WindowRenderSurface::PreRender: Set resize\n");
+ DALI_LOG_RELEASE_INFO("WindowRenderSurface::PreRender: Set resize, x: %d, y: %d, w: %d, h:%d\n", positionSize.x, positionSize.y, positionSize.width, positionSize.height);
}
SetFullSwapNextFrame();
GlImplementation& mGLES = eglGraphics->GetGlesInterface();
mGLES.PostRender();
- if(mIsResizing)
+ if((mIsResizing && !mWindowRotationFinished) || mIsImeWindowSurface)
{
- if(!mWindowRotationFinished)
+ if(mThreadSynchronization)
{
- if(mThreadSynchronization)
- {
- // Enable PostRender flag
- mThreadSynchronization->PostRenderStarted();
- }
-
- DALI_LOG_RELEASE_INFO("WindowRenderSurface::PostRender: Trigger rotation event\n");
+ // Enable PostRender flag
+ mThreadSynchronization->PostRenderStarted();
+ }
- mRotationTrigger->Trigger();
+ if(!mWindowRotationFinished || mIsImeWindowSurface)
+ {
+ mPostRenderTrigger->Trigger();
+ }
- if(mThreadSynchronization)
- {
- // Wait until the event-thread complete the rotation event processing
- mThreadSynchronization->PostRenderWaitForCompletion();
- }
+ if(mThreadSynchronization)
+ {
+ // Wait until the event-thread complete the rotation event processing
+ mThreadSynchronization->PostRenderWaitForCompletion();
}
}
return mGraphics ? mGraphics->GetStencilBufferRequired() : Integration::StencilBufferAvailable::FALSE;
}
+void WindowRenderSurface::InitializeImeSurface()
+{
+ mIsImeWindowSurface = true;
+ if(!mPostRenderTrigger)
+ {
+ mPostRenderTrigger = std::unique_ptr<TriggerEventInterface>(TriggerEventFactory::CreateTriggerEvent(MakeCallback(this, &WindowRenderSurface::ProcessPostRender),
+ TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER));
+ }
+}
+
void WindowRenderSurface::OutputTransformed()
{
int screenRotationAngle = mWindowBase->GetScreenRotationAngle();
}
}
-void WindowRenderSurface::ProcessRotationRequest()
+void WindowRenderSurface::ProcessPostRender()
{
- mWindowRotationFinished = true;
-
- mWindowBase->WindowRotationCompleted(mWindowRotationAngle, mPositionSize.width, mPositionSize.height);
+ if(!mWindowRotationFinished)
+ {
+ mWindowBase->WindowRotationCompleted(mWindowRotationAngle, mPositionSize.width, mPositionSize.height);
+ DALI_LOG_RELEASE_INFO("WindowRenderSurface::ProcessPostRender: Rotation Done\n");
+ mWindowRotationFinished = true;
+ }
- DALI_LOG_INFO(gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::ProcessRotationRequest: Rotation Done\n");
+ if(mIsImeWindowSurface)
+ {
+ mWindowBase->ImeWindowReadyToRender();
+ }
if(mThreadSynchronization)
{
WindowBase* GetWindowBase();
/**
+ * @brief Intiailize Ime Surface for Ime window rendering.
+ *
+ * It sets one flag and callback function for Ime window rendering
+ * This callback function calls one special native window function for ready to commit buffer.
+ * The special function notify to display server.
+ * It is only used for Ime window.
+ */
+ void InitializeImeSurface();
+
+ /**
* @brief This signal is emitted when the output is transformed.
*/
OutputSignalType& OutputTransformedSignal();
void OutputTransformed();
/**
- * @brief Used as the callback for the rotation-trigger.
+ * @brief Used as the callback for the post render.
+ * It is used both window rotation and supporting Ime window
*/
- void ProcessRotationRequest();
+ void ProcessPostRender();
/**
* @brief Used as the callback for the frame rendered / presented.
std::unique_ptr<WindowBase> mWindowBase;
ThreadSynchronizationInterface* mThreadSynchronization;
TriggerEventInterface* mRenderNotification; ///< Render notification trigger
- TriggerEventInterface* mRotationTrigger;
+ std::unique_ptr<TriggerEventInterface> mPostRenderTrigger; ///< Post render callback function
std::unique_ptr<TriggerEventInterface> mFrameRenderedTrigger;
GraphicsInterface* mGraphics; ///< Graphics interface
EGLSurface mEGLSurface;
bool mScreenRotationFinished;
bool mResizeFinished;
bool mDefaultScreenRotationAvailable;
+ bool mIsImeWindowSurface;
}; // class WindowRenderSurface
void SetType(Dali::WindowType type) override;
/**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::GetType()
+ */
+ Dali::WindowType GetType() const override;
+
+ /**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
WindowOperationResult SetNotificationLevel(WindowNotificationLevel level) override;
*/
int CreateFramePresentedSyncFence() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetPositionSizeWithAngle()
+ */
+ void SetPositionSizeWithAngle(PositionSize positionSize, int angle) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::InitializeIme()
+ */
+ void InitializeIme() override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::ImeWindowReadyToRender()
+ */
+ void ImeWindowReadyToRender() override;
+
private:
// Undefined
WindowBaseCocoa(const WindowBaseCocoa&) = delete;
{
}
+Dali::WindowType WindowBaseCocoa::GetType() const
+{
+ return Dali::WindowType::NORMAL;
+}
+
WindowOperationResult WindowBaseCocoa::SetNotificationLevel( WindowNotificationLevel level )
{
return WindowOperationResult::NOT_SUPPORTED;
return -1;
}
+void WindowBaseCocoa::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
+{
+}
+
+void WindowBaseCocoa::InitializeIme()
+{
+}
+
+void WindowBaseCocoa::ImeWindowReadyToRender()
+{
+}
+
} // namespace Dali::Internal::Adaptor
@implementation CocoaView
ecore_wl_window_type_set(mEcoreWindow, windowType);
}
+Dali::WindowType WindowBaseEcoreWl::GetType() const
+{
+ return Dali::WindowType::NORMAL;
+}
+
Dali::WindowOperationResult WindowBaseEcoreWl::SetNotificationLevel(Dali::WindowNotificationLevel level)
{
while(!mTizenPolicy)
return -1;
}
+void WindowBaseEcoreWl::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
+{
+}
+
+void WindowBaseEcoreWl::InitializeIme()
+{
+}
+
+void WindowBaseEcoreWl::ImeWindowReadyToRender()
+{
+}
+
} // namespace Adaptor
} // namespace Internal
void SetType(Dali::WindowType type) override;
/**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::GetType()
+ */
+ Dali::WindowType GetType() const override;
+
+ /**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
*/
int CreateFramePresentedSyncFence() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetPositionSizeWithAngle()
+ */
+ void SetPositionSizeWithAngle(PositionSize positionSize, int angle) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::InitializeIme()
+ */
+ void InitializeIme() override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::ImeWindowReadyToRender()
+ */
+ void ImeWindowReadyToRender() override;
+
private:
/**
* Second stage initialization
: mEcoreEventHandler(),
mEcoreWindow(nullptr),
mWlSurface(nullptr),
+ mWlInputPanel(nullptr),
+ mWlOutput(nullptr),
+ mWlInputPanelSurface(nullptr),
mEglWindow(nullptr),
mDisplay(nullptr),
mEventQueue(nullptr),
mTizenDisplayPolicy(nullptr),
mKeyMap(nullptr),
mSupportedAuxiliaryHints(),
+ mWindowPositionSize(positionSize),
mAuxiliaryHints(),
+ mType(WindowType::NORMAL),
mNotificationLevel(-1),
- mNotificationChangeState(0),
- mNotificationLevelChangeDone(true),
mScreenOffMode(0),
- mScreenOffModeChangeState(0),
- mScreenOffModeChangeDone(true),
mBrightness(0),
+ mWindowRotationAngle(0),
+ mScreenRotationAngle(0),
+ mSupportedPreProtation(0),
+ mNotificationChangeState(0),
+ mScreenOffModeChangeState(0),
mBrightnessChangeState(0),
- mBrightnessChangeDone(true),
+ mLastSubmittedMoveResizeSerial(0),
+ mMoveResizeSerial(0),
+ mNotificationLevelChangeDone(true),
+ mScreenOffModeChangeDone(true),
mVisible(true),
- mWindowPositionSize(positionSize),
mOwnSurface(false),
- mMoveResizeSerial(0),
- mLastSubmittedMoveResizeSerial(0),
- mWindowRotationAngle(0),
- mScreenRotationAngle(0),
- mSupportedPreProtation(0)
+ mBrightnessChangeDone(true)
#ifdef DALI_ELDBUS_AVAILABLE
,
mSystemConnection(NULL)
InitializeEcoreElDBus();
Ecore_Wl2_Display* display = ecore_wl2_connected_display_get(NULL);
- mDisplay = ecore_wl2_display_get(display);
+ mDisplay = ecore_wl2_display_get(display);
if(mDisplay)
{
void WindowBaseEcoreWl2::SetType(Dali::WindowType type)
{
- Ecore_Wl2_Window_Type windowType;
-
- switch(type)
+ if(mType != type)
{
- case Dali::WindowType::NORMAL:
- {
- windowType = ECORE_WL2_WINDOW_TYPE_TOPLEVEL;
- break;
- }
- case Dali::WindowType::NOTIFICATION:
- {
- windowType = ECORE_WL2_WINDOW_TYPE_NOTIFICATION;
- break;
- }
- case Dali::WindowType::UTILITY:
- {
- windowType = ECORE_WL2_WINDOW_TYPE_UTILITY;
- break;
- }
- case Dali::WindowType::DIALOG:
- {
- windowType = ECORE_WL2_WINDOW_TYPE_DIALOG;
- break;
- }
- default:
+ mType = type;
+ Ecore_Wl2_Window_Type windowType;
+
+ switch(type)
{
- windowType = ECORE_WL2_WINDOW_TYPE_TOPLEVEL;
- break;
+ case Dali::WindowType::NORMAL:
+ {
+ windowType = ECORE_WL2_WINDOW_TYPE_TOPLEVEL;
+ break;
+ }
+ case Dali::WindowType::NOTIFICATION:
+ {
+ windowType = ECORE_WL2_WINDOW_TYPE_NOTIFICATION;
+ break;
+ }
+ case Dali::WindowType::UTILITY:
+ {
+ windowType = ECORE_WL2_WINDOW_TYPE_UTILITY;
+ break;
+ }
+ case Dali::WindowType::DIALOG:
+ {
+ windowType = ECORE_WL2_WINDOW_TYPE_DIALOG;
+ break;
+ }
+ case Dali::WindowType::IME:
+ {
+ windowType = ECORE_WL2_WINDOW_TYPE_NONE;
+ break;
+ }
+ default:
+ {
+ windowType = ECORE_WL2_WINDOW_TYPE_TOPLEVEL;
+ break;
+ }
}
+ ecore_wl2_window_type_set(mEcoreWindow, windowType);
}
+}
- ecore_wl2_window_type_set(mEcoreWindow, windowType);
+Dali::WindowType WindowBaseEcoreWl2::GetType() const
+{
+ return mType;
}
Dali::WindowOperationResult WindowBaseEcoreWl2::SetNotificationLevel(Dali::WindowNotificationLevel level)
return wl_egl_window_tizen_create_presentation_sync_fd(mEglWindow);
}
+void WindowBaseEcoreWl2::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
+{
+ DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetPositionSizeWithAngle, angle: %d, x: %d, y: %d, w: %d, h: %d\n", angle, positionSize.x, positionSize.y, positionSize.width, positionSize.height);
+ ecore_wl2_window_rotation_geometry_set(mEcoreWindow, angle, positionSize.x, positionSize.y, positionSize.width, positionSize.height);
+}
+
+void WindowBaseEcoreWl2::InitializeIme()
+{
+ Eina_Iterator* globals;
+ struct wl_registry* registry;
+ Ecore_Wl2_Global* global;
+ Ecore_Wl2_Display* ecoreWl2Display;
+
+ if(!(ecoreWl2Display = ecore_wl2_connected_display_get(NULL)))
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get ecore_wl2 connected display\n");
+ return;
+ }
+
+ DALI_LOG_RELEASE_INFO("InitializeIme: Ecore_Wl2_Display: %p, ecore wl window: %p\n", ecoreWl2Display, mEcoreWindow);
+
+ if(!(registry = ecore_wl2_display_registry_get(ecoreWl2Display)))
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get ecore_wl2 display registry\n");
+ return;
+ }
+
+ if(!(globals = ecore_wl2_display_globals_get(ecoreWl2Display)))
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get ecore_wl2 globals\n");
+ return;
+ }
+
+ EINA_ITERATOR_FOREACH(globals, global)
+ {
+ if(strcmp(global->interface, "wl_input_panel") == 0)
+ {
+ mWlInputPanel = (wl_input_panel*)wl_registry_bind(registry, global->id, &wl_input_panel_interface, 1);
+ }
+ else if(strcmp(global->interface, "wl_output") == 0)
+ {
+ mWlOutput = (wl_output*)wl_registry_bind(registry, global->id, &wl_output_interface, 1);
+ }
+ }
+
+ if(!mWlInputPanel)
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get wayland input panel interface\n");
+ return;
+ }
+
+ if(!mWlOutput)
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get wayland output panel interface\n");
+ return;
+ }
+
+ mWlInputPanelSurface = wl_input_panel_get_input_panel_surface(mWlInputPanel, mWlSurface);
+ if(!mWlInputPanelSurface)
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get wayland input panel surface\n");
+ return;
+ }
+
+ wl_input_panel_surface_set_toplevel(mWlInputPanelSurface, mWlOutput, WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM);
+}
+
+void WindowBaseEcoreWl2::ImeWindowReadyToRender()
+{
+ if(!mWlInputPanelSurface)
+ {
+ DALI_LOG_ERROR("WindowBaseEcoreWl2::ImeWindowReadyToRender(), wayland input panel surface is null\n");
+ return;
+ }
+
+ wl_input_panel_surface_set_ready(mWlInputPanelSurface, 1);
+}
+
} // namespace Adaptor
} // namespace Internal
// EXTERNAL HEADERS
#include <Ecore.h>
#include <Ecore_Wl2.h>
+#include <input-method-client-protocol.h>
#include <tizen-extension-client-protocol.h>
#include <wayland-egl.h>
#include <xkbcommon/xkbcommon.h>
void SetType(Dali::WindowType type) override;
/**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::GetType()
+ */
+ Dali::WindowType GetType() const override;
+
+ /**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
*/
int CreateFramePresentedSyncFence() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetPositionSizeWithAngle()
+ */
+ void SetPositionSizeWithAngle(PositionSize positionSize, int angle) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::InitializeIme()
+ */
+ void InitializeIme() override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::ImeWindowReadyToRender()
+ */
+ void ImeWindowReadyToRender() override;
+
private:
/**
* Second stage initialization
private:
typedef std::vector<std::pair<std::string, std::string> > AuxiliaryHints;
+ Dali::Vector<Ecore_Event_Handler*> mEcoreEventHandler;
+ Ecore_Wl2_Window* mEcoreWindow;
- Dali::Vector<Ecore_Event_Handler*> mEcoreEventHandler;
+ wl_surface* mWlSurface;
+ wl_input_panel* mWlInputPanel;
+ wl_output* mWlOutput;
+ wl_input_panel_surface* mWlInputPanelSurface;
- Ecore_Wl2_Window* mEcoreWindow;
- wl_surface* mWlSurface;
wl_egl_window* mEglWindow;
wl_display* mDisplay;
wl_event_queue* mEventQueue;
xkb_keymap* mKeyMap;
std::vector<std::string> mSupportedAuxiliaryHints;
- AuxiliaryHints mAuxiliaryHints;
-
- int mNotificationLevel;
- uint32_t mNotificationChangeState;
- bool mNotificationLevelChangeDone;
-
- int mScreenOffMode;
- uint32_t mScreenOffModeChangeState;
- bool mScreenOffModeChangeDone;
-
- int mBrightness;
- uint32_t mBrightnessChangeState;
- bool mBrightnessChangeDone;
- bool mVisible : 1;
Dali::PositionSize mWindowPositionSize;
+ AuxiliaryHints mAuxiliaryHints;
+
+ WindowType mType;
+ int mNotificationLevel;
+ int mScreenOffMode;
+ int mBrightness;
+ int mWindowRotationAngle;
+ int mScreenRotationAngle;
+ int mSupportedPreProtation;
+
+ uint32_t mNotificationChangeState;
+ uint32_t mScreenOffModeChangeState;
+ uint32_t mBrightnessChangeState;
+ uint32_t mLastSubmittedMoveResizeSerial;
+ volatile uint32_t mMoveResizeSerial;
+ bool mNotificationLevelChangeDone;
+ bool mScreenOffModeChangeDone;
+ bool mVisible : 1;
bool mOwnSurface;
+ bool mBrightnessChangeDone;
- volatile uint32_t mMoveResizeSerial;
- uint32_t mLastSubmittedMoveResizeSerial;
-
- int mWindowRotationAngle;
- int mScreenRotationAngle;
- int mSupportedPreProtation;
#ifdef DALI_ELDBUS_AVAILABLE
Eldbus_Connection* mSystemConnection;
#endif // DALI_ELDBUS_AVAILABLE
{
}
+Dali::WindowType WindowBaseEcoreX::GetType() const
+{
+ return Dali::WindowType::NORMAL;
+}
+
Dali::WindowOperationResult WindowBaseEcoreX::SetNotificationLevel(Dali::WindowNotificationLevel level)
{
return Dali::WindowOperationResult::NOT_SUPPORTED;
return -1;
}
+void WindowBaseEcoreX::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
+{
+}
+
+void WindowBaseEcoreX::InitializeIme()
+{
+}
+
+void WindowBaseEcoreX::ImeWindowReadyToRender()
+{
+}
+
} // namespace Adaptor
} // namespace Internal
void SetType(Dali::WindowType type) override;
/**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::GetType()
+ */
+ Dali::WindowType GetType() const override;
+
+ /**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
*/
int CreateFramePresentedSyncFence() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetPositionSizeWithAngle()
+ */
+ void SetPositionSizeWithAngle(PositionSize positionSize, int angle) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::InitializeIme()
+ */
+ void InitializeIme() override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::ImeWindowReadyToRender()
+ */
+ void ImeWindowReadyToRender() override;
+
private:
/**
* Second stage initialization
{
}
+Dali::WindowType WindowBaseWin::GetType() const
+{
+ return Dali::WindowType::NORMAL;
+}
+
Dali::WindowOperationResult WindowBaseWin::SetNotificationLevel(Dali::WindowNotificationLevel level)
{
return Dali::WindowOperationResult::NOT_SUPPORTED;
return -1;
}
+void WindowBaseWin::SetPositionSizeWithAngle(PositionSize positionSize, int angle)
+{
+}
+
+void WindowBaseWin::InitializeIme()
+{
+}
+
+void WindowBaseWin::ImeWindowReadyToRender()
+{
+}
+
} // namespace Adaptor
} // namespace Internal
void SetType(Dali::WindowType type) override;
/**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::GetType()
+ */
+ Dali::WindowType GetType() const override;
+
+ /**
* @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
*/
Dali::WindowOperationResult SetNotificationLevel(Dali::WindowNotificationLevel level) override;
*/
int CreateFramePresentedSyncFence() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::SetPositionSizeWithAngle()
+ */
+ void SetPositionSizeWithAngle(PositionSize positionSize, int angle) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::InitializeIme()
+ */
+ void InitializeIme() override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::ImeWindowReadyToRender()
+ */
+ void ImeWindowReadyToRender() override;
+
private:
/**
* Second stage initialization
{
internal->GetWindow().SetClass((*argv)[0], "");
}
-
- return Application(internal.Get());
}
else
{
- internal = Internal::Adaptor::Application::New(argc, argv, "", OPAQUE, PositionSize(), Internal::Adaptor::Framework::NORMAL);
- return Application(internal.Get());
+ internal = Internal::Adaptor::Application::New(argc, argv, "", OPAQUE, PositionSize(), Internal::Adaptor::Framework::NORMAL, WindowType::NORMAL);
}
+ return Application(internal.Get());
}
Application Application::New(int* argc, char** argv[], const std::string& stylesheet)
internal->GetWindow().SetClass((*argv)[0], "");
}
internal->SetStyleSheet(stylesheet);
-
- return Application(internal.Get());
}
else
{
- internal = Internal::Adaptor::Application::New(argc, argv, stylesheet, OPAQUE, PositionSize(), Internal::Adaptor::Framework::NORMAL);
- return Application(internal.Get());
+ internal = Internal::Adaptor::Application::New(argc, argv, stylesheet, OPAQUE, PositionSize(), Internal::Adaptor::Framework::NORMAL, WindowType::NORMAL);
}
+ return Application(internal.Get());
}
Application Application::New(int* argc, char** argv[], const std::string& stylesheet, WINDOW_MODE windowMode)
internal->SetStyleSheet(stylesheet);
internal->GetWindow().SetTransparency((windowMode == Application::OPAQUE ? false : true));
-
- return Application(internal.Get());
}
else
{
- internal = Internal::Adaptor::Application::New(argc, argv, stylesheet, windowMode, PositionSize(), Internal::Adaptor::Framework::NORMAL);
- return Application(internal.Get());
+ internal = Internal::Adaptor::Application::New(argc, argv, stylesheet, windowMode, PositionSize(), Internal::Adaptor::Framework::NORMAL, WindowType::NORMAL);
}
+ return Application(internal.Get());
}
Application Application::New(int* argc, char** argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize)
//Store only the value before adaptor is created
internal->StoreWindowPositionSize(positionSize);
-
- return Application(internal.Get());
}
else
{
- internal = Internal::Adaptor::Application::New(argc, argv, stylesheet, windowMode, positionSize, Internal::Adaptor::Framework::NORMAL);
- return Application(internal.Get());
+ internal = Internal::Adaptor::Application::New(argc, argv, stylesheet, windowMode, positionSize, Internal::Adaptor::Framework::NORMAL, WindowType::NORMAL);
}
+ return Application(internal.Get());
}
Application::~Application()
/**
* @brief An enum of Window types.
+ * Window type has effect of DALi window's behavior, window's stack and extra functions.
+ * The default window type is NORMAL. If application does not set the specific window type, this type will be set.
+ *
+ * Ime window type is special type. It can only set by one Application::New function.
+ * The fuction is "New(int* argc, char** argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize, WindowType type)".
+ * Ime window type can not set by Window::SetType().
+ *
* @SINCE_2_0.0
*/
enum class WindowType
NORMAL, ///< A default window type. Indicates a normal, top-level window. Almost every window will be created with this type. @SINCE_2_0.0
NOTIFICATION, ///< A notification window, like a warning about battery life or a new E-Mail received. @SINCE_2_0.0
UTILITY, ///< A persistent utility window, like a toolbox or palette. @SINCE_2_0.0
- DIALOG ///< Used for simple dialog windows. @SINCE_2_0.0
+ DIALOG, ///< Used for simple dialog window. @SINCE_2_0.0
+ IME ///< Used for Ime keyboard window. It should be set in application New function. @SINCE_2_0.33
};
/**
if(isNewWindowAllowed)
{
- Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, isTransparent);
+ Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, WindowType::NORMAL, isTransparent);
Integration::SceneHolder sceneHolder = Integration::SceneHolder(window);
BuildRequires: pkgconfig(wayland-egl)
BuildRequires: pkgconfig(wayland-client)
+BuildRequires: pkgconfig(input-method-client)
BuildRequires: wayland-devel
BuildRequires: wayland-extension-client-devel