1 #ifndef DALI_TOOLKIT_ATLAS_UPLOAD_OBSERVER_H
2 #define DALI_TOOLKIT_ATLAS_UPLOAD_OBSERVER_H
5 * Copyright (c) 2018 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-toolkit/public-api/dali-toolkit-common.h>
22 #include <dali/public-api/common/dali-vector.h>
23 #include <dali/public-api/signals/callback.h>
38 * @brief Base class used to observe the upload status of the ImageAtlas when requesting an image atlasing.
40 * Derived class should implement the UploadCompleted method which would get executed once the texture is ready.
42 class DALI_TOOLKIT_API AtlasUploadObserver
49 AtlasUploadObserver();
52 * @brief Virtual destructor.
54 virtual ~AtlasUploadObserver();
57 * The action to be taken once the upload is completed.
59 virtual void UploadCompleted() = 0;
61 public: // not intended for developer, called by ImageAtlas internally to get notified when this observer dies
64 * @brief Register an ImageAtlas which be notified when the observer is destructing.
65 * @param[in] imageAtlas The ImageAtlas object to get notification about the destruction of the observer.
67 void Register( Internal::ImageAtlas& imageAtlas );
70 * @brief Unregister an ImageAtlas which be notified when the observer is destructing.
71 * @param[in] imageAtlas The ImageAtlas object to get notification about the destruction of the observer.
73 void Unregister( Internal::ImageAtlas& imageAtlas );
77 Vector<Internal::ImageAtlas*> mAtlasList; ///< The list of the registered ImageAtlas object
81 } // namespace Toolkit
85 #endif /* DALI_TOOLKIT_ATLAS_UPLOAD_OBSERVER_H */