1 #ifndef DALI_TOOLKIT_ATLAS_UPLOAD_OBSERVER_H
2 #define DALI_TOOLKIT_ATLAS_UPLOAD_OBSERVER_H
5 * Copyright (c) 2020 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>
35 * @brief Base class used to observe the upload status of the ImageAtlas when requesting an image atlasing.
37 * Derived class should implement the UploadCompleted method which would get executed once the texture is ready.
39 class DALI_TOOLKIT_API AtlasUploadObserver
45 AtlasUploadObserver();
48 * @brief Virtual destructor.
50 virtual ~AtlasUploadObserver();
53 * The action to be taken once the upload is completed.
55 virtual void UploadCompleted() = 0;
57 public: // not intended for developer, called by ImageAtlas internally to get notified when this observer dies
59 * @brief Register an ImageAtlas which be notified when the observer is destructing.
60 * @param[in] imageAtlas The ImageAtlas object to get notification about the destruction of the observer.
62 void Register(Internal::ImageAtlas& imageAtlas);
65 * @brief Unregister an ImageAtlas which be notified when the observer is destructing.
66 * @param[in] imageAtlas The ImageAtlas object to get notification about the destruction of the observer.
68 void Unregister(Internal::ImageAtlas& imageAtlas);
71 Vector<Internal::ImageAtlas*> mAtlasList; ///< The list of the registered ImageAtlas object
74 } // namespace Toolkit
78 #endif /* DALI_TOOLKIT_ATLAS_UPLOAD_OBSERVER_H */