Dali 3D User Interface Engine
tizen-platform-abstraction.h
Go to the documentation of this file.
1 #ifndef __DALI_TIZEN_PLATFORM_ABSTRACTION_H__
2 #define __DALI_TIZEN_PLATFORM_ABSTRACTION_H__
3 
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20 
24 
25 #include <string>
26 
27 namespace Dali
28 {
29 
33 Integration::PlatformAbstraction* CreatePlatformAbstraction();
34 
35 namespace TizenPlatform
36 {
37 
38 class ResourceLoader;
39 
44 {
45 
46 public: // Construction & Destruction
47 
52 
56  virtual ~TizenPlatformAbstraction();
57 
58 public: // PlatformAbstraction overrides
59 
63  virtual void Suspend();
64 
68  virtual void Resume();
69 
73  virtual ImageDimensions GetClosestImageSize( const std::string& filename,
74  ImageDimensions size,
75  FittingMode::Type fittingMode,
76  SamplingMode::Type samplingMode,
77  bool orientationCorrection );
78 
83  ImageDimensions size,
84  FittingMode::Type fittingMode,
85  SamplingMode::Type samplingMode,
86  bool orientationCorrection );
87 
91  virtual void LoadResource(const Integration::ResourceRequest& request);
92 
96  virtual Integration::ResourcePointer LoadResourceSynchronously(const Integration::ResourceType& resourceType, const std::string& resourcePath);
97 
101  virtual Integration::BitmapPtr DecodeBuffer( const Integration::ResourceType& resourceType, uint8_t * buffer, size_t size );
102 
107 
111  virtual void GetResources(Integration::ResourceCache& cache);
112 
116  virtual void JoinLoaderThreads();
117 
121  virtual int GetDefaultFontSize() const;
122 
126  virtual bool LoadFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const;
127 
131  virtual std::string LoadFile( const std::string& filename );
132 
136  virtual bool LoadShaderBinaryFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const;
137 
141  virtual bool SaveShaderBinaryFile( const std::string& filename, const unsigned char * buffer, unsigned int numBytes ) const;
142 
147  void SetDataStoragePath( const std::string& path );
148 
149 private:
151  std::string mDataStoragePath;
152 };
153 
154 } // namespace TizenPlatform
155 } // namespace Dali
156 
157 #endif // __DALI_TIZEN_PLATFORM_ABSTRACTION_H__
Dali Docs Home
Read more about Dali