1 #ifndef DALI_INTERNAL_PROPERTY_NOTIFICATION_MANAGER_H
2 #define DALI_INTERNAL_PROPERTY_NOTIFICATION_MANAGER_H
5 * Copyright (c) 2021 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.
22 #include <dali/internal/event/common/property-notifier.h>
23 #include <dali/public-api/common/dali-vector.h>
29 class PropertyNotification;
32 * PropertyNotificationManager issues notifications to applications
33 * a condition of a property being met.
34 * It also monitors the lifetime of PropertyNotification objects and will
35 * only emit signals for PropertyNotification objects which are still valid.
37 class PropertyNotificationManager : public PropertyNotifier
41 * Create an PropertyNotificationManager.
42 * @return A newly allocated object.
44 static PropertyNotificationManager* New();
49 ~PropertyNotificationManager() override;
52 * Called when a PropertyNotification is constructed.
54 void PropertyNotificationCreated(PropertyNotification& propertyNotification);
57 * Called when a PropertyNotification is destroyed.
59 void PropertyNotificationDestroyed(PropertyNotification& propertyNotification);
61 private: // private virtual overrides
63 * @copydoc PropertyNotifier::NotifyProperty
65 void NotifyProperty(SceneGraph::PropertyNotification* propertyNotification, bool validity) override;
69 * Default constructor.
71 PropertyNotificationManager();
74 PropertyNotificationManager(const PropertyNotificationManager&);
77 PropertyNotificationManager& operator=(const PropertyNotificationManager& rhs);
80 Dali::Vector<PropertyNotification*> mPropertyNotifications; ///< All existing PropertyNotifications (not owned)
83 } // namespace Internal
87 #endif // DALI_INTERNAL_PROPERTY_NOTIFICATION_MANAGER_H