1 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
2 // PROPRIETARY/CONFIDENTIAL
3 // This software is the confidential and proprietary
4 // information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall
5 // not disclose such Confidential Information and shall use it only in
6 // accordance with the terms of the license agreement you entered into with
7 // SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the
8 // suitability of the software, either express or implied, including but not
9 // limited to the implied warranties of merchantability, fitness for a
10 // particular purpose, or non-infringement. SAMSUNG shall not be liable for any
11 // damages suffered by licensee as a result of using, modifying or distributing
12 // this software or its derivatives.
14 // Copyright (c) 2017 Samsung Electronics Co., Ltd.
16 // Licensed under the Apache License, Version 2.0 (the "License");
17 // you may not use this file except in compliance with the License.
18 // You may obtain a copy of the License at
20 // http://www.apache.org/licenses/LICENSE-2.0
22 // Unless required by applicable law or agreed to in writing, software
23 // distributed under the License is distributed on an "AS IS" BASIS,
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 // See the License for the specific language governing permissions and
26 // limitations under the License.
29 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
30 // Some have been manually changed
37 using System.Runtime.InteropServices;
40 public class VideoView : View
42 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
44 internal VideoView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VideoView_SWIGUpcast(cPtr), cMemoryOwn)
46 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
49 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VideoView obj)
51 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
56 DisposeQueue.Instance.Add(this);
59 public override void Dispose()
61 if (!Stage.IsInstalled())
63 DisposeQueue.Instance.Add(this);
69 if (swigCPtr.Handle != global::System.IntPtr.Zero)
74 NDalicPINVOKE.delete_VideoView(swigCPtr);
76 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
78 global::System.GC.SuppressFinalize(this);
86 * @brief Event arguments that passed via Finished signal
89 public class FinishedEventArgs : EventArgs
91 private VideoView _videoView;
94 * @brief VideoView - VideoView is a control for video playback and display.
97 public VideoView VideoView
111 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
112 private delegate void FinishedCallback(IntPtr data);
113 private FinishedCallback _videoViewFinishedCallback;
114 private EventHandler<FinishedEventArgs> _videoViewFinishedEventHandler;
118 * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler
119 * (in the type of FinishedEventHandler-DaliEventHandler<object,FinishedEventArgs>) provided by the user.
120 * Finished signal is emitted when a video playback have finished.
122 public event EventHandler<FinishedEventArgs> Finished
126 if (_videoViewFinishedCallback == null)
128 _videoViewFinishedCallback = OnFinished;
129 FinishedSignal().Connect(_videoViewFinishedCallback);
131 _videoViewFinishedEventHandler += value;
135 if (_videoViewFinishedCallback != null)
137 FinishedSignal().Disconnect(_videoViewFinishedCallback);
139 _videoViewFinishedEventHandler -= value;
143 private void OnFinished(IntPtr data)
145 FinishedEventArgs e = new FinishedEventArgs();
147 e.VideoView = VideoView.GetVideoViewFromPtr(data);
149 if (_videoViewFinishedEventHandler != null)
151 _videoViewFinishedEventHandler(this, e);
155 internal static VideoView GetVideoViewFromPtr(global::System.IntPtr cPtr)
157 VideoView ret = new VideoView(cPtr, false);
158 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163 internal class Property : global::System.IDisposable
165 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
166 protected bool swigCMemOwn;
168 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
170 swigCMemOwn = cMemoryOwn;
171 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
174 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
176 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
184 public virtual void Dispose()
188 if (swigCPtr.Handle != global::System.IntPtr.Zero)
193 NDalicPINVOKE.delete_VideoView_Property(swigCPtr);
195 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
197 global::System.GC.SuppressFinalize(this);
201 internal Property() : this(NDalicPINVOKE.new_VideoView_Property(), true)
203 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206 internal static readonly int VIDEO = NDalicPINVOKE.VideoView_Property_VIDEO_get();
207 internal static readonly int LOOPING = NDalicPINVOKE.VideoView_Property_LOOPING_get();
208 internal static readonly int MUTED = NDalicPINVOKE.VideoView_Property_MUTED_get();
209 internal static readonly int VOLUME = NDalicPINVOKE.VideoView_Property_VOLUME_get();
213 public VideoView() : this(NDalicPINVOKE.VideoView_New__SWIG_0(), true)
215 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218 public VideoView(string url) : this(NDalicPINVOKE.VideoView_New__SWIG_1(url), true)
220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223 internal VideoView(VideoView videoView) : this(NDalicPINVOKE.new_VideoView__SWIG_1(VideoView.getCPtr(videoView)), true)
225 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
228 internal VideoView Assign(VideoView videoView)
230 VideoView ret = new VideoView(NDalicPINVOKE.VideoView_Assign(swigCPtr, VideoView.getCPtr(videoView)), false);
231 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
235 public new static VideoView DownCast(BaseHandle handle)
237 VideoView ret = new VideoView(NDalicPINVOKE.VideoView_DownCast(BaseHandle.getCPtr(handle)), true);
238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
244 NDalicPINVOKE.VideoView_Play(swigCPtr);
245 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
250 NDalicPINVOKE.VideoView_Pause(swigCPtr);
251 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
256 NDalicPINVOKE.VideoView_Stop(swigCPtr);
257 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260 public void Forward(int millisecond)
262 NDalicPINVOKE.VideoView_Forward(swigCPtr, millisecond);
263 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266 public void Backward(int millisecond)
268 NDalicPINVOKE.VideoView_Backward(swigCPtr, millisecond);
269 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 internal VideoViewSignal FinishedSignal()
274 VideoViewSignal ret = new VideoViewSignal(NDalicPINVOKE.VideoView_FinishedSignal(swigCPtr), false);
275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279 internal enum PropertyRange
281 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX
284 public PropertyMap Video
288 PropertyMap temp = new PropertyMap();
289 GetProperty(VideoView.Property.VIDEO).Get(temp);
294 SetProperty(VideoView.Property.VIDEO, new Tizen.NUI.PropertyValue(value));
302 GetProperty(VideoView.Property.LOOPING).Get(ref temp);
307 SetProperty(VideoView.Property.LOOPING, new Tizen.NUI.PropertyValue(value));
315 GetProperty(VideoView.Property.MUTED).Get(ref temp);
320 SetProperty(VideoView.Property.MUTED, new Tizen.NUI.PropertyValue(value));
323 public PropertyMap Volume
327 PropertyMap temp = new PropertyMap();
328 GetProperty(VideoView.Property.VOLUME).Get(temp);
333 SetProperty(VideoView.Property.VOLUME, new Tizen.NUI.PropertyValue(value));