-#ifndef __DALI_PLATFORM_TEXT_ABSTRACTION_BIDIRECTIONAL_SUPPORT_H__
-#define __DALI_PLATFORM_TEXT_ABSTRACTION_BIDIRECTIONAL_SUPPORT_H__
+#ifndef DALI_PLATFORM_TEXT_ABSTRACTION_BIDIRECTIONAL_SUPPORT_H
+#define DALI_PLATFORM_TEXT_ABSTRACTION_BIDIRECTIONAL_SUPPORT_H
/*
- * Copyright (c) 2018 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.
#include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
// EXTERNAL INCLUDES
+#include <dali/public-api/actors/actor-enumerations.h>
#include <dali/public-api/object/base-handle.h>
// INTERNAL INCLUDES
namespace Dali
{
-
namespace TextAbstraction
{
-
namespace Internal DALI_INTERNAL
{
-
class BidirectionalSupport;
-} // Internal
+} // namespace DALI_INTERNAL
/**
* BidirectionalSupport API
*/
class DALI_ADAPTOR_API BidirectionalSupport : public BaseHandle
{
-
public:
-
/**
* @brief Create an uninitialized TextAbstraction handle.
*
*
* @param[in] implementation a pointer to the internal bidirectional support object.
*/
- explicit DALI_INTERNAL BidirectionalSupport( Internal::BidirectionalSupport* implementation );
+ explicit DALI_INTERNAL BidirectionalSupport(Internal::BidirectionalSupport* implementation);
/**
* @brief Retrieve a handle to the BidirectionalSupport instance.
*
* @param[in] paragraph Pointer to the first character of the paragraph coded in UTF32.
* @param[in] numberOfCharacters The number of characters of the paragraph.
- *
+ * @param[in] matchSystemLanguageDirection Whether match for system language direction or not.
+ * @param[in] layoutDirection The direction of the system language.
* @return An index of an object inside a table storing the bidirectional data.
*/
- BidiInfoIndex CreateInfo( const Character* const paragraph,
- Length numberOfCharacters );
+ BidiInfoIndex CreateInfo(const Character* const paragraph,
+ Length numberOfCharacters,
+ bool matchSystemLanguageDirection,
+ LayoutDirection::Type layoutDirection);
/**
* @brief Destroys the bidirectional data.
*
* @param[in] bidiInfoIndex The index to the of the object inside the table storing the bidirectional data for the current paragraph.
*/
- void DestroyInfo( BidiInfoIndex bidiInfoIndex );
+ void DestroyInfo(BidiInfoIndex bidiInfoIndex);
/**
* @brief Reorders a line of a paragraph.
* @param[in] numberOfCharacters The number of characters of the line.
* @param[out] visualToLogicalMap The visual to logical conversion map.
*/
- void Reorder( BidiInfoIndex bidiInfoIndex,
- CharacterIndex firstCharacterIndex,
- Length numberOfCharacters,
- CharacterIndex* visualToLogicalMap );
+ void Reorder(BidiInfoIndex bidiInfoIndex,
+ CharacterIndex firstCharacterIndex,
+ Length numberOfCharacters,
+ CharacterIndex* visualToLogicalMap);
/**
* @brief Replaces any character which could be mirrored.
*
* @return @e true if a character has been replaced.
*/
- bool GetMirroredText( Character* text,
- CharacterDirection* directions,
- Length numberOfCharacters );
+ bool GetMirroredText(Character* text,
+ CharacterDirection* directions,
+ Length numberOfCharacters);
/**
* @brief Retrieves the paragrpah's direction.
*
* @return @e true if the paragraph is right to left, otherwise @e false.
*/
- bool GetParagraphDirection( BidiInfoIndex bidiInfoIndex ) const;
+ bool GetParagraphDirection(BidiInfoIndex bidiInfoIndex) const;
/**
* @brief Retrieves the character's directions.
* @param[out] directions The direction, @e false is left to right and @e true is right to left, of each character of the paragraph.
* @param[in] numberOfCharacters The number of characters.
*/
- void GetCharactersDirection( BidiInfoIndex bidiInfoIndex,
- CharacterDirection* directions,
- Length numberOfCharacters );
+ void GetCharactersDirection(BidiInfoIndex bidiInfoIndex,
+ CharacterDirection* directions,
+ Length numberOfCharacters);
};
} // namespace TextAbstraction
} // namespace Dali
-#endif // __DALI_PLATFORM_TEXT_ABSTRACTION_BIDIRECTIONAL_SUPPORT_H__
+#endif // DALI_PLATFORM_TEXT_ABSTRACTION_BIDIRECTIONAL_SUPPORT_H