1 #ifndef __DALI_PEPPER_OBJECT_VIEW_H__
2 #define __DALI_PEPPER_OBJECT_VIEW_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 <dali-toolkit/public-api/controls/control.h>
30 namespace Internal DALI_INTERNAL
36 * @addtogroup dali_pepper_compositor
41 * @brief ObjectView is a container for images of client surfaces. It displays the images.
42 * And input events that ObjectView gets are delivered to the client.
46 class DALI_IMPORT_API ObjectView : public Toolkit::Control
51 * @brief Create object view.
54 * @return A handle to ObjectView.
56 static ObjectView New();
59 * @brief Downcast a handle to ObjectView handle.
61 * If the BaseHandle points is a ObjectView the downcast returns a valid handle.
62 * If not the returned handle is left empty.
65 * @param[in] handle Handle to an object
66 * @return handle to a ObjectView or an empty handle
68 static ObjectView DownCast( BaseHandle handle );
71 * @brief Creates an empty handle.
77 * @brief Copy constructor.
80 * @param[in] handle The handle to copy from.
82 ObjectView( const ObjectView& handle );
85 * @brief Assignment operator.
88 * @param[in] handle The handle to copy from.
89 * @return A reference to this.
91 ObjectView& operator=( const ObjectView& handle );
96 * This is non-virtual since derived Handle types must not contain data or virtual methods.
102 * @brief Sets this ObjectView from an Image.
104 * If the handle is empty, ObjectView will display nothing.
106 * @param[in] image The Image to display.
108 void SetImage( Image image );
111 * @brief Gets pid of the client.
114 * @return pid on success, otherwise 0.
116 pid_t GetPid() const;
119 * @brief Gets title of the client.
122 * @return title on success, otherwise empty string.
124 std::string GetTitle() const;
127 * @brief Gets app id of the client.
130 * @return app id on success, otherwise empty string.
132 std::string GetAppId() const;
135 * @brief Cancels touch event procedure.
138 * @return true on success, false otherwise.
140 bool CancelTouchEvent();
142 public: // Not intended for application developers
145 * @brief Creates a handle using the ObjectView::Internal implementation.
148 * @param[in] implementation The ObjectView implementation.
150 DALI_INTERNAL ObjectView( Internal::ObjectView& implementation );
153 * @brief Allows the creation of this control from an Internal::CustomActor pointer.
156 * @param[in] internal A pointer to the internal CustomActor.
158 DALI_INTERNAL ObjectView( Dali::Internal::CustomActor* internal );
164 } // namespace Pepper
168 #endif // __DALI_PEPPER_OBJECT_VIEW_H__