1 #ifndef __DALI_SLP_PLATFORM_ABSTRACTION_H__
2 #define __DALI_SLP_PLATFORM_ABSTRACTION_H__
5 * Copyright (c) 2014 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/integration-api/resource-cache.h>
23 #include <dali/public-api/common/dali-common.h>
26 #include FT_FREETYPE_H
33 * Construct a platform abstraction and return it.
35 Integration::PlatformAbstraction* CreatePlatformAbstraction();
40 class DynamicsFactory;
44 * Concrete implementation of the platform abstraction class.
46 class SlpPlatformAbstraction : public Integration::PlatformAbstraction
49 public: // Construction & Destruction
54 SlpPlatformAbstraction();
59 virtual ~SlpPlatformAbstraction();
61 public: // PlatformAbstraction overrides
64 * @copydoc PlatformAbstraction::GetTimeMicroseconds()
66 virtual void GetTimeMicroseconds(unsigned int &seconds, unsigned int µSeconds);
69 * @copydoc PlatformAbstraction::Suspend()
71 virtual void Suspend();
74 * @copydoc PlatformAbstraction::Resume()
76 virtual void Resume();
79 * @copydoc PlatformAbstraction::GetClosestImageSize()
81 virtual void GetClosestImageSize( const std::string& filename,
82 const ImageAttributes& attributes,
83 Vector2& closestSize );
86 * @copydoc PlatformAbstraction::GetClosestImageSize()
88 virtual void GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
89 const ImageAttributes& attributes,
90 Vector2& closestSize );
93 * @copydoc PlatformAbstraction::LoadResource()
95 virtual void LoadResource(const Integration::ResourceRequest& request);
98 * @copydoc PlatformAbstraction::LoadResourceSynchronously()
100 virtual Integration::ResourcePointer LoadResourceSynchronously(const Integration::ResourceType& resourceType, const std::string& resourcePath);
103 * @copydoc PlatformAbstraction::SaveResource()
105 virtual void SaveResource(const Integration::ResourceRequest& request);
108 * @copydoc PlatformAbstraction::CancelLoad()
110 virtual void CancelLoad(Integration::ResourceId id, Integration::ResourceTypeId typeId);
113 * @copydoc PlatformAbstraction::GetResources()
115 virtual void GetResources(Integration::ResourceCache& cache);
118 * @copydoc PlatformAbstraction::IsLoading()
120 virtual bool IsLoading();
123 * @copydoc PlatformAbstraction::JoinLoaderThreads()
125 virtual void JoinLoaderThreads();
128 * @copydoc PlatformAbstraction::SetDpi()
130 virtual void SetDpi (unsigned int DpiHorizontal, unsigned int DpiVertical);
133 * @copydoc PlatformAbstraction::LoadFile()
135 virtual bool LoadFile( const std::string& filename, std::vector< unsigned char >& buffer ) const;
138 * @copydoc PlatformAbstraction::LoadFile()
140 virtual std::string LoadFile( const std::string& filename );
143 * @copydoc PlatformAbstraction::SaveFile()
145 virtual bool SaveFile(const std::string& filename, std::vector< unsigned char >& buffer) const;
148 * @copydoc PlatformAbstraction::GetDynamicsFactory();
150 virtual Integration::DynamicsFactory* GetDynamicsFactory();
153 ResourceLoader* mResourceLoader;
154 DynamicsFactory* mDynamicsFactory;
157 } // namespace SlpPlatform
160 #endif // __DALI_SLP_PLATFORM_ABSTRACTION_H__