2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
21 namespace Tizen.NUI.BaseComponents
24 /// CameraView is a view for camera preview.
26 [EditorBrowsable(EditorBrowsableState.Never)]
27 public class CameraView : View
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 public enum DisplayType
32 Window = 0, // HW overlay
33 Image // texture stream
37 /// Creates an initialized CameraView.
39 /// <param name="handle">Multimedia Camera handle</param>
40 /// <param name="type">DisplayType</param>
41 [EditorBrowsable(EditorBrowsableState.Never)]
42 public CameraView(global::System.IntPtr handle, DisplayType type = DisplayType.Window) : this(Interop.CameraView.New(handle, (int)type), true)
44 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
47 internal CameraView(CameraView cameraView) : this(Interop.CameraView.NewCameraView(CameraView.getCPtr(cameraView)), true)
49 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
52 internal CameraView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
56 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CameraView obj)
58 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
62 /// Called when the camera view needs to be updated if the camera setting is changed..
64 [EditorBrowsable(EditorBrowsableState.Never)]
67 Interop.CameraView.Update(SwigCPtr);
73 /// <param name="type">DisposeTypes</param>
74 [EditorBrowsable(EditorBrowsableState.Never)]
75 protected override void Dispose(DisposeTypes type)
85 /// This will not be public opened.
86 [EditorBrowsable(EditorBrowsableState.Never)]
87 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
89 Interop.CameraView.DeleteCameraView(swigCPtr);