1 #ifndef DALI_TOOLKIT_CAMERA_VIEW_H
2 #define DALI_TOOLKIT_CAMERA_VIEW_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-toolkit/public-api/controls/control.h>
30 namespace Internal DALI_INTERNAL
33 } // namespace DALI_INTERNAL
36 * @addtogroup dali_toolkit_controls_camera_view
41 * @brief CameraView is a control for camera display.
43 * For working CameraView, a camera plugin for a platform should be provided.
45 class DALI_TOOLKIT_API CameraView : public Control
49 * @brief Camera display type
51 enum class DisplayType
53 WINDOW = 0, // Overlay type
54 IMAGE // Native Image type
58 * @brief Creates an initialized CameraView.
59 * @param[in] handle Multimedia camera player handle
60 * @param[in] type Where it is an overlay type or a native image type
61 * @return A handle to a newly allocated Dali ImageView
63 static CameraView New(Any handle, DisplayType type = DisplayType::WINDOW);
66 * @brief Creates an uninitialized CameraView.
73 * This is non-virtual since derived Handel types must not contain data or virtual methods.
78 * @brief Copy constructor.
80 * @param[in] CameraView CameraView to copy. The copied CameraView will point at the same implementation
82 CameraView(const CameraView& CameraView);
85 * @brief Move constructor
87 * @param[in] rhs A reference to the moved handle
89 CameraView(CameraView&& rhs);
92 * @brief Update camera view
94 * Multimedia camera operation is work outside the view.
95 * So, This must be called when the view needs to be updated after camera operation.
100 * @brief Assignment operator.
102 * @param[in] CameraView The CameraView to assign from
103 * @return The updated CameraView
105 CameraView& operator=(const CameraView& CameraView);
108 * @brief Move assignment
110 * @param[in] rhs A reference to the moved handle
111 * @return A reference to this
113 CameraView& operator=(CameraView&& rhs);
116 * @brief Downcasts a handle to CameraView handle.
118 * If handle points to a CameraView, the downcast produces valid handle.
119 * If not, the returned handle is left uninitialized.
121 * @param[in] handle Handle to an object
122 * @return Handle to a CameraView or an uninitialized handle
124 static CameraView DownCast(BaseHandle handle);
126 public: // Not intended for application developers
129 * @brief Creates a handle using the Toolkit::Internal implementation.
131 * @param[in] implementation The CameraView implementation
133 DALI_INTERNAL CameraView(Internal::CameraView& implementation);
136 * @brief Allows the creation of this CameraView from an Internal::CustomActor pointer.
138 * @param[in] internal A pointer to the internal CustomActor
140 DALI_INTERNAL CameraView(Dali::Internal::CustomActor* internal);
148 } // namespace Toolkit
152 #endif // DALI_TOOLKIT_CAMERA_VIEW_H