*/
internal class NUIApplicationBatteryLowEventArgs : EventArgs
{
- private Application _application;
+ private Application.BatteryStatus _status;
/**
* @brief Application - is the application that is being affected when the battery level of the device is low
*
*/
- public Application Application
+ public Application.BatteryStatus BatteryStatus
{
get
{
- return _application;
+ return _status;
}
set
{
- _application = value;
+ _status = value;
}
}
}
*/
internal class NUIApplicationMemoryLowEventArgs : EventArgs
{
- private Application _application;
+ private Application.MemoryStatus _status;
/**
* @brief Application - is the application that is being affected when the memory level of the device is low
*
*/
- public Application Application
+ public Application.MemoryStatus MemoryStatus
{
get
{
- return _application;
+ return _status;
}
set
{
- _application = value;
+ _status = value;
}
}
}
base.Dispose(type);
}
+ public enum BatteryStatus
+ {
+ Normal,
+ CriticalLow,
+ PowerOff
+ };
+
+ public enum MemoryStatus
+ {
+ Normal,
+ SoftWarning,
+ HardWarning
+ };
+
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate void NUIApplicationInitEventCallbackDelegate(IntPtr application);
private DaliEventHandler<object, NUIApplicationInitEventArgs> _applicationInitEventHandler;
private NUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- private delegate void NUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
+ private delegate void NUIApplicationBatteryLowEventCallbackDelegate(BatteryStatus status);
private DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> _applicationBatteryLowEventHandler;
private NUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- private delegate void NUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
+ private delegate void NUIApplicationMemoryLowEventCallbackDelegate(MemoryStatus status);
private DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> _applicationMemoryLowEventHandler;
private NUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
}
// Callback for Application BatteryLowSignal
- private void OnNUIApplicationBatteryLow(IntPtr data)
+ private void OnNUIApplicationBatteryLow(BatteryStatus status)
{
NUIApplicationBatteryLowEventArgs e = new NUIApplicationBatteryLowEventArgs();
// Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data
- e.Application = Application.GetApplicationFromPtr(data);
+ e.BatteryStatus = status;
if (_applicationBatteryLowEventHandler != null)
{
}
// Callback for Application MemoryLowSignal
- private void OnNUIApplicationMemoryLow(IntPtr data)
+ private void OnNUIApplicationMemoryLow(MemoryStatus status)
{
NUIApplicationMemoryLowEventArgs e = new NUIApplicationMemoryLowEventArgs();
// Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data
- e.Application = Application.GetApplicationFromPtr(data);
+ e.MemoryStatus = status;
if (_applicationMemoryLowEventHandler != null)
{
return ret;
}
+ public string GetLanguage()
+ {
+ string ret = NDalicPINVOKE.Application_GetLanguage(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public string GetRegion()
+ {
+ string ret = NDalicPINVOKE.Application_GetRegion(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+
internal ApplicationSignal InitSignal()
{
ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_InitSignal(swigCPtr), false);
return ret;
}
- internal ApplicationSignal BatteryLowSignal()
+ internal LowBatterySignalType BatteryLowSignal()
{
- ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_BatteryLowSignal(swigCPtr), false);
+ LowBatterySignalType ret = new LowBatterySignalType(NDalicPINVOKE.Application_BatteryLowSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- internal ApplicationSignal MemoryLowSignal()
+ internal LowMemorySignalType MemoryLowSignal()
{
- ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_MemoryLowSignal(swigCPtr), false);
+ LowMemorySignalType ret = new LowMemorySignalType(NDalicPINVOKE.Application_MemoryLowSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+
+ /// <summary>
+ /// LowBatterySignalType.
+ /// </summary>
+ internal class LowBatterySignalType : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ /// <summary>
+ /// swigCMemOwn.
+ /// </summary>
+ protected bool swigCMemOwn;
+
+ internal LowBatterySignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
+ {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LowBatterySignalType obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ //A Flag to check who called Dispose(). (By User or DisposeQueue)
+ private bool isDisposeQueued = false;
+
+ /// <summary>
+ /// A Flat to check if it is already disposed.
+ /// </summary>
+ protected bool disposed = false;
+
+
+ /// <summary>
+ /// Distructor.
+ /// </summary>
+ ~LowBatterySignalType()
+ {
+ if (!isDisposeQueued)
+ {
+ isDisposeQueued = true;
+ DisposeQueue.Instance.Add(this);
+ }
+ }
+
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ public void Dispose()
+ {
+ //Throw excpetion if Dispose() is called in separate thread.
+ if (!Window.IsInstalled())
+ {
+ throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+ }
+
+ if (isDisposeQueued)
+ {
+ Dispose(DisposeTypes.Implicit);
+ }
+ else
+ {
+ Dispose(DisposeTypes.Explicit);
+ System.GC.SuppressFinalize(this);
+ }
+ }
+
+ /// <summary>
+ /// you can override it to clean-up your own resources.
+ /// </summary>
+ /// <param name="type">DisposeTypes</param>
+ /// <since_tizen> 3 </since_tizen>
+ protected virtual void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicPINVOKE.delete_LowBatterySignalType(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ disposed = true;
+ }
+
+ /// <summary>
+ /// Empty
+ /// </summary>
+ /// <returns>true if there is no signal attached</returns>
+ public bool Empty()
+ {
+ bool ret = NDalicPINVOKE.LowBatterySignalType_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// GetConnectionCount
+ /// </summary>
+ /// <returns>number of attached signals</returns>
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicPINVOKE.LowBatterySignalType_GetConnectionCount(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// signal connect
+ /// </summary>
+ /// <param name="func"></param>
+ public void Connect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicPINVOKE.LowBatterySignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ /// <summary>
+ /// signal disconnect
+ /// </summary>
+ /// <param name="func"></param>
+ public void Disconnect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicPINVOKE.LowBatterySignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ internal void Emit(Application.BatteryStatus arg)
+ {
+ NDalicPINVOKE.LowBatterySignalType_Emit(swigCPtr, (int)arg);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// LowBatterySignalType
+ /// </summary>
+ public LowBatterySignalType() : this(NDalicPINVOKE.new_LowBatterySignalType(), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ }
+
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+
+ internal class LowMemorySignalType : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal LowMemorySignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
+ {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LowMemorySignalType obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ //A Flag to check who called Dispose(). (By User or DisposeQueue)
+ private bool isDisposeQueued = false;
+ //A Flat to check if it is already disposed.
+ protected bool disposed = false;
+
+ ~LowMemorySignalType()
+ {
+ if (!isDisposeQueued)
+ {
+ isDisposeQueued = true;
+ DisposeQueue.Instance.Add(this);
+ }
+ }
+
+ public void Dispose()
+ {
+ //Throw excpetion if Dispose() is called in separate thread.
+ if (!Window.IsInstalled())
+ {
+ throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+ }
+
+ if (isDisposeQueued)
+ {
+ Dispose(DisposeTypes.Implicit);
+ }
+ else
+ {
+ Dispose(DisposeTypes.Explicit);
+ System.GC.SuppressFinalize(this);
+ }
+ }
+
+ protected virtual void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicPINVOKE.delete_LowMemorySignalType(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ disposed = true;
+ }
+
+ public bool Empty()
+ {
+ bool ret = NDalicPINVOKE.LowMemorySignalType_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicPINVOKE.LowMemorySignalType_GetConnectionCount(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public void Connect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicPINVOKE.LowMemorySignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Disconnect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicPINVOKE.LowMemorySignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ internal void Emit(Application.MemoryStatus arg)
+ {
+ NDalicPINVOKE.LowMemorySignalType_Emit(swigCPtr, (int)arg);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public LowMemorySignalType() : this(NDalicPINVOKE.new_LowMemorySignalType(), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ }
+
+}
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_ImfManager_ImfCallbackData")]
public static extern void delete_ImfManager_ImfCallbackData(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ImfManager_Finalize")]
+ public static extern void ImfManager_Finalize(global::System.Runtime.InteropServices.HandleRef jarg1);
+
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ImfManager_Get")]
public static extern global::System.IntPtr ImfManager_Get();
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextField_Property_PLACEHOLDER_get")]
public static extern int TextField_Property_PLACEHOLDER_get();
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextField_Property_ELLIPSIS_get")]
+ public static extern int TextField_Property_ELLIPSIS_get();
+
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextLabel_Property_PIXEL_SIZE_get")]
public static extern int TextLabel_Property_PIXEL_SIZE_get();
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_HIDDENINPUT_PROPERTY_SUBSTITUTE_COUNT_get")]
public static extern int HIDDENINPUT_PROPERTY_SUBSTITUTE_COUNT_get();
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_HIDDENINPUT_PROPERTY_SHOW_DURATION_get")]
- public static extern int HIDDENINPUT_PROPERTY_SHOW_DURATION_get();
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_HIDDENINPUT_PROPERTY_SHOW_LAST_CHARACTER_DURATION_get")]
+ public static extern int HIDDENINPUT_PROPERTY_SHOW_LAST_CHARACTER_DURATION_get();
+
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_TtsPlayer_SWIGUpcast")]
public static extern global::System.IntPtr TtsPlayer_SWIGUpcast(global::System.IntPtr jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Adaptor_RenderOnce")]
public static extern void Window_RenderOnce(global::System.Runtime.InteropServices.HandleRef jarg1);
+ //for watch
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WatchTime")]
+ public static extern global::System.IntPtr new_WatchTime();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WatchTime")]
+ public static extern void delete_WatchTime(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetHour")]
+ public static extern int WatchTime_GetHour(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetHour24")]
+ public static extern int WatchTime_GetHour24(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetMinute")]
+ public static extern int WatchTime_GetMinute(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetSecond")]
+ public static extern int WatchTime_GetSecond(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetMillisecond")]
+ public static extern int WatchTime_GetMillisecond(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetYear")]
+ public static extern int WatchTime_GetYear(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetMonth")]
+ public static extern int WatchTime_GetMonth(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetDay")]
+ public static extern int WatchTime_GetDay(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetDayOfWeek")]
+ public static extern int WatchTime_GetDayOfWeek(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetUtcTime")]
+ public static extern global::System.IntPtr WatchTime_GetUtcTime(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetUtcTimeStamp")]
+ public static extern global::System.IntPtr WatchTime_GetUtcTimeStamp(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetTimeZone")]
+ public static extern string WatchTime_GetTimeZone(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTime_GetDaylightSavingTimeStatus")]
+ public static extern bool WatchTime_GetDaylightSavingTimeStatus(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchApplication_New__SWIG_0")]
+ public static extern global::System.IntPtr WatchApplication_New__SWIG_0();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchApplication_New__SWIG_1")]
+ public static extern global::System.IntPtr WatchApplication_New__SWIG_1(int jarg1, string jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchApplication_New__SWIG_2")]
+ public static extern global::System.IntPtr WatchApplication_New__SWIG_2(int jarg1, string jarg2, string jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WatchApplication__SWIG_0")]
+ public static extern global::System.IntPtr new_WatchApplication__SWIG_0();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WatchApplication__SWIG_1")]
+ public static extern global::System.IntPtr new_WatchApplication__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchApplication_Assign")]
+ public static extern global::System.IntPtr WatchApplication_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WatchApplication")]
+ public static extern void delete_WatchApplication(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchApplication_TimeTickSignal")]
+ public static extern global::System.IntPtr WatchApplication_TimeTickSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchApplication_AmbientTickSignal")]
+ public static extern global::System.IntPtr WatchApplication_AmbientTickSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchApplication_AmbientChangedSignal")]
+ public static extern global::System.IntPtr WatchApplication_AmbientChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ //for watch signal
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTimeSignal_Empty")]
+ public static extern bool WatchTimeSignal_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTimeSignal_GetConnectionCount")]
+ public static extern uint WatchTimeSignal_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTimeSignal_Connect")]
+ public static extern void WatchTimeSignal_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTimeSignal_Disconnect")]
+ public static extern void WatchTimeSignal_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchTimeSignal_Emit")]
+ public static extern void WatchTimeSignal_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WatchTimeSignal")]
+ public static extern global::System.IntPtr new_WatchTimeSignal();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WatchTimeSignal")]
+ public static extern void delete_WatchTimeSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchBoolSignal_Empty")]
+ public static extern bool WatchBoolSignal_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchBoolSignal_GetConnectionCount")]
+ public static extern uint WatchBoolSignal_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchBoolSignal_Connect")]
+ public static extern void WatchBoolSignal_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchBoolSignal_Disconnect")]
+ public static extern void WatchBoolSignal_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WatchBoolSignal_Emit")]
+ public static extern void WatchBoolSignal_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, bool jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WatchBoolSignal")]
+ public static extern global::System.IntPtr new_WatchBoolSignal();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WatchBoolSignal")]
+ public static extern void delete_WatchBoolSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
}
}
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetDeviceClass")]
public static extern int GetDeviceClass(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetDeviceSubClass")]
+ public static extern int GetDeviceSubClass(global::System.Runtime.InteropServices.HandleRef jarg1);
+
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Actor_Property_PARENT_ORIGIN_get")]
public static extern int Actor_Property_PARENT_ORIGIN_get();
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_Set")]
public static extern void PaddingType_Set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2, float jarg3, float jarg4, float jarg5);
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_x_set")]
- public static extern void PaddingType_x_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
-
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_x_get")]
- public static extern float PaddingType_x_get(global::System.Runtime.InteropServices.HandleRef jarg1);
-
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_left_set")]
public static extern void PaddingType_left_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_left_get")]
public static extern float PaddingType_left_get(global::System.Runtime.InteropServices.HandleRef jarg1);
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_y_set")]
- public static extern void PaddingType_y_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_start_set")]
+ public static extern void PaddingType_start_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_y_get")]
- public static extern float PaddingType_y_get(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_start_get")]
+ public static extern float PaddingType_start_get(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_right_set")]
public static extern void PaddingType_right_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_right_get")]
public static extern float PaddingType_right_get(global::System.Runtime.InteropServices.HandleRef jarg1);
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_width_set")]
- public static extern void PaddingType_width_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_end_set")]
+ public static extern void PaddingType_end_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_width_get")]
- public static extern float PaddingType_width_get(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_end_get")]
+ public static extern float PaddingType_end_get(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_bottom_set")]
public static extern void PaddingType_bottom_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_bottom_get")]
public static extern float PaddingType_bottom_get(global::System.Runtime.InteropServices.HandleRef jarg1);
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_height_set")]
- public static extern void PaddingType_height_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
-
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_height_get")]
- public static extern float PaddingType_height_get(global::System.Runtime.InteropServices.HandleRef jarg1);
-
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_top_set")]
public static extern void PaddingType_top_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IsOpaqueState")]
public static extern bool IsOpaqueState(global::System.Runtime.InteropServices.HandleRef jarg1);
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetScreenMode")]
- public static extern bool SetScreenMode(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetScreenOffMode")]
+ public static extern bool SetScreenOffMode(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetScreenMode")]
- public static extern int GetScreenMode(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetScreenOffMode")]
+ public static extern int GetScreenOffMode(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetBrightness")]
public static extern bool SetBrightness(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_GetStereoBase")]
public static extern float Application_GetStereoBase(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_GetLanguage")]
+ public static extern string Application_GetLanguage(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_GetRegion")]
+ public static extern string Application_GetRegion(global::System.Runtime.InteropServices.HandleRef jarg1);
+
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_InitSignal")]
public static extern global::System.IntPtr Application_InitSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_ApplicationControlSignal")]
public static extern void delete_ApplicationControlSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
- [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_Application_New__SWIG_4")]
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_New__SWIG_4")]
public static extern global::System.IntPtr Application_New__SWIG_4(int jarg1, string jarg3, int jarg4, global::System.Runtime.InteropServices.HandleRef jarg5);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowBatterySignalType_Empty")]
+ public static extern bool LowBatterySignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowBatterySignalType_GetConnectionCount")]
+ public static extern uint LowBatterySignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowBatterySignalType_Connect")]
+ public static extern void LowBatterySignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowBatterySignalType_Disconnect")]
+ public static extern void LowBatterySignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowBatterySignalType_Emit")]
+ public static extern void LowBatterySignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_new_LowBatterySignalType")]
+ public static extern global::System.IntPtr new_LowBatterySignalType();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_delete_LowBatterySignalType")]
+ public static extern void delete_LowBatterySignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowMemorySignalType_Empty")]
+ public static extern bool LowMemorySignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowMemorySignalType_GetConnectionCount")]
+ public static extern uint LowMemorySignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowMemorySignalType_Connect")]
+ public static extern void LowMemorySignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowMemorySignalType_Disconnect")]
+ public static extern void LowMemorySignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowMemorySignalType_Emit")]
+ public static extern void LowMemorySignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_new_LowMemorySignalType")]
+ public static extern global::System.IntPtr new_LowMemorySignalType();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_delete_LowMemorySignalType")]
+ public static extern void delete_LowMemorySignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_TimerSignalType_Empty")]
public static extern bool TimerSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_TextLabel_Property_TEXT_COLOR_get")]
public static extern int TextLabel_Property_TEXT_COLOR_get();
- [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_TextLabel_Property_TEXT_COLOR_ANIMATABLE_get")]
- public static extern int TextLabel_Property_TEXT_COLOR_ANIMATABLE_get();
-
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_TextLabel_Property_SHADOW_OFFSET_get")]
public static extern int TextLabel_Property_SHADOW_OFFSET_get();
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_AsyncImageLoader_SWIGUpcast")]
public static extern global::System.IntPtr AsyncImageLoader_SWIGUpcast(global::System.IntPtr jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLite_New")]
+ public static extern global::System.IntPtr WebViewLite_New();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WebViewLite__SWIG_0")]
+ public static extern global::System.IntPtr new_WebViewLite__SWIG_0();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WebViewLite")]
+ public static extern void delete_WebViewLite(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WebViewLite__SWIG_1")]
+ public static extern global::System.IntPtr new_WebViewLite__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLite_Assign")]
+ public static extern global::System.IntPtr WebViewLite_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLite_DownCast")]
+ public static extern global::System.IntPtr WebViewLite_DownCast(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLite_CreateInstance")]
+ public static extern void WebViewLite_CreateInstance(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3, int jarg4, int jarg5, string jarg6, string jarg7);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLite_DestroyInstance")]
+ public static extern void WebViewLite_DestroyInstance(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLite_LoadHtml")]
+ public static extern void WebViewLite_LoadHtml(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLite_FinishedSignal")]
+ public static extern global::System.IntPtr WebViewLite_FinishedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLiteSignal_Empty")]
+ public static extern bool WebViewLiteSignal_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLiteSignal_GetConnectionCount")]
+ public static extern uint WebViewLiteSignal_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLiteSignal_Connect")]
+ public static extern void WebViewLiteSignal_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLiteSignal_Disconnect")]
+ public static extern void WebViewLiteSignal_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLiteSignal_Emit")]
+ public static extern void WebViewLiteSignal_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WebViewLiteSignal")]
+ public static extern global::System.IntPtr new_WebViewLiteSignal();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WebViewLiteSignal")]
+ public static extern void delete_WebViewLiteSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLite_SWIGUpcast")]
+ public static extern global::System.IntPtr WebViewLite_SWIGUpcast(global::System.IntPtr jarg1);
}
}
Log.Debug("NUI", "NUICorebackend OnRegionChanged Called");
var handler = Handlers[EventType.RegionFormatChanged] as Action<RegionFormatChangedEventArgs>;
// Need to make new signal return in native to return right value.
- handler?.Invoke( new RegionFormatChangedEventArgs(""));
+ handler?.Invoke( new RegionFormatChangedEventArgs(e.Application.GetRegion()));
}
/// <summary>
Log.Debug("NUI", "NUICorebackend OnMemoryLow Called");
var handler = Handlers[EventType.LowMemory] as Action<LowMemoryEventArgs>;
// Need to make new signal return in native to return right value.
+ switch( e.MemoryStatus )
+ {
+ case Application.MemoryStatus.Normal:
+ {
handler?.Invoke( new LowMemoryEventArgs(LowMemoryStatus.None));
+ break;
+ }
+ case Application.MemoryStatus.SoftWarning:
+ {
+ handler?.Invoke(new LowMemoryEventArgs(LowMemoryStatus.SoftWarning));
+ break;
+ }
+ case Application.MemoryStatus.HardWarning:
+ {
+ handler?.Invoke(new LowMemoryEventArgs(LowMemoryStatus.HardWarning));
+ break;
+ }
+ }
}
/// <summary>
Log.Debug("NUI", "NUICorebackend OnLanguageChanged Called");
var handler = Handlers[EventType.LocaleChanged] as Action<LocaleChangedEventArgs>;
// Need to make new signal return in native to return right value.
- handler?.Invoke( new LocaleChangedEventArgs(""));
+ handler?.Invoke( new LocaleChangedEventArgs(e.Application.GetLanguage()));
}
/// <summary>
Log.Debug("NUI", "NUICorebackend OnBatteryLow Called");
var handler = Handlers[EventType.LowBattery] as Action<LowBatteryEventArgs>;
// Need to make new signal return in native to return right value.
+ switch( e.BatteryStatus )
+ {
+ case Application.BatteryStatus.Normal:
+ {
handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.None));
+ break;
+ }
+ case Application.BatteryStatus.CriticalLow:
+ {
+ handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.CriticalLow));
+ break;
+ }
+ case Application.BatteryStatus.PowerOff:
+ {
+ handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.PowerOff));
+ break;
+ }
+ }
}
/// <summary>
namespace Tizen.NUI
{
/// <summary>
- /// This class represents the type of NUI event for backends. This class can be converted from string type.
+ /// Class that represents the type of NUI event for backends. This class can be converted from string type.
/// </summary>
public class NUIEventType : EventType
{
/// <summary>
/// Initializes the EventType class.
/// </summary>
- /// <param name="name">The name of the event type.</param>
+ /// <param name="name">The name of event type.</param>
public NUIEventType(string name) : base(name)
{
}
/// <summary>
- /// Pre-defined event type "Reset".
+ /// Pre-defined event type. "TimeTick"
/// </summary>
- public static readonly NUIEventType Reset = "Reset";
+ public static readonly NUIEventType TimeTick = "TimeTick";
+
+ /// <summary>
+ /// Pre-defined event type. "AmbientTick"
+ /// </summary>
+ public static readonly NUIEventType AmbientTick = "AmbientTick";
+
+ /// <summary>
+ /// Pre-defined event type. "AmbientChanged"
+ /// </summary>
+ public static readonly NUIEventType AmbientChanged = "AmbientChanged";
/// <summary>
/// Converts a string to NUIEventType instance.
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+namespace Tizen.NUI
+{
+
+ internal class SWIGTYPE_p_time_t
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ internal SWIGTYPE_p_time_t(global::System.IntPtr cPtr, bool futureUse)
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ protected SWIGTYPE_p_time_t()
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_time_t obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+
+ internal class SWIGTYPE_p_tm
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ internal SWIGTYPE_p_tm(global::System.IntPtr cPtr, bool futureUse)
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ protected SWIGTYPE_p_tm()
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_tm obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Runtime.InteropServices;
+namespace Tizen.NUI
+{
+ internal class WatchApplication : Application
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ internal WatchApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WatchApplication obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ protected virtual void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+ DisConnectFromSignals();
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WatchApplication(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ base.Dispose(type);
+ }
+
+ private void DisConnectFromSignals()
+ {
+ if (_timeTickCallback != null)
+ {
+ this.TimeTickSignal().Disconnect(_timeTickCallback);
+ }
+ if (_ambientTickCallback != null)
+ {
+ this.AmbientTickSignal().Disconnect(_ambientTickCallback);
+ }
+ if (_ambientChangedCallback != null)
+ {
+ this.AmbientChangedSignal().Disconnect(_ambientChangedCallback);
+ }
+ }
+
+ public static WatchApplication Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ public static WatchApplication NewWatchApplication()
+ {
+ WatchApplication ret = New();
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ // we've got an application now connect the signals
+ _instance = ret;
+ return ret;
+ }
+
+ public static WatchApplication NewWatchApplication(string[] args)
+ {
+ WatchApplication ret = New(args);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ _instance = ret;
+ return ret;
+ }
+
+ public static WatchApplication NewWatchApplication(string[] args, string stylesheet)
+ {
+ WatchApplication ret = New(args, stylesheet);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ _instance = ret;
+ return ret;
+ }
+
+ public new static WatchApplication New()
+ {
+ WatchApplication ret = new WatchApplication(NDalicManualPINVOKE.WatchApplication_New__SWIG_0(), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public static WatchApplication New(string[] args)
+ {
+ int argc = args.Length;
+ string argvStr = string.Join(" ", args);
+
+ WatchApplication ret = new WatchApplication(NDalicManualPINVOKE.WatchApplication_New__SWIG_1(argc, argvStr), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public static WatchApplication New(string[] args, string stylesheet)
+ {
+ int argc = args.Length;
+ string argvStr = string.Join(" ", args);
+
+ WatchApplication ret = new WatchApplication(NDalicManualPINVOKE.WatchApplication_New__SWIG_2(argc, argvStr, stylesheet), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ internal WatchApplication(WatchApplication implementation) : this(NDalicManualPINVOKE.new_WatchApplication__SWIG_1(WatchApplication.getCPtr(implementation)), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Event arguments that passed via time tick event signal.
+ /// </summary>
+ public class TimeTickEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Application.
+ /// </summary>
+ public Application Application
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// WatchTime.
+ /// </summary>
+ public WatchTime WatchTime
+ {
+ get;
+ set;
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void TimeTickCallbackType(IntPtr application, IntPtr watchTime);
+ private TimeTickCallbackType _timeTickCallback;
+ private DaliEventHandler<object,TimeTickEventArgs> _timeTickEventHandler;
+
+ /// <summary>
+ /// TimeTick event.
+ /// </summary>
+ public event DaliEventHandler<object, TimeTickEventArgs> TimeTick
+ {
+ add
+ {
+ if (_timeTickEventHandler == null)
+ {
+ _timeTickCallback = new TimeTickCallbackType( OnTimeTick);
+ TimeTickSignal().Connect(_timeTickCallback);
+ }
+
+ _timeTickEventHandler += value;
+ }
+
+ remove
+ {
+ _timeTickEventHandler -= value;
+
+ if (_timeTickEventHandler == null && TimeTickSignal().Empty() == false)
+ {
+ TimeTickSignal().Disconnect(_timeTickCallback);
+ }
+ }
+ }
+
+ private void OnTimeTick(IntPtr application, IntPtr watchTime)
+ {
+ TimeTickEventArgs e = new TimeTickEventArgs();
+ if (application != null)
+ {
+ e.Application = Application.GetApplicationFromPtr(application);
+ }
+ if(watchTime != null)
+ {
+ e.WatchTime = WatchTime.GetWatchTimeFromPtr(watchTime);
+ }
+
+ _timeTickEventHandler?.Invoke(this, e);
+ }
+
+ internal WatchTimeSignal TimeTickSignal()
+ {
+ WatchTimeSignal ret = new WatchTimeSignal(NDalicManualPINVOKE.WatchApplication_TimeTickSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Event arguments that passed via ambient tick event signal.
+ /// </summary>
+ public class AmbientTickEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Application.
+ /// </summary>
+ public Application Application
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// WatchTime.
+ /// </summary>
+ public WatchTime WatchTime
+ {
+ get;
+ set;
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AmbientTickCallbackType(IntPtr application, IntPtr watchTime);
+ private AmbientTickCallbackType _ambientTickCallback;
+ private DaliEventHandler<object,AmbientTickEventArgs> _ambientTickEventHandler;
+
+ /// <summary>
+ /// AmbientTick event.
+ /// </summary>
+ public event DaliEventHandler<object, AmbientTickEventArgs> AmbientTick
+ {
+ add
+ {
+ if (_ambientTickEventHandler == null)
+ {
+ _ambientTickCallback = new AmbientTickCallbackType( OnAmbientTick);
+ AmbientTickSignal().Connect(_ambientTickCallback);
+ }
+
+ _ambientTickEventHandler += value;
+ }
+
+ remove
+ {
+ _ambientTickEventHandler -= value;
+
+ if (_ambientTickEventHandler == null && AmbientTickSignal().Empty() == false)
+ {
+ AmbientTickSignal().Disconnect(_ambientTickCallback);
+ }
+ }
+ }
+
+ private void OnAmbientTick(IntPtr application, IntPtr watchTime)
+ {
+ AmbientTickEventArgs e = new AmbientTickEventArgs();
+ if (application != null)
+ {
+ e.Application = Application.GetApplicationFromPtr(application);
+ }
+ if (watchTime != null)
+ {
+ e.WatchTime = WatchTime.GetWatchTimeFromPtr(watchTime);
+ }
+
+ _ambientTickEventHandler?.Invoke(this, e);
+ }
+
+ internal WatchTimeSignal AmbientTickSignal()
+ {
+ WatchTimeSignal ret = new WatchTimeSignal(NDalicManualPINVOKE.WatchApplication_AmbientTickSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Event arguments that passed via ambient tick event signal.
+ /// </summary>
+ public class AmbientChangedEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Application.
+ /// </summary>
+ public Application Application
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// Changed.
+ /// </summary>
+ public bool Changed
+ {
+ get;
+ set;
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AmbientChangedCallbackType(IntPtr application, bool changed);
+ private AmbientChangedCallbackType _ambientChangedCallback;
+ private DaliEventHandler<object,AmbientChangedEventArgs> _ambientChangedEventHandler;
+
+ /// <summary>
+ /// AmbientChanged event.
+ /// </summary>
+ public event DaliEventHandler<object, AmbientChangedEventArgs> AmbientChanged
+ {
+ add
+ {
+ if (_ambientChangedEventHandler == null)
+ {
+ _ambientChangedCallback = new AmbientChangedCallbackType( OnAmbientChanged);
+ AmbientChangedSignal().Connect(_ambientChangedCallback);
+ }
+
+ _ambientChangedEventHandler += value;
+ }
+
+ remove
+ {
+ _ambientChangedEventHandler -= value;
+
+ if (_ambientChangedEventHandler == null && AmbientChangedSignal().Empty() == false)
+ {
+ AmbientChangedSignal().Disconnect(_ambientChangedCallback);
+ }
+ }
+ }
+
+ private void OnAmbientChanged(IntPtr application, bool changed)
+ {
+ AmbientChangedEventArgs e = new AmbientChangedEventArgs();
+ if (application != null)
+ {
+ e.Application = Application.GetApplicationFromPtr(application);
+ }
+ e.Changed = changed;
+
+ _ambientChangedEventHandler?.Invoke(this, e);
+ }
+
+ internal WatchBoolSignal AmbientChangedSignal()
+ {
+ WatchBoolSignal ret = new WatchBoolSignal(NDalicManualPINVOKE.WatchApplication_AmbientChangedSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ private static WatchApplication _instance; //singleton
+
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+
+ internal class WatchBoolSignal : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal WatchBoolSignal(global::System.IntPtr cPtr, bool cMemoryOwn)
+ {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WatchBoolSignal obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ //A Flag to check who called Dispose(). (By User or DisposeQueue)
+ private bool isDisposeQueued = false;
+ //A Flat to check if it is already disposed.
+ protected bool disposed = false;
+
+ ~WatchBoolSignal()
+ {
+ if (!isDisposeQueued)
+ {
+ isDisposeQueued = true;
+ DisposeQueue.Instance.Add(this);
+ }
+ }
+
+ public void Dispose()
+ {
+ //Throw excpetion if Dispose() is called in separate thread.
+ if (!Window.IsInstalled())
+ {
+ throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+ }
+
+ if (isDisposeQueued)
+ {
+ Dispose(DisposeTypes.Implicit);
+ }
+ else
+ {
+ Dispose(DisposeTypes.Explicit);
+ System.GC.SuppressFinalize(this);
+ }
+ }
+
+ protected virtual void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WatchBoolSignal(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ disposed = true;
+ }
+
+ public bool Empty()
+ {
+ bool ret = NDalicManualPINVOKE.WatchBoolSignal_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicManualPINVOKE.WatchBoolSignal_GetConnectionCount(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public void Connect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicManualPINVOKE.WatchBoolSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Disconnect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicManualPINVOKE.WatchBoolSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Emit(Application arg1, bool arg2)
+ {
+ NDalicManualPINVOKE.WatchBoolSignal_Emit(swigCPtr, Application.getCPtr(arg1), arg2);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public WatchBoolSignal() : this(NDalicManualPINVOKE.new_WatchBoolSignal(), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+
+ internal class WatchTimeSignal : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal WatchTimeSignal(global::System.IntPtr cPtr, bool cMemoryOwn)
+ {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WatchTimeSignal obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ //A Flag to check who called Dispose(). (By User or DisposeQueue)
+ private bool isDisposeQueued = false;
+ //A Flat to check if it is already disposed.
+ protected bool disposed = false;
+
+ ~WatchTimeSignal()
+ {
+ if (!isDisposeQueued)
+ {
+ isDisposeQueued = true;
+ DisposeQueue.Instance.Add(this);
+ }
+ }
+
+ public void Dispose()
+ {
+ //Throw excpetion if Dispose() is called in separate thread.
+ if (!Window.IsInstalled())
+ {
+ throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+ }
+
+ if (isDisposeQueued)
+ {
+ Dispose(DisposeTypes.Implicit);
+ }
+ else
+ {
+ Dispose(DisposeTypes.Explicit);
+ System.GC.SuppressFinalize(this);
+ }
+ }
+
+ protected virtual void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WatchTimeSignal(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ disposed = true;
+ }
+
+ public bool Empty()
+ {
+ bool ret = NDalicManualPINVOKE.WatchTimeSignal_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicManualPINVOKE.WatchTimeSignal_GetConnectionCount(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public void Connect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicManualPINVOKE.WatchTimeSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Disconnect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicManualPINVOKE.WatchTimeSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Emit(Application arg1, WatchTime arg2)
+ {
+ NDalicManualPINVOKE.WatchTimeSignal_Emit(swigCPtr, Application.getCPtr(arg1), WatchTime.getCPtr(arg2));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public WatchTimeSignal() : this(NDalicManualPINVOKE.new_WatchTimeSignal(), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI {
+
+/// <summary>
+/// WebViewLiteSignal.
+/// </summary>
+public class WebViewLiteSignal : global::System.IDisposable {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ /// <summary>
+ /// swigCMemOwn.
+ /// </summary>
+ protected bool swigCMemOwn;
+
+ internal WebViewLiteSignal(global::System.IntPtr cPtr, bool cMemoryOwn) {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebViewLiteSignal obj) {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ //A Flag to check who called Dispose(). (By User or DisposeQueue)
+ private bool isDisposeQueued = false;
+
+ /// <summary>
+ /// A Flat to check if it is already disposed.
+ /// </summary>
+ protected bool disposed = false;
+
+ /// <summary>
+ /// Distructor.
+ /// </summary>
+ ~WebViewLiteSignal()
+ {
+ if (!isDisposeQueued)
+ {
+ isDisposeQueued = true;
+ DisposeQueue.Instance.Add(this);
+ }
+ }
+
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ public void Dispose()
+ {
+ //Throw excpetion if Dispose() is called in separate thread.
+ if (!Window.IsInstalled())
+ {
+ throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+ }
+
+ if (isDisposeQueued)
+ {
+ Dispose(DisposeTypes.Implicit);
+ }
+ else
+ {
+ Dispose(DisposeTypes.Explicit);
+ System.GC.SuppressFinalize(this);
+ }
+ }
+
+ /// <summary>
+ /// you can override it to clean-up your own resources.
+ /// </summary>
+ /// <param name="type">DisposeTypes</param>
+ /// <since_tizen> 3 </since_tizen>
+ protected virtual void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicPINVOKE.delete_WebViewLiteSignal(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ disposed = true;
+ }
+
+
+ /// <summary>
+ /// Empty
+ /// </summary>
+ /// <returns>true if there is no signal attached</returns>
+ public bool Empty() {
+ bool ret = NDalicPINVOKE.WebViewLiteSignal_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// GetConnectionCount
+ /// </summary>
+ /// <returns>number of attached signals</returns>
+ public uint GetConnectionCount() {
+ uint ret = NDalicPINVOKE.WebViewLiteSignal_GetConnectionCount(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// signal connect
+ /// </summary>
+ /// <param name="func"></param>
+ public void Connect(System.Delegate func) {
+System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicPINVOKE.WebViewLiteSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ /// <summary>
+ /// signal disconnect
+ /// </summary>
+ /// <param name="func"></param>
+ public void Disconnect(System.Delegate func) {
+System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ NDalicPINVOKE.WebViewLiteSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ /// <summary>
+ /// Emit
+ /// </summary>
+ public void Emit(WebViewLite arg) {
+ NDalicPINVOKE.WebViewLiteSignal_Emit(swigCPtr, WebViewLite.getCPtr(arg));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// WebViewLiteSignal
+ /// </summary>
+ public WebViewLiteSignal() : this(NDalicPINVOKE.new_WebViewLiteSignal(), true) {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+}
+
+}
/// <since_tizen> 3 </since_tizen>
public int GetPropertyIndex(string name)
{
- int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, name);
+ string daliPropertyName = name.Substring(0, 1).ToLower() + name.Substring(1);
+
+ int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, daliPropertyName);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextField_Property_PIXEL_SIZE_get();
internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SELECTION_get();
internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextField_Property_PLACEHOLDER_get();
-
+ internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextField_Property_ELLIPSIS_get();
}
internal class InputStyle
}
}
+ /// <summary>
+ /// The Ellipsis property.<br />
+ /// Enable or disable the ellipsis.<br />
+ /// Placeholder PropertyMap is used to add ellipsis to placeholder text.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ public bool Ellipsis
+ {
+ get
+ {
+ bool temp = false;
+ GetProperty(TextField.Property.ELLIPSIS).Get(out temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(TextField.Property.ELLIPSIS, new Tizen.NUI.PropertyValue(value));
+ }
+ }
+
+
}
}
\ No newline at end of file
internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get();
internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextLabel_Property_LINE_COUNT_get();
internal static readonly int LINE_WRAP_MODE = NDalicManualPINVOKE.TextLabel_Property_LINE_WRAP_MODE_get();
- internal static readonly int TEXT_COLOR_ANIMATABLE = NDalicPINVOKE.TextLabel_Property_TEXT_COLOR_ANIMATABLE_get();
}
/// <summary>
/// The TextColor property.<br />
/// The color of the text.<br />
+ /// Animation framework can be used to change the color of the text when not using mark up.<br />
+ /// Cannot animate the color when text is auto scrolling.<br />
/// </summary>
/// <since_tizen> 3 </since_tizen>
public Color TextColor
}
/// <summary>
- /// The TextColorAnimatable property.<br />
- /// The color of the text that can be animatated.<br />
- /// Animation framework can be used to change the color of the text when not using mark up.<br />
- /// Not possible when text is auto scrolling. <br />
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- public Color TextColorAnimatable
- {
- get
- {
- Color animatableColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
- GetProperty(TextLabel.Property.TEXT_COLOR_ANIMATABLE).Get(animatableColor);
- return animatableColor;
- }
- set
- {
- SetProperty(TextLabel.Property.TEXT_COLOR_ANIMATABLE, new Tizen.NUI.PropertyValue(value));
- }
- }
-
- /// <summary>
/// The line count of the text.
/// </summary>
/// <since_tizen> 4 </since_tizen>
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
{
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
/// <summary>
/// Adds a child view to this view.
/// </summary>
- /// <seealso cref="Container.Add">
- /// </seealso>
+ /// <seealso cref="Container.Add" />
/// <since_tizen> 4 </since_tizen>
public override void Add(View child)
{
NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ Children.Add(child);
}
/// <summary>
/// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
/// </summary>
- /// <seealso cref="Container.Remove">
- /// </seealso>
+ /// <seealso cref="Container.Remove" />
/// <since_tizen> 4 </since_tizen>
public override void Remove(View child)
{
NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ Children.Remove(child);
}
/// <summary>
/// Retrieves a child view by index.
/// </summary>
- /// <seealso cref="Container.GetChildAt">
- /// </seealso>
+ /// <seealso cref="Container.GetChildAt" />
/// <since_tizen> 4 </since_tizen>
public override View GetChildAt(uint index)
{
- IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
-
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
-
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret ?? null;
+ if (index < Children.Count)
+ {
+ return Children[Convert.ToInt32(index)];
+ }
+ else
+ {
+ return null;
+ }
}
/// <summary>
/// Retrieves the number of children held by the view.
/// </summary>
- /// <seealso cref="Container.GetChildCount">
- /// </seealso>
+ /// <seealso cref="Container.GetChildCount" />
protected override uint GetChildCount()
{
- uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return Convert.ToUInt32(Children.Count);
}
/// <summary>
/// <seealso cref="Container.GetParent()" />
protected override Container GetParent()
{
- Container ret;
IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
- if(basehandle is Layer)
- {
- ret = basehandle as Layer;
- }
- else
- {
- ret = basehandle as View;
- }
-
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+
+ return basehandle as Container;
}
/// <summary>
}
base.Dispose(type);
+
+ // Dispose all Children of this View.
+ foreach (View childView in Children)
+ {
+ childView?.Dispose();
+ }
+ Children.Clear();
}
private void DisConnectFromSignals()
internal void Raise()
{
+ var parentChildren = Parent?.Children;
+
+ if (parentChildren != null)
+ {
+ int currentIndex = parentChildren.IndexOf(this);
+
+ // If the view is not already the last item in the list.
+ if (currentIndex != parentChildren.Count -1)
+ {
+ View temp = parentChildren[currentIndex + 1];
+ parentChildren[currentIndex + 1] = this;
+ parentChildren[currentIndex] = temp;
+ }
+ }
+
NDalicPINVOKE.Raise(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
internal void Lower()
{
+ var parentChildren = Parent?.Children;
+
+ if (parentChildren != null)
+ {
+ int currentIndex = parentChildren.IndexOf(this);
+
+ // If the view is not already the first item in the list.
+ if (currentIndex > 0)
+ {
+ View temp = parentChildren[currentIndex - 1];
+ parentChildren[currentIndex - 1] = this;
+ parentChildren[currentIndex] = temp;
+ }
+ }
+
NDalicPINVOKE.Lower(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <since_tizen> 3 </since_tizen>
public void RaiseToTop()
{
+ var parentChildren = Parent?.Children;
+
+ if (parentChildren != null)
+ {
+ parentChildren.Remove(this);
+ parentChildren.Add(this);
+ }
+
NDalicPINVOKE.RaiseToTop(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <since_tizen> 3 </since_tizen>
public void LowerToBottom()
{
+ var parentChildren = Parent?.Children;
+
+ if (parentChildren != null)
+ {
+ parentChildren.Remove(this);
+ parentChildren.Insert(0, this);
+ }
+
NDalicPINVOKE.LowerToBottom(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <param name="target">Will be raised above this view.</param>
internal void RaiseAbove(View target)
{
+ var parentChildren = Parent?.Children;
+
+ if (parentChildren != null)
+ {
+ int currentIndex = parentChildren.IndexOf(this);
+ int targetIndex = parentChildren.IndexOf(target);
+
+ // If the currentIndex is less than the target index and the target has the same parent.
+ if (currentIndex < targetIndex)
+ {
+ parentChildren.Remove(this);
+ parentChildren.Insert(targetIndex, this);
+ }
+ }
+
NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <param name="target">Will be lowered below this view.</param>
internal void LowerBelow(View target)
{
- NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
+ var parentChildren = Parent?.Children;
+
+ if (parentChildren != null)
+ {
+ int currentIndex = parentChildren.IndexOf(this);
+ int targetIndex = parentChildren.IndexOf(target);
+
+ // If the currentIndex is not already the 0th index and the target has the same parent.
+ if ((currentIndex != 0) && (targetIndex != -1) &&
+ (currentIndex > targetIndex))
+ {
+ parentChildren.Remove(this);
+ parentChildren.Insert(targetIndex, this);
+ }
+ }
+
+ NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 4 </since_tizen>
public void Unparent()
{
- NDalicPINVOKE.Actor_Unparent(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ GetParent()?.Remove(this);
}
/// <summary>
return ClippingModeType.Disabled;
case "CLIP_CHILDREN":
return ClippingModeType.ClipChildren;
+ case "CLIP_TO_BOUNDING_BOX":
+ return ClippingModeType.ClipToBoundingBox;
default:
return ClippingModeType.Disabled;
}
public static Color operator +(Color arg1, Color arg2)
{
Color result = arg1.Add(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static Color operator -(Color arg1, Color arg2)
{
Color result = arg1.Subtract(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static Color operator -(Color arg1)
{
Color result = arg1.Subtract();
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static Color operator *(Color arg1, Color arg2)
{
Color result = arg1.Multiply(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static Color operator*(Color arg1, float arg2)
{
Color result = arg1.Multiply(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static Color operator /(Color arg1, Color arg2)
{
Color result = arg1.Divide(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static Color operator/(Color arg1, float arg2)
{
Color result = arg1.Divide(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
/// <param name="b">The blue component.</param>
/// <param name="a">The alpha component.</param>
/// <since_tizen> 3 </since_tizen>
- public Color(float r, float g, float b, float a) : this(NDalicPINVOKE.new_Vector4__SWIG_1(r, g, b, a), true)
+ public Color(float r, float g, float b, float a) : this(NDalicPINVOKE.new_Vector4__SWIG_1(ValueCheck(r), ValueCheck(g), ValueCheck(b), ValueCheck(a)), true)
{
- ValueCheck(ref r);
- ValueCheck(ref g);
- ValueCheck(ref b);
- ValueCheck(ref a);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// </summary>
/// <param name="array">array Array of R,G,B,A.</param>
/// <since_tizen> 3 </since_tizen>
- public Color(float[] array) : this(NDalicPINVOKE.new_Vector4__SWIG_2(array), true)
+ public Color(float[] array) : this(NDalicPINVOKE.new_Vector4__SWIG_2(ValueCheck(array)), true)
{
- ValueCheck(ref array[0]);
- ValueCheck(ref array[1]);
- ValueCheck(ref array[2]);
- ValueCheck(ref array[3]);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
{
set
{
- ValueCheck(ref value);
- NDalicPINVOKE.Vector4_r_set(swigCPtr, value);
+ NDalicPINVOKE.Vector4_r_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
set
{
- ValueCheck(ref value);
- NDalicPINVOKE.Vector4_g_set(swigCPtr, value);
+ NDalicPINVOKE.Vector4_g_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
set
{
- ValueCheck(ref value);
- NDalicPINVOKE.Vector4_b_set(swigCPtr, value);
+ NDalicPINVOKE.Vector4_b_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
set
{
- ValueCheck(ref value);
- NDalicPINVOKE.Vector4_a_set(swigCPtr, value);
+ NDalicPINVOKE.Vector4_a_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
return new Color(vec.R, vec.G, vec.B, vec.A);
}
- internal static void ValueCheck(Color color)
+ internal static Color ValueCheck(Color color)
{
if (color.R < 0.0f)
{
color.R = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if (color.R > 1.0f)
{
color.R = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
if (color.G < 0.0f)
{
color.G = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if (color.G > 1.0f)
{
color.G = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
if (color.B < 0.0f)
{
color.B = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if (color.B > 1.0f)
{
color.B = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
if (color.A < 0.0f)
{
color.A = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if (color.A > 1.0f)
{
color.A = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
+ return color;
}
- internal static void ValueCheck(ref float value)
+ internal static float ValueCheck(float value)
{
if (value < 0.0f)
{
value = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Parameters is invalid! Should be between [0, 1].");
}
else if (value > 1.0f)
{
value = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Parameters is invalid! Should be between [0, 1].");
}
+ return value;
+ }
+
+ internal static float[] ValueCheck(float[] arr)
+ {
+ for(int i = 0; i < arr.Length; i++)
+ {
+ if (arr[i] < 0.0f)
+ {
+ arr[i] = 0.0f;
+ NUILog.Error( "The value of Parameters is invalid! Should be between [0, 1].");
+ }
+ else if (arr[i] > 1.0f)
+ {
+ arr[i] = 1.0f;
+ NUILog.Error( "The value of Parameters is invalid! Should be between [0, 1].");
+ }
+ }
+ return arr;
}
}
}
+
*/
using System;
+using System.Collections.Generic;
using Tizen.NUI.BaseComponents;
namespace Tizen.NUI
{
/// <summary>
- ///
/// The Container is an abstract class to be inherited from by classes that desire to have views
/// added to them.
- ///
/// </summary>
public abstract class Container : Animatable
{
+ private List<View> _childViews = new List<View>();
+
+ /// <summary>
+ /// List of children of Container.
+ /// </summary>
+ public List<View> Children
+ {
+ get
+ {
+ return _childViews;
+ }
+ }
+
internal Container(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
// No un-managed data hence no need to store a native ptr
}
}
}
-} // namespace Tizen.NUI
\ No newline at end of file
+} // namespace Tizen.NUI
}
/// <summary>
+ /// Finalize the IMF.<br/>
+ /// </summary>
+ public void Finalize()
+ {
+ NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
/// Retrieves a handle to the instance of the ImfManager.
/// </summary>
/// <returns>A handle to the ImfManager.</returns>
}
/// <summary>
- /// the device class the key event originated from.
+ /// Get the device class the key event originated from.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public DeviceClassType DeviceClass
}
}
+ /// <summary>
+ /// Get the device subclass the key event originated from.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ public DeviceSubClassType DeviceSubClass
+ {
+ get
+ {
+ int ret = NDalicPINVOKE.GetDeviceSubClass(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return (DeviceSubClassType)ret;
+ }
+ }
/// <summary>
/// The default constructor.
NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ Children.Add(child);
}
/// <summary>
NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ Children.Remove(child);
}
/// <summary>
/// <since_tizen> 4 </since_tizen>
public override View GetChildAt(uint index)
{
- System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
-
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
-
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
- return ret ?? null;
+ if (index < Children.Count)
+ {
+ return Children[Convert.ToInt32(index)];
+ }
+ else
+ {
+ return null;
+ }
}
+
/// <summary>
/// Get parent of the layer.
/// </summary>
/// <since_tizen> 3 </since_tizen>
protected override uint GetChildCount()
{
- uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return Convert.ToUInt32(Children.Count);
}
/// <summary>
}
base.Dispose(type);
+
+ // Dispose all Children of this Layer.
+ foreach (View childView in Children)
+ {
+ childView?.Dispose();
+ }
+ Children.Clear();
}
/// <summary>
/// This actor will clip all children to within its boundaries (the actor will also be visible itself).
/// </summary>
- ClipChildren
+ ClipChildren,
+ /// <summary>
+ /// This Actor will clip all children within a screen-aligned rectangle encompassing its boundaries (the actor will also be visible itself).
+ /// </summary>
+ ClipToBoundingBox
}
/// <summary>
LastViewBehaviourFlag
}
+ /// <summary>
+ /// An enum of Device Class types.
+ /// </summary>
/// <since_tizen> 3 </since_tizen>
public enum DeviceClassType
{
}
/// <summary>
+ /// An enum of Device Subclass types.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ public enum DeviceSubClassType
+ {
+ /// <summary>
+ /// Not a device
+ /// </summary>
+ None,
+ /// <summary>
+ /// The normal flat of your finger
+ /// </summary>
+ Finger,
+ /// <summary>
+ /// A fingernail
+ /// </summary>
+ Fingernail,
+ /// <summary>
+ /// A Knuckle
+ /// </summary>
+ Knuckle,
+ /// <summary>
+ /// The palm of a users hand
+ /// </summary>
+ Palm,
+ /// <summary>
+ /// The side of your hand
+ /// </summary>
+ HandSide,
+ /// <summary>
+ /// The flat of your hand
+ /// </summary>
+ HandFlat,
+ /// <summary>
+ /// The tip of a pen
+ /// </summary>
+ PenTip,
+ /// <summary>
+ /// A trackpad style mouse
+ /// </summary>
+ Trackpad,
+ /// <summary>
+ /// A trackpoint style mouse
+ /// </summary>
+ Trackpoint,
+ /// <summary>
+ /// A trackball style mouse
+ /// </summary>
+ Trackball,
+ /// <summary>
+ /// A remote controller
+ /// </summary>
+ Remocon,
+ /// <summary>
+ /// A virtual keyboard
+ /// </summary>
+ VirtualKeyboard
+ }
+
+ /// <summary>
/// This specifies all the property types.<br />
/// Enumeration for the property types supported.
/// </summary>
/// <summary>
/// Hide last character after this duration, available when SHOW_LAST_CHARACTER mode.
/// </summary>
- public static readonly int ShowDuration = NDalicManualPINVOKE.HIDDENINPUT_PROPERTY_SHOW_DURATION_get();
+ public static readonly int ShowLastCharacterDuration = NDalicManualPINVOKE.HIDDENINPUT_PROPERTY_SHOW_LAST_CHARACTER_DURATION_get();
}
/// <summary>
/// </summary>
ShowCount,
/// <summary>
- /// Show last character for the duration (use ShowDuration property to modify duration).
+ /// Show last character for the duration(use ShowLastCharacterDuration property to modify duration).
/// </summary>
ShowLastCharacter
}
/// An enum of screen mode.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public enum ScreenMode {
+ public enum ScreenOffMode {
/// <summary>
/// The mode which turns the screen off after a timeout.
/// </summary>
- Default,
+ Timout,
/// <summary>
/// The mode which keeps the screen turned on.
/// </summary>
- AlwaysOn
+ Never
}
/// <summary>
namespace Tizen.NUI
{
+
+ using System;
+
/// <summary>
/// The gesture state.
/// </summary>
}
/// <summary>
- /// Equality operator
+ /// Equality operator.
/// </summary>
+ /// <param name="a">First operand</param>
+ /// <param name="b">Second operand</param>
+ /// <returns>True if the values are identical</returns>
/// <since_tizen> 3 </since_tizen>
public static bool operator ==(PaddingType a, PaddingType b)
{
}
// Return true if the fields match:
- return (System.Math.Abs(a.Left - b.Left) < NDalic.GetRangedEpsilon(a.Left, b.Left)) &&
- (System.Math.Abs(a.Right - b.Right) < NDalic.GetRangedEpsilon(a.Right, b.Right)) &&
+ return (System.Math.Abs(a.Start- b.Start) < NDalic.GetRangedEpsilon(a.Start, b.Start)) &&
+ (System.Math.Abs(a.End - b.End) < NDalic.GetRangedEpsilon(a.End, b.End)) &&
(System.Math.Abs(a.Bottom - b.Bottom) < NDalic.GetRangedEpsilon(a.Bottom, b.Bottom)) &&
(System.Math.Abs(a.Top - b.Top) < NDalic.GetRangedEpsilon(a.Top, b.Top));
}
/// <summary>
- /// Inequality operator. Returns Null if either operand is Null
+ /// Inequality operator.
/// </summary>
+ /// <param name="a">First operand</param>
+ /// <param name="b">Second operand</param>
+ /// <returns>True if the values are not identical</returns>
/// <since_tizen> 3 </since_tizen>
public static bool operator !=(PaddingType a, PaddingType b)
{
PaddingType p = (PaddingType)o;
// Return true if the fields match:
- return (System.Math.Abs(Left - p.Left) < NDalic.GetRangedEpsilon(Left, p.Left)) &&
- (System.Math.Abs(Right - p.Right) < NDalic.GetRangedEpsilon(Right, p.Right)) &&
+ return (System.Math.Abs(Start- p.Start) < NDalic.GetRangedEpsilon(Start, p.Start)) &&
+ (System.Math.Abs(End - p.End) < NDalic.GetRangedEpsilon(End, p.End)) &&
(System.Math.Abs(Bottom - p.Bottom) < NDalic.GetRangedEpsilon(Bottom, p.Bottom)) &&
(System.Math.Abs(Top - p.Top) < NDalic.GetRangedEpsilon(Top, p.Top));
}
/// <summary>
/// The Left value.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
+ [Obsolete("Please do not use! this will be removed. please use Start instead")]
public float Left
{
set
}
/// <summary>
+ /// The Start value.
+ /// </summary>
+ public float Start
+ {
+ set
+ {
+ start = value;
+ }
+ get
+ {
+ return start;
+ }
+ }
+
+ /// <summary>
/// The Right value.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
+ [Obsolete("Please do not use! this will be removed. please use End instead")]
public float Right
{
set
}
/// <summary>
- /// The Bottom value.
+ /// The End value.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public float Bottom
+ public float End
{
set
{
- bottom = value;
+ end = value;
}
get
{
- return bottom;
+ return end;
}
}
}
/// <summary>
- /// Create an instance of paddingType.
+ /// The Bottom value.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true)
+ public float Bottom
{
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ set
+ {
+ bottom = value;
+ }
+ get
+ {
+ return bottom;
+ }
}
/// <summary>
- /// Create an instance of BaseHandle.
+ /// Creates an uninitialized PaddingType.
/// </summary>
- /// <param name="x">The x value.</param>
- /// <param name="y">The y value.</param>
- /// <param name="width">The width value.</param>
- /// <param name="height">The height value.</param>
/// <since_tizen> 3 </since_tizen>
- public PaddingType(float x, float y, float width, float height) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(x, y, width, height), true)
+ public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <summary>
- /// Set the x, y, width, height of this paddingtype.
+ /// PaddingType Constructor.
/// </summary>
- /// <param name="newX">The x value.</param>
- /// <param name="newY">The y value.</param>
- /// <param name="newWidth">The width value.</param>
- /// <param name="newHeight">The height value.</param>
- /// <since_tizen> 3 </since_tizen>
- public void Set(float newX, float newY, float newWidth, float newHeight)
+ /// <param name="start">Start padding or X coordinate</param>
+ /// <param name="end">End padding or Y coordinate</param>
+ /// <param name="top">Top padding or Height</param>
+ /// <param name="bottom">Bottom padding or Width</param>
+ public PaddingType(float start, float end, float top, float bottom) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(start, end, bottom, top), true)
{
- NDalicPINVOKE.PaddingType_Set(swigCPtr, newX, newY, newWidth, newHeight);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- private float x
+ /// <summary>
+ /// Assignment from individual values.
+ /// </summary>
+ /// <param name="newStart">Start padding or X coordinate</param>
+ /// <param name="newEnd">End padding or Y coordinate</param>
+ /// <param name="newTop">Top padding or Height</param>
+ /// <param name="newBottom">Bottom padding or Width</param>
+ public void Set(float newStart, float newEnd, float newTop, float newBottom)
{
- set
- {
- NDalicPINVOKE.PaddingType_x_set(swigCPtr, value);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
- get
- {
- float ret = NDalicPINVOKE.PaddingType_x_get(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
+ NDalicPINVOKE.PaddingType_Set(swigCPtr, newStart, newEnd, newBottom, newTop);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
private float left
}
}
- private float y
+ private float start
{
set
{
- NDalicPINVOKE.PaddingType_y_set(swigCPtr, value);
+ NDalicPINVOKE.PaddingType_start_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = NDalicPINVOKE.PaddingType_y_get(swigCPtr);
+ float ret = NDalicPINVOKE.PaddingType_start_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
}
- private float width
+ private float end
{
set
{
- NDalicPINVOKE.PaddingType_width_set(swigCPtr, value);
+ NDalicPINVOKE.PaddingType_end_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = NDalicPINVOKE.PaddingType_width_get(swigCPtr);
+ float ret = NDalicPINVOKE.PaddingType_end_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
- private float bottom
- {
- set
- {
- NDalicPINVOKE.PaddingType_bottom_set(swigCPtr, value);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
- get
- {
- float ret = NDalicPINVOKE.PaddingType_bottom_get(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- private float height
+ private float top
{
set
{
- NDalicPINVOKE.PaddingType_height_set(swigCPtr, value);
+ NDalicPINVOKE.PaddingType_top_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = NDalicPINVOKE.PaddingType_height_get(swigCPtr);
+ float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
- private float top
+ private float bottom
{
set
{
- NDalicPINVOKE.PaddingType_top_set(swigCPtr, value);
+ NDalicPINVOKE.PaddingType_bottom_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr);
+ float ret = NDalicPINVOKE.PaddingType_bottom_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
-
}
}
\ No newline at end of file
public static RelativeVector2 operator +(RelativeVector2 arg1, RelativeVector2 arg2)
{
RelativeVector2 result = arg1.Add(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector2 operator -(RelativeVector2 arg1, RelativeVector2 arg2)
{
RelativeVector2 result = arg1.Subtract(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector2 operator *(RelativeVector2 arg1, RelativeVector2 arg2)
{
RelativeVector2 result = arg1.Multiply(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector2 operator *(RelativeVector2 arg1, float arg2)
{
RelativeVector2 result = arg1.Multiply(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector2 operator /(RelativeVector2 arg1, RelativeVector2 arg2)
{
RelativeVector2 result = arg1.Divide(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector2 operator /(RelativeVector2 arg1, float arg2)
{
RelativeVector2 result = arg1.Divide(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <param name="x">The x component.</param>
/// <param name="y">The y component.</param>
/// <since_tizen> 3 </since_tizen>
- public RelativeVector2(float x, float y) : this(NDalicPINVOKE.new_Vector2__SWIG_1(x, y), true)
+ public RelativeVector2(float x, float y) : this(NDalicPINVOKE.new_Vector2__SWIG_1(ValueCheck(x), ValueCheck(y)), true)
{
- ValueCheck(x);
- ValueCheck(y);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
{
set
{
- ValueCheck(value);
- NDalicPINVOKE.Vector2_X_set(swigCPtr, value);
+ NDalicPINVOKE.Vector2_X_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
set
{
- ValueCheck(value);
- NDalicPINVOKE.Vector2_Y_set(swigCPtr, value);
+ NDalicPINVOKE.Vector2_Y_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
/// <since_tizen> 3 </since_tizen>
public static implicit operator RelativeVector2(Vector2 vec)
{
- ValueCheck(vec.X);
- ValueCheck(vec.Y);
- return new RelativeVector2(vec.X, vec.Y);
+ return new RelativeVector2(ValueCheck(vec.X), ValueCheck(vec.Y));
}
- internal static void ValueCheck(RelativeVector2 relativeVector2)
+ internal static RelativeVector2 ValueCheck(RelativeVector2 relativeVector2)
{
if(relativeVector2.X < 0.0f)
{
relativeVector2.X = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if(relativeVector2.X > 1.0f)
{
relativeVector2.X = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
if(relativeVector2.Y < 0.0f)
{
relativeVector2.Y = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if(relativeVector2.Y > 1.0f)
{
relativeVector2.Y = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
+ return relativeVector2;
}
- internal static void ValueCheck(float value)
+ internal static float ValueCheck(float value)
{
if(value < 0.0f)
{
value = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Parameters is invalid! Should be between [0, 1].");
}
else if(value > 1.0f)
{
value = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Parameters is invalid! Should be between [0, 1].");
}
+ return value;
}
}
}
+
public static RelativeVector3 operator +(RelativeVector3 arg1, RelativeVector3 arg2)
{
RelativeVector3 result = arg1.Add(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector3 operator -(RelativeVector3 arg1, RelativeVector3 arg2)
{
RelativeVector3 result = arg1.Subtract(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector3 operator *(RelativeVector3 arg1, RelativeVector3 arg2)
{
RelativeVector3 result = arg1.Multiply(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector3 operator *(RelativeVector3 arg1, float arg2)
{
RelativeVector3 result = arg1.Multiply(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector3 operator /(RelativeVector3 arg1, RelativeVector3 arg2)
{
RelativeVector3 result = arg1.Divide(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector3 operator /(RelativeVector3 arg1, float arg2)
{
RelativeVector3 result = arg1.Divide(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <param name="y">The y component.</param>
/// <param name="z">The z component.</param>
/// <since_tizen> 3 </since_tizen>
- public RelativeVector3(float x, float y, float z) : this(NDalicPINVOKE.new_Vector3__SWIG_1(x, y, z), true)
+ public RelativeVector3(float x, float y, float z) : this(NDalicPINVOKE.new_Vector3__SWIG_1(ValueCheck(x), ValueCheck(y), ValueCheck(z)), true)
{
- ValueCheck(x);
- ValueCheck(y);
- ValueCheck(z);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
{
set
{
- ValueCheck(value);
- NDalicPINVOKE.Vector3_X_set(swigCPtr, value);
+ NDalicPINVOKE.Vector3_X_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
set
{
- ValueCheck(value);
- NDalicPINVOKE.Vector3_Y_set(swigCPtr, value);
+ NDalicPINVOKE.Vector3_Y_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
set
{
- ValueCheck(value);
- NDalicPINVOKE.Vector3_Z_set(swigCPtr, value);
+ NDalicPINVOKE.Vector3_Z_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
/// <since_tizen> 3 </since_tizen>
public static implicit operator RelativeVector3(Vector3 vec)
{
- ValueCheck(vec.X);
- ValueCheck(vec.Y);
- ValueCheck(vec.Z);
- return new RelativeVector3(vec.X, vec.Y, vec.Z);
+ return new RelativeVector3(ValueCheck(vec.X), ValueCheck(vec.Y), ValueCheck(vec.Z));
}
- internal static void ValueCheck(RelativeVector3 relativeVector3)
+ internal static RelativeVector3 ValueCheck(RelativeVector3 relativeVector3)
{
if(relativeVector3.X < 0.0f)
{
relativeVector3.X = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if(relativeVector3.X > 1.0f)
{
relativeVector3.X = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
if(relativeVector3.Y < 0.0f)
{
relativeVector3.Y = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if(relativeVector3.Y > 1.0f)
{
relativeVector3.Y = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
if(relativeVector3.Z < 0.0f)
{
relativeVector3.Z = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if(relativeVector3.Z > 1.0f)
{
relativeVector3.Z = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
+ return relativeVector3;
}
- internal static void ValueCheck(float value)
+ internal static float ValueCheck(float value)
{
if(value < 0.0f)
{
value = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Parameters is invalid! Should be between [0, 1].");
}
else if(value > 1.0f)
{
value = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Parameters is invalid! Should be between [0, 1].");
}
+ return value;
}
}
}
+
public static RelativeVector4 operator +(RelativeVector4 arg1, RelativeVector4 arg2)
{
RelativeVector4 result = arg1.Add(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector4 operator -(RelativeVector4 arg1, RelativeVector4 arg2)
{
RelativeVector4 result = arg1.Subtract(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector4 operator *(RelativeVector4 arg1, RelativeVector4 arg2)
{
RelativeVector4 result = arg1.Multiply(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector4 operator *(RelativeVector4 arg1, float arg2)
{
RelativeVector4 result = arg1.Multiply(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector4 operator /(RelativeVector4 arg1, RelativeVector4 arg2)
{
RelativeVector4 result = arg1.Divide(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <summary>
public static RelativeVector4 operator /(RelativeVector4 arg1, float arg2)
{
RelativeVector4 result = arg1.Divide(arg2);
- ValueCheck(result);
- return result;
+ return ValueCheck(result);
}
/// <param name="z">The z component.</param>
/// <param name="w">The w component.</param>
/// <since_tizen> 3 </since_tizen>
- public RelativeVector4(float x, float y, float z, float w) : this(NDalicPINVOKE.new_Vector4__SWIG_1(x, y, z, w), true)
+ public RelativeVector4(float x, float y, float z, float w) : this(NDalicPINVOKE.new_Vector4__SWIG_1(ValueCheck(x), ValueCheck(y),ValueCheck(z), ValueCheck(w)), true)
{
- ValueCheck(x);
- ValueCheck(y);
- ValueCheck(z);
- ValueCheck(W);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
{
set
{
- ValueCheck(value);
- NDalicPINVOKE.Vector4_X_set(swigCPtr, value);
+ NDalicPINVOKE.Vector4_X_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
set
{
- ValueCheck(value);
- NDalicPINVOKE.Vector4_Y_set(swigCPtr, value);
+ NDalicPINVOKE.Vector4_Y_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
set
{
- ValueCheck(value);
- NDalicPINVOKE.Vector4_Z_set(swigCPtr, value);
+ NDalicPINVOKE.Vector4_Z_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
set
{
- ValueCheck(value);
- NDalicPINVOKE.Vector4_W_set(swigCPtr, value);
+ NDalicPINVOKE.Vector4_W_set(swigCPtr, ValueCheck(value));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
/// <since_tizen> 3 </since_tizen>
public static implicit operator RelativeVector4(Vector4 vec)
{
- ValueCheck(vec.X);
- ValueCheck(vec.Y);
- ValueCheck(vec.Z);
- ValueCheck(vec.W);
- return new RelativeVector4(vec.X, vec.Y, vec.Z, vec.W);
+ return new RelativeVector4(ValueCheck(vec.X), ValueCheck(vec.Y), ValueCheck(vec.Z), ValueCheck(vec.W));
}
- internal static void ValueCheck(RelativeVector4 relativeVector4)
+ internal static RelativeVector4 ValueCheck(RelativeVector4 relativeVector4)
{
if(relativeVector4.X < 0.0f)
{
relativeVector4.X = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if(relativeVector4.X > 1.0f)
{
relativeVector4.X = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
if(relativeVector4.Y < 0.0f)
{
relativeVector4.Y = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if(relativeVector4.Y > 1.0f)
{
relativeVector4.Y = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
if(relativeVector4.Z < 0.0f)
{
relativeVector4.Z = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if(relativeVector4.Z > 1.0f)
{
relativeVector4.Z = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
if(relativeVector4.W < 0.0f)
{
relativeVector4.W = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
else if(relativeVector4.W > 1.0f)
{
relativeVector4.W = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Result is invalid! Should be between [0, 1].");
}
+ return relativeVector4;
}
- internal static void ValueCheck(float value)
+ internal static float ValueCheck(float value)
{
if(value < 0.0f)
{
value = 0.0f;
- Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Parameters is invalid! Should be between [0, 1].");
}
else if(value > 1.0f)
{
value = 1.0f;
- Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+ NUILog.Error( "The value of Parameters is invalid! Should be between [0, 1].");
}
+ return value;
}
}
-
}
+
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// The WatchTime class is used to get time for the WatchApplication.<br/>
+ /// A WatchTime has a time handle from watch application framework.<br/>
+ /// You can get time(hour, minute, second, millisecond) and date(year, month, day)<br/>
+ /// on receiving timeTick signal.
+ /// </summary>
+ public class WatchTime : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ /// <summary>
+ /// swigCMemOwn.
+ /// </summary>
+ protected bool swigCMemOwn;
+
+ internal WatchTime(global::System.IntPtr cPtr, bool cMemoryOwn)
+ {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WatchTime obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ //A Flag to check who called Dispose(). (By User or DisposeQueue)
+ private bool isDisposeQueued = false;
+
+ /// <summary>
+ /// A Flat to check if it is already disposed.
+ /// </summary>
+ protected bool disposed = false;
+
+ /// <summary>
+ /// Distructor.
+ /// </summary>
+ ~WatchTime()
+ {
+ if (!isDisposeQueued)
+ {
+ isDisposeQueued = true;
+ DisposeQueue.Instance.Add(this);
+ }
+ }
+
+ /// <summary>
+ /// To make watch time instance be disposed.
+ /// </summary>
+ public void Dispose()
+ {
+ //Throw excpetion if Dispose() is called in separate thread.
+ if (!Window.IsInstalled())
+ {
+ throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+ }
+
+ if (isDisposeQueued)
+ {
+ Dispose(DisposeTypes.Implicit);
+ }
+ else
+ {
+ Dispose(DisposeTypes.Explicit);
+ System.GC.SuppressFinalize(this);
+ }
+ }
+
+ /// <summary>
+ /// you can override it to clean-up your own resources.
+ /// </summary>
+ /// <param name="type">DisposeTypes</param>
+ /// <since_tizen> 3 </since_tizen>
+ protected virtual void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WatchTime(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ disposed = true;
+ }
+
+ internal static WatchTime GetWatchTimeFromPtr(global::System.IntPtr cPtr)
+ {
+ WatchTime ret = new WatchTime(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ public WatchTime() : this(NDalicManualPINVOKE.new_WatchTime(), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Get the current hour.
+ /// </summary>
+ /// <remarks>The return value is always positive.The WatchTime needs to be initialized.</remarks>
+ public int Hour
+ {
+ get
+ {
+ return GetHour();
+ }
+ }
+
+ internal int GetHour()
+ {
+ int ret = NDalicManualPINVOKE.WatchTime_GetHour(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the current hour24.
+ /// </summary>
+ /// <remarks>The return value is always positive.The WatchTime needs to be initialized.</remarks>
+ public int Hour24
+ {
+ get
+ {
+ return GetHour24();
+ }
+ }
+
+ internal int GetHour24()
+ {
+ int ret = NDalicManualPINVOKE.WatchTime_GetHour24(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the current minute.
+ /// </summary>
+ /// <remarks>The return value is always positive.The WatchTime needs to be initialized.</remarks>
+ public int Minute
+ {
+ get
+ {
+ return GetMinute();
+ }
+ }
+
+ internal int GetMinute()
+ {
+ int ret = NDalicManualPINVOKE.WatchTime_GetMinute(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the current second.
+ /// </summary>
+ /// <remarks>The return value is always positive.The WatchTime needs to be initialized.</remarks>
+ public int Second
+ {
+ get
+ {
+ return GetSecond();
+ }
+ }
+
+ internal int GetSecond()
+ {
+ int ret = NDalicManualPINVOKE.WatchTime_GetSecond(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the current millisecond.
+ /// </summary>
+ /// <remarks>The return value is always positive.The WatchTime needs to be initialized.</remarks>
+ public int Millisecond
+ {
+ get
+ {
+ return GetMillisecond();
+ }
+ }
+
+ internal int GetMillisecond()
+ {
+ int ret = NDalicManualPINVOKE.WatchTime_GetMillisecond(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the current year.
+ /// </summary>
+ /// <remarks>The return value is always positive.The WatchTime needs to be initialized.</remarks>
+ public int Year
+ {
+ get
+ {
+ return GetYear();
+ }
+ }
+
+ internal int GetYear()
+ {
+ int ret = NDalicManualPINVOKE.WatchTime_GetYear(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the current month.
+ /// </summary>
+ /// <remarks>The return value is always positive.The WatchTime needs to be initialized.</remarks>
+ public int Month
+ {
+ get
+ {
+ return GetMonth();
+ }
+ }
+
+ internal int GetMonth()
+ {
+ int ret = NDalicManualPINVOKE.WatchTime_GetMonth(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the current day.
+ /// </summary>
+ /// <remarks>The return value is always positive.The WatchTime needs to be initialized.</remarks>
+ public int Day
+ {
+ get
+ {
+ return GetDay();
+ }
+ }
+
+ internal int GetDay()
+ {
+ int ret = NDalicManualPINVOKE.WatchTime_GetDay(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the current week.
+ /// </summary>
+ /// <remarks>The return value is always positive.The WatchTime needs to be initialized.</remarks>
+ public int DayOfWeek
+ {
+ get
+ {
+ return GetDayOfWeek();
+ }
+ }
+
+ internal int GetDayOfWeek()
+ {
+ int ret = NDalicManualPINVOKE.WatchTime_GetDayOfWeek(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ internal SWIGTYPE_p_tm GetUtcTime()
+ {
+ SWIGTYPE_p_tm ret = new SWIGTYPE_p_tm(NDalicManualPINVOKE.WatchTime_GetUtcTime(swigCPtr), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ internal SWIGTYPE_p_time_t GetUtcTimeStamp()
+ {
+ SWIGTYPE_p_time_t ret = new SWIGTYPE_p_time_t(NDalicManualPINVOKE.WatchTime_GetUtcTimeStamp(swigCPtr), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the ID of timezone.
+ /// </summary>
+ /// <remarks>
+ /// The WatchTime needs to be initialized.<br/>
+ /// The timezone ID, according to the IANA(Internet Assigned Numbers Authority)<br/>
+ /// If you want to see more information, please refer to the site :<br/>
+ /// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones/
+ /// </remarks>
+ public string TimeZone
+ {
+ get
+ {
+ return GetTimeZone();
+ }
+ }
+
+ internal string GetTimeZone()
+ {
+ string ret = NDalicManualPINVOKE.WatchTime_GetTimeZone(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get the daylight saving time status.
+ /// </summary>
+ /// <remarks>The WatchTime needs to be initialized.</remarks>
+ public bool DaylightSavingTimeStatus
+ {
+ get
+ {
+ return GetDaylightSavingTimeStatus();
+ }
+ }
+
+ internal bool GetDaylightSavingTimeStatus()
+ {
+ bool ret = NDalicManualPINVOKE.WatchTime_GetDaylightSavingTimeStatus(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Runtime.InteropServices;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI {
+
+/// <summary>
+/// WebViewLite.
+/// </summary>
+public class WebViewLite : View
+{
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ internal WebViewLite(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.WebViewLite_SWIGUpcast(cPtr), cMemoryOwn) {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebViewLite obj) {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ /// <summary>
+ /// To make Button instance be disposed.
+ /// </summary>
+ protected override void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ DisConnectFromSignals();
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicPINVOKE.delete_WebViewLite(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ base.Dispose(type);
+ }
+
+ private void DisConnectFromSignals()
+ {
+ // Save current CPtr.
+ global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
+
+ // Use BaseHandle CPtr as current might have been deleted already in derived classes.
+ swigCPtr = GetBaseHandleCPtrHandleRef;
+
+ if (_loadingFinishedEventCallback != null)
+ {
+ FinishedSignal().Disconnect(_loadingFinishedEventCallback);
+ }
+
+ // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
+ // Restore current CPtr.
+ swigCPtr = currentCPtr;
+ }
+
+ private LoadingFinishedCallbackType _loadingFinishedEventCallback;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void LoadingFinishedCallbackType(global::System.IntPtr data);
+ private EventHandler _loadingFinishedEventHandler;
+
+ /// <summary>
+ /// Web View loading finished event.
+ /// </summary>
+ public event EventHandler LoadingFinished
+ {
+ add
+ {
+ if (_loadingFinishedEventHandler == null)
+ {
+ NUILog.Debug("[add before]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+ _loadingFinishedEventCallback = OnFinished;
+ FinishedSignal().Connect(_loadingFinishedEventCallback);
+ NUILog.Debug("[add after]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+ }
+ _loadingFinishedEventHandler += value;
+ }
+ remove
+ {
+ _loadingFinishedEventHandler -= value;
+
+ if (_loadingFinishedEventHandler == null && FinishedSignal().Empty() == false)
+ {
+ NUILog.Debug("[remove before]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+ FinishedSignal().Disconnect(_loadingFinishedEventCallback);
+ NUILog.Debug("[remove after]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+ }
+ }
+ }
+ private void OnFinished(IntPtr data)
+ {
+ if (_loadingFinishedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _loadingFinishedEventHandler(this, null);
+ }
+ }
+
+ /// <summary>
+ /// Creates an uninitialized WebViewLite.
+ /// </summary>
+ public WebViewLite () : this (NDalicPINVOKE.WebViewLite_New(), true) {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ }
+
+ /// <summary>
+ /// Copy constructor.
+ /// <param name="webViewLite">WebViewLite to copy. The copied WebViewLite will point at the same implementation</param>
+ /// </summary>
+ public WebViewLite(WebViewLite webViewLite) : this(NDalicPINVOKE.new_WebViewLite__SWIG_1(WebViewLite.getCPtr(webViewLite)), true) {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal WebViewLite Assign(WebViewLite webViewLite) {
+ WebViewLite ret = new WebViewLite(NDalicPINVOKE.WebViewLite_Assign(swigCPtr, WebViewLite.getCPtr(webViewLite)), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ internal new static WebViewLite DownCast(BaseHandle handle) {
+ WebViewLite ret = new WebViewLite(NDalicPINVOKE.WebViewLite_DownCast(BaseHandle.getCPtr(handle)), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Creates an internal web view instance (e.g. minimized web engine instance).
+ /// <param name="width">The width of Web</param>
+ /// <param name="height">The height of Web</param>
+ /// <param name="windowX">The x position of window</param>
+ /// <param name="windowY">The y position of window</param>
+ /// <param name="locale">The locale of Web</param>
+ /// <param name="timezoneID">The timezoneID of Web</param>
+ /// </summary>
+ public void CreateInstance(int width, int height, int windowX, int windowY, string locale, string timezoneID) {
+ NDalicPINVOKE.WebViewLite_CreateInstance(swigCPtr, width, height, windowX, windowY, locale, timezoneID);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Destroys an internal web view instance (e.g. minimized web engine instance).
+ /// </summary>
+ public void DestroyInstance() {
+ NDalicPINVOKE.WebViewLite_DestroyInstance(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Loads a html file.
+ /// <param name="path">The path of Web</param>
+ /// </summary>
+ public void LoadHtml(string path) {
+ NDalicPINVOKE.WebViewLite_LoadHtml(swigCPtr, path);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal WebViewLiteSignal FinishedSignal() {
+ WebViewLiteSignal ret = new WebViewLiteSignal(NDalicPINVOKE.WebViewLite_FinishedSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+}
+
+}
}
/// <summary>
- /// Sets a window's screen mode.
+ /// Sets a window's screen off mode.
/// </summary>
- /// <param name="screenMode">The screen mode.</param>
+ /// <param name="screenOffMode">The screen mode.</param>
/// <returns>True if no error occurred, false otherwise.</returns>
/// <since_tizen> 3 </since_tizen>
- public bool SetScreenMode(ScreenMode screenMode) {
- bool ret = NDalicPINVOKE.SetScreenMode(swigCPtr, (int)screenMode);
+ public bool SetScreenOffMode(ScreenOffMode screenOffMode) {
+ bool ret = NDalicPINVOKE.SetScreenOffMode(swigCPtr, (int)screenOffMode);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <summary>
/// Gets the screen mode of the window.
/// </summary>
- /// <returns>The screen mode.</returns>
+ /// <returns>The screen off mode.</returns>
/// <since_tizen> 3 </since_tizen>
- public ScreenMode GetScreenMode() {
- ScreenMode ret = (ScreenMode)NDalicPINVOKE.GetScreenMode(swigCPtr);
+ public ScreenOffMode GetScreenOffMode() {
+ ScreenOffMode ret = (ScreenOffMode)NDalicPINVOKE.GetScreenOffMode(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public void Add(View view)
{
- NDalicPINVOKE.Stage_Add(stageCPtr, View.getCPtr(view));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ GetRootLayer()?.Add(view);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public void Remove(View view)
{
- NDalicPINVOKE.Stage_Remove(stageCPtr, View.getCPtr(view));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ GetRootLayer()?.Remove(view);
}
internal Vector2 GetSize()
internal Layer GetRootLayer()
{
- if (_rootLayer == null)
+ // Window.IsInstalled() is actually true only when called from event thread and
+ // Core has been initialized, not when Stage is ready.
+ if (_rootLayer == null && Window.IsInstalled())
+ {
_rootLayer = new Layer(NDalicPINVOKE.Stage_GetRootLayer(stageCPtr), true);
-
-
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
return _rootLayer;
}