From 1ccef2ffdd833443e3e31170aaf88b7d612cc364 Mon Sep 17 00:00:00 2001 From: "xb.teng" Date: Tue, 17 Oct 2017 18:57:58 +0800 Subject: [PATCH] Update widget and widget application Here are some changes: 1, Add LowBatterySignal and LowMemorySignal into WidgetApplication 2, Add GetRegion and GetLanguage apis into WidgetApplication 3, Update widge Change-Id: Ibf5bf5d9723be33deb3683888ac72de69552290a --- src/Tizen.NUI/src/internal/ManualPINVOKE.cs | 253 ++++++++++++--------- src/Tizen.NUI/src/internal/WidgetApplication.cs | 35 ++- ...cs => WidgetApplicationLowBatterySignalType.cs} | 77 +++++-- ....cs => WidgetApplicationLowMemorySignalType.cs} | 34 +-- ...sizeSignalType.cs => WidgetCreateSignalType.cs} | 25 +- ...pdateSignalType.cs => WidgetPauseSignalType.cs} | 24 +- .../src/internal/WidgetResizeSignalType.cs | 143 ++++++++++++ ...eateSignalType.cs => WidgetResumeSignalType.cs} | 24 +- .../src/internal/WidgetTerminateSignalType.cs | 143 ++++++++++++ .../src/internal/WidgetUpdateSignalType.cs | 144 ++++++++++++ src/Tizen.NUI/src/public/NUIWidgetApplication.cs | 13 -- src/Tizen.NUI/src/public/Widget.cs | 131 +++++------ src/Tizen.NUI/src/public/WidgetData.cs | 167 -------------- 13 files changed, 767 insertions(+), 446 deletions(-) rename src/Tizen.NUI/src/internal/{WidgetInstanceTerminateSignalType.cs => WidgetApplicationLowBatterySignalType.cs} (62%) rename src/Tizen.NUI/src/internal/{WidgetInstancePauseOrResumeSignalType.cs => WidgetApplicationLowMemorySignalType.cs} (78%) rename src/Tizen.NUI/src/internal/{WidgetInstanceResizeSignalType.cs => WidgetCreateSignalType.cs} (79%) rename src/Tizen.NUI/src/internal/{WidgetInstanceUpdateSignalType.cs => WidgetPauseSignalType.cs} (78%) create mode 100755 src/Tizen.NUI/src/internal/WidgetResizeSignalType.cs rename src/Tizen.NUI/src/internal/{WidgetInstanceCreateSignalType.cs => WidgetResumeSignalType.cs} (78%) create mode 100755 src/Tizen.NUI/src/internal/WidgetTerminateSignalType.cs create mode 100755 src/Tizen.NUI/src/internal/WidgetUpdateSignalType.cs delete mode 100755 src/Tizen.NUI/src/public/WidgetData.cs diff --git a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs index 28d7154..aff59c8 100755 --- a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs @@ -1054,6 +1054,13 @@ namespace Tizen.NUI public static extern void delete_AdaptorSignalType(global::System.Runtime.InteropServices.HandleRef jarg1); //For widget + + [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_Widget_New")] public static extern global::System.IntPtr Widget_New(string jarg1); @@ -1108,12 +1115,15 @@ namespace Tizen.NUI [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_GetRegion")] + public static extern string WidgetApplication_GetRegion(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_GetLanguage")] + public static extern string WidgetApplication_GetLanguage(global::System.Runtime.InteropServices.HandleRef jarg1); + [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); @@ -1126,152 +1136,138 @@ namespace Tizen.NUI [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_WidgetApplication_LowBatterySignal")] + public static extern global::System.IntPtr WidgetApplication_LowBatterySignal(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetApplication_LowMemorySignal")] + public static extern global::System.IntPtr WidgetApplication_LowMemorySignal(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetCreateSignalType_Empty")] + public static extern bool WidgetCreateSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetCreateSignalType_GetConnectionCount")] + public static extern uint WidgetCreateSignalType_GetConnectionCount(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_WidgetCreateSignalType_Connect")] + public static extern void WidgetCreateSignalType_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_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_WidgetCreateSignalType_Disconnect")] + public static extern void WidgetCreateSignalType_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_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_WidgetCreateSignalType_Emit")] + public static extern void WidgetCreateSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string 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_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_new_WidgetCreateSignalType")] + public static extern global::System.IntPtr new_WidgetCreateSignalType(); - [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_delete_WidgetCreateSignalType")] + public static extern void delete_WidgetCreateSignalType(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetTerminateSignalType_Empty")] + public static extern bool WidgetTerminateSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetTerminateSignalType_GetConnectionCount")] + public static extern uint WidgetTerminateSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetTerminateSignalType_Connect")] + public static extern void WidgetTerminateSignalType_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_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_WidgetTerminateSignalType_Disconnect")] + public static extern void WidgetTerminateSignalType_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_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_WidgetTerminateSignalType_Emit")] + public static extern void WidgetTerminateSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4); - [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_new_WidgetTerminateSignalType")] + public static extern global::System.IntPtr new_WidgetTerminateSignalType(); - [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_delete_WidgetTerminateSignalType")] + public static extern void delete_WidgetTerminateSignalType(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetPauseSignalType_Empty")] + public static extern bool WidgetPauseSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetPauseSignalType_GetConnectionCount")] + public static extern uint WidgetPauseSignalType_GetConnectionCount(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_WidgetPauseSignalType_Connect")] + public static extern void WidgetPauseSignalType_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_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_WidgetPauseSignalType_Disconnect")] + public static extern void WidgetPauseSignalType_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_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_WidgetPauseSignalType_Emit")] + public static extern void WidgetPauseSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string 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_new_WidgetPauseSignalType")] + public static extern global::System.IntPtr new_WidgetPauseSignalType(); - [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_delete_WidgetPauseSignalType")] + public static extern void delete_WidgetPauseSignalType(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetResumeSignalType_Empty")] + public static extern bool WidgetResumeSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetResumeSignalType_GetConnectionCount")] + public static extern uint WidgetResumeSignalType_GetConnectionCount(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_WidgetResumeSignalType_Connect")] + public static extern void WidgetResumeSignalType_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_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_WidgetResumeSignalType_Disconnect")] + public static extern void WidgetResumeSignalType_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_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_WidgetResumeSignalType_Emit")] + public static extern void WidgetResumeSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string 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_new_WidgetResumeSignalType")] + public static extern global::System.IntPtr new_WidgetResumeSignalType(); - [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_delete_WidgetResumeSignalType")] + public static extern void delete_WidgetResumeSignalType(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetResizeSignalType_Empty")] + public static extern bool WidgetResizeSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetResizeSignalType_GetConnectionCount")] + public static extern uint WidgetResizeSignalType_GetConnectionCount(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_WidgetResizeSignalType_Connect")] + public static extern void WidgetResizeSignalType_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_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_WidgetResizeSignalType_Disconnect")] + public static extern void WidgetResizeSignalType_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_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_WidgetResizeSignalType_Emit")] + public static extern void WidgetResizeSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3); - [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_new_WidgetResizeSignalType")] + public static extern global::System.IntPtr new_WidgetResizeSignalType(); - [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_delete_WidgetResizeSignalType")] + public static extern void delete_WidgetResizeSignalType(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetUpdateSignalType_Empty")] + public static extern bool WidgetUpdateSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1); - [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_WidgetUpdateSignalType_GetConnectionCount")] + public static extern uint WidgetUpdateSignalType_GetConnectionCount(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_WidgetUpdateSignalType_Connect")] + public static extern void WidgetUpdateSignalType_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_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_WidgetUpdateSignalType_Disconnect")] + public static extern void WidgetUpdateSignalType_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_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_WidgetUpdateSignalType_Emit")] + public static extern void WidgetUpdateSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4); - [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_new_WidgetUpdateSignalType")] + public static extern global::System.IntPtr new_WidgetUpdateSignalType(); - [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_delete_WidgetUpdateSignalType")] + public static extern void delete_WidgetUpdateSignalType(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); @@ -1294,14 +1290,49 @@ namespace Tizen.NUI [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_LowBatterySignalType_Empty")] + public static extern bool WidgetApplication_LowBatterySignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowBatterySignalType_GetConnectionCount")] + public static extern uint WidgetApplication_LowBatterySignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowBatterySignalType_Connect")] + public static extern void WidgetApplication_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_WidgetApplication_LowBatterySignalType_Disconnect")] + public static extern void WidgetApplication_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_WidgetApplication_LowBatterySignalType_Emit")] + public static extern void WidgetApplication_LowBatterySignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_new_LowBatterySignalType")] + public static extern global::System.IntPtr WidgetApplication_new_LowBatterySignalType(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_delete_LowBatterySignalType")] + public static extern void WidgetApplication_delete_LowBatterySignalType(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowMemorySignalType_Empty")] + public static extern bool WidgetApplication_LowMemorySignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowMemorySignalType_GetConnectionCount")] + public static extern uint WidgetApplication_LowMemorySignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowMemorySignalType_Connect")] + public static extern void WidgetApplication_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_WidgetApplication_LowMemorySignalType_Disconnect")] + public static extern void WidgetApplication_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_WidgetApplication_LowMemorySignalType_Emit")] + public static extern void WidgetApplication_LowMemorySignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_new_LowMemorySignalType")] + public static extern global::System.IntPtr WidgetApplication_new_LowMemorySignalType(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_delete_LowMemorySignalType")] + public static extern void WidgetApplication_delete_LowMemorySignalType(global::System.Runtime.InteropServices.HandleRef 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); [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Actor_Property_INHERIT_LAYOUT_DIRECTION_get")] public static extern int Actor_Property_INHERIT_LAYOUT_DIRECTION_get(); diff --git a/src/Tizen.NUI/src/internal/WidgetApplication.cs b/src/Tizen.NUI/src/internal/WidgetApplication.cs index 7608783..55d5913 100755 --- a/src/Tizen.NUI/src/internal/WidgetApplication.cs +++ b/src/Tizen.NUI/src/internal/WidgetApplication.cs @@ -164,23 +164,34 @@ namespace Tizen.NUI } /// - /// Get window. + /// Get path application resources are stored at. /// - /// The window for widget instance. - public Window GetWindow() + /// The full path of the resources + public static string GetResourcePath() { - Window ret = new Window(NDalicManualPINVOKE.WidgetApplication_GetWindow(swigCPtr), true); + string ret = NDalicManualPINVOKE.WidgetApplication_GetResourcePath(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// - /// Get path application resources are stored at. + /// Get region information from device. /// - /// The full path of the resources - public static string GetResourcePath() + /// Region information + public string GetRegion() { - string ret = NDalicManualPINVOKE.WidgetApplication_GetResourcePath(); + string ret = NDalicManualPINVOKE.WidgetApplication_GetRegion(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Get language from device. + /// + /// Language information + public string GetLanguage() + { + string ret = NDalicManualPINVOKE.WidgetApplication_GetLanguage(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -462,9 +473,9 @@ namespace Tizen.NUI } } - internal AppSignalType BatteryLowSignal() + internal WidgetApplicationLowBatterySignalType BatteryLowSignal() { - AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_BatteryLowSignal(swigCPtr), false); + WidgetApplicationLowBatterySignalType ret = new WidgetApplicationLowBatterySignalType(NDalicManualPINVOKE.WidgetApplication_LowBatterySignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -516,9 +527,9 @@ namespace Tizen.NUI } } - internal AppSignalType MemoryLowSignal() + internal WidgetApplicationLowMemorySignalType MemoryLowSignal() { - AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_MemoryLowSignal(swigCPtr), false); + WidgetApplicationLowMemorySignalType ret = new WidgetApplicationLowMemorySignalType(NDalicManualPINVOKE.WidgetApplication_LowMemorySignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } diff --git a/src/Tizen.NUI/src/internal/WidgetInstanceTerminateSignalType.cs b/src/Tizen.NUI/src/internal/WidgetApplicationLowBatterySignalType.cs similarity index 62% rename from src/Tizen.NUI/src/internal/WidgetInstanceTerminateSignalType.cs rename to src/Tizen.NUI/src/internal/WidgetApplicationLowBatterySignalType.cs index d3fb7ca..3240acf 100755 --- a/src/Tizen.NUI/src/internal/WidgetInstanceTerminateSignalType.cs +++ b/src/Tizen.NUI/src/internal/WidgetApplicationLowBatterySignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * 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. @@ -14,31 +14,46 @@ * limitations under the License. * */ + namespace Tizen.NUI { - internal class WidgetInstanceTerminateSignalType : global::System.IDisposable + /// + /// LowBatterySignalType. + /// + internal class WidgetApplicationLowBatterySignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + /// + /// swigCMemOwn. + /// protected bool swigCMemOwn; - internal WidgetInstanceTerminateSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + internal WidgetApplicationLowBatterySignalType(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) + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetApplicationLowBatterySignalType 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. + + /// + /// A Flat to check if it is already disposed. + /// protected bool disposed = false; - ~WidgetInstanceTerminateSignalType() + + /// + /// Distructor. + /// + ~WidgetApplicationLowBatterySignalType() { if (!isDisposeQueued) { @@ -47,6 +62,9 @@ namespace Tizen.NUI } } + /// + /// Dispose. + /// public void Dispose() { //Throw excpetion if Dispose() is called in separate thread. @@ -66,6 +84,11 @@ namespace Tizen.NUI } } + /// + /// you can override it to clean-up your own resources. + /// + /// DisposeTypes + /// 3 protected virtual void Dispose(DisposeTypes type) { if (disposed) @@ -87,53 +110,74 @@ namespace Tizen.NUI if (swigCPtr.Handle != global::System.IntPtr.Zero) { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_WidgetInstanceTerminateSignalType(swigCPtr); + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicManualPINVOKE.WidgetApplication_delete_LowBatterySignalType(swigCPtr); + } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; } + /// + /// Empty + /// + /// true if there is no signal attached public bool Empty() { - bool ret = NDalicManualPINVOKE.WidgetInstanceTerminateSignalType_Empty(swigCPtr); + bool ret = NDalicManualPINVOKE.WidgetApplication_LowBatterySignalType_Empty(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } + /// + /// GetConnectionCount + /// + /// number of attached signals public uint GetConnectionCount() { - uint ret = NDalicManualPINVOKE.WidgetInstanceTerminateSignalType_GetConnectionCount(swigCPtr); + uint ret = NDalicManualPINVOKE.WidgetApplication_LowBatterySignalType_GetConnectionCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } + /// + /// signal connect + /// + /// 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)); + NDalicManualPINVOKE.WidgetApplication_LowBatterySignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } + /// + /// signal disconnect + /// + /// 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)); + NDalicManualPINVOKE.WidgetApplication_LowBatterySignalType_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) + internal void Emit(Application.BatteryStatus arg) { - NDalicManualPINVOKE.WidgetInstanceTerminateSignalType_Emit(swigCPtr, WidgetData.getCPtr(arg1), SWIGTYPE_p_bundle.getCPtr(arg2), (int)arg3); + NDalicManualPINVOKE.WidgetApplication_LowBatterySignalType_Emit(swigCPtr, (int)arg); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public WidgetInstanceTerminateSignalType() : this(NDalicManualPINVOKE.new_WidgetInstanceTerminateSignalType(), true) + /// + /// LowBatterySignalType + /// + public WidgetApplicationLowBatterySignalType() : this(NDalicManualPINVOKE.WidgetApplication_new_LowBatterySignalType(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } @@ -141,3 +185,4 @@ namespace Tizen.NUI } } + diff --git a/src/Tizen.NUI/src/internal/WidgetInstancePauseOrResumeSignalType.cs b/src/Tizen.NUI/src/internal/WidgetApplicationLowMemorySignalType.cs similarity index 78% rename from src/Tizen.NUI/src/internal/WidgetInstancePauseOrResumeSignalType.cs rename to src/Tizen.NUI/src/internal/WidgetApplicationLowMemorySignalType.cs index 04eef2a..b943ede 100755 --- a/src/Tizen.NUI/src/internal/WidgetInstancePauseOrResumeSignalType.cs +++ b/src/Tizen.NUI/src/internal/WidgetApplicationLowMemorySignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * 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. @@ -14,22 +14,22 @@ * limitations under the License. * */ - + namespace Tizen.NUI { - internal class WidgetInstancePauseOrResumeSignalType : global::System.IDisposable + internal class WidgetApplicationLowMemorySignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; - internal WidgetInstancePauseOrResumeSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + internal WidgetApplicationLowMemorySignalType(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) + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetApplicationLowMemorySignalType obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } @@ -39,7 +39,7 @@ namespace Tizen.NUI //A Flat to check if it is already disposed. protected bool disposed = false; - ~WidgetInstancePauseOrResumeSignalType() + ~WidgetApplicationLowMemorySignalType() { if (!isDisposeQueued) { @@ -88,24 +88,26 @@ namespace Tizen.NUI if (swigCPtr.Handle != global::System.IntPtr.Zero) { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_WidgetInstancePauseOrResumeSignalType(swigCPtr); + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicManualPINVOKE.WidgetApplication_delete_LowMemorySignalType(swigCPtr); + } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; } public bool Empty() { - bool ret = NDalicManualPINVOKE.WidgetInstancePauseOrResumeSignalType_Empty(swigCPtr); + bool ret = NDalicManualPINVOKE.WidgetApplication_LowMemorySignalType_Empty(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public uint GetConnectionCount() { - uint ret = NDalicManualPINVOKE.WidgetInstancePauseOrResumeSignalType_GetConnectionCount(swigCPtr); + uint ret = NDalicManualPINVOKE.WidgetApplication_LowMemorySignalType_GetConnectionCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -114,7 +116,7 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - NDalicManualPINVOKE.WidgetInstancePauseOrResumeSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + NDalicManualPINVOKE.WidgetApplication_LowMemorySignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } @@ -123,18 +125,18 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - NDalicManualPINVOKE.WidgetInstancePauseOrResumeSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + NDalicManualPINVOKE.WidgetApplication_LowMemorySignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } - public void Emit(WidgetData arg) + internal void Emit(Application.MemoryStatus arg) { - NDalicManualPINVOKE.WidgetInstancePauseOrResumeSignalType_Emit(swigCPtr, WidgetData.getCPtr(arg)); + NDalicManualPINVOKE.WidgetApplication_LowMemorySignalType_Emit(swigCPtr, (int)arg); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public WidgetInstancePauseOrResumeSignalType() : this(NDalicManualPINVOKE.new_WidgetInstancePauseOrResumeSignalType(), true) + public WidgetApplicationLowMemorySignalType() : this(NDalicManualPINVOKE.WidgetApplication_new_LowMemorySignalType(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } diff --git a/src/Tizen.NUI/src/internal/WidgetInstanceResizeSignalType.cs b/src/Tizen.NUI/src/internal/WidgetCreateSignalType.cs similarity index 79% rename from src/Tizen.NUI/src/internal/WidgetInstanceResizeSignalType.cs rename to src/Tizen.NUI/src/internal/WidgetCreateSignalType.cs index c33e390..9bdb099 100755 --- a/src/Tizen.NUI/src/internal/WidgetInstanceResizeSignalType.cs +++ b/src/Tizen.NUI/src/internal/WidgetCreateSignalType.cs @@ -18,18 +18,18 @@ namespace Tizen.NUI { - internal class WidgetInstanceResizeSignalType : global::System.IDisposable + internal class WidgetCreateSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; - internal WidgetInstanceResizeSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + internal WidgetCreateSignalType(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) + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetCreateSignalType obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } @@ -39,7 +39,7 @@ namespace Tizen.NUI //A Flat to check if it is already disposed. protected bool disposed = false; - ~WidgetInstanceResizeSignalType() + ~WidgetCreateSignalType() { if (!isDisposeQueued) { @@ -47,6 +47,7 @@ namespace Tizen.NUI DisposeQueue.Instance.Add(this); } } + public void Dispose() { //Throw excpetion if Dispose() is called in separate thread. @@ -88,7 +89,7 @@ namespace Tizen.NUI if (swigCPtr.Handle != global::System.IntPtr.Zero) { swigCMemOwn = false; - NDalicManualPINVOKE.delete_WidgetInstanceResizeSignalType(swigCPtr); + NDalicManualPINVOKE.delete_WidgetCreateSignalType(swigCPtr); swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } @@ -97,14 +98,14 @@ namespace Tizen.NUI public bool Empty() { - bool ret = NDalicManualPINVOKE.WidgetInstanceResizeSignalType_Empty(swigCPtr); + bool ret = NDalicManualPINVOKE.WidgetCreateSignalType_Empty(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public uint GetConnectionCount() { - uint ret = NDalicManualPINVOKE.WidgetInstanceResizeSignalType_GetConnectionCount(swigCPtr); + uint ret = NDalicManualPINVOKE.WidgetCreateSignalType_GetConnectionCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -113,7 +114,7 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - NDalicManualPINVOKE.WidgetInstanceResizeSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + NDalicManualPINVOKE.WidgetCreateSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } @@ -122,18 +123,18 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - NDalicManualPINVOKE.WidgetInstanceResizeSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + NDalicManualPINVOKE.WidgetCreateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } - public void Emit(WidgetData arg1, Uint16Pair arg2) + public void Emit(string arg1, SWIGTYPE_p_bundle arg2, Window arg3) { - NDalicManualPINVOKE.WidgetInstanceResizeSignalType_Emit(swigCPtr, WidgetData.getCPtr(arg1), Uint16Pair.getCPtr(arg2)); + NDalicManualPINVOKE.WidgetCreateSignalType_Emit(swigCPtr, arg1, SWIGTYPE_p_bundle.getCPtr(arg2), Window.getCPtr(arg3)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public WidgetInstanceResizeSignalType() : this(NDalicManualPINVOKE.new_WidgetInstanceResizeSignalType(), true) + public WidgetCreateSignalType() : this(NDalicManualPINVOKE.new_WidgetCreateSignalType(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } diff --git a/src/Tizen.NUI/src/internal/WidgetInstanceUpdateSignalType.cs b/src/Tizen.NUI/src/internal/WidgetPauseSignalType.cs similarity index 78% rename from src/Tizen.NUI/src/internal/WidgetInstanceUpdateSignalType.cs rename to src/Tizen.NUI/src/internal/WidgetPauseSignalType.cs index 4d13046..df85d46 100755 --- a/src/Tizen.NUI/src/internal/WidgetInstanceUpdateSignalType.cs +++ b/src/Tizen.NUI/src/internal/WidgetPauseSignalType.cs @@ -18,18 +18,18 @@ namespace Tizen.NUI { - internal class WidgetInstanceUpdateSignalType : global::System.IDisposable + internal class WidgetPauseSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; - internal WidgetInstanceUpdateSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + internal WidgetPauseSignalType(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) + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetPauseSignalType obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } @@ -39,7 +39,7 @@ namespace Tizen.NUI //A Flat to check if it is already disposed. protected bool disposed = false; - ~WidgetInstanceUpdateSignalType() + ~WidgetPauseSignalType() { if (!isDisposeQueued) { @@ -89,7 +89,7 @@ namespace Tizen.NUI if (swigCPtr.Handle != global::System.IntPtr.Zero) { swigCMemOwn = false; - NDalicManualPINVOKE.delete_WidgetInstanceUpdateSignalType(swigCPtr); + NDalicManualPINVOKE.delete_WidgetPauseSignalType(swigCPtr); swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } @@ -98,14 +98,14 @@ namespace Tizen.NUI public bool Empty() { - bool ret = NDalicManualPINVOKE.WidgetInstanceUpdateSignalType_Empty(swigCPtr); + bool ret = NDalicManualPINVOKE.WidgetPauseSignalType_Empty(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public uint GetConnectionCount() { - uint ret = NDalicManualPINVOKE.WidgetInstanceUpdateSignalType_GetConnectionCount(swigCPtr); + uint ret = NDalicManualPINVOKE.WidgetPauseSignalType_GetConnectionCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -114,7 +114,7 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - NDalicManualPINVOKE.WidgetInstanceUpdateSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + NDalicManualPINVOKE.WidgetPauseSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } @@ -123,18 +123,18 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - NDalicManualPINVOKE.WidgetInstanceUpdateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + NDalicManualPINVOKE.WidgetPauseSignalType_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) + public void Emit(string arg) { - NDalicManualPINVOKE.WidgetInstanceUpdateSignalType_Emit(swigCPtr, WidgetData.getCPtr(arg1), SWIGTYPE_p_bundle.getCPtr(arg2), arg3); + NDalicManualPINVOKE.WidgetPauseSignalType_Emit(swigCPtr, arg); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public WidgetInstanceUpdateSignalType() : this(NDalicManualPINVOKE.new_WidgetInstanceUpdateSignalType(), true) + public WidgetPauseSignalType() : this(NDalicManualPINVOKE.new_WidgetPauseSignalType(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } diff --git a/src/Tizen.NUI/src/internal/WidgetResizeSignalType.cs b/src/Tizen.NUI/src/internal/WidgetResizeSignalType.cs new file mode 100755 index 0000000..5d29bcf --- /dev/null +++ b/src/Tizen.NUI/src/internal/WidgetResizeSignalType.cs @@ -0,0 +1,143 @@ +/* + * 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 WidgetResizeSignalType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal WidgetResizeSignalType(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(WidgetResizeSignalType 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; + + ~WidgetResizeSignalType() + { + 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_WidgetResizeSignalType(swigCPtr); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicManualPINVOKE.WidgetResizeSignalType_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicManualPINVOKE.WidgetResizeSignalType_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.WidgetResizeSignalType_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.WidgetResizeSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(string arg1, Window arg2) + { + NDalicManualPINVOKE.WidgetResizeSignalType_Emit(swigCPtr, arg1, Window.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public WidgetResizeSignalType() : this(NDalicManualPINVOKE.new_WidgetResizeSignalType(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/internal/WidgetInstanceCreateSignalType.cs b/src/Tizen.NUI/src/internal/WidgetResumeSignalType.cs similarity index 78% rename from src/Tizen.NUI/src/internal/WidgetInstanceCreateSignalType.cs rename to src/Tizen.NUI/src/internal/WidgetResumeSignalType.cs index d7222d2..18f320d 100755 --- a/src/Tizen.NUI/src/internal/WidgetInstanceCreateSignalType.cs +++ b/src/Tizen.NUI/src/internal/WidgetResumeSignalType.cs @@ -18,18 +18,18 @@ namespace Tizen.NUI { - internal class WidgetInstanceCreateSignalType : global::System.IDisposable + internal class WidgetResumeSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; - internal WidgetInstanceCreateSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + internal WidgetResumeSignalType(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) + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetResumeSignalType obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } @@ -39,7 +39,7 @@ namespace Tizen.NUI //A Flat to check if it is already disposed. protected bool disposed = false; - ~WidgetInstanceCreateSignalType() + ~WidgetResumeSignalType() { if (!isDisposeQueued) { @@ -89,7 +89,7 @@ namespace Tizen.NUI if (swigCPtr.Handle != global::System.IntPtr.Zero) { swigCMemOwn = false; - NDalicManualPINVOKE.delete_WidgetInstanceCreateSignalType(swigCPtr); + NDalicManualPINVOKE.delete_WidgetResumeSignalType(swigCPtr); swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } @@ -98,14 +98,14 @@ namespace Tizen.NUI public bool Empty() { - bool ret = NDalicManualPINVOKE.WidgetInstanceCreateSignalType_Empty(swigCPtr); + bool ret = NDalicManualPINVOKE.WidgetResumeSignalType_Empty(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public uint GetConnectionCount() { - uint ret = NDalicManualPINVOKE.WidgetInstanceCreateSignalType_GetConnectionCount(swigCPtr); + uint ret = NDalicManualPINVOKE.WidgetResumeSignalType_GetConnectionCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -114,7 +114,7 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - NDalicManualPINVOKE.WidgetInstanceCreateSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + NDalicManualPINVOKE.WidgetResumeSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } @@ -123,18 +123,18 @@ namespace Tizen.NUI { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); { - NDalicManualPINVOKE.WidgetInstanceCreateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + NDalicManualPINVOKE.WidgetResumeSignalType_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) + public void Emit(string arg) { - NDalicManualPINVOKE.WidgetInstanceCreateSignalType_Emit(swigCPtr, WidgetData.getCPtr(arg1), SWIGTYPE_p_bundle.getCPtr(arg2), Uint16Pair.getCPtr(arg3)); + NDalicManualPINVOKE.WidgetResumeSignalType_Emit(swigCPtr, arg); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public WidgetInstanceCreateSignalType() : this(NDalicManualPINVOKE.new_WidgetInstanceCreateSignalType(), true) + public WidgetResumeSignalType() : this(NDalicManualPINVOKE.new_WidgetResumeSignalType(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } diff --git a/src/Tizen.NUI/src/internal/WidgetTerminateSignalType.cs b/src/Tizen.NUI/src/internal/WidgetTerminateSignalType.cs new file mode 100755 index 0000000..feda42c --- /dev/null +++ b/src/Tizen.NUI/src/internal/WidgetTerminateSignalType.cs @@ -0,0 +1,143 @@ +/* + * 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 WidgetTerminateSignalType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal WidgetTerminateSignalType(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(WidgetTerminateSignalType 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; + + ~WidgetTerminateSignalType() + { + 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_WidgetTerminateSignalType(swigCPtr); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicManualPINVOKE.WidgetTerminateSignalType_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicManualPINVOKE.WidgetTerminateSignalType_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.WidgetTerminateSignalType_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.WidgetTerminateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(string arg1, SWIGTYPE_p_bundle arg2, Widget.WidgetTerminateType arg3) + { + NDalicManualPINVOKE.WidgetTerminateSignalType_Emit(swigCPtr, arg1, SWIGTYPE_p_bundle.getCPtr(arg2), (int)arg3); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public WidgetTerminateSignalType() : this(NDalicManualPINVOKE.new_WidgetTerminateSignalType(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/internal/WidgetUpdateSignalType.cs b/src/Tizen.NUI/src/internal/WidgetUpdateSignalType.cs new file mode 100755 index 0000000..89fe674 --- /dev/null +++ b/src/Tizen.NUI/src/internal/WidgetUpdateSignalType.cs @@ -0,0 +1,144 @@ +/* + * 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 WidgetUpdateSignalType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal WidgetUpdateSignalType(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(WidgetUpdateSignalType 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; + + ~WidgetUpdateSignalType() + { + 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_WidgetUpdateSignalType(swigCPtr); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicManualPINVOKE.WidgetUpdateSignalType_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicManualPINVOKE.WidgetUpdateSignalType_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.WidgetUpdateSignalType_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.WidgetUpdateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(string arg1, SWIGTYPE_p_bundle arg2, int arg3) + { + NDalicManualPINVOKE.WidgetUpdateSignalType_Emit(swigCPtr, arg1, SWIGTYPE_p_bundle.getCPtr(arg2), arg3); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public WidgetUpdateSignalType() : this(NDalicManualPINVOKE.new_WidgetUpdateSignalType(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/public/NUIWidgetApplication.cs b/src/Tizen.NUI/src/public/NUIWidgetApplication.cs index daf782b..d2f4652 100755 --- a/src/Tizen.NUI/src/public/NUIWidgetApplication.cs +++ b/src/Tizen.NUI/src/public/NUIWidgetApplication.cs @@ -141,18 +141,5 @@ namespace Tizen.NUI return ((NUIWidgetCoreBackend)this.Backend).WidgetApplicationHandle; } } - - /// - /// Get the window instance. - /// - /// 4 - public Window Window - { - get - { - //return Window.Instance; - return ApplicationHandle.GetWindow(); - } - } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Widget.cs b/src/Tizen.NUI/src/public/Widget.cs index e4b9956..930a46f 100755 --- a/src/Tizen.NUI/src/public/Widget.cs +++ b/src/Tizen.NUI/src/public/Widget.cs @@ -99,10 +99,10 @@ namespace Tizen.NUI public class CreateEventArgs : EventArgs { /// - /// widget data. + /// widget id. /// /// 4 - public WidgetData WidgetData + public string ID { get; set; @@ -119,10 +119,10 @@ namespace Tizen.NUI } /// - /// window size. + /// window. /// /// 4 - public Size2D WindowSize + public Window Window { get; set; @@ -130,7 +130,7 @@ namespace Tizen.NUI } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void CreateCallbackType(IntPtr widgetData, IntPtr bundle, IntPtr windowSize); + private delegate void CreateCallbackType(string id, IntPtr bundle, IntPtr window); private CreateCallbackType _createCallback; private EventHandler _createEventHandler; @@ -162,30 +162,27 @@ namespace Tizen.NUI } } - private void OnCreate(IntPtr widgetData, IntPtr bundle, IntPtr windowSize) + private void OnCreate(string id, IntPtr bundle, IntPtr window) { CreateEventArgs e = new CreateEventArgs(); - if (widgetData != null) - { - e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData); - } + + e.ID = id; + if (bundle != null) { e.Bundle = new SWIGTYPE_p_bundle(bundle, false); } - if (windowSize != null) + if (window != null) { - var val = new Uint16Pair(windowSize, false); - e.WindowSize = val; - val.Dispose(); + e.Window = new Window(window, false); } _createEventHandler?.Invoke(this, e); } - internal WidgetInstanceCreateSignalType CreateSignal() + internal WidgetCreateSignalType CreateSignal() { - WidgetInstanceCreateSignalType ret = new WidgetInstanceCreateSignalType(NDalicManualPINVOKE.Widget_CreateSignal(swigCPtr), false); + WidgetCreateSignalType ret = new WidgetCreateSignalType(NDalicManualPINVOKE.Widget_CreateSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -196,10 +193,10 @@ namespace Tizen.NUI public class TerminateEventArgs : EventArgs { /// - /// widget data. + /// widget id. /// /// 4 - public WidgetData WidgetData + public string ID { get; set; @@ -227,7 +224,7 @@ namespace Tizen.NUI } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void TerminateCallbackType(IntPtr widgetData, IntPtr bundle, WidgetTerminateType widgetTerminateType); + private delegate void TerminateCallbackType(string id, IntPtr bundle, WidgetTerminateType widgetTerminateType); private TerminateCallbackType _terminateCallback; private EventHandler _terminateEventHandler; @@ -259,13 +256,11 @@ namespace Tizen.NUI } } - private void OnTerminate(IntPtr widgetData, IntPtr bundle, WidgetTerminateType widgetTerminateType) + private void OnTerminate(string id, IntPtr bundle, WidgetTerminateType widgetTerminateType) { TerminateEventArgs e = new TerminateEventArgs(); - if (widgetData != null) - { - e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData); - } + e.ID = id; + if (bundle != null) { e.Bundle = new SWIGTYPE_p_bundle(bundle, false); @@ -275,9 +270,9 @@ namespace Tizen.NUI _terminateEventHandler?.Invoke(this, e); } - internal WidgetInstanceTerminateSignalType TerminateSignal() + internal WidgetTerminateSignalType TerminateSignal() { - WidgetInstanceTerminateSignalType ret = new WidgetInstanceTerminateSignalType(NDalicManualPINVOKE.Widget_TerminateSignal(swigCPtr), false); + WidgetTerminateSignalType ret = new WidgetTerminateSignalType(NDalicManualPINVOKE.Widget_TerminateSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -288,10 +283,10 @@ namespace Tizen.NUI public class PauseEventArgs : EventArgs { /// - /// widget data. + /// widget id. /// - /// 4 - public WidgetData WidgetData + /// 4 + public string ID { get; set; @@ -299,7 +294,7 @@ namespace Tizen.NUI } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void PauseCallbackType(IntPtr widgetData); + private delegate void PauseCallbackType(string id); private PauseCallbackType _pauseCallback; private EventHandler _pauseEventHandler; @@ -331,20 +326,17 @@ namespace Tizen.NUI } } - private void OnPause(IntPtr widgetData) + private void OnPause(string id) { PauseEventArgs e = new PauseEventArgs(); - if (widgetData != null) - { - e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData); - } + e.ID = id; _pauseEventHandler?.Invoke(this, e); } - internal WidgetInstancePauseOrResumeSignalType PauseSignal() + internal WidgetPauseSignalType PauseSignal() { - WidgetInstancePauseOrResumeSignalType ret = new WidgetInstancePauseOrResumeSignalType(NDalicManualPINVOKE.Widget_PauseSignal(swigCPtr), false); + WidgetPauseSignalType ret = new WidgetPauseSignalType(NDalicManualPINVOKE.Widget_PauseSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -355,10 +347,10 @@ namespace Tizen.NUI public class ResumeEventArgs : EventArgs { /// - /// widget data. + /// widget id. /// - /// 4 - public WidgetData WidgetData + /// 4 + public string ID { get; set; @@ -366,7 +358,7 @@ namespace Tizen.NUI } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void ResumeCallbackType(IntPtr widgetData); + private delegate void ResumeCallbackType(string id); private ResumeCallbackType _resumeCallback; private EventHandler _resumeEventHandler; @@ -398,20 +390,17 @@ namespace Tizen.NUI } } - private void OnResume(IntPtr widgetData) + private void OnResume(string id) { ResumeEventArgs e = new ResumeEventArgs(); - if (widgetData != null) - { - e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData); - } + e.ID = id; _resumeEventHandler?.Invoke(this, e); } - internal WidgetInstancePauseOrResumeSignalType ResumeSignal() + internal WidgetResumeSignalType ResumeSignal() { - WidgetInstancePauseOrResumeSignalType ret = new WidgetInstancePauseOrResumeSignalType(NDalicManualPINVOKE.Widget_ResumeSignal(swigCPtr), false); + WidgetResumeSignalType ret = new WidgetResumeSignalType(NDalicManualPINVOKE.Widget_ResumeSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -422,20 +411,20 @@ namespace Tizen.NUI public class ResizeEventArgs : EventArgs { /// - /// widget data. + /// widget id. /// - /// 4 - public WidgetData WidgetData + /// 4 + public string ID { get; set; } /// - /// window size. + /// window. /// - /// 4 - public Size2D WindowSize + /// 4 + public Window Window { get; set; @@ -443,7 +432,7 @@ namespace Tizen.NUI } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void ResizeCallbackType(IntPtr widgetData, IntPtr windowSize); + private delegate void ResizeCallbackType(string id, IntPtr window); private ResizeCallbackType _resizeCallback; private EventHandler _resizeEventHandler; @@ -475,26 +464,21 @@ namespace Tizen.NUI } } - private void OnResize(IntPtr widgetData, IntPtr windowSize) + private void OnResize(string id, IntPtr window) { ResizeEventArgs e = new ResizeEventArgs(); - if (widgetData != null) + e.ID = id; + if (window != null) { - e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData); - } - if (windowSize != null) - { - var val = new Uint16Pair(windowSize, false); - e.WindowSize = val; - val.Dispose(); + e.Window = new Window(window, false); } _resizeEventHandler?.Invoke(this, e); } - internal WidgetInstanceResizeSignalType ResizeSignal() + internal WidgetResizeSignalType ResizeSignal() { - WidgetInstanceResizeSignalType ret = new WidgetInstanceResizeSignalType(NDalicManualPINVOKE.Widget_ResizeSignal(swigCPtr), false); + WidgetResizeSignalType ret = new WidgetResizeSignalType(NDalicManualPINVOKE.Widget_ResizeSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -508,7 +492,7 @@ namespace Tizen.NUI /// widget data. /// /// 4 - public WidgetData WidgetData + public string ID { get; set; @@ -541,7 +525,7 @@ namespace Tizen.NUI } [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void UpdateCallbackType(IntPtr widgetData, IntPtr bundle, int force); + private delegate void UpdateCallbackType(string id, IntPtr bundle, int force); private UpdateCallbackType _updateCallback; private EventHandler _updateEventHandler; @@ -573,13 +557,10 @@ namespace Tizen.NUI } } - private void OnUpdate(IntPtr widgetData, IntPtr bundle, int force) + private void OnUpdate(string id, IntPtr bundle, int force) { UpdateEventArgs e = new UpdateEventArgs(); - if (widgetData != null) - { - e.WidgetData = WidgetData.GetWidgetDataFromPtr(widgetData); - } + e.ID = id; if (bundle != null) { e.Bundle = new SWIGTYPE_p_bundle(bundle, false); @@ -589,9 +570,9 @@ namespace Tizen.NUI _updateEventHandler?.Invoke(this, e); } - internal WidgetInstanceUpdateSignalType UpdateSignal() + internal WidgetUpdateSignalType UpdateSignal() { - WidgetInstanceUpdateSignalType ret = new WidgetInstanceUpdateSignalType(NDalicManualPINVOKE.Widget_UpdateSignal(swigCPtr), false); + WidgetUpdateSignalType ret = new WidgetUpdateSignalType(NDalicManualPINVOKE.Widget_UpdateSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } diff --git a/src/Tizen.NUI/src/public/WidgetData.cs b/src/Tizen.NUI/src/public/WidgetData.cs deleted file mode 100755 index 47d100a..0000000 --- a/src/Tizen.NUI/src/public/WidgetData.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* - * 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 -{ - /// - /// Widget data. - /// - 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; - } - - /// - /// To make Window instance be disposed. - /// - 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; - } - - /// - /// Get widget instance id. - /// - /// Id of widget instance. - /// 4 - 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; - } - - /// - /// Get widget instance content. - /// - /// Content of widget instance. - /// 4 - public string GetContent() - { - string ret = NDalicManualPINVOKE.WidgetData_GetContent(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Get widget instance Window. - /// - /// Window of widget instance - /// 4 - 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(); - } - - /// - /// Set widget instance arguments. - /// - /// Content of widget instance - /// 4 - public void SetContent(string content) - { - NDalicManualPINVOKE.WidgetData_SetContent(swigCPtr, content); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Set widget instance arguments. - /// - /// Window of widget instance. - /// 4 - public void SetWindow(Window window) - { - NDalicManualPINVOKE.WidgetData_SetWindow(swigCPtr, Window.getCPtr(window)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } -} \ No newline at end of file -- 2.7.4