1 #ifndef DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H
2 #define DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H
5 * Copyright (c) 2017 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/public-api/rendering/texture-set.h>
30 * API to interface with the toolkit texture manager
31 * Allows developers to add Textures through TextureSets to toolkit so that visuals can use them to render
33 namespace TextureManager
37 * @brief Add a Texture to texture manager
38 * Toolkit keeps the Texture handle until RemoveTexture is called.
39 * @note this method does not check for duplicates,
40 * if same Texture is added multiple times, a different URL is returned each time
41 * @param[in] texture the Texture to add
42 * @return the Url string representing this texture
44 DALI_IMPORT_API std::string AddTexture( Texture& texture );
47 * @brief Add a TextureSet to texture manager
48 * Toolkit keeps the TextureSet handle until RemoveTexture is called.
49 * @note this method does not check for duplicates,
50 * if same TextureSet is added multiple times, a different URL is returned each time
51 * @param[in] textureSet the TextureSet to add
52 * @return the Url string representing this texture
54 DALI_IMPORT_API std::string AddTexture( TextureSet& textureSet );
57 * @brief Removes a TextureSet from toolkit
58 * @note TextureSet may still be used by visuals and kept alive by them
59 * @param[in] textureUrl to remove
60 * @return the handle to the TextureSet or empty handle in case TextureSet is not found
62 DALI_IMPORT_API TextureSet RemoveTexture( const std::string& textureUrl );
70 #endif // DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H