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