1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
\r
3 * Licensed under the Apache License, Version 2.0 (the "License");
\r
4 * you may not use this file except in compliance with the License.
\r
5 * You may obtain a copy of the License at
\r
7 * http://www.apache.org/licenses/LICENSE-2.0
\r
9 * Unless required by applicable law or agreed to in writing, software
\r
10 * distributed under the License is distributed on an "AS IS" BASIS,
\r
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
12 * See the License for the specific language governing permissions and
\r
13 * limitations under the License.
\r
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
\r
17 //------------------------------------------------------------------------------
\r
18 // <auto-generated />
\r
20 // This file was automatically generated by SWIG (http://www.swig.org).
\r
23 // Do not make changes to this file unless you know what you are doing--modify
\r
24 // the SWIG interface file instead.
\r
25 //------------------------------------------------------------------------------
\r
30 public class Timer : BaseHandle
\r
32 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
\r
34 internal Timer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Timer_SWIGUpcast(cPtr), cMemoryOwn)
\r
36 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
\r
39 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Timer obj)
\r
41 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
\r
46 DisposeQueue.Instance.Add(this);
\r
49 public override void Dispose()
\r
51 if (!Stage.IsInstalled())
\r
53 DisposeQueue.Instance.Add(this);
\r
59 if (swigCPtr.Handle != global::System.IntPtr.Zero)
\r
63 swigCMemOwn = false;
\r
64 NDalicPINVOKE.delete_Timer(swigCPtr);
\r
66 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
\r
68 global::System.GC.SuppressFinalize(this);
\r
74 public Timer(uint milliSec) : this(NDalicPINVOKE.Timer_New(milliSec), true)
\r
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
79 internal Timer(Timer timer) : this(NDalicPINVOKE.new_Timer__SWIG_1(Timer.getCPtr(timer)), true)
\r
81 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
84 internal Timer Assign(Timer timer)
\r
86 Timer ret = new Timer(NDalicPINVOKE.Timer_Assign(swigCPtr, Timer.getCPtr(timer)), false);
\r
87 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
91 public static Timer DownCast(BaseHandle handle)
\r
93 Timer ret = new Timer(NDalicPINVOKE.Timer_DownCast(BaseHandle.getCPtr(handle)), true);
\r
94 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
100 NDalicPINVOKE.Timer_Start(swigCPtr);
\r
101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
106 NDalicPINVOKE.Timer_Stop(swigCPtr);
\r
107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
110 public uint Interval
\r
114 SetInterval(value);
\r
118 return GetInterval();
\r
122 internal void SetInterval(uint milliSec)
\r
124 NDalicPINVOKE.Timer_SetInterval(swigCPtr, milliSec);
\r
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
128 internal uint GetInterval()
\r
130 uint ret = NDalicPINVOKE.Timer_GetInterval(swigCPtr);
\r
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
135 public bool Running
\r
139 return IsRunning();
\r
143 internal bool IsRunning()
\r
145 bool ret = NDalicPINVOKE.Timer_IsRunning(swigCPtr);
\r
146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r
150 internal BoolSignal TickSignal()
\r
152 BoolSignal ret = new BoolSignal(NDalicPINVOKE.Timer_TickSignal(swigCPtr), false);
\r
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
\r