{
Dali::Stage stage = Dali::Stage::GetCurrent();
- stage.GetRootLayer().SetProperty( DevelActor::Property::LAYOUT_DIRECTION,
- static_cast< DevelActor::LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) );
+ stage.GetRootLayer().SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION,
+ static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) );
}
} // namespace Adaptor
#include <orientation.h>
#include <render-surface.h>
#include <drag-and-drop-detector.h>
-#include <window-devel.h>
namespace Dali
{
{
public:
typedef Dali::Window::IndicatorSignalType IndicatorSignalType;
- typedef Dali::DevelWindow::FocusSignalType FocusSignalType;
- typedef Dali::DevelWindow::ResizedSignalType ResizedSignalType;
+ typedef Dali::Window::FocusSignalType FocusSignalType;
+ typedef Dali::Window::ResizedSignalType ResizedSignalType;
typedef Signal< void () > SignalType;
/**
Dali::Any GetNativeHandle() const;
/**
- * @copydoc Dali::DevelWindow::SetAcceptFocus()
+ * @copydoc Dali::Window::SetAcceptFocus()
*/
void SetAcceptFocus( bool accept );
/**
- * @copydoc Dali::DevelWindow::IsFocusAcceptable()
+ * @copydoc Dali::Window::IsFocusAcceptable()
*/
- bool IsFocusAcceptable();
+ bool IsFocusAcceptable() const;
/**
- * @copydoc Dali::DevelWindow::Show()
+ * @copydoc Dali::Window::Show()
*/
void Show();
/**
- * @copydoc Dali::DevelWindow::Hide()
+ * @copydoc Dali::Window::Hide()
*/
void Hide();
/**
- * @copydoc Dali::DevelWindow::IsVisible() const
+ * @copydoc Dali::Window::IsVisible() const
*/
bool IsVisible() const;
/**
- * @copydoc Dali::DevelWindow::GetSupportedAuxiliaryHintCount()
+ * @copydoc Dali::Window::GetSupportedAuxiliaryHintCount()
*/
- unsigned int GetSupportedAuxiliaryHintCount();
+ unsigned int GetSupportedAuxiliaryHintCount() const;
/**
- * @copydoc Dali::DevelWindow::GetSupportedAuxiliaryHint()
+ * @copydoc Dali::Window::GetSupportedAuxiliaryHint()
*/
- std::string GetSupportedAuxiliaryHint( unsigned int index );
+ std::string GetSupportedAuxiliaryHint( unsigned int index ) const;
/**
- * @copydoc Dali::DevelWindow::AddAuxiliaryHint()
+ * @copydoc Dali::Window::AddAuxiliaryHint()
*/
unsigned int AddAuxiliaryHint( const std::string& hint, const std::string& value );
/**
- * @copydoc Dali::DevelWindow::RemoveAuxiliaryHint()
+ * @copydoc Dali::Window::RemoveAuxiliaryHint()
*/
bool RemoveAuxiliaryHint( unsigned int id );
/**
- * @copydoc Dali::DevelWindow::SetAuxiliaryHintValue()
+ * @copydoc Dali::Window::SetAuxiliaryHintValue()
*/
bool SetAuxiliaryHintValue( unsigned int id, const std::string& value );
/**
- * @copydoc Dali::DevelWindow::GetAuxiliaryHintValue()
+ * @copydoc Dali::Window::GetAuxiliaryHintValue()
*/
std::string GetAuxiliaryHintValue( unsigned int id ) const;
/**
- * @copydoc Dali::DevelWindow::GetAuxiliaryHintId()
+ * @copydoc Dali::Window::GetAuxiliaryHintId()
*/
unsigned int GetAuxiliaryHintId( const std::string& hint ) const;
/**
- * @copydoc Dali::DevelWindow::SetInputRegion()
+ * @copydoc Dali::Window::SetInputRegion()
*/
void SetInputRegion( const Rect< int >& inputRegion );
/**
- * @copydoc Dali::DevelWindow::SetType()
+ * @copydoc Dali::Window::SetType()
*/
- void SetType( Dali::DevelWindow::Type type );
+ void SetType( Dali::Window::Type type );
/**
- * @copydoc Dali::DevelWindow::GetType() const
+ * @copydoc Dali::Window::GetType() const
*/
- Dali::DevelWindow::Type GetType() const;
+ Dali::Window::Type GetType() const;
/**
- * @copydoc Dali::DevelWindow::SetNotificationLevel()
+ * @copydoc Dali::Window::SetNotificationLevel()
*/
- bool SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type level );
+ bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level );
/**
- * @copydoc Dali::DevelWindow::GetNotificationLevel()
+ * @copydoc Dali::Window::GetNotificationLevel()
*/
- Dali::DevelWindow::NotificationLevel::Type GetNotificationLevel();
+ Dali::Window::NotificationLevel::Type GetNotificationLevel() const;
/**
- * @copydoc Dali::DevelWindow::SetOpaqueState()
+ * @copydoc Dali::Window::SetOpaqueState()
*/
void SetOpaqueState( bool opaque );
/**
- * @copydoc Dali::DevelWindow::IsOpaqueState()
+ * @copydoc Dali::Window::IsOpaqueState()
*/
- bool IsOpaqueState();
+ bool IsOpaqueState() const;
/**
- * @copydoc Dali::DevelWindow::SetScreenMode()
+ * @copydoc Dali::Window::SetScreenOffMode()
*/
- bool SetScreenMode( Dali::DevelWindow::ScreenMode::Type screenMode );
+ bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode);
/**
- * @copydoc Dali::DevelWindow::GetScreenMode()
+ * @copydoc Dali::Window::GetScreenOffMode()
*/
- Dali::DevelWindow::ScreenMode::Type GetScreenMode();
+ Dali::Window::ScreenOffMode::Type GetScreenOffMode() const;
/**
- * @copydoc Dali::DevelWindow::SetBrightness()
+ * @copydoc Dali::Window::SetBrightness()
*/
bool SetBrightness( int brightness );
/**
- * @copydoc Dali::DevelWindow::GetBrightness()
+ * @copydoc Dali::Window::GetBrightness()
*/
- int GetBrightness();
+ int GetBrightness() const;
/**
- * @copydoc Dali::DevelWindow::SetSize()
+ * @copydoc Dali::Window::SetSize()
*/
- void SetSize( Dali::DevelWindow::WindowSize size );
+ void SetSize( Dali::Window::WindowSize size );
/**
- * @copydoc Dali::DevelWindow::GetSize()
+ * @copydoc Dali::Window::GetSize()
*/
- Dali::DevelWindow::WindowSize GetSize();
+ Dali::Window::WindowSize GetSize() const;
/**
- * @copydoc Dali::DevelWindow::SetPosition()
+ * @copydoc Dali::Window::SetPosition()
*/
- void SetPosition( Dali::DevelWindow::WindowPosition position );
+ void SetPosition( Dali::Window::WindowPosition position );
/**
- * @copydoc Dali::DevelWindow::GetPosition()
+ * @copydoc Dali::Window::GetPosition()
*/
- Dali::DevelWindow::WindowPosition GetPosition();
+ Dali::Window::WindowPosition GetPosition() const;
/**
- * @copydoc Dali::DevelWindow::SetTransparency()
+ * @copydoc Dali::Window::SetTransparency()
*/
void SetTransparency( bool transparent );
IndicatorSignalType& IndicatorVisibilityChangedSignal() { return mIndicatorVisibilityChangedSignal; }
/**
- * @copydoc Dali::DevelWindow::FocusChangedSignal()
+ * @copydoc Dali::Window::FocusChangedSignal()
*/
FocusSignalType& FocusChangedSignal() { return mFocusChangedSignal; }
/**
- * @copydoc Dali::DevelWindow::ResizedSignal()
+ * @copydoc Dali::Window::ResizedSignal()
*/
ResizedSignalType& ResizedSignal() { return mResizedSignal; }
Integration::SystemOverlay* mOverlay;
Adaptor* mAdaptor;
Dali::DragAndDropDetector mDragAndDropDetector;
- Dali::DevelWindow::Type mType;
+ Dali::Window::Type mType;
struct EventHandler;
EventHandler* mEventHandler;
// INTERNAL INCLUDES
#include <adaptors/devel-api/adaptor-framework/application-devel.h>
-#include <adaptors/devel-api/adaptor-framework/window-devel.h>
#include <adaptors/common/application-impl.h>
namespace Dali
namespace DevelApplication
{
-Application New( int* argc, char **argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize )
-{
- Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
- if( internal )
- {
- if( argc && ( *argc > 0 ) )
- {
- internal->GetWindow().SetClass( (*argv)[0], "" );
- }
- internal->SetStyleSheet( stylesheet );
-
- DevelWindow::SetTransparency( internal->GetWindow(), ( windowMode == Application::OPAQUE ? false : true ) );
- DevelWindow::SetSize( internal->GetWindow(), DevelWindow::WindowSize( positionSize.width, positionSize.height ) );
- DevelWindow::SetPosition( internal->GetWindow(), DevelWindow::WindowPosition( positionSize.x, positionSize.y ) );
-
- return Application( internal.Get() );
- }
- else
- {
- internal = Internal::Adaptor::Application::New( argc, argv, stylesheet, windowMode, positionSize, Internal::Adaptor::Framework::NORMAL );
- return Application( internal.Get() );
- }
-}
-
void PreInitialize( int* argc, char** argv[] )
{
Internal::Adaptor::Application::PreInitialize( argc, argv );
namespace DevelApplication
{
-
-/**
- * @brief This is the constructor for applications.
- *
- * @PRIVLEVEL_PUBLIC
- * @PRIVILEGE_DISPLAY
- * @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
- * @return A handle to the Application
- * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
- */
-DALI_IMPORT_API Application New( int* argc, char **argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize );
-
/**
* @brief This is used to improve application launch performance.
* It preloads so files, initializes some functions in advance and makes a window in advance.
+++ /dev/null
-/*
- * Copyright (c) 2017 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 <adaptors/devel-api/adaptor-framework/window-devel.h>
-#include <adaptors/common/window-impl.h>
-
-namespace Dali
-{
-
-namespace DevelWindow
-{
-
-FocusSignalType& FocusChangedSignal( Window window )
-{
- return GetImplementation( window ).FocusChangedSignal();
-}
-
-void SetAcceptFocus( Window window, bool accept )
-{
- GetImplementation( window ).SetAcceptFocus( accept );
-}
-
-bool IsFocusAcceptable( Window window )
-{
- return GetImplementation( window ).IsFocusAcceptable();
-}
-
-void Show( Window window )
-{
- GetImplementation( window ).Show();
-}
-
-void Hide( Window window )
-{
- GetImplementation( window ).Hide();
-}
-
-bool IsVisible( Window window )
-{
- return GetImplementation( window ).IsVisible();
-}
-
-unsigned int GetSupportedAuxiliaryHintCount( Window window )
-{
- return GetImplementation( window ).GetSupportedAuxiliaryHintCount();
-}
-
-std::string GetSupportedAuxiliaryHint( Window window, unsigned int index )
-{
- return GetImplementation( window ).GetSupportedAuxiliaryHint( index );
-}
-
-unsigned int AddAuxiliaryHint( Window window, const std::string& hint, const std::string& value )
-{
- return GetImplementation( window ).AddAuxiliaryHint( hint, value );
-}
-
-bool RemoveAuxiliaryHint( Window window, unsigned int id )
-{
- return GetImplementation( window ).RemoveAuxiliaryHint( id );
-}
-
-bool SetAuxiliaryHintValue( Window window, unsigned int id, const std::string& value )
-{
- return GetImplementation( window ).SetAuxiliaryHintValue( id, value );
-}
-
-std::string GetAuxiliaryHintValue( Window window, unsigned int id )
-{
- return GetImplementation( window ).GetAuxiliaryHintValue( id );
-}
-
-unsigned int GetAuxiliaryHintId( Window window, const std::string& hint )
-{
- return GetImplementation( window ).GetAuxiliaryHintId( hint );
-}
-
-void SetInputRegion( Window window, const Rect< int >& inputRegion )
-{
- return GetImplementation( window ).SetInputRegion( inputRegion );
-}
-
-void SetType( Window window, Type type )
-{
- GetImplementation( window ).SetType( type );
-}
-
-Type GetType( Window window )
-{
- return GetImplementation( window ).GetType();
-}
-
-bool SetNotificationLevel( Window window, NotificationLevel::Type level )
-{
- return GetImplementation( window ).SetNotificationLevel( level );
-}
-
-NotificationLevel::Type GetNotificationLevel( Window window )
-{
- return GetImplementation( window ).GetNotificationLevel();
-}
-
-void SetOpaqueState( Window window, bool opaque )
-{
- GetImplementation( window ).SetOpaqueState( opaque );
-}
-
-bool IsOpaqueState( Window window )
-{
- return GetImplementation( window ).IsOpaqueState();
-}
-
-bool SetScreenMode( Window window, ScreenMode::Type screenMode )
-{
- return GetImplementation( window ).SetScreenMode( screenMode );
-}
-
-ScreenMode::Type GetScreenMode( Window window )
-{
- return GetImplementation( window ).GetScreenMode();
-}
-
-bool SetBrightness( Window window, int brightness )
-{
- return GetImplementation( window ).SetBrightness( brightness );
-}
-
-int GetBrightness( Window window )
-{
- return GetImplementation( window ).GetBrightness();
-}
-
-ResizedSignalType& ResizedSignal( Window window )
-{
- return GetImplementation( window ).ResizedSignal();
-}
-
-void SetSize( Window window, WindowSize size )
-{
- GetImplementation( window ).SetSize( size );
-}
-
-WindowSize GetSize( Window window )
-{
- return GetImplementation( window ).GetSize();
-}
-
-void SetPosition( Window window, WindowPosition position )
-{
- GetImplementation( window ).SetPosition( position );
-}
-
-WindowPosition GetPosition( Window window )
-{
- return GetImplementation( window ).GetPosition();
-}
-
-void SetTransparency( Window window, bool transparent )
-{
- GetImplementation( window ).SetTransparency( transparent );
-}
-
-} // namespace DevelWindow
-
-} // namespace Dali
+++ /dev/null
-#ifndef DALI_WINDOW_DEVEL_H
-#define DALI_WINDOW_DEVEL_H
-
-/*
- * Copyright (c) 2017 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <string>
-#include <dali/public-api/math/rect.h>
-#include <dali/public-api/math/uint-16-pair.h>
-
-// INTERNAL INCLUDES
-#ifdef DALI_ADAPTOR_COMPILATION // full path doesn't exist until adaptor is installed so we have to use relative
-#include <window.h>
-#else
-#include <dali/public-api/adaptor-framework/window.h>
-#endif
-
-namespace Dali
-{
-
-namespace DevelWindow
-{
-
-namespace NotificationLevel
-{
-
-/**
- * @brief An enum of notification window's priority level.
- */
-enum Type
-{
- NONE = -1, ///< No notification level. Default level. This value makes the notification window place in the layer of the normal window.
- BASE = 10, ///< Base notification level.
- MEDIUM = 20, ///< Higher notification level than base.
- HIGH = 30, ///< Higher notification level than medium.
- TOP = 40 ///< The highest notification level.
-};
-
-} // namespace NotificationLevel
-
-namespace ScreenMode
-{
-
-/**
- * @brief An enum of screen mode.
- */
-enum Type
-{
- DEFAULT, ///< The mode which turns the screen off after a timeout.
- ALWAYS_ON ///< The mode which keeps the screen turned on.
-};
-
-} // namespace ScreenMode
-
-/**
- * @brief An enum of Window types.
- */
-enum Type
-{
- NORMAL, ///< A default window type. Indicates a normal, top-level window. Almost every window will be created with this type.
- NOTIFICATION, ///< A notification window, like a warning about battery life or a new E-Mail received.
- UTILITY, ///< A persistent utility window, like a toolbox or palette.
- DIALOG ///< Used for simple dialog windows.
-};
-
-typedef Uint16Pair WindowSize; ///< Window size type
-typedef Uint16Pair WindowPosition; ///< Window position type
-
-typedef Signal< void ( bool ) > FocusSignalType; ///< Window focus signal type
-typedef Signal< void ( WindowSize ) > ResizedSignalType; ///< Window resized signal type
-
-/**
- * @brief The user should connect to this signal to get a timing when window gains focus or loses focus.
- *
- * A callback of the following type may be connected:
- * @code
- * void YourCallbackName( bool focusIn );
- * @endcode
- * The parameter is true if window gains focus, otherwise false.
- *
- * @param[in] window The window to get a signal
- * @return The signal to connect to
- */
-DALI_IMPORT_API FocusSignalType& FocusChangedSignal( Window window );
-
-/**
- * @brief Sets whether window accepts focus or not.
- *
- * @param[in] window The window to accept focus
- * @param[in] accept If focus is accepted or not. Default is true.
- */
-DALI_IMPORT_API void SetAcceptFocus( Window window, bool accept );
-
-/**
- * @brief Returns whether window accepts focus or not.
- *
- * @param[in] window The window to accept focus
- * @return True if the window accept focus, false otherwise
- */
-DALI_IMPORT_API bool IsFocusAcceptable( Window window );
-
-/**
- * @brief Shows the window if it is hidden.
- * @param[in] window The window to show
- */
-DALI_IMPORT_API void Show( Window window );
-
-/**
- * @brief Hides the window if it is showing.
- * @param[in] window The window to hide
- */
-DALI_IMPORT_API void Hide( Window window );
-
-/**
- * @brief Returns whether the window is visible or not.
- * @param[in] window The window to query
- * @return True if the window is visible, false otherwise.
- */
-DALI_IMPORT_API bool IsVisible( Window window );
-
-/**
- * @brief Gets the count of supported auxiliary hints of the window.
- * @param[in] window The window to get the hint count
- * @return The number of supported auxiliary hints.
- *
- * @note The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager.
- * If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
- */
-DALI_IMPORT_API unsigned int GetSupportedAuxiliaryHintCount( Window window );
-
-/**
- * @brief Gets the supported auxiliary hint string of the window.
- * @param[in] window The window to get the hint
- * @param[in] index The index of the supported auxiliary hint lists
- * @return The auxiliary hint string of the index.
- *
- * @note The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager.
- * If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
- */
-DALI_IMPORT_API std::string GetSupportedAuxiliaryHint( Window window, unsigned int index );
-
-/**
- * @brief Creates an auxiliary hint of the window.
- * @param[in] window The window to create a hint
- * @param[in] hint The auxiliary hint string.
- * @param[in] value The value string.
- * @return The ID of created auxiliary hint, or @c 0 on failure.
- */
-DALI_IMPORT_API unsigned int AddAuxiliaryHint( Window window, const std::string& hint, const std::string& value );
-
-/**
- * @brief Removes an auxiliary hint of the window.
- * @param[in] window The window to remove a hint
- * @param[in] id The ID of the auxiliary hint.
- * @return True if no error occurred, false otherwise.
- */
-DALI_IMPORT_API bool RemoveAuxiliaryHint( Window window, unsigned int id );
-
-/**
- * @brief Changes a value of the auxiliary hint.
- * @param[in] window The window to set a value
- * @param[in] id The auxiliary hint ID.
- * @param[in] value The value string to be set.
- * @return True if no error occurred, false otherwise.
- */
-DALI_IMPORT_API bool SetAuxiliaryHintValue( Window window, unsigned int id, const std::string& value );
-
-/**
- * @brief Gets a value of the auxiliary hint.
- * @param[in] window The window to get a value
- * @param[in] id The auxiliary hint ID.
- * @return The string value of the auxiliary hint ID, or an empty string if none exists.
- */
-DALI_IMPORT_API std::string GetAuxiliaryHintValue( Window window, unsigned int id );
-
-/**
- * @brief Gets a ID of the auxiliary hint string.
- * @param[in] window The window to get an ID
- * @param[in] hint The auxiliary hint string.
- * @return The ID of the auxiliary hint string, or @c 0 if none exists.
- */
-DALI_IMPORT_API unsigned int GetAuxiliaryHintId( Window window, const std::string& hint );
-
-/**
- * @brief Sets a region to accept input events.
- * @param[in] window The window to set a region
- * @param[in] inputRegion The region to accept input events.
- */
-DALI_IMPORT_API void SetInputRegion( Window window, const Rect< int >& inputRegion );
-
-/**
- * @brief Sets a window type.
- * @param[in] window The window to set a type
- * @param[in] type The window type.
- * @remarks The default window type is NORMAL.
- */
-DALI_IMPORT_API void SetType( Window window, Type type );
-
-/**
- * @brief Gets a window type.
- * @param[in] window The window to get a type
- * @return A window type.
- */
-DALI_IMPORT_API Type GetType( Window window );
-
-/**
- * @brief Sets a priority level for the specified notification window.
- * @param[in] window The window to set a notification level
- * @param[in] level The notification window level.
- * @return True if no error occurred, false otherwise.
- * @PRIVLEVEL_PUBLIC
- * @PRIVILEGE_WINDOW_PRIORITY
- * @remarks This can be used for a notification type window only. The default level is NotificationLevel::NONE.
- */
-DALI_IMPORT_API bool SetNotificationLevel( Window window, NotificationLevel::Type level );
-
-/**
- * @brief Gets a priority level for the specified notification window.
- * @param[in] window The window to get a notification level
- * @return The notification window level.
- * @remarks This can be used for a notification type window only.
- */
-DALI_IMPORT_API NotificationLevel::Type GetNotificationLevel( Window window );
-
-/**
- * @brief Sets a transparent window's visual state to opaque.
- * @details If a visual state of a transparent window is opaque,
- * then the window manager could handle it as an opaque window when calculating visibility.
- * @param[in] window The window to set a state
- * @param[in] opaque Whether the window's visual state is opaque.
- * @remarks This will have no effect on an opaque window.
- * It doesn't change transparent window to opaque window but lets the window manager know the visual state of the window.
- */
-DALI_IMPORT_API void SetOpaqueState( Window window, bool opaque );
-
-/**
- * @brief Returns whether a transparent window's visual state is opaque or not.
- * @param[in] window The window to get a state
- * @return True if the window's visual state is opaque, false otherwise.
- * @remarks The return value has no meaning on an opaque window.
- */
-DALI_IMPORT_API bool IsOpaqueState( Window window );
-
-/**
- * @brief Sets a window's screen mode.
- * @details This API is useful when the application needs to keep the display turned on.
- * If the application sets the screen mode to #ScreenMode::ALWAYS_ON to its window and the window is shown,
- * the window manager requests the display system to keep the display on as long as the window is shown.
- * If the window is no longer shown, then the window manager requests the display system to go back to normal operation.
- * @param[in] window The window to set a screen mode
- * @param[in] screenMode The screen mode.
- * @return True if no error occurred, false otherwise.
- * @PRIVLEVEL_PUBLIC
- * @PRIVILEGE_DISPLAY
- */
-DALI_IMPORT_API bool SetScreenMode( Window window, ScreenMode::Type screenMode );
-
-/**
- * @brief Gets a screen mode of the window.
- * @param[in] window The window to get a screen mode
- * @return The screen mode.
- */
-DALI_IMPORT_API ScreenMode::Type GetScreenMode( Window window );
-
-/**
- * @brief Sets preferred brightness of the window.
- * @details This API is useful when the application needs to change the brightness of the screen when it is appeared on the screen.
- * If the brightness has been set and the window is shown, the window manager requests the display system to change the brightness to the provided value.
- * If the window is no longer shown, then the window manager requests the display system to go back to default brightness.
- * A value less than 0 results in default brightness and a value greater than 100 results in maximum brightness.
- * @param[in] window The window to set a brightness
- * @param[in] brightness The preferred brightness (0 to 100).
- * @return True if no error occurred, false otherwise.
- * @PRIVLEVEL_PUBLIC
- * @PRIVILEGE_DISPLAY
- */
-DALI_IMPORT_API bool SetBrightness( Window window, int brightness );
-
-/**
- * @brief Gets preffered brightness of the window.
- * @param[in] window The window to get brightness
- * @return The preffered brightness.
- */
-DALI_IMPORT_API int GetBrightness( Window window );
-
-/**
- * @brief This signal is emitted when the window is resized.
- *
- * A callback of the following type may be connected:
- * @code
- * void YourCallbackName( int width, int height );
- * @endcode
- * The parameters are the resized width and height.
- *
- * @param[in] window The window to get a signal
- * @return The signal to connect to
- */
-DALI_IMPORT_API ResizedSignalType& ResizedSignal( Window window );
-
-/**
- * @brief Sets a size of the window.
- *
- * @param[in] window The window to set a size
- * @param[in] size The new window size
- */
-DALI_IMPORT_API void SetSize( Window window, WindowSize size );
-
-/**
- * @brief Gets a size of the window.
- *
- * @param[in] window The window to get a size
- * @return The size of the window
- */
-DALI_IMPORT_API WindowSize GetSize( Window window );
-
-/**
- * @brief Sets a position of the window.
- *
- * @param[in] window The window to set a position
- * @param[in] position The new window position
- */
-DALI_IMPORT_API void SetPosition( Window window, WindowPosition position );
-
-/**
- * @brief Gets a position of the window.
- *
- * @param[in] window The window to get a position
- * @return The position of the window
- */
-DALI_IMPORT_API WindowPosition GetPosition( Window window );
-
-/**
- * @brief Sets whether the window is transparent or not.
- *
- * @param[in] window The window to set transparency
- * @param[in] transparent Whether the window is transparent
- */
-DALI_IMPORT_API void SetTransparency( Window window, bool transparent );
-
-} // namespace DevelWindow
-
-} // namespace Dali
-
-#endif // DALI_WINDOW_DEVEL_H
$(adaptor_devel_api_dir)/adaptor-framework/tilt-sensor.cpp \
$(adaptor_devel_api_dir)/adaptor-framework/lifecycle-controller.cpp \
$(adaptor_devel_api_dir)/adaptor-framework/video-player.cpp \
- $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.cpp \
- $(adaptor_devel_api_dir)/adaptor-framework/window-devel.cpp
+ $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.cpp
devel_api_adaptor_framework_header_files = \
$(adaptor_devel_api_dir)/adaptor-framework/video-player-plugin.h \
$(adaptor_devel_api_dir)/adaptor-framework/key-extension-plugin.h \
$(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.h \
- $(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.h \
- $(adaptor_devel_api_dir)/adaptor-framework/window-devel.h
+ $(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.h
+
#endif // DALI_ELDBUS_AVAILABLE
#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/events/device.h>
#include <dali/public-api/events/touch-point.h>
#include <dali/public-api/events/key-event.h>
#include <dali/public-api/events/wheel-event.h>
#include <dali/integration-api/events/touch-event-integ.h>
#include <dali/integration-api/events/hover-event-integ.h>
#include <dali/integration-api/events/wheel-event-integ.h>
-#include <dali/devel-api/events/device.h>
// INTERNAL INCLUDES
#include <events/gesture-manager.h>
/**
* Get the device class from the provided ecore event
*/
-void GetDeviceClass( Ecore_Device_Class ecoreDeviceClass, DevelDevice::Class::Type& deviceClass )
+void GetDeviceClass( Ecore_Device_Class ecoreDeviceClass, Device::Class::Type& deviceClass )
{
switch( ecoreDeviceClass )
{
case ECORE_DEVICE_CLASS_SEAT:
{
- deviceClass = DevelDevice::Class::USER;
+ deviceClass = Device::Class::USER;
break;
}
case ECORE_DEVICE_CLASS_KEYBOARD:
{
- deviceClass = DevelDevice::Class::KEYBOARD;
+ deviceClass = Device::Class::KEYBOARD;
break;
}
case ECORE_DEVICE_CLASS_MOUSE:
{
- deviceClass = DevelDevice::Class::MOUSE;
+ deviceClass = Device::Class::MOUSE;
break;
}
case ECORE_DEVICE_CLASS_TOUCH:
{
- deviceClass = DevelDevice::Class::TOUCH;
+ deviceClass = Device::Class::TOUCH;
break;
}
case ECORE_DEVICE_CLASS_PEN:
{
- deviceClass = DevelDevice::Class::PEN;
+ deviceClass = Device::Class::PEN;
break;
}
case ECORE_DEVICE_CLASS_POINTER:
{
- deviceClass = DevelDevice::Class::POINTER;
+ deviceClass = Device::Class::POINTER;
break;
}
case ECORE_DEVICE_CLASS_GAMEPAD:
{
- deviceClass = DevelDevice::Class::GAMEPAD;
+ deviceClass = Device::Class::GAMEPAD;
break;
}
default:
{
- deviceClass = DevelDevice::Class::NONE;
+ deviceClass = Device::Class::NONE;
break;
}
}
}
-void GetDeviceSubclass( Ecore_Device_Subclass ecoreDeviceSubclass, DevelDevice::Subclass::Type& deviceSubclass )
+void GetDeviceSubclass( Ecore_Device_Subclass ecoreDeviceSubclass, Device::Subclass::Type& deviceSubclass )
{
switch( ecoreDeviceSubclass )
{
case ECORE_DEVICE_SUBCLASS_FINGER:
{
- deviceSubclass = DevelDevice::Subclass::FINGER;
+ deviceSubclass = Device::Subclass::FINGER;
break;
}
case ECORE_DEVICE_SUBCLASS_FINGERNAIL:
{
- deviceSubclass = DevelDevice::Subclass::FINGERNAIL;
+ deviceSubclass = Device::Subclass::FINGERNAIL;
break;
}
case ECORE_DEVICE_SUBCLASS_KNUCKLE:
{
- deviceSubclass = DevelDevice::Subclass::KNUCKLE;
+ deviceSubclass = Device::Subclass::KNUCKLE;
break;
}
case ECORE_DEVICE_SUBCLASS_PALM:
{
- deviceSubclass = DevelDevice::Subclass::PALM;
+ deviceSubclass = Device::Subclass::PALM;
break;
}
case ECORE_DEVICE_SUBCLASS_HAND_SIZE:
{
- deviceSubclass = DevelDevice::Subclass::HAND_SIDE;
+ deviceSubclass = Device::Subclass::HAND_SIDE;
break;
}
case ECORE_DEVICE_SUBCLASS_HAND_FLAT:
{
- deviceSubclass = DevelDevice::Subclass::HAND_FLAT;
+ deviceSubclass = Device::Subclass::HAND_FLAT;
break;
}
case ECORE_DEVICE_SUBCLASS_PEN_TIP:
{
- deviceSubclass = DevelDevice::Subclass::PEN_TIP;
+ deviceSubclass = Device::Subclass::PEN_TIP;
break;
}
case ECORE_DEVICE_SUBCLASS_TRACKPAD:
{
- deviceSubclass = DevelDevice::Subclass::TRACKPAD;
+ deviceSubclass = Device::Subclass::TRACKPAD;
break;
}
case ECORE_DEVICE_SUBCLASS_TRACKPOINT:
{
- deviceSubclass = DevelDevice::Subclass::TRACKPOINT;
+ deviceSubclass = Device::Subclass::TRACKPOINT;
break;
}
case ECORE_DEVICE_SUBCLASS_TRACKBALL:
{
- deviceSubclass = DevelDevice::Subclass::TRACKBALL;
+ deviceSubclass = Device::Subclass::TRACKBALL;
break;
}
default:
{
- deviceSubclass = DevelDevice::Subclass::NONE;
+ deviceSubclass = Device::Subclass::NONE;
break;
}
}
state = PointState::INTERRUPTED;
}
- DevelDevice::Class::Type deviceClass;
- DevelDevice::Subclass::Type deviceSubclass;
+ Device::Class::Type deviceClass;
+ Device::Subclass::Type deviceSubclass;
GetDeviceClass( ecore_device_class_get( touchEvent->dev ), deviceClass );
GetDeviceSubclass( ecore_device_subclass_get( touchEvent->dev ), deviceSubclass );
if ( touchEvent->window == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
{
- DevelDevice::Class::Type deviceClass;
- DevelDevice::Subclass::Type deviceSubclass;
+ Device::Class::Type deviceClass;
+ Device::Subclass::Type deviceSubclass;
GetDeviceClass( ecore_device_class_get( touchEvent->dev ), deviceClass );
GetDeviceSubclass( ecore_device_subclass_get( touchEvent->dev ), deviceSubclass );
if ( touchEvent->window == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
{
- DevelDevice::Class::Type deviceClass;
- DevelDevice::Subclass::Type deviceSubclass;
+ Device::Class::Type deviceClass;
+ Device::Subclass::Type deviceSubclass;
GetDeviceClass( ecore_device_class_get( touchEvent->dev ), deviceClass );
GetDeviceSubclass( ecore_device_subclass_get( touchEvent->dev ), deviceSubclass );
}
std::string deviceName;
- DevelDevice::Class::Type deviceClass;
- DevelDevice::Subclass::Type deviceSubclass;
+ Device::Class::Type deviceClass;
+ Device::Subclass::Type deviceSubclass;
GetDeviceName( keyEvent, deviceName );
GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass );
}
std::string deviceName;
- DevelDevice::Class::Type deviceClass;
- DevelDevice::Subclass::Type deviceSubclass;
+ Device::Class::Type deviceClass;
+ Device::Subclass::Type deviceSubclass;
GetDeviceName( keyEvent, deviceName );
GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass );
mNotificationLevel( -1 ),
mNotificationChangeState( 0 ),
mNotificationLevelChangeDone( true ),
- mScreenMode( 0 ),
- mScreenModeChangeState( 0 ),
- mScreenModeChangeDone( true ),
+ mScreenOffMode( 0 ),
+ mScreenOffModeChangeState( 0 ),
+ mScreenOffModeChangeDone( true ),
mBrightness( 0 ),
mBrightnessChangeState( 0 ),
mBrightnessChangeDone( true )
{
Window::EventHandler* eventHandler = static_cast< Window::EventHandler* >( data );
- eventHandler->mScreenMode = mode;
- eventHandler->mScreenModeChangeState = state;
- eventHandler->mScreenModeChangeDone = true;
+ eventHandler->mScreenOffMode = mode;
+ eventHandler->mScreenOffModeChangeState = state;
+ eventHandler->mScreenOffModeChangeDone = true;
DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window::EventHandler::TizenPolicyScreenModeChangeDone: mode = %d, state = %d\n", mode, state );
}
uint32_t mNotificationChangeState;
bool mNotificationLevelChangeDone;
- int mScreenMode;
- uint32_t mScreenModeChangeState;
- bool mScreenModeChangeDone;
+ int mScreenOffMode;
+ uint32_t mScreenOffModeChangeState;
+ bool mScreenOffModeChangeDone;
int mBrightness;
uint32_t mBrightnessChangeState;
mIndicatorOpacityMode( Dali::Window::OPAQUE ),
mOverlay( NULL ),
mAdaptor( NULL ),
- mType( Dali::DevelWindow::NORMAL ),
+ mType( Dali::Window::NORMAL ),
mEventHandler( NULL ),
mPreferredOrientation( Dali::Window::PORTRAIT ),
mSupportedAuxiliaryHints(),
ecore_wl_window_focus_skip_set( mEventHandler->mEcoreWindow, !accept );
}
-bool Window::IsFocusAcceptable()
+bool Window::IsFocusAcceptable() const
{
return mIsFocusAcceptable;
}
mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( width, height ) );
// Emit signal
- mResizedSignal.Emit( Dali::DevelWindow::WindowSize( width, height ) );
+ mResizedSignal.Emit( Dali::Window::WindowSize( width, height ) );
mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( width, height ) );
}
-unsigned int Window::GetSupportedAuxiliaryHintCount()
+unsigned int Window::GetSupportedAuxiliaryHintCount() const
{
return mSupportedAuxiliaryHints.size();
}
-std::string Window::GetSupportedAuxiliaryHint( unsigned int index )
+std::string Window::GetSupportedAuxiliaryHint( unsigned int index ) const
{
if( index >= GetSupportedAuxiliaryHintCount() )
{
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetInputRegion: x = %d, y = %d, w = %d, h = %d\n", inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height );
}
-void Window::SetType( Dali::DevelWindow::Type type )
+void Window::SetType( Dali::Window::Type type )
{
Ecore_Wl_Window_Type windowType;
{
switch( type )
{
- case Dali::DevelWindow::NORMAL:
+ case Dali::Window::NORMAL:
{
windowType = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
break;
}
- case Dali::DevelWindow::NOTIFICATION:
+ case Dali::Window::NOTIFICATION:
{
windowType = ECORE_WL_WINDOW_TYPE_NOTIFICATION;
break;
}
- case Dali::DevelWindow::UTILITY:
+ case Dali::Window::UTILITY:
{
windowType = ECORE_WL_WINDOW_TYPE_UTILITY;
break;
}
- case Dali::DevelWindow::DIALOG:
+ case Dali::Window::DIALOG:
{
windowType = ECORE_WL_WINDOW_TYPE_DIALOG;
break;
mType = type;
}
-Dali::DevelWindow::Type Window::GetType() const
+Dali::Window::Type Window::GetType() const
{
return mType;
}
-bool Window::SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type level )
+bool Window::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
{
- if( mType != Dali::DevelWindow::NOTIFICATION )
+ if( mType != Dali::Window::NOTIFICATION )
{
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Not supported window type [%d]\n", mType );
return false;
switch( level )
{
- case Dali::DevelWindow::NotificationLevel::NONE:
+ case Dali::Window::NotificationLevel::NONE:
{
notificationLevel = TIZEN_POLICY_LEVEL_NONE;
break;
}
- case Dali::DevelWindow::NotificationLevel::BASE:
+ case Dali::Window::NotificationLevel::BASE:
{
notificationLevel = TIZEN_POLICY_LEVEL_DEFAULT;
break;
}
- case Dali::DevelWindow::NotificationLevel::MEDIUM:
+ case Dali::Window::NotificationLevel::MEDIUM:
{
notificationLevel = TIZEN_POLICY_LEVEL_MEDIUM;
break;
}
- case Dali::DevelWindow::NotificationLevel::HIGH:
+ case Dali::Window::NotificationLevel::HIGH:
{
notificationLevel = TIZEN_POLICY_LEVEL_HIGH;
break;
}
- case Dali::DevelWindow::NotificationLevel::TOP:
+ case Dali::Window::NotificationLevel::TOP:
{
notificationLevel = TIZEN_POLICY_LEVEL_TOP;
break;
return true;
}
-Dali::DevelWindow::NotificationLevel::Type Window::GetNotificationLevel()
+Dali::Window::NotificationLevel::Type Window::GetNotificationLevel() const
{
- if( mType != Dali::DevelWindow::NOTIFICATION )
+ if( mType != Dali::Window::NOTIFICATION )
{
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: Not supported window type [%d]\n", mType );
- return Dali::DevelWindow::NotificationLevel::NONE;
+ return Dali::Window::NotificationLevel::NONE;
}
while( !mEventHandler->mTizenPolicy )
if( !mEventHandler->mNotificationLevelChangeDone )
{
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: Error! [%d]\n", mEventHandler->mNotificationChangeState );
- return Dali::DevelWindow::NotificationLevel::NONE;
+ return Dali::Window::NotificationLevel::NONE;
}
- Dali::DevelWindow::NotificationLevel::Type level;
+ Dali::Window::NotificationLevel::Type level;
switch( mEventHandler->mNotificationLevel )
{
case TIZEN_POLICY_LEVEL_NONE:
{
- level = Dali::DevelWindow::NotificationLevel::NONE;
+ level = Dali::Window::NotificationLevel::NONE;
break;
}
case TIZEN_POLICY_LEVEL_DEFAULT:
{
- level = Dali::DevelWindow::NotificationLevel::BASE;
+ level = Dali::Window::NotificationLevel::BASE;
break;
}
case TIZEN_POLICY_LEVEL_MEDIUM:
{
- level = Dali::DevelWindow::NotificationLevel::MEDIUM;
+ level = Dali::Window::NotificationLevel::MEDIUM;
break;
}
case TIZEN_POLICY_LEVEL_HIGH:
{
- level = Dali::DevelWindow::NotificationLevel::HIGH;
+ level = Dali::Window::NotificationLevel::HIGH;
break;
}
case TIZEN_POLICY_LEVEL_TOP:
{
- level = Dali::DevelWindow::NotificationLevel::TOP;
+ level = Dali::Window::NotificationLevel::TOP;
break;
}
default:
{
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: invalid level [%d]\n", mEventHandler->mNotificationLevel );
- level = Dali::DevelWindow::NotificationLevel::NONE;
+ level = Dali::Window::NotificationLevel::NONE;
break;
}
}
DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetOpaqueState: opaque = %d\n", opaque );
}
-bool Window::IsOpaqueState()
+bool Window::IsOpaqueState() const
{
return mOpaqueState;
}
-bool Window::SetScreenMode( Dali::DevelWindow::ScreenMode::Type screenMode )
+bool Window::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
{
while( !mEventHandler->mTizenPolicy )
{
wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
}
- mEventHandler->mScreenModeChangeDone = false;
- mEventHandler->mScreenModeChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
+ mEventHandler->mScreenOffModeChangeDone = false;
+ mEventHandler->mScreenOffModeChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
unsigned int mode = 0;
- switch( screenMode )
+ switch( screenOffMode )
{
- case Dali::DevelWindow::ScreenMode::DEFAULT:
+ case Dali::Window::ScreenOffMode::TIMEOUT:
{
mode = 0;
break;
}
- case Dali::DevelWindow::ScreenMode::ALWAYS_ON:
+ case Dali::Window::ScreenOffMode::NEVER:
{
mode = 1;
break;
int count = 0;
- while( !mEventHandler->mScreenModeChangeDone && count < 3 )
+ while( !mEventHandler->mScreenOffModeChangeDone && count < 3 )
{
ecore_wl_flush();
wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
count++;
}
- if( !mEventHandler->mScreenModeChangeDone )
+ if( !mEventHandler->mScreenOffModeChangeDone )
{
- DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenMode: Screen mode change is failed [%d, %d]\n", screenMode, mEventHandler->mScreenModeChangeState );
+ DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenOffMode: Screen mode change is failed [%d, %d]\n", screenOffMode, mEventHandler->mScreenOffModeChangeState );
return false;
}
- else if( mEventHandler->mScreenModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED )
+ else if( mEventHandler->mScreenOffModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED )
{
- DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenMode: Permission denied! [%d]\n", screenMode );
+ DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenOffMode: Permission denied! [%d]\n", screenOffMode );
return false;
}
- DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenMode: Screen mode is changed [%d]\n", mEventHandler->mScreenMode );
+ DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenOffMode: Screen mode is changed [%d]\n", mEventHandler->mScreenOffMode );
return true;
}
-Dali::DevelWindow::ScreenMode::Type Window::GetScreenMode()
+Dali::Window::ScreenOffMode::Type Window::GetScreenOffMode() const
{
while( !mEventHandler->mTizenPolicy )
{
int count = 0;
- while( !mEventHandler->mScreenModeChangeDone && count < 3 )
+ while( !mEventHandler->mScreenOffModeChangeDone && count < 3 )
{
ecore_wl_flush();
wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
count++;
}
- if( !mEventHandler->mScreenModeChangeDone )
+ if( !mEventHandler->mScreenOffModeChangeDone )
{
- DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetScreenMode: Error! [%d]\n", mEventHandler->mScreenModeChangeState );
- return Dali::DevelWindow::ScreenMode::DEFAULT;
+ DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetScreenOffMode: Error! [%d]\n", mEventHandler->mScreenOffModeChangeState );
+ return Dali::Window::ScreenOffMode::TIMEOUT;
}
- Dali::DevelWindow::ScreenMode::Type screenMode = Dali::DevelWindow::ScreenMode::DEFAULT;
+ Dali::Window::ScreenOffMode::Type screenMode = Dali::Window::ScreenOffMode::TIMEOUT;
- switch( mEventHandler->mScreenMode )
+ switch( mEventHandler->mScreenOffMode )
{
case 0:
{
- screenMode = Dali::DevelWindow::ScreenMode::DEFAULT;
+ screenMode = Dali::Window::ScreenOffMode::TIMEOUT;
break;
}
case 1:
{
- screenMode = Dali::DevelWindow::ScreenMode::ALWAYS_ON;
+ screenMode = Dali::Window::ScreenOffMode::NEVER;
break;
}
}
- DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetScreenMode: screen mode [%d]\n", mEventHandler->mScreenMode );
+ DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetScreenOffMode: screen mode [%d]\n", mEventHandler->mScreenOffMode );
return screenMode;
}
return true;
}
-int Window::GetBrightness()
+int Window::GetBrightness() const
{
while( !mEventHandler->mTizenDisplayPolicy )
{
return mEventHandler->mBrightness;
}
-void Window::SetSize( Dali::DevelWindow::WindowSize size )
+void Window::SetSize( Dali::Window::WindowSize size )
{
if( !mResizeEnabled )
{
mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
// Emit signal
- mResizedSignal.Emit( Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height ) );
+ mResizedSignal.Emit( Dali::Window::WindowSize( positionSize.width, positionSize.height ) );
mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
}
}
-Dali::DevelWindow::WindowSize Window::GetSize()
+Dali::Window::WindowSize Window::GetSize() const
{
PositionSize positionSize = mSurface->GetPositionSize();
- return Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height );
+ return Dali::Window::WindowSize( positionSize.width, positionSize.height );
}
-void Window::SetPosition( Dali::DevelWindow::WindowPosition position )
+void Window::SetPosition( Dali::Window::WindowPosition position )
{
if( !mResizeEnabled )
{
}
}
-Dali::DevelWindow::WindowPosition Window::GetPosition()
+Dali::Window::WindowPosition Window::GetPosition() const
{
PositionSize positionSize = mSurface->GetPositionSize();
- return Dali::DevelWindow::WindowPosition( positionSize.x, positionSize.y );
+ return Dali::Window::WindowPosition( positionSize.x, positionSize.y );
}
void Window::SetTransparency( bool transparent )
}
internal->SetStyleSheet( stylesheet );
- DevelWindow::SetTransparency( internal->GetWindow(), ( windowMode == Application::OPAQUE ? false : true ) );
+ internal->GetWindow().SetTransparency( ( windowMode == Application::OPAQUE ? false : true ) );
return Application( internal.Get() );
}
}
}
+Application Application::New( int* argc, char **argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize )
+{
+ Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
+ if( internal )
+ {
+ if( argc && ( *argc > 0 ) )
+ {
+ internal->GetWindow().SetClass( (*argv)[0], "" );
+ }
+ internal->SetStyleSheet( stylesheet );
+
+ internal->GetWindow().SetTransparency( ( windowMode == Application::OPAQUE ? false : true ) );
+ internal->GetWindow().SetSize( Window::WindowSize( positionSize.width, positionSize.height ) );
+ internal->GetWindow().SetPosition( Window::WindowPosition( positionSize.x, positionSize.y ) );
+
+ return Application( internal.Get() );
+ }
+ else
+ {
+ internal = Internal::Adaptor::Application::New( argc, argv, stylesheet, windowMode, positionSize, Internal::Adaptor::Framework::NORMAL );
+ return Application( internal.Get() );
+ }
+}
+
Application::~Application()
{
}
static Application New( int* argc, char **argv[], const std::string& stylesheet, WINDOW_MODE windowMode );
/**
+ * @brief This is the constructor for applications.
+ *
+ * @SINCE_1_2.60
+ * @PRIVLEVEL_PUBLIC
+ * @PRIVILEGE_DISPLAY
+ * @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
+ * @return A handle to the Application
+ * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
+ */
+ static Application New( int* argc, char **argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize );
+
+ /**
* @brief Constructs an empty handle.
* @SINCE_1_0.0
*/
return GetImplementation(*this).GetNativeHandle();
}
+Window::FocusSignalType& Window::FocusChangedSignal()
+{
+ return GetImplementation(*this).FocusChangedSignal();
+}
+
+void Window::SetAcceptFocus( bool accept )
+{
+ GetImplementation(*this).SetAcceptFocus( accept );
+}
+
+bool Window::IsFocusAcceptable() const
+{
+ return GetImplementation(*this).IsFocusAcceptable();
+}
+
+void Window::Show()
+{
+ GetImplementation(*this).Show();
+}
+
+void Window::Hide()
+{
+ GetImplementation(*this).Hide();
+}
+
+bool Window::IsVisible() const
+{
+ return GetImplementation(*this).IsVisible();
+}
+
+unsigned int Window::GetSupportedAuxiliaryHintCount() const
+{
+ return GetImplementation(*this).GetSupportedAuxiliaryHintCount();
+}
+
+std::string Window::GetSupportedAuxiliaryHint( unsigned int index ) const
+{
+ return GetImplementation(*this).GetSupportedAuxiliaryHint( index );
+}
+
+unsigned int Window::AddAuxiliaryHint( const std::string& hint, const std::string& value )
+{
+ return GetImplementation(*this).AddAuxiliaryHint( hint, value );
+}
+
+bool Window::RemoveAuxiliaryHint( unsigned int id )
+{
+ return GetImplementation(*this).RemoveAuxiliaryHint( id );
+}
+
+bool Window::SetAuxiliaryHintValue( unsigned int id, const std::string& value )
+{
+ return GetImplementation(*this).SetAuxiliaryHintValue( id, value );
+}
+
+std::string Window::GetAuxiliaryHintValue( unsigned int id ) const
+{
+ return GetImplementation(*this).GetAuxiliaryHintValue( id );
+}
+
+unsigned int Window::GetAuxiliaryHintId( const std::string& hint ) const
+{
+ return GetImplementation(*this).GetAuxiliaryHintId( hint );
+}
+
+void Window::SetInputRegion( const Rect< int >& inputRegion )
+{
+ return GetImplementation(*this).SetInputRegion( inputRegion );
+}
+
+void Window::SetType( Window::Type type )
+{
+ GetImplementation(*this).SetType( type );
+}
+
+Window::Type Window::GetType() const
+{
+ return GetImplementation(*this).GetType();
+}
+
+bool Window::SetNotificationLevel( Window::NotificationLevel::Type level )
+{
+ return GetImplementation(*this).SetNotificationLevel( level );
+}
+
+Window::NotificationLevel::Type Window::GetNotificationLevel() const
+{
+ return GetImplementation(*this).GetNotificationLevel();
+}
+
+void Window::SetOpaqueState( bool opaque )
+{
+ GetImplementation(*this).SetOpaqueState( opaque );
+}
+
+bool Window::IsOpaqueState() const
+{
+ return GetImplementation(*this).IsOpaqueState();
+}
+
+bool Window::SetScreenOffMode(Window::ScreenOffMode::Type screenMode)
+{
+ return GetImplementation(*this).SetScreenOffMode(screenMode);
+}
+
+Window::ScreenOffMode::Type Window::GetScreenOffMode() const
+{
+ return GetImplementation(*this).GetScreenOffMode();
+}
+
+bool Window::SetBrightness( int brightness )
+{
+ return GetImplementation(*this).SetBrightness( brightness );
+}
+
+int Window::GetBrightness() const
+{
+ return GetImplementation(*this).GetBrightness();
+}
+
+Window::ResizedSignalType& Window::ResizedSignal()
+{
+ return GetImplementation(*this).ResizedSignal();
+}
+
+void Window::SetSize( Window::WindowSize size )
+{
+ GetImplementation(*this).SetSize( size );
+}
+
+Window::WindowSize Window::GetSize() const
+{
+ return GetImplementation(*this).GetSize();
+}
+
+void Window::SetPosition( Window::WindowPosition position )
+{
+ GetImplementation(*this).SetPosition( position );
+}
+
+Window::WindowPosition Window::GetPosition() const
+{
+ return GetImplementation(*this).GetPosition();
+}
+
+void Window::SetTransparency( bool transparent )
+{
+ GetImplementation(*this).SetTransparency( transparent );
+}
+
Window::Window( Internal::Adaptor::Window* window )
: BaseHandle( window )
{
// EXTERNAL INCLUDES
#include <string>
#include <dali/public-api/math/rect.h>
+#include <dali/public-api/math/uint-16-pair.h>
#include <dali/public-api/math/vector2.h>
#include <dali/public-api/object/base-handle.h>
#include <dali/public-api/object/any.h>
class DALI_IMPORT_API Window : public BaseHandle
{
public:
+
+ typedef Uint16Pair WindowSize; ///< Window size type @SINCE_1_2.60
+ typedef Uint16Pair WindowPosition; ///< Window position type @SINCE_1_2.60
+
typedef Signal< void (bool) > IndicatorSignalType; ///< Indicator state signal type @SINCE_1_0.0
+ typedef Signal< void (bool) > FocusSignalType; ///< Window focus signal type @SINCE_1_2.60
+ typedef Signal< void (WindowSize) > ResizedSignalType; ///< Window resized signal type @SINCE_1_2.60
public:
AUTO = 2 ///< Hide in default, will show when necessary @SINCE_1_0.0
};
+ /**
+ * @brief An enum of Window types.
+ * @SINCE_1_2.60
+ */
+ enum Type
+ {
+ NORMAL, ///< A default window type. Indicates a normal, top-level window. Almost every window will be created with this type. @SINCE_1_2.60
+ NOTIFICATION, ///< A notification window, like a warning about battery life or a new E-Mail received. @SINCE_1_2.60
+ UTILITY, ///< A persistent utility window, like a toolbox or palette. @SINCE_1_2.60
+ DIALOG ///< Used for simple dialog windows. @SINCE_1_2.60
+ };
+
+ /**
+ * @brief An enum of screen mode.
+ * @SINCE_1_2.60
+ */
+ struct NotificationLevel
+ {
+ /**
+ * @brief An enum of screen mode.
+ * @SINCE_1_2.60
+ */
+ enum Type
+ {
+ NONE = -1, ///< No notification level. Default level. This value makes the notification window place in the layer of the normal window. @SINCE_1_2.60
+ BASE = 10, ///< Base notification level. @SINCE_1_2.60
+ MEDIUM = 20, ///< Higher notification level than base. @SINCE_1_2.60
+ HIGH = 30, ///< Higher notification level than medium. @SINCE_1_2.60
+ TOP = 40 ///< The highest notification level. @SINCE_1_2.60
+ };
+ };
+
+ /**
+ * @brief An enum of screen mode.
+ * @SINCE_1_2.60
+ */
+ struct ScreenOffMode
+ {
+ /**
+ * @brief An enum of screen mode.
+ * @SINCE_1_2.60
+ */
+ enum Type
+ {
+ TIMEOUT, ///< The mode which turns the screen off after a timeout. @SINCE_1_2.60
+ NEVER, ///< The mode which keeps the screen turned on. @SINCE_1_2.60
+ };
+
+ static constexpr Type DEFAULT { TIMEOUT }; ///< The default mode. @SINCE_1_2.60
+ };
+
// Methods
/**
*/
Any GetNativeHandle() const;
+ /**
+ * @brief Sets whether window accepts focus or not.
+ *
+ * @SINCE_1_2.60
+ * @param[in] accept If focus is accepted or not. Default is true.
+ */
+ void SetAcceptFocus( bool accept );
+
+ /**
+ * @brief Returns whether window accepts focus or not.
+ *
+ * @SINCE_1_2.60
+ * @return True if the window accept focus, false otherwise
+ */
+ bool IsFocusAcceptable() const;
+
+ /**
+ * @brief Shows the window if it is hidden.
+ * @SINCE_1_2.60
+ */
+ void Show();
+
+ /**
+ * @brief Hides the window if it is showing.
+ * @SINCE_1_2.60
+ */
+ void Hide();
+
+ /**
+ * @brief Returns whether the window is visible or not.
+ * @SINCE_1_2.60
+ * @return True if the window is visible, false otherwise.
+ */
+ bool IsVisible() const;
+
+ /**
+ * @brief Gets the count of supported auxiliary hints of the window.
+ * @SINCE_1_2.60
+ * @return The number of supported auxiliary hints.
+ *
+ * @note The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager.
+ * If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
+ */
+ unsigned int GetSupportedAuxiliaryHintCount() const;
+
+ /**
+ * @brief Gets the supported auxiliary hint string of the window.
+ * @SINCE_1_2.60
+ * @param[in] index The index of the supported auxiliary hint lists
+ * @return The auxiliary hint string of the index.
+ *
+ * @note The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager.
+ * If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
+ */
+ std::string GetSupportedAuxiliaryHint( unsigned int index ) const;
+
+ /**
+ * @brief Creates an auxiliary hint of the window.
+ * @SINCE_1_2.60
+ * @param[in] hint The auxiliary hint string.
+ * @param[in] value The value string.
+ * @return The ID of created auxiliary hint, or @c 0 on failure.
+ */
+ unsigned int AddAuxiliaryHint( const std::string& hint, const std::string& value );
+
+ /**
+ * @brief Removes an auxiliary hint of the window.
+ * @SINCE_1_2.60
+ * @param[in] id The ID of the auxiliary hint.
+ * @return True if no error occurred, false otherwise.
+ */
+ bool RemoveAuxiliaryHint( unsigned int id );
+
+ /**
+ * @brief Changes a value of the auxiliary hint.
+ * @SINCE_1_2.60
+ * @param[in] id The auxiliary hint ID.
+ * @param[in] value The value string to be set.
+ * @return True if no error occurred, false otherwise.
+ */
+ bool SetAuxiliaryHintValue( unsigned int id, const std::string& value );
+
+ /**
+ * @brief Gets a value of the auxiliary hint.
+ * @SINCE_1_2.60
+ * @param[in] id The auxiliary hint ID.
+ * @return The string value of the auxiliary hint ID, or an empty string if none exists.
+ */
+ std::string GetAuxiliaryHintValue( unsigned int id ) const;
+
+ /**
+ * @brief Gets a ID of the auxiliary hint string.
+ * @SINCE_1_2.60
+ * @param[in] hint The auxiliary hint string.
+ * @return The ID of the auxiliary hint string, or @c 0 if none exists.
+ */
+ unsigned int GetAuxiliaryHintId( const std::string& hint ) const;
+
+ /**
+ * @brief Sets a region to accept input events.
+ * @SINCE_1_2.60
+ * @param[in] inputRegion The region to accept input events.
+ */
+ void SetInputRegion( const Rect< int >& inputRegion );
+
+ /**
+ * @brief Sets a window type.
+ * @SINCE_1_2.60
+ * @param[in] type The window type.
+ * @remarks The default window type is NORMAL.
+ */
+ void SetType( Type type );
+
+ /**
+ * @brief Gets a window type.
+ * @SINCE_1_2.60
+ * @return A window type.
+ */
+ Type GetType() const;
+
+ /**
+ * @brief Sets a priority level for the specified notification window.
+ * @SINCE_1_2.60
+ * @param[in] level The notification window level.
+ * @return True if no error occurred, false otherwise.
+ * @PRIVLEVEL_PUBLIC
+ * @PRIVILEGE_WINDOW_PRIORITY
+ * @remarks This can be used for a notification type window only. The default level is NotificationLevel::NONE.
+ */
+ bool SetNotificationLevel( NotificationLevel::Type level );
+
+ /**
+ * @brief Gets a priority level for the specified notification window.
+ * @SINCE_1_2.60
+ * @return The notification window level.
+ * @remarks This can be used for a notification type window only.
+ */
+ NotificationLevel::Type GetNotificationLevel() const;
+
+ /**
+ * @brief Sets a transparent window's visual state to opaque.
+ * @details If a visual state of a transparent window is opaque,
+ * then the window manager could handle it as an opaque window when calculating visibility.
+ * @SINCE_1_2.60
+ * @param[in] opaque Whether the window's visual state is opaque.
+ * @remarks This will have no effect on an opaque window.
+ * It doesn't change transparent window to opaque window but lets the window manager know the visual state of the window.
+ */
+ void SetOpaqueState( bool opaque );
+
+ /**
+ * @brief Returns whether a transparent window's visual state is opaque or not.
+ * @SINCE_1_2.60
+ * @return True if the window's visual state is opaque, false otherwise.
+ * @remarks The return value has no meaning on an opaque window.
+ */
+ bool IsOpaqueState() const;
+
+ /**
+ * @brief Sets a window's screen off mode.
+ * @details This API is useful when the application needs to keep the display turned on.
+ * If the application sets the screen mode to #::Dali::Window::ScreenOffMode::NEVER to its window and the window is shown,
+ * the window manager requests the display system to keep the display on as long as the window is shown.
+ * If the window is no longer shown, then the window manager requests the display system to go back to normal operation.
+ * @SINCE_1_2.60
+ * @param[in] screenOffMode The screen mode.
+ * @return True if no error occurred, false otherwise.
+ * @PRIVLEVEL_PUBLIC
+ * @PRIVILEGE_DISPLAY
+ */
+ bool SetScreenOffMode(ScreenOffMode::Type screenOffMode);
+
+ /**
+ * @brief Gets a screen off mode of the window.
+ * @SINCE_1_2.60
+ * @return The screen off mode.
+ */
+ ScreenOffMode::Type GetScreenOffMode() const;
+
+ /**
+ * @brief Sets preferred brightness of the window.
+ * @details This API is useful when the application needs to change the brightness of the screen when it is appeared on the screen.
+ * If the brightness has been set and the window is shown, the window manager requests the display system to change the brightness to the provided value.
+ * If the window is no longer shown, then the window manager requests the display system to go back to default brightness.
+ * A value less than 0 results in default brightness and a value greater than 100 results in maximum brightness.
+ * @SINCE_1_2.60
+ * @param[in] brightness The preferred brightness (0 to 100).
+ * @return True if no error occurred, false otherwise.
+ * @PRIVLEVEL_PUBLIC
+ * @PRIVILEGE_DISPLAY
+ */
+ bool SetBrightness( int brightness );
+
+ /**
+ * @brief Gets preffered brightness of the window.
+ * @return The preffered brightness.
+ */
+ int GetBrightness() const;
+
+ /**
+ * @brief Sets a size of the window.
+ *
+ * @SINCE_1_2.60
+ * @param[in] size The new window size
+ */
+ void SetSize( WindowSize size );
+
+ /**
+ * @brief Gets a size of the window.
+ *
+ * @SINCE_1_2.60
+ * @return The size of the window
+ */
+ WindowSize GetSize() const;
+
+ /**
+ * @brief Sets a position of the window.
+ *
+ * @SINCE_1_2.60
+ * @param[in] position The new window position
+ */
+ void SetPosition( WindowPosition position );
+
+ /**
+ * @brief Gets a position of the window.
+ *
+ * @SINCE_1_2.60
+ * @return The position of the window
+ */
+ WindowPosition GetPosition() const;
+
+ /**
+ * @brief Sets whether the window is transparent or not.
+ *
+ * @SINCE_1_2.60
+ * @param[in] transparent Whether the window is transparent
+ */
+ void SetTransparency( bool transparent );
+
public: // Signals
/**
* @brief The user should connect to this signal to get a timing when indicator was shown / hidden.
*/
IndicatorSignalType& IndicatorVisibilityChangedSignal();
+ /**
+ * @brief The user should connect to this signal to get a timing when window gains focus or loses focus.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( bool focusIn );
+ * @endcode
+ * The parameter is true if window gains focus, otherwise false.
+ *
+ * @SINCE_1_2.60
+ * @return The signal to connect to
+ */
+ FocusSignalType& FocusChangedSignal();
+
+ /**
+ * @brief This signal is emitted when the window is resized.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( int width, int height );
+ * @endcode
+ * The parameters are the resized width and height.
+ *
+ * @SINCE_1_2.60
+ * @return The signal to connect to
+ */
+ ResizedSignalType& ResizedSignal();
+
public: // Not intended for application developers
/// @cond internal
/**
const unsigned int ADAPTOR_MAJOR_VERSION = 1;
const unsigned int ADAPTOR_MINOR_VERSION = 2;
-const unsigned int ADAPTOR_MICRO_VERSION = 59;
+const unsigned int ADAPTOR_MICRO_VERSION = 60;
const char * const ADAPTOR_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
mIndicatorOpacityMode( Dali::Window::OPAQUE ),
mOverlay( NULL ),
mAdaptor( NULL ),
- mType( Dali::DevelWindow::NORMAL ),
+ mType( Dali::Window::NORMAL ),
mPreferredOrientation( Dali::Window::PORTRAIT ),
mSupportedAuxiliaryHints(),
mAuxiliaryHints(),
mIsFocusAcceptable = accept;
}
-bool Window::IsFocusAcceptable()
+bool Window::IsFocusAcceptable() const
{
return mIsFocusAcceptable;
}
{
}
-unsigned int Window::GetSupportedAuxiliaryHintCount()
+unsigned int Window::GetSupportedAuxiliaryHintCount() const
{
return 0;
}
-std::string Window::GetSupportedAuxiliaryHint( unsigned int index )
+std::string Window::GetSupportedAuxiliaryHint( unsigned int index ) const
{
return std::string();
}
{
}
-void Window::SetType( Dali::DevelWindow::Type type )
+void Window::SetType( Dali::Window::Type type )
{
mType = type;
}
-Dali::DevelWindow::Type Window::GetType() const
+Dali::Window::Type Window::GetType() const
{
return mType;
}
-bool Window::SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type level )
+bool Window::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
{
return false;
}
-Dali::DevelWindow::NotificationLevel::Type Window::GetNotificationLevel()
+Dali::Window::NotificationLevel::Type Window::GetNotificationLevel() const
{
- return Dali::DevelWindow::NotificationLevel::NONE;
+ return Dali::Window::NotificationLevel::NONE;
}
void Window::SetOpaqueState( bool opaque )
mOpaqueState = opaque;
}
-bool Window::IsOpaqueState()
+bool Window::IsOpaqueState() const
{
return mOpaqueState;
}
-bool Window::SetScreenMode( Dali::DevelWindow::ScreenMode::Type screenMode )
+bool Window::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
{
return false;
}
-Dali::DevelWindow::ScreenMode::Type Window::GetScreenMode()
+Dali::Window::ScreenOffMode::Type Window::GetScreenOffMode() const
{
- return Dali::DevelWindow::ScreenMode::DEFAULT;
+ return Dali::Window::ScreenOffMode::TIMEOUT;
}
bool Window::SetBrightness( int brightness )
return false;
}
-int Window::GetBrightness()
+int Window::GetBrightness() const
{
return 0;
}
-void Window::SetSize( Dali::DevelWindow::WindowSize size )
+void Window::SetSize( Dali::Window::WindowSize size )
{
PositionSize positionSize = mSurface->GetPositionSize();
mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
// Emit signal
- mResizedSignal.Emit( Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height ) );
+ mResizedSignal.Emit( Dali::Window::WindowSize( positionSize.width, positionSize.height ) );
mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
}
}
-Dali::DevelWindow::WindowSize Window::GetSize()
+Dali::Window::WindowSize Window::GetSize() const
{
PositionSize positionSize = mSurface->GetPositionSize();
- return Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height );
+ return Dali::Window::WindowSize( positionSize.width, positionSize.height );
}
-void Window::SetPosition( Dali::DevelWindow::WindowPosition position )
+void Window::SetPosition( Dali::Window::WindowPosition position )
{
PositionSize positionSize = mSurface->GetPositionSize();
}
}
-Dali::DevelWindow::WindowPosition Window::GetPosition()
+Dali::Window::WindowPosition Window::GetPosition() const
{
PositionSize positionSize = mSurface->GetPositionSize();
- return Dali::DevelWindow::WindowPosition( positionSize.x, positionSize.y );
+ return Dali::Window::WindowPosition( positionSize.x, positionSize.y );
}
void Window::SetTransparency( bool transparent )
#include <dali/integration-api/events/touch-event-integ.h>
#include <dali/integration-api/events/hover-event-integ.h>
#include <dali/integration-api/events/wheel-event-integ.h>
-#include <dali/devel-api/events/key-event-devel.h>
// INTERNAL INCLUDES
#include <events/gesture-manager.h>
const char * DETENT_DEVICE_NAME = "tizen_detent";
const std::string DEFAULT_DEVICE_NAME = "";
-const DevelDevice::Class::Type DEFAULT_DEVICE_CLASS = DevelDevice::Class::NONE;
-const DevelDevice::Subclass::Type DEFAULT_DEVICE_SUBCLASS = DevelDevice::Subclass::NONE;
+const Device::Class::Type DEFAULT_DEVICE_CLASS = Device::Class::NONE;
+const Device::Subclass::Type DEFAULT_DEVICE_SUBCLASS = Device::Subclass::NONE;
// DBUS accessibility
#define A11Y_BUS "org.a11y.Bus"
mIndicatorOpacityMode( Dali::Window::OPAQUE ),
mOverlay( NULL ),
mAdaptor( NULL ),
- mType( Dali::DevelWindow::NORMAL ),
+ mType( Dali::Window::NORMAL ),
mEventHandler( NULL ),
mPreferredOrientation( Dali::Window::PORTRAIT ),
mSupportedAuxiliaryHints(),
mIsFocusAcceptable = accept;
}
-bool Window::IsFocusAcceptable()
+bool Window::IsFocusAcceptable() const
{
return mIsFocusAcceptable;
}
mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( width, height ) );
// Emit signal
- mResizedSignal.Emit( Dali::DevelWindow::WindowSize( width, height ) );
+ mResizedSignal.Emit( Dali::Window::WindowSize( width, height ) );
mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( width, height ) );
#endif // DALI_PROFILE_UBUNTU
}
}
-unsigned int Window::GetSupportedAuxiliaryHintCount()
+unsigned int Window::GetSupportedAuxiliaryHintCount() const
{
return 0;
}
-std::string Window::GetSupportedAuxiliaryHint( unsigned int index )
+std::string Window::GetSupportedAuxiliaryHint( unsigned int index ) const
{
return std::string();
}
{
}
-void Window::SetType( Dali::DevelWindow::Type type )
+void Window::SetType( Dali::Window::Type type )
{
mType = type;
}
-Dali::DevelWindow::Type Window::GetType() const
+Dali::Window::Type Window::GetType() const
{
return mType;
}
-bool Window::SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type level )
+bool Window::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
{
return false;
}
-Dali::DevelWindow::NotificationLevel::Type Window::GetNotificationLevel()
+Dali::Window::NotificationLevel::Type Window::GetNotificationLevel() const
{
- return Dali::DevelWindow::NotificationLevel::NONE;
+ return Dali::Window::NotificationLevel::NONE;
}
void Window::SetOpaqueState( bool opaque )
mOpaqueState = opaque;
}
-bool Window::IsOpaqueState()
+bool Window::IsOpaqueState() const
{
return mOpaqueState;
}
-bool Window::SetScreenMode( Dali::DevelWindow::ScreenMode::Type screenMode )
+bool Window::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
{
return false;
}
-Dali::DevelWindow::ScreenMode::Type Window::GetScreenMode()
+Dali::Window::ScreenOffMode::Type Window::GetScreenOffMode() const
{
- return Dali::DevelWindow::ScreenMode::DEFAULT;
+ return Dali::Window::ScreenOffMode::TIMEOUT;
}
bool Window::SetBrightness( int brightness )
return false;
}
-int Window::GetBrightness()
+int Window::GetBrightness() const
{
return 0;
}
-void Window::SetSize( Dali::DevelWindow::WindowSize size )
+void Window::SetSize( Dali::Window::WindowSize size )
{
PositionSize positionSize = mSurface->GetPositionSize();
mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
// Emit signal
- mResizedSignal.Emit( Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height ) );
+ mResizedSignal.Emit( Dali::Window::WindowSize( positionSize.width, positionSize.height ) );
mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
}
}
-Dali::DevelWindow::WindowSize Window::GetSize()
+Dali::Window::WindowSize Window::GetSize() const
{
PositionSize positionSize = mSurface->GetPositionSize();
- return Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height );
+ return Dali::Window::WindowSize( positionSize.width, positionSize.height );
}
-void Window::SetPosition( Dali::DevelWindow::WindowPosition position )
+void Window::SetPosition( Dali::Window::WindowPosition position )
{
PositionSize positionSize = mSurface->GetPositionSize();
}
}
-Dali::DevelWindow::WindowPosition Window::GetPosition()
+Dali::Window::WindowPosition Window::GetPosition() const
{
PositionSize positionSize = mSurface->GetPositionSize();
- return Dali::DevelWindow::WindowPosition( positionSize.x, positionSize.y );
+ return Dali::Window::WindowPosition( positionSize.x, positionSize.y );
}
void Window::SetTransparency( bool transparent )
#include <dali/dali.h>
#include <Ecore_X.h>
#include <devel-api/adaptor-framework/drag-and-drop-detector.h>
-#include <devel-api/adaptor-framework/window-devel.h>
#include <dali-test-suite-utils.h>
using namespace Dali;
Dali::Window window;
try
{
- DevelWindow::SetAcceptFocus( window, true );
+ window.SetAcceptFocus( true );
DALI_TEST_CHECK( false ); // Should not reach here!
}
catch( ... )
Dali::Window window;
try
{
- DevelWindow::IsFocusAcceptable( window );
+ window.IsFocusAcceptable();
DALI_TEST_CHECK( false ); // Should not reach here!
}
catch( ... )
Dali::Window window;
try
{
- DevelWindow::FocusChangedSignal( window );
+ window.FocusChangedSignal();
DALI_TEST_CHECK( false ); // Should not reach here!
}
catch( ... )
Name: dali-adaptor
Summary: The DALi Tizen Adaptor
-Version: 1.2.59
+Version: 1.2.60
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT
case Dali::Pixel::RGB888:
case Dali::Pixel::RGB8888:
case Dali::Pixel::BGR8888:
+ case Dali::Pixel::RGB16F:
+ case Dali::Pixel::RGB32F:
{
return ( channel == RED || channel == GREEN || channel == BLUE );
}