1 #ifndef __DALI_TIZEN_PLATFORM_ABSTRACTION_H__
2 #define __DALI_TIZEN_PLATFORM_ABSTRACTION_H__
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 #include <dali/integration-api/platform-abstraction.h>
22 #include <dali/public-api/common/dali-common.h>
30 * Construct a platform abstraction and return it.
32 Integration::PlatformAbstraction* CreatePlatformAbstraction();
34 namespace TizenPlatform
40 * Concrete implementation of the platform abstraction class.
42 class TizenPlatformAbstraction : public Integration::PlatformAbstraction
45 public: // Construction & Destruction
50 TizenPlatformAbstraction();
55 virtual ~TizenPlatformAbstraction();
57 public: // PlatformAbstraction overrides
60 * @copydoc PlatformAbstraction::GetClosestImageSize()
62 virtual ImageDimensions GetClosestImageSize( const std::string& filename,
64 FittingMode::Type fittingMode,
65 SamplingMode::Type samplingMode,
66 bool orientationCorrection );
69 * @copydoc PlatformAbstraction::GetClosestImageSize()
71 virtual ImageDimensions GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
73 FittingMode::Type fittingMode,
74 SamplingMode::Type samplingMode,
75 bool orientationCorrection );
78 * @copydoc PlatformAbstraction::LoadResourceSynchronously()
80 virtual Integration::ResourcePointer LoadResourceSynchronously(const Integration::ResourceType& resourceType, const std::string& resourcePath);
83 * @copydoc PlatformAbstraction::DecodeBuffer()
85 virtual Integration::BitmapPtr DecodeBuffer( const Integration::ResourceType& resourceType, uint8_t * buffer, size_t size );
88 * @copydoc PlatformAbstraction::GetDefaultFontSize()
90 virtual int GetDefaultFontSize() const;
93 * @copydoc PlatformAbstraction::LoadShaderBinaryFile()
95 virtual bool LoadShaderBinaryFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const;
98 * @copydoc PlatformAbstraction::SaveShaderBinaryFile()
100 virtual bool SaveShaderBinaryFile( const std::string& filename, const unsigned char * buffer, unsigned int numBytes ) const;
103 * Sets path for data/resource storage.
104 * @param[in] path data/resource storage path
106 void SetDataStoragePath( const std::string& path );
110 TizenPlatformAbstraction( const TizenPlatformAbstraction& ); ///< Undefined
111 TizenPlatformAbstraction& operator=( const TizenPlatformAbstraction& ); ///< Undefined
113 ResourceLoader* mResourceLoader;
114 std::string mDataStoragePath;
117 } // namespace TizenPlatform
120 #endif // __DALI_TIZEN_PLATFORM_ABSTRACTION_H__