--- /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 AppSignalType : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal AppSignalType(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(AppSignalType 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;
+
+ ~AppSignalType()
+ {
+ 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)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_AppSignalType(swigCPtr);
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ disposed = true;
+ }
+
+ public bool Empty()
+ {
+ bool ret = NDalicManualPINVOKE.AppSignalType_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicManualPINVOKE.AppSignalType_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.AppSignalType_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.AppSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Emit(WidgetApplication arg)
+ {
+ NDalicManualPINVOKE.AppSignalType_Emit(swigCPtr, WidgetApplication.getCPtr(arg));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public AppSignalType() : this(NDalicManualPINVOKE.new_AppSignalType(), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+}
{
NUILog.Debug("New(string[] args) is called!");
int argc = args.Length;
- string argvStr = "";
- for (int index = 0; index < args.Length; index++)
- {
- if(index == (args.Length - 1))
- {
- argvStr = argvStr + args[index];
- }
- else
- {
- argvStr = argvStr + args[index] + " ";
- }
- }
+ string argvStr = string.Join(" ", args);
Application ret = new Application(NDalicPINVOKE.Application_New__MANUAL_4(argc, argvStr, stylesheet, (int)windowMode), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Adaptor_FeedKeyEvent")]
public static extern void Window_FeedKeyEvent(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_MakeCallback")]
+ public static extern global::System.IntPtr MakeCallback(global::System.Runtime.InteropServices.HandleRef jarg1);
+
//for widget view
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetView_Property_WIDGET_ID_get")]
public static extern int WidgetView_Property_WIDGET_ID_get();
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetViewManager_SWIGUpcast")]
public static extern global::System.IntPtr WidgetViewManager_SWIGUpcast(global::System.IntPtr jarg1);
+
//For Adaptor
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Adaptor_New__SWIG_0")]
public static extern global::System.IntPtr Adaptor_New__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_MakeCallback")]
public static extern global::System.IntPtr MakeCallback(global::System.Runtime.InteropServices.HandleRef jarg1);
+ //For widget
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_New")]
+ public static extern global::System.IntPtr Widget_New(string jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Widget__SWIG_0")]
+ public static extern global::System.IntPtr new_Widget__SWIG_0();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Widget__SWIG_1")]
+ public static extern global::System.IntPtr new_Widget__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_Assign")]
+ public static extern global::System.IntPtr Widget_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_Widget")]
+ public static extern void delete_Widget(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_CreateSignal")]
+ public static extern global::System.IntPtr Widget_CreateSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_TerminateSignal")]
+ public static extern global::System.IntPtr Widget_TerminateSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_PauseSignal")]
+ public static extern global::System.IntPtr Widget_PauseSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_ResumeSignal")]
+ public static extern global::System.IntPtr Widget_ResumeSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_ResizeSignal")]
+ public static extern global::System.IntPtr Widget_ResizeSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_UpdateSignal")]
+ public static extern global::System.IntPtr Widget_UpdateSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_New")]
+ public static extern global::System.IntPtr WidgetApplication_New(int jarg1, string jarg2, string jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetApplication__SWIG_0")]
+ public static extern global::System.IntPtr new_WidgetApplication__SWIG_0();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetApplication__SWIG_1")]
+ public static extern global::System.IntPtr new_WidgetApplication__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_Assign")]
+ public static extern global::System.IntPtr WidgetApplication_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_WidgetApplication")]
+ public static extern void delete_WidgetApplication(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_MainLoop")]
+ public static extern void WidgetApplication_MainLoop(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_Quit")]
+ public static extern void WidgetApplication_Quit(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_GetWindow")]
+ public static extern global::System.IntPtr WidgetApplication_GetWindow(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_GetResourcePath")]
+ public static extern string WidgetApplication_GetResourcePath();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_InitSignal")]
+ public static extern global::System.IntPtr WidgetApplication_InitSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_TerminateSignal")]
+ public static extern global::System.IntPtr WidgetApplication_TerminateSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LanguageChangedSignal")]
+ public static extern global::System.IntPtr WidgetApplication_LanguageChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_RegionChangedSignal")]
+ public static extern global::System.IntPtr WidgetApplication_RegionChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_BatteryLowSignal")]
+ public static extern global::System.IntPtr WidgetApplication_BatteryLowSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_MemoryLowSignal")]
+ public static extern global::System.IntPtr WidgetApplication_MemoryLowSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetData_New")]
+ public static extern global::System.IntPtr WidgetData_New(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, string jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetData__SWIG_0")]
+ public static extern global::System.IntPtr new_WidgetData__SWIG_0();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetData__SWIG_1")]
+ public static extern global::System.IntPtr new_WidgetData__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetData_Assign")]
+ public static extern global::System.IntPtr WidgetData_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_WidgetData")]
+ public static extern void delete_WidgetData(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetData_GetInstanceId")]
+ public static extern string WidgetData_GetInstanceId(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetData_GetArgs")]
+ public static extern global::System.IntPtr WidgetData_GetArgs(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetData_GetContent")]
+ public static extern string WidgetData_GetContent(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetData_GetWindow")]
+ public static extern global::System.IntPtr WidgetData_GetWindow(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetData_SetArgs")]
+ public static extern void WidgetData_SetArgs(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetData_SetContent")]
+ public static extern void WidgetData_SetContent(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetData_SetWindow")]
+ public static extern void WidgetData_SetWindow(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceCreateSignalType_Empty")]
+ public static extern bool WidgetInstanceCreateSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceCreateSignalType_GetConnectionCount")]
+ public static extern uint WidgetInstanceCreateSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceCreateSignalType_Connect")]
+ public static extern void WidgetInstanceCreateSignalType_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_WidgetInstanceCreateSignalType_Disconnect")]
+ public static extern void WidgetInstanceCreateSignalType_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_WidgetInstanceCreateSignalType_Emit")]
+ public static extern void WidgetInstanceCreateSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetInstanceCreateSignalType")]
+ public static extern global::System.IntPtr new_WidgetInstanceCreateSignalType();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetInstanceCreateSignalType")]
+ public static extern void delete_WidgetInstanceCreateSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceTerminateSignalType_Empty")]
+ public static extern bool WidgetInstanceTerminateSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceTerminateSignalType_GetConnectionCount")]
+ public static extern uint WidgetInstanceTerminateSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceTerminateSignalType_Connect")]
+ public static extern void WidgetInstanceTerminateSignalType_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_WidgetInstanceTerminateSignalType_Disconnect")]
+ public static extern void WidgetInstanceTerminateSignalType_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_WidgetInstanceTerminateSignalType_Emit")]
+ public static extern void WidgetInstanceTerminateSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetInstanceTerminateSignalType")]
+ public static extern global::System.IntPtr new_WidgetInstanceTerminateSignalType();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetInstanceTerminateSignalType")]
+ public static extern void delete_WidgetInstanceTerminateSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstancePauseOrResumeSignalType_Empty")]
+ public static extern bool WidgetInstancePauseOrResumeSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstancePauseOrResumeSignalType_GetConnectionCount")]
+ public static extern uint WidgetInstancePauseOrResumeSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstancePauseOrResumeSignalType_Connect")]
+ public static extern void WidgetInstancePauseOrResumeSignalType_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_WidgetInstancePauseOrResumeSignalType_Disconnect")]
+ public static extern void WidgetInstancePauseOrResumeSignalType_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_WidgetInstancePauseOrResumeSignalType_Emit")]
+ public static extern void WidgetInstancePauseOrResumeSignalType_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_WidgetInstancePauseOrResumeSignalType")]
+ public static extern global::System.IntPtr new_WidgetInstancePauseOrResumeSignalType();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetInstancePauseOrResumeSignalType")]
+ public static extern void delete_WidgetInstancePauseOrResumeSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceResizeSignalType_Empty")]
+ public static extern bool WidgetInstanceResizeSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceResizeSignalType_GetConnectionCount")]
+ public static extern uint WidgetInstanceResizeSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceResizeSignalType_Connect")]
+ public static extern void WidgetInstanceResizeSignalType_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_WidgetInstanceResizeSignalType_Disconnect")]
+ public static extern void WidgetInstanceResizeSignalType_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_WidgetInstanceResizeSignalType_Emit")]
+ public static extern void WidgetInstanceResizeSignalType_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_WidgetInstanceResizeSignalType")]
+ public static extern global::System.IntPtr new_WidgetInstanceResizeSignalType();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetInstanceResizeSignalType")]
+ public static extern void delete_WidgetInstanceResizeSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceUpdateSignalType_Empty")]
+ public static extern bool WidgetInstanceUpdateSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceUpdateSignalType_GetConnectionCount")]
+ public static extern uint WidgetInstanceUpdateSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetInstanceUpdateSignalType_Connect")]
+ public static extern void WidgetInstanceUpdateSignalType_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_WidgetInstanceUpdateSignalType_Disconnect")]
+ public static extern void WidgetInstanceUpdateSignalType_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_WidgetInstanceUpdateSignalType_Emit")]
+ public static extern void WidgetInstanceUpdateSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetInstanceUpdateSignalType")]
+ public static extern global::System.IntPtr new_WidgetInstanceUpdateSignalType();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetInstanceUpdateSignalType")]
+ public static extern void delete_WidgetInstanceUpdateSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_AppSignalType_Empty")]
+ public static extern bool AppSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_AppSignalType_GetConnectionCount")]
+ public static extern uint AppSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_AppSignalType_Connect")]
+ public static extern void AppSignalType_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_AppSignalType_Disconnect")]
+ public static extern void AppSignalType_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_AppSignalType_Emit")]
+ public static extern void AppSignalType_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_AppSignalType")]
+ public static extern global::System.IntPtr new_AppSignalType();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_AppSignalType")]
+ public static extern void delete_AppSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_SWIGUpcast")]
+ public static extern global::System.IntPtr Widget_SWIGUpcast(global::System.IntPtr jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_SWIGUpcast")]
+ public static extern global::System.IntPtr WidgetApplication_SWIGUpcast(global::System.IntPtr jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetData_SWIGUpcast")]
+ public static extern global::System.IntPtr WidgetData_SWIGUpcast(global::System.IntPtr jarg1);
}
}
--- /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
+{
+
+ public class SWIGTYPE_p_bundle
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ internal SWIGTYPE_p_bundle(global::System.IntPtr cPtr, bool futureUse)
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ protected SWIGTYPE_p_bundle()
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_bundle 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
+{
+ /// <summary>
+ /// Widget application
+ /// </summary>
+ internal class WidgetApplication : BaseHandle
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ internal WidgetApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.WidgetApplication_SWIGUpcast(cPtr), cMemoryOwn)
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetApplication obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ /// <summary>
+ /// To make Window 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.
+
+ if (_initCallback != null)
+ {
+ this.InitSignal().Disconnect(_initCallback);
+ }
+ if (_terminateCallback != null)
+ {
+ this.TerminateSignal().Disconnect(_terminateCallback);
+ }
+ if (_languageChangedCallback != null)
+ {
+ this.LanguageChangedSignal().Disconnect(_languageChangedCallback);;
+ }
+ if (_regionChangedCallback != null)
+ {
+ this.RegionChangedSignal().Disconnect(_regionChangedCallback);
+ }
+ if (_batteryLowCallback != null)
+ {
+ this.BatteryLowSignal().Disconnect(_batteryLowCallback);
+ }
+ if (_memoryLowCallback != null)
+ {
+ this.MemoryLowSignal().Disconnect(_memoryLowCallback);
+ }
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WidgetApplication(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ base.Dispose(type);
+ }
+
+ internal static WidgetApplication GetWidgetApplicationFromPtr(global::System.IntPtr cPtr)
+ {
+ WidgetApplication ret = new WidgetApplication(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public static WidgetApplication instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ internal void SetupDelegates()
+ {
+ InitDelegateInternal initializeCallback = new InitDelegateInternal(Initialization);
+
+ NUILog.Debug("InitSignal connection count");
+ this.InitSignal().Connect(initializeCallback);
+
+ NUILog.Debug("InitSignal connection count = " + InitSignal().GetConnectionCount());
+ }
+
+ public static WidgetApplication NewWidgetApplication(string[] args, string stylesheet)
+ {
+ WidgetApplication ret = New(args, stylesheet);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ // we've got an application now connect the signals
+ ret.SetupDelegates();
+ _instance = ret;
+ return ret;
+ }
+
+ public static WidgetApplication New(string[] args, string stylesheet)
+ {
+ int argc = args.Length;
+ string argvStr = string.Join(" ", args);
+
+ WidgetApplication ret = new WidgetApplication(NDalicManualPINVOKE.WidgetApplication_New(argc, argvStr, stylesheet), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ internal WidgetApplication(WidgetApplication widgetApplication) : this(NDalicManualPINVOKE.new_WidgetApplication__SWIG_1(WidgetApplication.getCPtr(widgetApplication)), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal WidgetApplication Assign(WidgetApplication widgetApplication)
+ {
+ WidgetApplication ret = new WidgetApplication(NDalicManualPINVOKE.WidgetApplication_Assign(swigCPtr, WidgetApplication.getCPtr(widgetApplication)), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// This starts the application.
+ /// </summary>
+ public void MainLoop()
+ {
+ NDalicManualPINVOKE.WidgetApplication_MainLoop(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ {
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ /// <summary>
+ /// This quits the application.
+ /// Tizen applications should use Lower to improve re-start performance unless they need to Quit completely.
+ /// </summary>
+ public void Quit()
+ {
+ NDalicManualPINVOKE.WidgetApplication_Quit(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Get window.
+ /// </summary>
+ /// <returns> The window for widget instance.</returns>
+ public Window GetWindow()
+ {
+ Window ret = new Window(NDalicManualPINVOKE.WidgetApplication_GetWindow(swigCPtr), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get path application resources are stored at.
+ /// </summary>
+ /// <returns>The full path of the resources</returns>
+ public static string GetResourcePath()
+ {
+ string ret = NDalicManualPINVOKE.WidgetApplication_GetResourcePath();
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Event arguments that passed via widget app event signal.
+ /// </summary>
+ public class WidgetApplicationEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Widget application.
+ /// </summary>
+ public WidgetApplication WidgetApplication
+ {
+ get;
+ set;
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void InitCallbackType(IntPtr widgetApplication);
+ private InitCallbackType _initCallback;
+ private DaliEventHandler<object,WidgetApplicationEventArgs> _initEventHandler;
+
+ /// <summary>
+ /// Init event.
+ /// </summary>
+ public event DaliEventHandler<object, WidgetApplicationEventArgs> Init
+ {
+ add
+ {
+ if (_initEventHandler == null)
+ {
+ _initCallback = new InitCallbackType( OnInit);
+ InitSignal().Connect(_initCallback);
+ }
+
+ _initEventHandler += value;
+ }
+
+ remove
+ {
+ _initEventHandler -= value;
+
+ if (_initEventHandler == null && InitSignal().Empty() == false)
+ {
+ InitSignal().Disconnect(_initCallback);
+ }
+ }
+ }
+
+ private void OnInit(IntPtr widgetApplication)
+ {
+ WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
+ if (widgetApplication != null)
+ {
+ e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
+ }
+
+ if (_initEventHandler != null)
+ {
+ _initEventHandler(this, e);
+ }
+ }
+
+ internal AppSignalType InitSignal()
+ {
+ AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_InitSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void TerminateCallbackType(IntPtr widgetApplication);
+ private TerminateCallbackType _terminateCallback;
+ private DaliEventHandler<object, WidgetApplicationEventArgs> _terminateEventHandler;
+
+ /// <summary>
+ /// Terminate event.
+ /// </summary>
+ public event DaliEventHandler<object, WidgetApplicationEventArgs> Terminate
+ {
+ add
+ {
+ if (_terminateEventHandler == null)
+ {
+ _terminateCallback = new TerminateCallbackType( OnTerminate);
+ TerminateSignal().Connect(_terminateCallback);
+ }
+
+ _terminateEventHandler += value;
+ }
+
+ remove
+ {
+ _terminateEventHandler -= value;
+
+ if (_terminateEventHandler == null && TerminateSignal().Empty() == false)
+ {
+ TerminateSignal().Disconnect(_terminateCallback);
+ }
+ }
+ }
+
+ private void OnTerminate(IntPtr widgetApplication)
+ {
+ WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
+
+ if (widgetApplication != null)
+ {
+ e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
+ }
+
+ if (_terminateEventHandler != null)
+ {
+ _terminateEventHandler(this, e);
+ }
+ }
+
+ internal AppSignalType TerminateSignal()
+ {
+ AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_TerminateSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void LanguageChangedCallbackType(IntPtr widgetApplication);
+ private LanguageChangedCallbackType _languageChangedCallback;
+ private DaliEventHandler<object, WidgetApplicationEventArgs> _languageChangedEventHandler;
+
+ /// <summary>
+ /// LanguageChanged event.
+ /// </summary>
+ public event DaliEventHandler<object, WidgetApplicationEventArgs> LanguageChanged
+ {
+ add
+ {
+ if (_languageChangedEventHandler == null)
+ {
+ _languageChangedCallback = new LanguageChangedCallbackType( OnLanguageChanged);
+ LanguageChangedSignal().Connect(_languageChangedCallback);
+ }
+
+ _languageChangedEventHandler += value;
+ }
+
+ remove
+ {
+ _languageChangedEventHandler -= value;
+
+ if (_languageChangedEventHandler == null && LanguageChangedSignal().Empty() == false)
+ {
+ LanguageChangedSignal().Disconnect(_languageChangedCallback);
+ }
+ }
+ }
+
+ private void OnLanguageChanged(IntPtr widgetApplication)
+ {
+ WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
+
+ if (widgetApplication != null)
+ {
+ e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
+ }
+
+ if (_languageChangedEventHandler != null)
+ {
+ _languageChangedEventHandler(this, e);
+ }
+ }
+
+ internal AppSignalType LanguageChangedSignal()
+ {
+ AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_LanguageChangedSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void RegionChangedCallbackType(IntPtr widgetApplication);
+ private RegionChangedCallbackType _regionChangedCallback;
+ private DaliEventHandler<object, WidgetApplicationEventArgs> _regionChangedEventHandler;
+
+ /// <summary>
+ /// RegionChanged event.
+ /// </summary>
+ public event DaliEventHandler<object, WidgetApplicationEventArgs> RegionChanged
+ {
+ add
+ {
+ if (_regionChangedEventHandler == null)
+ {
+ _regionChangedCallback = new RegionChangedCallbackType( OnRegionChanged );
+ RegionChangedSignal().Connect(_regionChangedCallback);
+ }
+
+ _regionChangedEventHandler += value;
+ }
+
+ remove
+ {
+ _regionChangedEventHandler -= value;
+
+ if (_regionChangedEventHandler == null && RegionChangedSignal().Empty() == false)
+ {
+ RegionChangedSignal().Disconnect(_regionChangedCallback);
+ }
+ }
+ }
+
+ private void OnRegionChanged(IntPtr widgetApplication)
+ {
+ WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
+
+ if (widgetApplication != null)
+ {
+ e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
+ }
+
+ if (_regionChangedEventHandler != null)
+ {
+ _regionChangedEventHandler(this, e);
+ }
+ }
+
+ internal AppSignalType RegionChangedSignal()
+ {
+ AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_RegionChangedSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void BatteryLowCallbackType(IntPtr widgetApplication);
+ private BatteryLowCallbackType _batteryLowCallback;
+ private DaliEventHandler<object, WidgetApplicationEventArgs> _batteryLowEventHandler;
+
+ /// <summary>
+ /// BatteryLow event.
+ /// </summary>
+ public event DaliEventHandler<object, WidgetApplicationEventArgs> BatteryLow
+ {
+ add
+ {
+ if (_batteryLowEventHandler == null)
+ {
+ _batteryLowCallback = new BatteryLowCallbackType( OnBatteryLow );
+ BatteryLowSignal().Connect(_batteryLowCallback);
+ }
+
+ _batteryLowEventHandler += value;
+ }
+
+ remove
+ {
+ _batteryLowEventHandler -= value;
+
+ if (_batteryLowEventHandler == null && BatteryLowSignal().Empty() == false)
+ {
+ BatteryLowSignal().Disconnect(_batteryLowCallback);
+ }
+ }
+ }
+
+ private void OnBatteryLow(IntPtr widgetApplication)
+ {
+ WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
+
+ if (widgetApplication != null)
+ {
+ e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
+ }
+
+ if (_batteryLowEventHandler != null)
+ {
+ _batteryLowEventHandler(this, e);
+ }
+ }
+
+ internal AppSignalType BatteryLowSignal()
+ {
+ AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_BatteryLowSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void MemoryLowCallbackType(IntPtr widgetApplication);
+ private MemoryLowCallbackType _memoryLowCallback;
+ private DaliEventHandler<object, WidgetApplicationEventArgs> _memoryLowEventHandler;
+
+ /// <summary>
+ /// MemoryLow event.
+ /// </summary>
+ public event DaliEventHandler<object, WidgetApplicationEventArgs> MemoryLow
+ {
+ add
+ {
+ if (_memoryLowEventHandler == null)
+ {
+ _memoryLowCallback = new MemoryLowCallbackType (OnMemoryLow);
+ MemoryLowSignal().Connect(_memoryLowCallback);
+ }
+
+ _memoryLowEventHandler += value;
+ }
+
+ remove
+ {
+ _memoryLowEventHandler -= value;
+
+ if (_memoryLowEventHandler == null && MemoryLowSignal().Empty() == false)
+ {
+ MemoryLowSignal().Disconnect(_memoryLowCallback);
+ }
+ }
+ }
+
+ private void OnMemoryLow(IntPtr widgetApplication)
+ {
+ WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
+
+ if (widgetApplication != null)
+ {
+ e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
+ }
+
+ if (_memoryLowEventHandler != null)
+ {
+ _memoryLowEventHandler(this, e);
+ }
+ }
+
+ internal AppSignalType MemoryLowSignal()
+ {
+ AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_MemoryLowSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public delegate void InitDelegate();
+
+ public delegate void TerminateDelegate();
+
+ public delegate void LanguageChangedDelegate();
+
+ public delegate void RegionChangedDelegate();
+
+ public delegate void BatteryLowDelegate();
+
+ public delegate void MemoryLowDelegate();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void InitDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void TerminateDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void LanguageChangedDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void RegionChangedDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void BatteryLowDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void MemoryLowDelegateInternal();
+
+ static void Initialization()
+ {
+ // instance.InitDelegate();
+ }
+
+ private static WidgetApplication _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 WidgetInstanceCreateSignalType : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal WidgetInstanceCreateSignalType(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(WidgetInstanceCreateSignalType 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;
+
+ ~WidgetInstanceCreateSignalType()
+ {
+ 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)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WidgetInstanceCreateSignalType(swigCPtr);
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ disposed = true;
+ }
+
+ public bool Empty()
+ {
+ bool ret = NDalicManualPINVOKE.WidgetInstanceCreateSignalType_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicManualPINVOKE.WidgetInstanceCreateSignalType_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.WidgetInstanceCreateSignalType_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.WidgetInstanceCreateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Emit(WidgetData arg1, SWIGTYPE_p_bundle arg2, Uint16Pair arg3)
+ {
+ NDalicManualPINVOKE.WidgetInstanceCreateSignalType_Emit(swigCPtr, WidgetData.getCPtr(arg1), SWIGTYPE_p_bundle.getCPtr(arg2), Uint16Pair.getCPtr(arg3));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public WidgetInstanceCreateSignalType() : this(NDalicManualPINVOKE.new_WidgetInstanceCreateSignalType(), 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 WidgetInstancePauseOrResumeSignalType : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal WidgetInstancePauseOrResumeSignalType(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(WidgetInstancePauseOrResumeSignalType 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;
+
+ ~WidgetInstancePauseOrResumeSignalType()
+ {
+ 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)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WidgetInstancePauseOrResumeSignalType(swigCPtr);
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ disposed = true;
+ }
+
+ public bool Empty()
+ {
+ bool ret = NDalicManualPINVOKE.WidgetInstancePauseOrResumeSignalType_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicManualPINVOKE.WidgetInstancePauseOrResumeSignalType_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.WidgetInstancePauseOrResumeSignalType_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.WidgetInstancePauseOrResumeSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Emit(WidgetData arg)
+ {
+ NDalicManualPINVOKE.WidgetInstancePauseOrResumeSignalType_Emit(swigCPtr, WidgetData.getCPtr(arg));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public WidgetInstancePauseOrResumeSignalType() : this(NDalicManualPINVOKE.new_WidgetInstancePauseOrResumeSignalType(), 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 WidgetInstanceResizeSignalType : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal WidgetInstanceResizeSignalType(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(WidgetInstanceResizeSignalType 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;
+
+ ~WidgetInstanceResizeSignalType()
+ {
+ 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)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WidgetInstanceResizeSignalType(swigCPtr);
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ disposed = true;
+ }
+
+ public bool Empty()
+ {
+ bool ret = NDalicManualPINVOKE.WidgetInstanceResizeSignalType_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicManualPINVOKE.WidgetInstanceResizeSignalType_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.WidgetInstanceResizeSignalType_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.WidgetInstanceResizeSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Emit(WidgetData arg1, Uint16Pair arg2)
+ {
+ NDalicManualPINVOKE.WidgetInstanceResizeSignalType_Emit(swigCPtr, WidgetData.getCPtr(arg1), Uint16Pair.getCPtr(arg2));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public WidgetInstanceResizeSignalType() : this(NDalicManualPINVOKE.new_WidgetInstanceResizeSignalType(), 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 WidgetInstanceTerminateSignalType : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal WidgetInstanceTerminateSignalType(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(WidgetInstanceTerminateSignalType 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;
+
+ ~WidgetInstanceTerminateSignalType()
+ {
+ 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)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WidgetInstanceTerminateSignalType(swigCPtr);
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ disposed = true;
+ }
+
+ public bool Empty()
+ {
+ bool ret = NDalicManualPINVOKE.WidgetInstanceTerminateSignalType_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicManualPINVOKE.WidgetInstanceTerminateSignalType_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.WidgetInstanceTerminateSignalType_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.WidgetInstanceTerminateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Emit(WidgetData arg1, SWIGTYPE_p_bundle arg2, Widget.WidgetTerminateType arg3)
+ {
+ NDalicManualPINVOKE.WidgetInstanceTerminateSignalType_Emit(swigCPtr, WidgetData.getCPtr(arg1), SWIGTYPE_p_bundle.getCPtr(arg2), (int)arg3);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public WidgetInstanceTerminateSignalType() : this(NDalicManualPINVOKE.new_WidgetInstanceTerminateSignalType(), 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 WidgetInstanceUpdateSignalType : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal WidgetInstanceUpdateSignalType(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(WidgetInstanceUpdateSignalType 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;
+
+ ~WidgetInstanceUpdateSignalType()
+ {
+ 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)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WidgetInstanceUpdateSignalType(swigCPtr);
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ disposed = true;
+ }
+
+ public bool Empty()
+ {
+ bool ret = NDalicManualPINVOKE.WidgetInstanceUpdateSignalType_Empty(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public uint GetConnectionCount()
+ {
+ uint ret = NDalicManualPINVOKE.WidgetInstanceUpdateSignalType_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.WidgetInstanceUpdateSignalType_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.WidgetInstanceUpdateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ public void Emit(WidgetData arg1, SWIGTYPE_p_bundle arg2, int arg3)
+ {
+ NDalicManualPINVOKE.WidgetInstanceUpdateSignalType_Emit(swigCPtr, WidgetData.getCPtr(arg1), SWIGTYPE_p_bundle.getCPtr(arg2), arg3);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ public WidgetInstanceUpdateSignalType() : this(NDalicManualPINVOKE.new_WidgetInstanceUpdateSignalType(), 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.
+*
+*/
+using System;
+using System.Runtime.InteropServices;
+using Tizen.Applications;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Widget object should be created by WidgetApplication.
+ /// </summary>
+ public class Widget : BaseHandle
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ internal Widget(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.Widget_SWIGUpcast(cPtr), cMemoryOwn)
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Widget obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ /// <summary>
+ /// To make Widget 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.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_Widget(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ base.Dispose(type);
+ }
+
+ /// <summary>
+ /// This is the constructor for Widget.
+ /// </summary>
+ /// <param name="id">for widget instance</param>
+ public Widget(string id) : this(NDalicManualPINVOKE.Widget_New(id), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal Widget(Widget widget) : this(NDalicManualPINVOKE.new_Widget__SWIG_1(Widget.getCPtr(widget)), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal Widget Assign(Widget widget)
+ {
+ Widget ret = new Widget(NDalicManualPINVOKE.Widget_Assign(swigCPtr, Widget.getCPtr(widget)), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Event arguments that passed via KeyEvent signal.
+ /// </summary>
+ public class CreateEventArgs : EventArgs
+ {
+ /// <summary>
+ /// widget data.
+ /// </summary>
+ public WidgetData WidgetData
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// a bundle.
+ /// </summary>
+ public SWIGTYPE_p_bundle Bundle
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// window size.
+ /// </summary>
+ public Size2D WindowSize
+ {
+ get;
+ set;
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void CreateCallbackType(IntPtr widgetData, IntPtr bundle, IntPtr windowSize);
+ private CreateCallbackType _createCallback;
+ private EventHandler<CreateEventArgs> _createEventHandler;
+
+ /// <summary>
+ /// Create event.
+ /// </summary>
+ public event EventHandler<CreateEventArgs> Create
+ {
+ add
+ {
+ if (_createEventHandler == null)
+ {
+ _createCallback = OnCreate;
+ CreateSignal().Connect(_createCallback);
+ }
+
+ _createEventHandler += value;
+ }
+
+ remove
+ {
+ _createEventHandler -= value;
+
+ if (_createEventHandler == null && CreateSignal().Empty() == false)
+ {
+ CreateSignal().Disconnect(_createCallback);
+ }
+ }
+ }
+
+ private void OnCreate(IntPtr widgetData, IntPtr bundle, IntPtr windowSize)
+ {
+ CreateEventArgs e = new CreateEventArgs();
+ if (widgetData != null)
+ {
+ e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData);
+ }
+ if (bundle != null)
+ {
+ e.Bundle = new SWIGTYPE_p_bundle(bundle, false);
+ }
+ if (windowSize != null)
+ {
+ var val = new Uint16Pair(windowSize, false);
+ e.WindowSize = val;
+ val.Dispose();
+ }
+
+ _createEventHandler?.Invoke(this, e);
+ }
+
+ internal WidgetInstanceCreateSignalType CreateSignal()
+ {
+ WidgetInstanceCreateSignalType ret = new WidgetInstanceCreateSignalType(NDalicManualPINVOKE.Widget_CreateSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Event arguments that passed via terminate event signal.
+ /// </summary>
+ public class TerminateEventArgs : EventArgs
+ {
+ /// <summary>
+ /// widget data.
+ /// </summary>
+ public WidgetData WidgetData
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// a bundle.
+ /// </summary>
+ public SWIGTYPE_p_bundle Bundle
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// widget terminate type.
+ /// </summary>
+ public WidgetTerminateType WidgetTerminateType
+ {
+ get;
+ set;
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void TerminateCallbackType(IntPtr widgetData, IntPtr bundle, WidgetTerminateType widgetTerminateType);
+ private TerminateCallbackType _terminateCallback;
+ private EventHandler<TerminateEventArgs> _terminateEventHandler;
+
+ /// <summary>
+ /// Terminate event.
+ /// </summary>
+ public event EventHandler<TerminateEventArgs> Terminate
+ {
+ add
+ {
+ if (_terminateEventHandler == null)
+ {
+ _terminateCallback = OnTerminate;
+ TerminateSignal().Connect(_terminateCallback);
+ }
+
+ _terminateEventHandler += value;
+ }
+
+ remove
+ {
+ _terminateEventHandler -= value;
+
+ if (_terminateEventHandler == null && TerminateSignal().Empty() == false)
+ {
+ TerminateSignal().Disconnect(_terminateCallback);
+ }
+ }
+ }
+
+ private void OnTerminate(IntPtr widgetData, IntPtr bundle, WidgetTerminateType widgetTerminateType)
+ {
+ TerminateEventArgs e = new TerminateEventArgs();
+ if (widgetData != null)
+ {
+ e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData);
+ }
+ if (bundle != null)
+ {
+ e.Bundle = new SWIGTYPE_p_bundle(bundle, false);
+ }
+
+ e.WidgetTerminateType = widgetTerminateType;
+ _terminateEventHandler?.Invoke(this, e);
+ }
+
+ internal WidgetInstanceTerminateSignalType TerminateSignal()
+ {
+ WidgetInstanceTerminateSignalType ret = new WidgetInstanceTerminateSignalType(NDalicManualPINVOKE.Widget_TerminateSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Event arguments that passed via pause event signal.
+ /// </summary>
+ public class PauseEventArgs : EventArgs
+ {
+ /// <summary>
+ /// widget data.
+ /// </summary>
+ public WidgetData WidgetData
+ {
+ get;
+ set;
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void PauseCallbackType(IntPtr widgetData);
+ private PauseCallbackType _pauseCallback;
+ private EventHandler<PauseEventArgs> _pauseEventHandler;
+
+ /// <summary>
+ /// Pause event.
+ /// </summary>
+ public event EventHandler<PauseEventArgs> Pause
+ {
+ add
+ {
+ if (_pauseEventHandler == null)
+ {
+ _pauseCallback = OnPause;
+ PauseSignal().Connect(_pauseCallback);
+ }
+
+ _pauseEventHandler += value;
+ }
+
+ remove
+ {
+ _pauseEventHandler -= value;
+
+ if (_pauseEventHandler == null && PauseSignal().Empty() == false)
+ {
+ PauseSignal().Disconnect(_pauseCallback);
+ }
+ }
+ }
+
+ private void OnPause(IntPtr widgetData)
+ {
+ PauseEventArgs e = new PauseEventArgs();
+ if (widgetData != null)
+ {
+ e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData);
+ }
+
+ _pauseEventHandler?.Invoke(this, e);
+ }
+
+ internal WidgetInstancePauseOrResumeSignalType PauseSignal()
+ {
+ WidgetInstancePauseOrResumeSignalType ret = new WidgetInstancePauseOrResumeSignalType(NDalicManualPINVOKE.Widget_PauseSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Event arguments that passed via pause event signal.
+ /// </summary>
+ public class ResumeEventArgs : EventArgs
+ {
+ /// <summary>
+ /// widget data.
+ /// </summary>
+ public WidgetData WidgetData
+ {
+ get;
+ set;
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void ResumeCallbackType(IntPtr widgetData);
+ private ResumeCallbackType _resumeCallback;
+ private EventHandler<ResumeEventArgs> _resumeEventHandler;
+
+ /// <summary>
+ /// Resume event.
+ /// </summary>
+ public event EventHandler<ResumeEventArgs> Resume
+ {
+ add
+ {
+ if (_resumeEventHandler == null)
+ {
+ _resumeCallback = OnResume;
+ ResumeSignal().Connect(_resumeCallback);
+ }
+
+ _resumeEventHandler += value;
+ }
+
+ remove
+ {
+ _resumeEventHandler -= value;
+
+ if (_resumeEventHandler == null && ResumeSignal().Empty() == false)
+ {
+ ResumeSignal().Disconnect(_resumeCallback);
+ }
+ }
+ }
+
+ private void OnResume(IntPtr widgetData)
+ {
+ ResumeEventArgs e = new ResumeEventArgs();
+ if (widgetData != null)
+ {
+ e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData);
+ }
+
+ _resumeEventHandler?.Invoke(this, e);
+ }
+
+ internal WidgetInstancePauseOrResumeSignalType ResumeSignal()
+ {
+ WidgetInstancePauseOrResumeSignalType ret = new WidgetInstancePauseOrResumeSignalType(NDalicManualPINVOKE.Widget_ResumeSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Event arguments that passed via resize signal.
+ /// </summary>
+ public class ResizeEventArgs : EventArgs
+ {
+ /// <summary>
+ /// widget data.
+ /// </summary>
+ public WidgetData WidgetData
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// window size.
+ /// </summary>
+ public Size2D WindowSize
+ {
+ get;
+ set;
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void ResizeCallbackType(IntPtr widgetData, IntPtr windowSize);
+ private ResizeCallbackType _resizeCallback;
+ private EventHandler<ResizeEventArgs> _resizeEventHandler;
+
+ /// <summary>
+ /// Resize event.
+ /// </summary>
+ public event EventHandler<ResizeEventArgs> Resize
+ {
+ add
+ {
+ if (_resizeEventHandler == null)
+ {
+ _resizeCallback = OnResize;
+ ResizeSignal().Connect(_resizeCallback);
+ }
+
+ _resizeEventHandler += value;
+ }
+
+ remove
+ {
+ _resizeEventHandler -= value;
+
+ if (_resizeEventHandler == null && ResizeSignal().Empty() == false)
+ {
+ ResizeSignal().Disconnect(_resizeCallback);
+ }
+ }
+ }
+
+ private void OnResize(IntPtr widgetData, IntPtr windowSize)
+ {
+ ResizeEventArgs e = new ResizeEventArgs();
+ if (widgetData != null)
+ {
+ e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData);
+ }
+ if (windowSize != null)
+ {
+ var val = new Uint16Pair(windowSize, false);
+ e.WindowSize = val;
+ val.Dispose();
+ }
+
+ _resizeEventHandler?.Invoke(this, e);
+ }
+
+ internal WidgetInstanceResizeSignalType ResizeSignal()
+ {
+ WidgetInstanceResizeSignalType ret = new WidgetInstanceResizeSignalType(NDalicManualPINVOKE.Widget_ResizeSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Event arguments that passed via update event signal.
+ /// </summary>
+ public class UpdateEventArgs : EventArgs
+ {
+ /// <summary>
+ /// widget data.
+ /// </summary>
+ public WidgetData WidgetData
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// A bundle.
+ /// </summary>
+ public SWIGTYPE_p_bundle Bundle
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// It means several steps.
+ /// </summary>
+ /// <remark>
+ /// 0 -> no force
+ /// 1 -> force but do someting
+ /// 2 -> force
+ /// </remark>
+ public int Force
+ {
+ get;
+ set;
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void UpdateCallbackType(IntPtr widgetData, IntPtr bundle, int force);
+ private UpdateCallbackType _updateCallback;
+ private EventHandler<UpdateEventArgs> _updateEventHandler;
+
+ /// <summary>
+ /// Update event.
+ /// </summary>
+ public event EventHandler<UpdateEventArgs> Update
+ {
+ add
+ {
+ if (_updateEventHandler == null)
+ {
+ _updateCallback = OnUpdate;
+ UpdateSignal().Connect(_updateCallback);
+ }
+
+ _updateEventHandler += value;
+ }
+
+ remove
+ {
+ _updateEventHandler -= value;
+
+ if (_updateEventHandler == null && UpdateSignal().Empty() == false)
+ {
+ UpdateSignal().Disconnect(_updateCallback);
+ }
+ }
+ }
+
+ private void OnUpdate(IntPtr widgetData, IntPtr bundle, int force)
+ {
+ UpdateEventArgs e = new UpdateEventArgs();
+ if (widgetData != null)
+ {
+ e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData);
+ }
+ if (bundle != null)
+ {
+ e.Bundle = new SWIGTYPE_p_bundle(bundle, false);
+ }
+ e.Force = force;
+
+ _updateEventHandler?.Invoke(this, e);
+ }
+
+ internal WidgetInstanceUpdateSignalType UpdateSignal()
+ {
+ WidgetInstanceUpdateSignalType ret = new WidgetInstanceUpdateSignalType(NDalicManualPINVOKE.Widget_UpdateSignal(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Enumeration for terminate type of widget instance.
+ /// </summary>
+ public enum WidgetTerminateType
+ {
+ /// <summary>
+ /// User deleted this widget from the viewer
+ /// </summary>
+ Permanent,
+ /// <summary>
+ /// Widget is deleted because of other reasons (e.g. widget process is terminated temporarily by the system)
+ /// </summary>
+ Temporary
+ }
+
+ /// <summary>
+ /// Enumeration for lifecycle event type of widget instance.
+ /// </summary>
+ public enum WidgetLifecycleEventType
+ {
+ /// <summary>
+ /// The widget is dead.
+ /// </summary>
+ AppDead = 0,
+ /// <summary>
+ /// The widget is dead.
+ /// </summary>
+ Create = 1,
+ /// <summary>
+ /// The widget is destroyed.
+ /// </summary>
+ Destroy = 2,
+ /// <summary>
+ /// The widget is paused.
+ /// </summary>
+ Pause = 3,
+ /// <summary>
+ /// The widget is resumed.
+ /// </summary>
+ Resume = 4
+ }
+ }
+}
--- /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>
+ /// Widget data.
+ /// </summary>
+ public class WidgetData : BaseHandle
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ internal WidgetData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.WidgetData_SWIGUpcast(cPtr), cMemoryOwn)
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetData obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ /// <summary>
+ /// To make Window 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.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicManualPINVOKE.delete_WidgetData(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ base.Dispose(type);
+ }
+
+ internal static WidgetData GetWidgetDataFromPtr(global::System.IntPtr cPtr)
+ {
+ WidgetData ret = new WidgetData(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ internal WidgetData(string instanceId, SWIGTYPE_p_bundle args, string content) : this(NDalicManualPINVOKE.WidgetData_New(instanceId, SWIGTYPE_p_bundle.getCPtr(args), content), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal WidgetData(WidgetData widgetData) : this(NDalicManualPINVOKE.new_WidgetData__SWIG_1(WidgetData.getCPtr(widgetData)), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal WidgetData Assign(WidgetData widgetData)
+ {
+ WidgetData ret = new WidgetData(NDalicManualPINVOKE.WidgetData_Assign(swigCPtr, WidgetData.getCPtr(widgetData)), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get widget instance id.
+ /// </summary>
+ /// <returns>Id of widget instance.</returns>
+ public string GetInstanceId()
+ {
+ string ret = NDalicManualPINVOKE.WidgetData_GetInstanceId(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ internal SWIGTYPE_p_bundle GetArgs()
+ {
+ global::System.IntPtr cPtr = NDalicManualPINVOKE.WidgetData_GetArgs(swigCPtr);
+ SWIGTYPE_p_bundle ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_bundle(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get widget instance content.
+ /// </summary>
+ /// <returns>Content of widget instance.</returns>
+ public string GetContent()
+ {
+ string ret = NDalicManualPINVOKE.WidgetData_GetContent(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get widget instance Window.
+ /// </summary>
+ /// <returns>Window of widget instance</returns>
+ public Window GetWindow()
+ {
+ Window ret = new Window(NDalicManualPINVOKE.WidgetData_GetWindow(swigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ internal void SetArgs(SWIGTYPE_p_bundle args)
+ {
+ NDalicManualPINVOKE.WidgetData_SetArgs(swigCPtr, SWIGTYPE_p_bundle.getCPtr(args));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Set widget instance arguments.
+ /// </summary>
+ /// <param name="content">Content of widget instance</param>
+ public void SetContent(string content)
+ {
+ NDalicManualPINVOKE.WidgetData_SetContent(swigCPtr, content);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Set widget instance arguments.
+ /// </summary>
+ /// <param name="window">Window of widget instance.</param>
+ public void SetWindow(Window window)
+ {
+ NDalicManualPINVOKE.WidgetData_SetWindow(swigCPtr, Window.getCPtr(window));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+}