Update widget and widget application
[platform/core/csapi/tizenfx.git] / 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.
  * 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();
         }