2 * Copyright(c) 2020 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;
20 using Tizen.NUI.BaseComponents;
22 namespace Tizen.NUI.Wearable
27 /// The WatchView is a class for displaying the watch.<br />
29 /// <since_tizen> 6 </since_tizen>
30 [EditorBrowsable(EditorBrowsableState.Never)]
31 public class WatchView : View
34 /// Creates a new WatchView.
36 /// <since_tizen> 6 </since_tizen>
37 [EditorBrowsable(EditorBrowsableState.Never)]
38 public WatchView(Window window, string watchId, string contentInfo, int width, int height) : this(Interop.WatchView.New(Window.getCPtr(window), watchId, contentInfo, width, height), true)
40 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
44 internal WatchView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.WatchView.Upcast(cPtr), cMemoryOwn)
47 internal WatchView(WatchView handle) : this(Interop.WatchView.NewWatchView(WatchView.getCPtr(handle)), true)
49 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
53 /// Pauses a given Watch.
55 /// <returns>True on success, false otherwise.</returns>
56 /// <since_tizen> 6 </since_tizen>
57 [EditorBrowsable(EditorBrowsableState.Never)]
58 public bool PauseWatch()
60 bool ret = Interop.WatchView.PauseWatch(swigCPtr);
61 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66 /// Resumes a given Watch.
68 /// <returns>True on success, false otherwise.</returns>
69 /// <since_tizen> 6 </since_tizen>
70 [EditorBrowsable(EditorBrowsableState.Never)]
71 public bool ResumeWatch()
73 bool ret = Interop.WatchView.ResumeWatch(swigCPtr);
74 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78 internal static WatchView DownCast(BaseHandle handle)
80 WatchView ret = new WatchView(Interop.WatchView.DownCast(BaseHandle.getCPtr(handle)), true);
81 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85 internal static WatchView GetWatchViewFromPtr(global::System.IntPtr cPtr)
87 WatchView ret = new WatchView(cPtr, false);
88 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WatchView obj)
94 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
97 internal WatchView Assign(WatchView handle)
99 WatchView ret = new WatchView(Interop.WatchView.Assign(swigCPtr, WatchView.getCPtr(handle)), false);
100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105 /// To make the Button instance be disposed.
107 /// <since_tizen> 6 </since_tizen>
108 [EditorBrowsable(EditorBrowsableState.Never)]
109 protected override void Dispose(DisposeTypes type)