END_TEST;
}
+int UtcDaliTextControllerImfPreeditStyle(void)
+{
+ tet_infoline(" UtcDaliTextControllerImfPreeditStyle");
+ ToolkitTestApplication application;
+
+ // Creates a text controller.
+ ControllerPtr controller = Controller::New();
+
+ std::string text;
+ InputMethodContext::EventData imfEvent;
+
+ DALI_TEST_CHECK( controller );
+
+ // Configures the text controller similarly to the text-field.
+ ConfigureTextField( controller );
+
+ InputMethodContext inputMethodContext = InputMethodContext::New();
+
+ // Send COMMIT event.
+ imfEvent = InputMethodContext::EventData( InputMethodContext::COMMIT, "Hello ", 0, 6 );
+ controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
+
+ // Force to update the model.
+ controller->GetNaturalSize();
+
+ controller->GetText( text );
+ DALI_TEST_EQUALS( "Hello ", text, TEST_LOCATION );
+
+ // Send PRE_EDIT event
+ imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "w", 6, 1 );
+ controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
+ inputMethodContext.SetPreeditStyle( InputMethodContext::PreeditStyle::NONE );
+ controller->GetNaturalSize();
+
+ controller->GetText( text );
+ DALI_TEST_EQUALS( "Hello w", text, TEST_LOCATION );
+
+ imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "w", 6, 1 );
+ controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
+
+ // Set the preedit style as REVERSE
+ inputMethodContext.SetPreeditStyle( InputMethodContext::PreeditStyle::REVERSE );
+ controller->GetNaturalSize();
+
+ controller->GetText( text );
+ DALI_TEST_EQUALS( "Hello w", text, TEST_LOCATION );
+
+ imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "w", 6, 1 );
+ controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
+
+ // Set the preedit style as HIGHLIGHT
+ inputMethodContext.SetPreeditStyle( InputMethodContext::PreeditStyle::HIGHLIGHT );
+ controller->GetNaturalSize();
+
+ controller->GetText( text );
+ DALI_TEST_EQUALS( "Hello w", text, TEST_LOCATION );
+
+ imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "w", 6, 1 );
+ controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
+
+ // Set the preedit style as CUSTOM_PLATFORM_STYLE_1
+ inputMethodContext.SetPreeditStyle( InputMethodContext::PreeditStyle::CUSTOM_PLATFORM_STYLE_1 );
+ controller->GetNaturalSize();
+
+ controller->GetText( text );
+ DALI_TEST_EQUALS( "Hello w", text, TEST_LOCATION );
+
+ imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "w", 6, 1 );
+ controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
+
+ // Set the preedit style as CUSTOM_PLATFORM_STYLE_2
+ inputMethodContext.SetPreeditStyle( InputMethodContext::PreeditStyle::CUSTOM_PLATFORM_STYLE_2 );
+ controller->GetNaturalSize();
+
+ controller->GetText( text );
+ DALI_TEST_EQUALS( "Hello w", text, TEST_LOCATION );
+
+ imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "w", 6, 1 );
+ controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
+
+ // Set the preedit style as CUSTOM_PLATFORM_STYLE_3
+ inputMethodContext.SetPreeditStyle( InputMethodContext::PreeditStyle::CUSTOM_PLATFORM_STYLE_3 );
+ controller->GetNaturalSize();
+
+ controller->GetText( text );
+ DALI_TEST_EQUALS( "Hello w", text, TEST_LOCATION );
+
+ imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "w", 6, 1 );
+ controller->OnInputMethodContextEvent( inputMethodContext, imfEvent );
+
+ // Set the preedit style as CUSTOM_PLATFORM_STYLE_4
+ inputMethodContext.SetPreeditStyle( InputMethodContext::PreeditStyle::CUSTOM_PLATFORM_STYLE_4 );
+ controller->GetNaturalSize();
+
+ controller->GetText( text );
+ DALI_TEST_EQUALS( "Hello w", text, TEST_LOCATION );
+
+ tet_result(TET_PASS);
+ END_TEST;
+}
+
int UtcDaliTextControllerTextPopupButtonTouched(void)
{
tet_infoline(" UtcDaliTextControllerTextPopupButtonTouched");
mActiveTextureUnit = 0;
mCheckFramebufferStatusResult = 0;
mFramebufferStatus = 0;
- mFramebufferColorAttached = 0;
mFramebufferDepthAttached = 0;
mFramebufferStencilAttached = 0;
+ mFramebufferColorAttachmentCount = 0;
+ mFrameBufferColorStatus = 0;
mNumBinaryFormats = 0;
mBinaryFormats = 0;
mProgramBinaryLength = 0;
mLastShaderCompiled = 0;
mLastClearBitMask = 0;
+ mLastClearColor = Color::TRANSPARENT;
mClearCount = 0;
mLastBlendEquationRgb = 0;
bool blendEnabled = callStack.FindMethodAndParams( "Disable", out.str() );
return blendEnabled;
}
+
#define TEST_GL_ABSTRACTION_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
// INTERNAL INCLUDES
#include <dali/public-api/dali-core.h>
+#include <dali/devel-api/rendering/frame-buffer-devel.h>
#include <dali/integration-api/core.h>
#include <dali/integration-api/gl-abstraction.h>
#include <dali/integration-api/gl-defines.h>
return mCheckFramebufferStatusResult;
}
- inline GLenum CheckFramebufferColorAttachment()
+ inline GLuint CheckFramebufferColorAttachmentCount()
{
- return mFramebufferColorAttached;
+ return mFramebufferColorAttachmentCount;
}
inline GLenum CheckFramebufferDepthAttachment()
inline void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
+ mLastClearColor.r = red;
+ mLastClearColor.g = green;
+ mLastClearColor.b = blue;
+ mLastClearColor.a = alpha;
+ }
+
+ inline const Vector4& GetLastClearColor() const
+ {
+ return mLastClearColor;
}
inline void ClearDepthf(GLclampf depth)
mFramebufferStatus |= 4;
//We check 4 attachment colors
- if ((attachment == GL_COLOR_ATTACHMENT0) || (attachment == GL_COLOR_ATTACHMENT1) || (attachment == GL_COLOR_ATTACHMENT2) || (attachment == GL_COLOR_ATTACHMENT4))
+ if ((attachment >= GL_COLOR_ATTACHMENT0) && (attachment < GL_COLOR_ATTACHMENT0 + Dali::DevelFrameBuffer::MAX_COLOR_ATTACHMENTS))
{
- mFramebufferColorAttached = true;
+ uint8_t mask = 1 << (attachment - GL_COLOR_ATTACHMENT0);
+ if ((mFrameBufferColorStatus & mask) == 0)
+ {
+ mFrameBufferColorStatus |= mask;
+ ++mFramebufferColorAttachmentCount;
+ }
}
}
GLenum mActiveTextureUnit;
GLenum mCheckFramebufferStatusResult;
GLint mFramebufferStatus;
- GLenum mFramebufferColorAttached;
GLenum mFramebufferDepthAttached;
GLenum mFramebufferStencilAttached;
+ GLuint mFramebufferColorAttachmentCount;
+ GLuint mFrameBufferColorStatus;
GLint mNumBinaryFormats;
GLint mBinaryFormats;
GLint mProgramBinaryLength;
ShaderSourceMap mShaderSources;
GLuint mLastShaderCompiled;
GLbitfield mLastClearBitMask;
+ Vector4 mLastClearColor;
unsigned int mClearCount;
Vector4 mLastBlendColor;
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
void ApplyOptions( const InputMethodOptions& options );
bool FilterEventKey( const Dali::KeyEvent& keyEvent );
void SetPreeditStyle( Dali::InputMethodContext::PreeditStyle type );
- Dali::InputMethodContext::PreeditStyle GetPreeditStyle() const;
+ void GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const;
public: // Signals
ActivatedSignalType& ActivatedSignal() { return mActivatedSignal; }
bool mRestoreAfterFocusLost:1; ///< Whether the keyboard needs to be restored (activated ) after focus regained.
bool mIdleCallbackConnected:1; ///< Whether the idle callback is already connected.
InputMethodOptions mOptions;
- Dali::InputMethodContext::PreeditStyle mPreeditStyle;
+ Vector< Dali::InputMethodContext::PreeditAttributeData > mPreeditAttrs; ///< Stores preedit attr data
ActivatedSignalType mActivatedSignal;
KeyboardEventSignalType mEventSignal;
: mIMFCursorPosition( 0 ),
mSurroundingText(),
mRestoreAfterFocusLost( false ),
- mIdleCallbackConnected( false ),
- mPreeditStyle( Dali::InputMethodContext::PreeditStyle::NONE )
+ mIdleCallbackConnected( false )
{
CreateContext( /*ecoreXwin*/ );
ConnectCallbacks();
void InputMethodContext::SetPreeditStyle( Dali::InputMethodContext::PreeditStyle type )
{
- mPreeditStyle = type;
+ Dali::InputMethodContext::PreeditAttributeData data;
+ data.preeditType = type;
+ mPreeditAttrs.PushBack( data );
}
-Dali::InputMethodContext::PreeditStyle InputMethodContext::GetPreeditStyle() const
+void InputMethodContext::GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const
{
- return mPreeditStyle;
+ attrs = mPreeditAttrs;
}
} // Adaptor
Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetPreeditStyle( type );
}
-Dali::InputMethodContext::PreeditStyle InputMethodContext::GetPreeditStyle() const
+void InputMethodContext::GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const
{
- return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetPreeditStyle();
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetPreeditStyle( attrs );
}
// Signals
*/
enum class PreeditStyle
{
- NONE, ///< None style
- UNDERLINE, ///< Underline substring style
- REVERSE, ///< Reverse substring style
- HIGHLIGHT ///< Highlight substring style
+ NONE, ///< None style
+ UNDERLINE, ///< Underline substring style
+ REVERSE, ///< Reverse substring style
+ HIGHLIGHT, ///< Highlight substring style
+ CUSTOM_PLATFORM_STYLE_1, ///< Custom style for platform
+ CUSTOM_PLATFORM_STYLE_2, ///< Custom style for platform
+ CUSTOM_PLATFORM_STYLE_3, ///< Custom style for platform
+ CUSTOM_PLATFORM_STYLE_4 ///< Custom style for platform
+ };
+
+ /**
+ * @brief This structure is for the preedit style types and indices.
+ */
+ struct PreeditAttributeData
+ {
+ PreeditStyle preeditType; /// The preedit style type
+ unsigned int startIndex; /// The start index of preedit
+ unsigned int endIndex; /// The end index of preedit
};
/**
void SetPreeditStyle( PreeditStyle type );
/**
- * @brief Gets the preedit type.
+ * @brief Gets the preedit attrs data.
*
- * @return The preedit style type
+ * @param[out] attrs The preedit attrs data.
*/
- PreeditStyle GetPreeditStyle() const;
+ void GetPreeditStyle( Vector<PreeditAttributeData>& attrs ) const;
public:
mDisplyMode = mode;
}
+ Any GetMediaPlayer()
+ {
+ return NULL;
+ }
+
public:
return Internal::Adaptor::GetImplementation( *this ).GetDisplayMode();
}
+Any VideoPlayer::GetMediaPlayer()
+{
+ return Internal::Adaptor::GetImplementation( *this ).GetMediaPlayer();
+}
+
} // namespace Dali;
map = dummyControl.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
value = map.Find( DevelImageVisual::Property::PLAY_STATE );
- DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::PAUSED );
+ DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::STOPPED );
tet_infoline( "On stage again" );
Stage::GetCurrent().Add( dummyControl );
map = dummyControl.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
value = map.Find( DevelImageVisual::Property::PLAY_STATE );
- DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::PAUSED );
+ DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::STOPPED );
tet_infoline( "Test Play action" );
DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
const char* const PROPERTY_NAME_ENABLE_GRAB_HANDLE = "enableGrabHandle";
const char* const PROPERTY_NAME_MATCH_SYSTEM_LANGUAGE_DIRECTION = "matchSystemLanguageDirection";
const char* const PROPERTY_NAME_ENABLE_GRAB_HANDLE_POPUP = "enableGrabHandlePopup";
+const char* const PROPERTY_NAME_BACKGROUND = "textBackground";
const Vector4 PLACEHOLDER_TEXT_COLOR( 0.8f, 0.8f, 0.8f, 0.8f );
const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f ); // The text highlight color.
DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_ENABLE_GRAB_HANDLE ) == DevelTextField::Property::ENABLE_GRAB_HANDLE );
DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_MATCH_SYSTEM_LANGUAGE_DIRECTION ) == DevelTextField::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION );
DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_ENABLE_GRAB_HANDLE_POPUP ) == DevelTextField::Property::ENABLE_GRAB_HANDLE_POPUP );
+ DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_BACKGROUND ) == DevelTextField::Property::BACKGROUND );
END_TEST;
}
field.SetProperty( DevelTextField::Property::ENABLE_GRAB_HANDLE_POPUP, false );
DALI_TEST_CHECK( !field.GetProperty<bool>( DevelTextField::Property::ENABLE_GRAB_HANDLE_POPUP ) );
+ // Check the background property
+ field.SetProperty( DevelTextField::Property::BACKGROUND, Color::RED );
+ DALI_TEST_EQUALS( field.GetProperty<Vector4>( DevelTextField::Property::BACKGROUND ), Color::RED, TEST_LOCATION );
+
application.SendNotification();
application.Render();
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/public-api/controls/video-view/video-view.h>
+#include <dali-toolkit/devel-api/controls/video-view/video-view-devel.h>
using namespace Dali;
using namespace Dali::Toolkit;
videoView.Stop();
videoView.Forward(10);
videoView.Backward(10);
+
+ Toolkit::DevelVideoView::GetMediaPlayer( videoView );
+
VideoView::VideoViewSignalType& signal = videoView.FinishedSignal();
DALI_TEST_EQUALS( 0, signal.GetConnectionCount(), TEST_LOCATION );
endif()
endif()
-FIND_PACKAGE( PkgConfig REQUIRED )
-FIND_PACKAGE( Doxygen QUIET )
-
-PKG_CHECK_MODULES(DALICORE REQUIRED dali-core)
-PKG_CHECK_MODULES(DALIADAPTOR REQUIRED dali-adaptor)
-
# API VERSION (Not DALi release version)
SET(${name}_VERSION_MAJOR 0)
SET(${name}_VERSION_MINOR 0)
SET(DALI_TOOLKIT_VERSION ${${name}_VERSION} )
# Define options to CMake
-OPTION(ENABLE_EXPORTALL "Enable Export all symbols" OFF)
-OPTION(ENABLE_DEBUG "Enable Debug" OFF)
-OPTION(ENABLE_TRACE "Enable Trace" OFF)
-OPTION(ENABLE_I18N "Turns on internationalisation" OFF)
-OPTION(ENABLE_COVERAGE "Coverage" OFF)
+OPTION(ENABLE_EXPORTALL "Enable Export all symbols" OFF)
+OPTION(ENABLE_DEBUG "Enable Debug" OFF)
+OPTION(ENABLE_TRACE "Enable Trace" OFF)
+OPTION(ENABLE_I18N "Turns on internationalisation" OFF)
+OPTION(ENABLE_COVERAGE "Coverage" OFF)
+OPTION(ENABLE_PKG_CONFIGURE "Use pkgconfig" ON)
+OPTION(ENABLE_LINK_TEST "Enable the link test" ON)
+OPTION(INSTALL_DOXYGEN_DOC "Install doxygen doc" ON)
+OPTION(CONFIGURE_AUTOMATED_TESTS "Configure automated tests" ON)
+
+IF( ENABLE_PKG_CONFIGURE )
+ FIND_PACKAGE( PkgConfig REQUIRED )
+
+ PKG_CHECK_MODULES(DALICORE REQUIRED dali-core)
+ PKG_CHECK_MODULES(DALIADAPTOR REQUIRED dali-adaptor)
+ENDIF()
+
+IF( INSTALL_DOXYGEN_DOC )
+ FIND_PACKAGE( Doxygen QUIET )
+ENDIF()
+
+IF( WIN32 ) # WIN32 includes x64 as well according to the cmake doc.
+ FIND_PACKAGE( dali-windows-dependencies REQUIRED)
+ FIND_PACKAGE( dali-core REQUIRED)
+ FIND_PACKAGE( dali-adaptor REQUIRED)
+ FIND_PATH( SYSTEM_INCLUDE_DIR "dali-windows-dependencies.h" )
+ENDIF()
# Define non-boolean options to CMake
SET(WITH_STYLE "480x800" CACHE STRING "Select the style folder to use")
MESSAGE( STATUS "CMAKE_BUILD_TYPE: " Release )
ENDIF()
-ADD_DEFINITIONS(-DPIC -DSTDC_HEADERS)
-ADD_DEFINITIONS(-DDALI_IMAGE_DIR=\"${dataReadOnlyDir}/toolkit/images/\"
- -DDALI_SOUND_DIR=\"${dataReadOnlyDir}/toolkit/sounds/\"
- -DDALI_STYLE_DIR=\"${dataReadOnlyDir}/toolkit/styles/\"
- -DDALI_STYLE_IMAGE_DIR=\"${dataReadOnlyDir}/toolkit/styles/images/\"
- -DDALI_DATA_READ_ONLY_DIR=\"${dataReadOnlyDir}\" )
-
-IF("${ARCH}" STREQUAL "arm")
- ADD_DEFINITIONS("-DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
IF( ENABLE_DEBUG )
ADD_DEFINITIONS( "-DDEBUG_ENABLED" )
SET( ENABLE_EXPORTALL ON )
ENDIF( ENABLE_DEBUG )
-IF( NOT ${ENABLE_EXPORTALL} )
- ADD_DEFINITIONS( "-fvisibility=hidden -DHIDE_DALI_INTERNALS" )
-ENDIF( NOT ${ENABLE_EXPORTALL} )
-
IF( ENABLE_I18N )
ADD_DEFINITIONS( "-DDGETTEXT_ENABLED" )
ENDIF( ENABLE_I18N )
+IF( SET_VCPKG_INSTALL_PREFIX )
+ ADD_DEFINITIONS( "-DBUILDING_DALI_TOOLKIT" )
+ ADD_DEFINITIONS( -DDALI_IMAGE_DIR=\"${VCPKG_INSTALLED_DIR}/share/dali/toolkit/images/\"
+ -DDALI_SOUND_DIR=\"${VCPKG_INSTALLED_DIR}/share/dali/toolkit/sounds/\"
+ -DDALI_STYLE_DIR=\"${VCPKG_INSTALLED_DIR}/share/dali/toolkit/styles/\"
+ -DDALI_STYLE_IMAGE_DIR=\"${VCPKG_INSTALLED_DIR}/share/dali/toolkit/styles/images/\"
+ -DDALI_DATA_READ_ONLY_DIR=\"${VCPKG_INSTALLED_DIR}/share/\" )
+ELSE()
+ ADD_DEFINITIONS(-DPIC -DSTDC_HEADERS)
+ ADD_DEFINITIONS(-DDALI_IMAGE_DIR=\"${dataReadOnlyDir}/toolkit/images/\"
+ -DDALI_SOUND_DIR=\"${dataReadOnlyDir}/toolkit/sounds/\"
+ -DDALI_STYLE_DIR=\"${dataReadOnlyDir}/toolkit/styles/\"
+ -DDALI_STYLE_IMAGE_DIR=\"${dataReadOnlyDir}/toolkit/styles/images/\"
+ -DDALI_DATA_READ_ONLY_DIR=\"${dataReadOnlyDir}\" )
+
+ IF("${ARCH}" STREQUAL "arm")
+ ADD_DEFINITIONS("-DTARGET")
+ ENDIF("${ARCH}" STREQUAL "arm")
+
+ IF( NOT ${ENABLE_EXPORTALL} )
+ ADD_DEFINITIONS( "-fvisibility=hidden -DHIDE_DALI_INTERNALS" )
+ ENDIF( NOT ${ENABLE_EXPORTALL} )
+ENDIF()
+
+IF( ENABLE_TRACE )
+ ADD_DEFINITIONS("-DTRACE_ENABLED")
+ENDIF()
+
# Platforms with highp shader support can use vector based text
IF( "${PROFILE}" STREQUAL "UBUNTU" )
SET( ENABLE_VECTOR_BASED_TEXT_RENDERING 1 )
ENDIF()
# Set up the lib dir
-SET( LIB_DIR $ENV{libdir} )
-IF( NOT LIB_DIR )
- SET( LIB_DIR ${CMAKE_INSTALL_LIBDIR} )
-ENDIF()
-IF( NOT LIB_DIR )
+IF( SET_VCPKG_INSTALL_PREFIX )
SET( LIB_DIR ${PREFIX}/lib )
+ SET( BIN_DIR ${PREFIX}/bin )
+ELSE()
+ SET( LIB_DIR $ENV{libdir} )
+ IF( NOT LIB_DIR )
+ SET( LIB_DIR ${CMAKE_INSTALL_LIBDIR} )
+ ENDIF()
+ IF( NOT LIB_DIR )
+ SET( LIB_DIR ${PREFIX}/lib )
+ ENDIF()
ENDIF()
-# Configure the pkg-config file
-# Requires the following variables to be setup:
-# @PREFIX@ @EXEC_PREFIX@ @DALI_VERSION@ @LIB_DIR@ @DEV_INCLUDE_PATH@
-SET( DEV_INCLUDE_PATH ${INCLUDE_DIR} )
-SET( CORE_PKG_CFG_FILE dali-toolkit.pc )
-CONFIGURE_FILE( ${CORE_PKG_CFG_FILE}.in ${CORE_PKG_CFG_FILE} @ONLY )
-
-# Set up compiler flags and warnings
-ADD_COMPILE_OPTIONS( -std=c++11 )
-ADD_COMPILE_OPTIONS( -Wno-ignored-qualifiers )
-
-# TODO: Clang is a lot more strict with warnings, we should address
-# those issues at some point.
-IF( NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
- ADD_COMPILE_OPTIONS( -Werror )
+IF( ENABLE_PKG_CONFIGURE )
+ # Configure the pkg-config file
+ # Requires the following variables to be setup:
+ # @PREFIX@ @EXEC_PREFIX@ @DALI_VERSION@ @LIB_DIR@ @DEV_INCLUDE_PATH@
+ SET( DEV_INCLUDE_PATH ${INCLUDE_DIR} )
+ SET( CORE_PKG_CFG_FILE dali-toolkit.pc )
+ CONFIGURE_FILE( ${CORE_PKG_CFG_FILE}.in ${CORE_PKG_CFG_FILE} @ONLY )
ENDIF()
-ADD_COMPILE_OPTIONS( -Wall -Wno-unused-parameter -Wno-float-equal -Wno-class-memaccess )
-
-IF( ENABLE_COVERAGE OR "$ENV{CXXFLAGS}" MATCHES --coverage )
- ADD_COMPILE_OPTIONS( --coverage )
- SET(ENABLE_COVERAGE ON)
- SET(COVERAGE --coverage)
+IF( WIN32 )
+ ADD_COMPILE_OPTIONS( /FIdali-windows-dependencies.h ) # Adds missing definitions.
+ ADD_COMPILE_OPTIONS( /vmg ) # Avoids a 'reinterpret_cast' compile error while compiling signals and callbacks.
+ELSE()
+ # Set up compiler flags and warnings
+ ADD_COMPILE_OPTIONS( -std=c++11 )
+ ADD_COMPILE_OPTIONS( -Wno-ignored-qualifiers )
+
+ # TODO: Clang is a lot more strict with warnings, we should address
+ # those issues at some point.
+ IF( NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
+ ADD_COMPILE_OPTIONS( -Werror )
+ ENDIF()
+
+ ADD_COMPILE_OPTIONS( -Wall -Wno-unused-parameter -Wno-float-equal -Wno-class-memaccess )
+
+ IF( ENABLE_COVERAGE OR "$ENV{CXXFLAGS}" MATCHES --coverage )
+ ADD_COMPILE_OPTIONS( --coverage )
+ SET(ENABLE_COVERAGE ON)
+ SET(COVERAGE --coverage)
+ ENDIF()
ENDIF()
-IF( ENABLE_TRACE )
- ADD_DEFINITIONS("-DTRACE_ENABLED")
-ENDIF()
INCLUDE_DIRECTORIES(
+ ${SYSTEM_INCLUDE_DIR}
${ROOT_SRC_DIR}
${DALICORE_INCLUDE_DIRS}
${DALIADAPTOR_INCLUDE_DIRS}
SET(LIBTYPE STATIC)
ENDIF()
+IF( WIN32 )
+ SET( DALICORE_LDFLAGS
+ "${DALICORE_LDFLAGS}"
+ dali-core::dali-core )
+
+ FIND_PACKAGE( pthreads REQUIRED )
+ FIND_PACKAGE( curl REQUIRED )
+ FIND_LIBRARY( GETOPT_LIBRARY NAMES getopt )
+ FIND_LIBRARY( EXIF_LIBRARY NAMES libexif )
+
+ FIND_PACKAGE( png REQUIRED )
+ FIND_PACKAGE( gif REQUIRED )
+ FIND_PACKAGE( jpeg REQUIRED )
+ FIND_LIBRARY( TURBO_JPEG_LIBRARY NAMES turbojpeg )
+
+ FIND_PACKAGE( fontconfig REQUIRED )
+ FIND_PACKAGE( freetype REQUIRED )
+ FIND_PACKAGE( harfbuzz REQUIRED )
+ FIND_LIBRARY( FRIBIDI_LIBRARY NAMES fribidi )
+
+ FIND_PACKAGE( unofficial-angle REQUIRED )
+ FIND_PACKAGE( unofficial-cairo REQUIRED )
+
+ SET( DALIADAPTOR_LDFLAGS
+ "${DALIADAPTOR_LDFLAGS}"
+ dali-adaptor::dali-adaptor )
+ENDIF()
+
+
ADD_LIBRARY( ${name} ${LIBTYPE} ${SOURCES} )
TARGET_LINK_LIBRARIES( ${name}
${DALICORE_LDFLAGS}
${DALIADAPTOR_LDFLAGS}
${COVERAGE}
)
+
IF( ANDROID )
-TARGET_LINK_LIBRARIES( ${name} log )
+ TARGET_LINK_LIBRARIES( ${name} log )
ENDIF()
SET_TARGET_PROPERTIES( ${name}
)
# Install the library so file and symlinks
-INSTALL( TARGETS ${name} DESTINATION ${LIB_DIR} )
+IF( INSTALL_CMAKE_MODULES )
+ INSTALL( TARGETS ${name}
+ EXPORT ${name}-targets
+ LIBRARY DESTINATION ${LIB_DIR}
+ ARCHIVE DESTINATION ${LIB_DIR}
+ RUNTIME DESTINATION ${BIN_DIR}
+ )
+
+ INSTALL(
+ EXPORT ${name}-targets
+ NAMESPACE ${name}::
+ FILE ${name}-targets.cmake
+ DESTINATION share/${name}
+ )
+
+ FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${name}-config.cmake "
+ include(CMakeFindDependencyMacro)
+ include(\${CMAKE_CURRENT_LIST_DIR}/${name}-targets.cmake)
+ ")
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}-config.cmake DESTINATION share/${name})
+ELSE()
+ INSTALL( TARGETS ${name} DESTINATION ${LIB_DIR} )
+ENDIF()
# Install the pkg-config file
-INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_PKG_CFG_FILE} DESTINATION ${LIB_DIR}/pkgconfig )
+IF( ENABLE_PKG_CONFIGURE )
+ INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_PKG_CFG_FILE} DESTINATION ${LIB_DIR}/pkgconfig )
+ENDIF()
# Glob for resources
MACRO( COPY_RESOURCES FILE_LIST SRC_RELATIVE_DIRECTORY DESTINATION EXPLICIT_DESTINATION )
INSTALL_HEADERS_WITH_DIRECTORY(PACKAGE_DOXY_HEADERS ${PACKAGE_DOXY_SRC_DIR} "dali-toolkit/doc" )
# Install dali-toolkit.h
-INSTALL( FILES ${ROOT_SRC_DIR}/dali-toolkit/dali-toolkit.h DESTINATION ${DEV_INCLUDE_PATH}/dali-toolkit )
+INSTALL( FILES ${ROOT_SRC_DIR}/dali-toolkit/dali-toolkit.h DESTINATION ${INCLUDE_DIR}/dali-toolkit )
# package doxygen file (contains doxygen grouping information)
INSTALL( FILES ${package_doxy_files} DESTINATION ${DEV_INCLUDE_PATH}/dali-toolkit/doc )
# The DALI_TOOLKIT_PREFIX must be set if this CMakeLists.txt is executed
# from the top-level CMake script using ADD_SUBDIRECTORY() to avoid
# target names duplication with other DALi modules.
-IF( UNIX )
+IF( ENABLE_COVERAGE )
FIND_PROGRAM( LCOV_BIN "lcov" )
IF( LCOV_BIN )
)
ENDIF( LCOV_BIN )
-ENDIF( UNIX )
+ENDIF()
# Build documentation if doxygen tool is available
SET( doxygenEnabled OFF )
ENDIF()
-# Configure automated tests
-CONFIGURE_FILE( ${ROOT_SRC_DIR}/automated-tests/CMakeLists.txt.in
- ${ROOT_SRC_DIR}/automated-tests/CMakeLists.txt @ONLY )
+IF( CONFIGURE_AUTOMATED_TESTS )
+ # Configure automated tests
+ CONFIGURE_FILE( ${ROOT_SRC_DIR}/automated-tests/CMakeLists.txt.in
+ ${ROOT_SRC_DIR}/automated-tests/CMakeLists.txt @ONLY )
+ENDIF()
# Configuration Messages
MESSAGE( STATUS "Configuration:\n" )
MESSAGE( STATUS "Style Dir: " ${STYLE_DIR} )
MESSAGE( STATUS "Style: " ${dali_style} )
MESSAGE( STATUS "i18n: " ${ENABLE_I18N} )
+MESSAGE( STATUS "Use pkg configure: " ${ENABLE_PKG_CONFIGURE} )
+MESSAGE( STATUS "Enable link test: " ${ENABLE_LINK_TEST} )
+MESSAGE( STATUS "Configure automated tests: " ${CONFIGURE_AUTOMATED_TESTS} )
MESSAGE( STATUS "CXXFLAGS: " ${CMAKE_CXX_FLAGS} )
MESSAGE( STATUS "LDFLAGS: " ${CMAKE_SHARED_LINKER_FLAGS_INIT}${CMAKE_SHARED_LINKER_FLAGS} )
* @details Name "enableGrabHandlePopup", type Property::BOOLEAN.
* @note The default value is true, which means the grab handle popup is enabled by default.
*/
- ENABLE_GRAB_HANDLE_POPUP = ELLIPSIS + 4
+ ENABLE_GRAB_HANDLE_POPUP = ELLIPSIS + 4,
+
+ /**
+ * @brief The default text background parameters.
+ * @details Name "textBackground", type Property::VECTOR4.
+ * @note Use "textBackground" as property name to avoid conflict with Control's "background" property.
+ * @note The default value is Color::TRANSPARENT.
+ */
+ BACKGROUND = ELLIPSIS + 5
};
} // namespace Property
--- /dev/null
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali-toolkit/devel-api/controls/video-view/video-view-devel.h>\r
+#include <dali-toolkit/internal/controls/video-view/video-view-impl.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Toolkit\r
+{\r
+\r
+namespace DevelVideoView\r
+{\r
+\r
+Any GetMediaPlayer( VideoView videoView )\r
+{\r
+ return Dali::Toolkit::GetImpl( videoView ).GetMediaPlayer();\r
+}\r
+\r
+\r
+} // namespace DevelVideoView\r
+\r
+} // namespace Toolkit\r
+\r
+} // namespace Dali\r
--- /dev/null
+#ifndef DALI_TOOLKIT_VIDEO_VIEW_DEVEL_H\r
+#define DALI_TOOLKIT_VIDEO_VIEW_DEVEL_H\r
+\r
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali-toolkit/public-api/controls/video-view/video-view.h>\r
+#include <dali/public-api/object/any.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Toolkit\r
+{\r
+\r
+namespace DevelVideoView\r
+{\r
+\r
+\r
+/**\r
+ * @brief Returns the internal media player.\r
+ * @param[in] videoView The current VideoView\r
+ * @return The internal media player of current VideoView\r
+ */\r
+DALI_TOOLKIT_API Any GetMediaPlayer( VideoView videoView );\r
+\r
+\r
+} // namespace DevelVideoView\r
+\r
+} // namespace Toolkit\r
+\r
+} // namespace Dali\r
+\r
+#endif // DALI_TOOLKIT_VIDEO_VIEW_DEVEL_H\r
${devel_api_src_dir}/controls/text-controls/text-selection-popup.cpp
${devel_api_src_dir}/controls/text-controls/text-selection-toolbar.cpp
${devel_api_src_dir}/controls/tool-bar/tool-bar.cpp
+ ${devel_api_src_dir}/controls/video-view/video-view-devel.cpp
${devel_api_src_dir}/controls/web-view/web-view.cpp
${devel_api_src_dir}/focus-manager/keyinput-focus-manager.cpp
${devel_api_src_dir}/focus-manager/keyboard-focus-manager-devel.cpp
${devel_api_src_dir}/controls/gaussian-blur-view/gaussian-blur-view.h
)
+SET( devel_api_video_view_header_files
+ ${devel_api_src_dir}/controls/video-view/video-view-devel.h
+)
+
SET( devel_api_web_view_header_files
${devel_api_src_dir}/controls/web-view/web-view.h
)
${devel_api_tooltip_header_files}
${devel_api_transition_effects_header_files}
${devel_api_gaussian_blur_view_header_files}
+ ${devel_api_video_view_header_files}
${devel_api_web_view_header_files}
${devel_api_drag_and_drop_detector_header_files}
)
#include <sstream>
#include <stdio.h>
-#include <unistd.h>
#include <dali/devel-api/adaptor-framework/file-loader.h>
// currently not called from code so compiler will optimize these away, kept here for future debugging
#define FLEX_CONTAINER_TAG "DALI Toolkit::FlexContainer "
-#define FC_LOG(fmt, args...) Debug::LogMessage(Debug::DebugInfo, FLEX_CONTAINER_TAG fmt, ## args)
+#define FC_LOG(fmt, args,...) Debug::LogMessage(Debug::DebugInfo, FLEX_CONTAINER_TAG fmt, ## args)
// #define FLEX_CONTAINER_DEBUG 1
#if defined(FLEX_CONTAINER_DEBUG)
// currently not called from code so compiler will optimize these away, kept here for future debugging
#define TABLEVIEW_TAG "DALI Toolkit::TableView "
-#define TV_LOG(fmt, args...) Debug::LogMessage(Debug::DebugInfo, TABLEVIEW_TAG fmt, ## args)
+#define TV_LOG(fmt, args,...) Debug::LogMessage(Debug::DebugInfo, TABLEVIEW_TAG fmt, ## args)
//#define TABLEVIEW_DEBUG 1
#if defined(TABLEVIEW_DEBUG)
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "enableGrabHandle", BOOLEAN, ENABLE_GRAB_HANDLE )
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "matchSystemLanguageDirection", BOOLEAN, MATCH_SYSTEM_LANGUAGE_DIRECTION )
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "enableGrabHandlePopup", BOOLEAN, ENABLE_GRAB_HANDLE_POPUP )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextField, "textBackground", VECTOR4, BACKGROUND )
DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "textChanged", SIGNAL_TEXT_CHANGED )
DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "maxLengthReached", SIGNAL_MAX_LENGTH_REACHED )
}
case Toolkit::DevelTextField::Property::ENABLE_GRAB_HANDLE_POPUP:
{
- if (impl.mController)
+ if( impl.mController )
{
const bool grabHandlePopupEnabled = value.Get<bool>();
DALI_LOG_INFO(gLogFilter, Debug::General, "TextField %p ENABLE_GRAB_HANDLE_POPUP %d\n", impl.mController.Get(), grabHandlePopupEnabled);
break;
}
}
+ case Toolkit::DevelTextField::Property::BACKGROUND:
+ {
+ if( impl.mController )
+ {
+ const Vector4 backgroundColor = value.Get< Vector4 >();
+ DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p BACKGROUND %f,%f,%f,%f\n", impl.mController.Get(), backgroundColor.r, backgroundColor.g, backgroundColor.b, backgroundColor.a );
+
+ impl.mController->SetBackgroundEnabled( true );
+ impl.mController->SetBackgroundColor( backgroundColor );
+ }
+ break;
+ }
} // switch
} // textfield
}
}
case Toolkit::DevelTextField::Property::ENABLE_GRAB_HANDLE_POPUP:
{
- if (impl.mController)
+ if( impl.mController )
{
value = impl.mController->IsGrabHandlePopupEnabled();
}
break;
}
+ case Toolkit::DevelTextField::Property::BACKGROUND:
+ {
+ if( impl.mController )
+ {
+ value = impl.mController->GetBackgroundColor();
+ }
+ break;
+ }
} //switch
}
return static_cast< int >( mVideoPlayer.GetDisplayMode() );
}
+Any VideoView::GetMediaPlayer()
+{
+ return mVideoPlayer.GetMediaPlayer();
+}
+
Dali::Shader VideoView::CreateShader()
{
std::string fragmentShader = "#extension GL_OES_EGL_image_external:require\n";
*/
int GetDisplayMode() const;
+ /**
+ * @brief Gets internal media player.
+ */
+ Any GetMediaPlayer();
+
private: // From Control
/**
Vector< unsigned short > mIndices; ///< container of indices
};
+const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f );
+const Dali::Vector4 BACKGROUND_SUB4( 0.58f, 0.87f, 0.96f, 1.f );
+const Dali::Vector4 BACKGROUND_SUB5( 0.83f, 0.94f, 0.98f, 1.f );
+const Dali::Vector4 BACKGROUND_SUB6( 1.f, 0.5f, 0.5f, 1.f );
+const Dali::Vector4 BACKGROUND_SUB7( 1.f, 0.8f, 0.8f, 1.f );
+
} // namespace
namespace Dali
mEventData->mPreEditFlag &&
( 0u != mModel->mVisualModel->mCharactersToGlyph.Count() ) )
{
- Dali::InputMethodContext::PreeditStyle type = mEventData->mInputMethodContext.GetPreeditStyle();
+ Vector< Dali::InputMethodContext::PreeditAttributeData > attrs;
+ mEventData->mInputMethodContext.GetPreeditStyle( attrs );
+ Dali::InputMethodContext::PreeditStyle type = Dali::InputMethodContext::PreeditStyle::NONE;
- switch( type )
+ // Check the type of preedit and run it.
+ for( Vector<Dali::InputMethodContext::PreeditAttributeData>::Iterator it = attrs.Begin(), endIt = attrs.End(); it != endIt; it++ )
{
- case Dali::InputMethodContext::PreeditStyle::UNDERLINE:
- {
- // Add the underline for the pre-edit text.
- const GlyphIndex* const charactersToGlyphBuffer = mModel->mVisualModel->mCharactersToGlyph.Begin();
- const Length* const glyphsPerCharacterBuffer = mModel->mVisualModel->mGlyphsPerCharacter.Begin();
+ Dali::InputMethodContext::PreeditAttributeData attrData = *it;
+ DALI_LOG_INFO( gLogFilter, Debug::General, "Controller::UpdateModel PreeditStyle type : %d start %d end %d \n", attrData.preeditType, attrData.startIndex, attrData.endIndex );
+ type = attrData.preeditType;
- const GlyphIndex glyphStart = *( charactersToGlyphBuffer + mEventData->mPreEditStartPosition );
- const CharacterIndex lastPreEditCharacter = mEventData->mPreEditStartPosition + ( ( mEventData->mPreEditLength > 0u ) ? mEventData->mPreEditLength - 1u : 0u );
- const Length numberOfGlyphsLastCharacter = *( glyphsPerCharacterBuffer + lastPreEditCharacter );
- const GlyphIndex glyphEnd = *( charactersToGlyphBuffer + lastPreEditCharacter ) + ( numberOfGlyphsLastCharacter > 1u ? numberOfGlyphsLastCharacter - 1u : 0u );
+ // Check the number of commit characters for the start position.
+ unsigned int numberOfCommit = mEventData->mPrimaryCursorPosition - mEventData->mPreEditLength;
+ Length numberOfIndices = attrData.endIndex - attrData.startIndex;
- GlyphRun underlineRun;
- underlineRun.glyphIndex = glyphStart;
- underlineRun.numberOfGlyphs = 1u + glyphEnd - glyphStart;
-
- mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
- break;
+ switch( type )
+ {
+ case Dali::InputMethodContext::PreeditStyle::UNDERLINE:
+ {
+ // Add the underline for the pre-edit text.
+ GlyphRun underlineRun;
+ underlineRun.glyphIndex = attrData.startIndex + numberOfCommit;
+ underlineRun.numberOfGlyphs = attrData.endIndex - attrData.startIndex;
+ mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
+ break;
+ }
+ case Dali::InputMethodContext::PreeditStyle::REVERSE:
+ {
+ Vector4 textColor = mModel->mVisualModel->GetTextColor();
+ ColorRun backgroundColorRun;
+ backgroundColorRun.characterRun.characterIndex = attrData.startIndex + numberOfCommit;
+ backgroundColorRun.characterRun.numberOfCharacters = numberOfIndices;
+ backgroundColorRun.color = textColor;
+ mModel->mLogicalModel->mBackgroundColorRuns.PushBack( backgroundColorRun );
+
+ Vector4 backgroundColor = mModel->mVisualModel->GetBackgroundColor();
+ Vector<ColorRun> colorRuns;
+ colorRuns.Resize( 1u );
+ ColorRun& colorRun = *( colorRuns.Begin() );
+ colorRun.color = backgroundColor;
+ colorRun.characterRun.characterIndex = attrData.startIndex + numberOfCommit;
+ colorRun.characterRun.numberOfCharacters = numberOfIndices;
+
+ mModel->mLogicalModel->mColorRuns.PushBack( colorRun );
+ break;
+ }
+ case Dali::InputMethodContext::PreeditStyle::HIGHLIGHT:
+ {
+ ColorRun backgroundColorRun;
+ backgroundColorRun.characterRun.characterIndex = attrData.startIndex + numberOfCommit;
+ backgroundColorRun.characterRun.numberOfCharacters = numberOfIndices;
+ backgroundColorRun.color = LIGHT_BLUE;
+ mModel->mLogicalModel->mBackgroundColorRuns.PushBack( backgroundColorRun );
+ break;
+ }
+ case Dali::InputMethodContext::PreeditStyle::CUSTOM_PLATFORM_STYLE_1:
+ {
+ // CUSTOM_PLATFORM_STYLE_1 should be drawn with background and underline together.
+ ColorRun backgroundColorRun;
+ backgroundColorRun.characterRun.characterIndex = attrData.startIndex + numberOfCommit;
+ backgroundColorRun.characterRun.numberOfCharacters = numberOfIndices;
+ backgroundColorRun.color = BACKGROUND_SUB4;
+ mModel->mLogicalModel->mBackgroundColorRuns.PushBack( backgroundColorRun );
+
+ GlyphRun underlineRun;
+ underlineRun.glyphIndex = attrData.startIndex + numberOfCommit;
+ underlineRun.numberOfGlyphs = attrData.endIndex - attrData.startIndex;
+ mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
+ break;
+ }
+ case Dali::InputMethodContext::PreeditStyle::CUSTOM_PLATFORM_STYLE_2:
+ {
+ // CUSTOM_PLATFORM_STYLE_2 should be drawn with background and underline together.
+ ColorRun backgroundColorRun;
+ backgroundColorRun.characterRun.characterIndex = attrData.startIndex + numberOfCommit;
+ backgroundColorRun.characterRun.numberOfCharacters = numberOfIndices;
+ backgroundColorRun.color = BACKGROUND_SUB5;
+ mModel->mLogicalModel->mBackgroundColorRuns.PushBack( backgroundColorRun );
+
+ GlyphRun underlineRun;
+ underlineRun.glyphIndex = attrData.startIndex + numberOfCommit;
+ underlineRun.numberOfGlyphs = attrData.endIndex - attrData.startIndex;
+ mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
+ break;
+ }
+ case Dali::InputMethodContext::PreeditStyle::CUSTOM_PLATFORM_STYLE_3:
+ {
+ // CUSTOM_PLATFORM_STYLE_3 should be drawn with background and underline together.
+ ColorRun backgroundColorRun;
+ backgroundColorRun.characterRun.characterIndex = attrData.startIndex + numberOfCommit;
+ backgroundColorRun.characterRun.numberOfCharacters = numberOfIndices;
+ backgroundColorRun.color = BACKGROUND_SUB6;
+ mModel->mLogicalModel->mBackgroundColorRuns.PushBack( backgroundColorRun );
+
+ GlyphRun underlineRun;
+ underlineRun.glyphIndex = attrData.startIndex + numberOfCommit;
+ underlineRun.numberOfGlyphs = attrData.endIndex - attrData.startIndex;
+ mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
+ break;
+ }
+ case Dali::InputMethodContext::PreeditStyle::CUSTOM_PLATFORM_STYLE_4:
+ {
+ // CUSTOM_PLATFORM_STYLE_4 should be drawn with background and underline together.
+ ColorRun backgroundColorRun;
+ backgroundColorRun.characterRun.characterIndex = attrData.startIndex + numberOfCommit;
+ backgroundColorRun.characterRun.numberOfCharacters = numberOfIndices;
+ backgroundColorRun.color = BACKGROUND_SUB7;
+ mModel->mLogicalModel->mBackgroundColorRuns.PushBack( backgroundColorRun );
+
+ GlyphRun underlineRun;
+ underlineRun.glyphIndex = attrData.startIndex + numberOfCommit;
+ underlineRun.numberOfGlyphs = attrData.endIndex - attrData.startIndex;
+ mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
+ break;
+ }
+ case Dali::InputMethodContext::PreeditStyle::NONE:
+ default:
+ {
+ break;
+ }
}
- // TODO : At this moment, other styles for preedit are not implemented yet.
- case Dali::InputMethodContext::PreeditStyle::REVERSE:
- case Dali::InputMethodContext::PreeditStyle::HIGHLIGHT:
- case Dali::InputMethodContext::PreeditStyle::NONE:
- default:
- break;
}
+ attrs.Clear();
+ updated = true;
}
if( NO_OPERATION != ( COLOR & operations ) )
const Vector4* const backgroundColorsBuffer = mView.GetBackgroundColors();
const ColorIndex* const backgroundColorIndicesBuffer = mView.GetBackgroundColorIndices();
+ const Vector4& defaultBackgroundColor = mModel->mVisualModel->IsBackgroundEnabled() ? mModel->mVisualModel->GetBackgroundColor() : Color::TRANSPARENT;
Vector4 quad;
uint32_t numberOfQuads = 0u;
// Get the background color of the character.
// The color index zero is reserved for the default background color (i.e. Color::TRANSPARENT)
const ColorIndex backgroundColorIndex = ( nullptr == backgroundColorsBuffer ) ? 0u : *( backgroundColorIndicesBuffer + i );
- const Vector4& backgroundColor = ( 0u == backgroundColorIndex ) ? Color::TRANSPARENT : *( backgroundColorsBuffer + backgroundColorIndex - 1u );
+ const Vector4& backgroundColor = ( 0u == backgroundColorIndex ) ? defaultBackgroundColor : *( backgroundColorsBuffer + backgroundColorIndex - 1u );
// Only create quads for glyphs with a background color
if ( backgroundColor != Color::TRANSPARENT )
// it means all texts should be removed and all Preedit variables should be initialized.
if( ( currentText.Count() - numberOfCharacters == 0 ) && ( cursorIndex == 0 ) )
{
- if( mImpl->mEventData )
- {
- mImpl->mEventData->mPreEditStartPosition = 0;
- mImpl->mEventData->mPreEditLength = 0;
- }
+ mImpl->ClearPreEditFlag();
}
// Updates the text style runs by removing characters. Runs with no characters are removed.
mShadowColor( Color::BLACK ),
mUnderlineColor( Color::BLACK ),
mOutlineColor( Color::WHITE ),
- mBackgroundColor( Color::CYAN ),
+ mBackgroundColor( Color::TRANSPARENT ),
mControlSize(),
mShadowOffset(),
mUnderlineHeight( 0.0f ),
void AnimatedVectorImageVisual::DoSetOffStage( Actor& actor )
{
- PauseAnimation();
+ StopAnimation();
if( mImpl->mRenderer )
{
}
}
-void AnimatedVectorImageVisual::PauseAnimation()
+void AnimatedVectorImageVisual::StopAnimation()
{
- if( mActionStatus == DevelAnimatedVectorImageVisual::Action::PLAY )
+ if( mActionStatus != DevelAnimatedVectorImageVisual::Action::STOP )
{
- mVectorAnimationTask->PauseAnimation();
+ mVectorAnimationTask->StopAnimation();
- mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
+ mActionStatus = DevelAnimatedVectorImageVisual::Action::STOP;
if( mImpl->mRenderer )
{
{
if( !visible )
{
- PauseAnimation();
+ StopAnimation();
DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnControlVisibilityChanged: invisibile. Pause animation [%p]\n", this );
}
{
if( !visible )
{
- PauseAnimation();
+ StopAnimation();
DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnWindowVisibilityChanged: invisibile. Pause animation [%p]\n", this );
}
void SetVectorImageSize();
/**
- * @brief Pause the animation.
+ * @brief Stop the animation.
*/
- void PauseAnimation();
+ void StopAnimation();
/**
* @brief Callback when the world scale factor changes.
if( value.Get( alphaUrl ) )
{
AllocateMaskData();
- // Immediately trigger the alpha mask loading (it may just get a cached value)
mMaskingData->mAlphaMaskUrl = alphaUrl;
}
break;
TextureSet TextureManager::LoadTexture(
const VisualUrl& url, Dali::ImageDimensions desiredSize, Dali::FittingMode::Type fittingMode,
- Dali::SamplingMode::Type samplingMode, const MaskingDataPointer& maskInfo,
+ Dali::SamplingMode::Type samplingMode, MaskingDataPointer& maskInfo,
bool synchronousLoading, TextureManager::TextureId& textureId, Vector4& textureRect,
Dali::ImageDimensions& textureRectSize, bool& atlasingStatus, bool& loadingStatus,
Dali::WrapMode::Type wrapModeU, Dali::WrapMode::Type wrapModeV, TextureUploadObserver* textureObserver,
}
else
{
- TextureId alphaMaskId = RequestMaskLoad( maskInfo->mAlphaMaskUrl );
+ maskInfo->mAlphaMaskId = RequestMaskLoad( maskInfo->mAlphaMaskUrl );
textureId = RequestLoad( url,
- alphaMaskId,
+ maskInfo->mAlphaMaskId,
maskInfo->mContentScaleFactor,
desiredSize,
fittingMode, samplingMode,
* @param[in] desiredSize The size the image is likely to appear at. This can be set to 0,0 for automatic
* @param[in] fittingMode The FittingMode to use
* @param[in] samplingMode The SamplingMode to use
- * @param[in] maskInfo Mask info structure
+ * @param[in, out] maskInfo Mask info structure
* @param[in] synchronousLoading true if the URL should be loaded synchronously
* @param[out] textureId, The textureId of the URL
* @param[out] textureRect The rectangle within the texture atlas that this URL occupies,
Dali::ImageDimensions desiredSize,
Dali::FittingMode::Type fittingMode,
Dali::SamplingMode::Type samplingMode,
- const MaskingDataPointer& maskInfo,
+ MaskingDataPointer& maskInfo,
bool synchronousLoading,
TextureManager::TextureId& textureId,
Vector4& textureRect,
const unsigned int TOOLKIT_MAJOR_VERSION = 1;
const unsigned int TOOLKIT_MINOR_VERSION = 4;
-const unsigned int TOOLKIT_MICRO_VERSION = 54;
+const unsigned int TOOLKIT_MICRO_VERSION = 55;
const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
Name: dali-toolkit
Summary: Dali 3D engine Toolkit
-Version: 1.4.54
+Version: 1.4.55
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT