1 #ifndef __DALI_PEPPER_COMPOSITOR_H__
2 #define __DALI_PEPPER_COMPOSITOR_H__
5 * Copyright (c) 2016 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 <pepper-dali/public-api/object-view/object-view.h>
25 #include <dali/public-api/common/dali-common.h>
26 #include <dali/public-api/object/base-handle.h>
27 #include <dali/public-api/adaptor-framework/application.h>
35 namespace Internal DALI_INTERNAL
41 * @addtogroup dali_pepper_compositor
46 * @brief Compositor is the embedding compositor that serve surfaces of clients as DALi Actor
47 * and deliver input events to clients.
49 * ObjectView is added when the client surface is created and object view added signal is emitted.
53 class DALI_IMPORT_API Compositor : public BaseHandle
58 * @brief Create the embedding compositer.
61 * @param[in] application Application class for the embedding compositor
62 * @param[in] name Socket name
63 * @return A handle to Compositor.
65 static Compositor New( Application application, const std::string& name );
68 * @brief Gets the name of the compositor.
71 * @return compositor name.
73 const std::string& GetName() const;
76 * @brief Downcast a handle to Compositor handle.
78 * If the BaseHandle points is a Compositor the downcast returns a valid handle.
79 * If not the returned handle is left empty.
82 * @param[in] handle Handle to an object
83 * @return handle to a Compositor or an empty handle
85 static Compositor DownCast( BaseHandle handle );
88 * @brief Creates an empty handle.
94 * @brief Copy constructor.
97 * @param[in] handle The handle to copy from.
99 Compositor( const Compositor& handle );
102 * @brief Assignment operator.
105 * @param[in] handle The handle to copy from.
106 * @return A reference to this.
108 Compositor& operator=( const Compositor& handle );
113 * This is non-virtual since derived Handle types must not contain data or virtual methods.
120 typedef Signal< void ( Compositor, ObjectView ) > CompositorSignalType; ///< Compositor signal type @since_tizen 3.0
123 * @brief This signal is emitted when the client surface is created and ObjectView is added.
126 * @return The signal to connect to.
128 CompositorSignalType& ObjectViewAddedSignal();
131 * @brief This signal is emitted when the client surface is deleted and ObjectView is deleted.
134 * @return The signal to connect to.
136 CompositorSignalType& ObjectViewDeletedSignal();
138 public: // Not intended for application developers
141 * @brief Creates a handle using the Pepper::Internal implementation.
144 * @param[in] implementation The Compositor implementation.
146 explicit DALI_INTERNAL Compositor( Internal::Compositor* implementation );
152 } // namespace Pepper
156 #endif // __DALI_PEPPER_COMPOSITOR_H__