3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 /*@file: IntCommonLib.h
19 *@brief: To define the common method of Internet application
22 #ifndef _INT_COMMON_LIB_H_
23 #define _INT_COMMON_LIB_H_
25 #include <FGraphics.h>
28 * @struct CommonBitmapTable
30 * Defines the table to store a bitmap
33 struct CommonBitmapTable
35 Tizen::Graphics::Bitmap* ptr;
37 Tizen::Base::String filename;
43 * @enum CommonBitmapId
45 * Defines a ID for a Bitmap path
55 * @brief This file declares common methods to be used
62 * Returns a pointer to a bitmap value using ID
64 * @return Pointer to a bitmap value
65 * @param[in] CommonBitmapId The ID of the Bitmap
66 * @remarks To work properly, the existing CommonBitmapId has to be passed.
68 static Tizen::Graphics::Bitmap* GetBitmap(uint id);
71 * Returns a pointer to a bitmap value using bitmap path, bitmap width and bitmap height
73 * @return Pointer to a bitmap value
74 * @param[in] strPath The path of the existing bitmap stored in res folder
75 * @param[in] width The width of the existing bitmap stored in res folder
76 * @param[in] height The height of the existing bitmap stored in res folder
77 * @remarks To work properly, the existing strPath, its width and height has to be passed.
79 static Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& strPath, const int width, const int height);
82 * Gets a bitmap using ID assigned to it.
88 * @remarks Releases all the bitmaps stored
90 static Tizen::Graphics::Bitmap* GetNinepatchedBitmapN(const Tizen::Base::String& strPath, const int width, const int height);
93 * Returns the string value using ID
96 * @param[in] resourceId The ID of the resource string
97 * @remarks To work properly, the existing resourceId has to be passed.
99 static Tizen::Base::String GetString(const Tizen::Base::String& resourceId);
103 static CommonBitmapTable __commonBitmapTable[];
106 #endif //_INT_COMMON_LIB_H_