[Tizen] Enhance Application device signals 91/152791/2
authorminho.sun <minho.sun@samsung.com>
Wed, 27 Sep 2017 06:15:01 +0000 (15:15 +0900)
committerxb.teng <xb.teng@samsung.com>
Wed, 27 Sep 2017 08:13:15 +0000 (16:13 +0800)
Change-Id: Iac22f76b0d697b3ec8625f74afc1659aeb5f1939
Signed-off-by: minho.sun <minho.sun@samsung.com>
Tizen.NUI/src/internal/Application.cs
Tizen.NUI/src/internal/LowBatterySignalType.cs [new file with mode: 0755]
Tizen.NUI/src/internal/LowMemorySignalType.cs [new file with mode: 0755]
Tizen.NUI/src/internal/NDalicPINVOKE.cs
Tizen.NUI/src/internal/NUICoreBackend.cs

index b7167d8..ce3d71e 100755 (executable)
@@ -219,20 +219,20 @@ namespace Tizen.NUI
       */
     internal class NUIApplicationBatteryLowEventArgs : EventArgs
     {
-        private Application _application;
+        private Application.BatteryStatus _status;
         /**
           * @brief Application - is the application that is being affected when the battery level of the device is low
           *
           */
-        public Application Application
+        public Application.BatteryStatus BatteryStatus
         {
             get
             {
-                return _application;
+                return _status;
             }
             set
             {
-                _application = value;
+                _status = value;
             }
         }
     }
@@ -243,20 +243,20 @@ namespace Tizen.NUI
       */
     internal class NUIApplicationMemoryLowEventArgs : EventArgs
     {
-        private Application _application;
+        private Application.MemoryStatus _status;
         /**
           * @brief Application - is the application that is being affected when the memory level of the device is low
           *
           */
-        public Application Application
+        public Application.MemoryStatus MemoryStatus
         {
             get
             {
-                return _application;
+                return _status;
             }
             set
             {
-                _application = value;
+                _status = value;
             }
         }
     }
@@ -402,6 +402,20 @@ namespace Tizen.NUI
             base.Dispose(type);
         }
 
+        public enum BatteryStatus
+        {
+            Normal,
+            CriticalLow,
+            PowerOff
+        };
+
+        public enum MemoryStatus
+        {
+            Normal,
+            SoftWarning,
+            HardWarning
+        };
+
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
         private delegate void NUIApplicationInitEventCallbackDelegate(IntPtr application);
         private DaliEventHandler<object, NUIApplicationInitEventArgs> _applicationInitEventHandler;
@@ -446,12 +460,12 @@ namespace Tizen.NUI
         private NUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
 
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void NUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
+        private delegate void NUIApplicationBatteryLowEventCallbackDelegate(BatteryStatus status);
         private DaliEventHandler<object, NUIApplicationBatteryLowEventArgs> _applicationBatteryLowEventHandler;
         private NUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
 
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void NUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
+        private delegate void NUIApplicationMemoryLowEventCallbackDelegate(MemoryStatus status);
         private DaliEventHandler<object, NUIApplicationMemoryLowEventArgs> _applicationMemoryLowEventHandler;
         private NUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
 
@@ -907,12 +921,12 @@ namespace Tizen.NUI
         }
 
         // Callback for Application BatteryLowSignal
-        private void OnNUIApplicationBatteryLow(IntPtr data)
+        private void OnNUIApplicationBatteryLow(BatteryStatus status)
         {
             NUIApplicationBatteryLowEventArgs e = new NUIApplicationBatteryLowEventArgs();
 
             // Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data
-            e.Application = Application.GetApplicationFromPtr(data);
+            e.BatteryStatus = status;
 
             if (_applicationBatteryLowEventHandler != null)
             {
@@ -958,12 +972,12 @@ namespace Tizen.NUI
         }
 
         // Callback for Application MemoryLowSignal
-        private void OnNUIApplicationMemoryLow(IntPtr data)
+        private void OnNUIApplicationMemoryLow(MemoryStatus status)
         {
             NUIApplicationMemoryLowEventArgs e = new NUIApplicationMemoryLowEventArgs();
 
             // Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data
-            e.Application = Application.GetApplicationFromPtr(data);
+            e.MemoryStatus = status;
 
             if (_applicationMemoryLowEventHandler != null)
             {
@@ -1246,6 +1260,21 @@ namespace Tizen.NUI
             return ret;
         }
 
+        public string GetLanguage()
+        {
+            string ret = NDalicPINVOKE.Application_GetLanguage(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public string GetRegion()
+        {
+            string ret = NDalicPINVOKE.Application_GetRegion(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+
         internal ApplicationSignal InitSignal()
         {
             ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_InitSignal(swigCPtr), false);
@@ -1309,16 +1338,16 @@ namespace Tizen.NUI
             return ret;
         }
 
-        internal ApplicationSignal BatteryLowSignal()
+        internal LowBatterySignalType BatteryLowSignal()
         {
-            ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_BatteryLowSignal(swigCPtr), false);
+            LowBatterySignalType ret = new LowBatterySignalType(NDalicPINVOKE.Application_BatteryLowSignal(swigCPtr), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-        internal ApplicationSignal MemoryLowSignal()
+        internal LowMemorySignalType MemoryLowSignal()
         {
-            ApplicationSignal ret = new ApplicationSignal(NDalicPINVOKE.Application_MemoryLowSignal(swigCPtr), false);
+            LowMemorySignalType ret = new LowMemorySignalType(NDalicPINVOKE.Application_MemoryLowSignal(swigCPtr), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
diff --git a/Tizen.NUI/src/internal/LowBatterySignalType.cs b/Tizen.NUI/src/internal/LowBatterySignalType.cs
new file mode 100755 (executable)
index 0000000..093cbcd
--- /dev/null
@@ -0,0 +1,145 @@
+/** Copyright (c) 2017 Samsung Electronics Co., Ltd.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+namespace Tizen.NUI
+{
+
+    public class LowBatterySignalType : global::System.IDisposable
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+        protected bool swigCMemOwn;
+
+        internal LowBatterySignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
+        {
+            swigCMemOwn = cMemoryOwn;
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LowBatterySignalType obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        //A Flag to check who called Dispose(). (By User or DisposeQueue)
+        private bool isDisposeQueued = false;
+        //A Flat to check if it is already disposed.
+        protected bool disposed = false;
+
+
+        ~LowBatterySignalType()
+        {
+            if (!isDisposeQueued)
+            {
+                isDisposeQueued = true;
+                DisposeQueue.Instance.Add(this);
+            }
+        }
+
+        public void Dispose()
+        {
+            //Throw excpetion if Dispose() is called in separate thread.
+            if (!Window.IsInstalled())
+            {
+                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+            }
+
+            if (isDisposeQueued)
+            {
+                Dispose(DisposeTypes.Implicit);
+            }
+            else
+            {
+                Dispose(DisposeTypes.Explicit);
+                System.GC.SuppressFinalize(this);
+            }
+        }
+
+        protected virtual void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+
+            if (swigCPtr.Handle != global::System.IntPtr.Zero)
+            {
+                if (swigCMemOwn)
+                {
+                    swigCMemOwn = false;
+                    NDalicPINVOKE.delete_LowBatterySignalType(swigCPtr);
+                }
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+            }
+            disposed = true;
+        }
+
+        public bool Empty()
+        {
+            bool ret = NDalicPINVOKE.LowBatterySignalType_Empty(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public uint GetConnectionCount()
+        {
+            uint ret = NDalicPINVOKE.LowBatterySignalType_GetConnectionCount(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public void Connect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+            {
+                NDalicPINVOKE.LowBatterySignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        public void Disconnect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+            {
+                NDalicPINVOKE.LowBatterySignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        internal void Emit(Application.BatteryStatus arg)
+        {
+            NDalicPINVOKE.LowBatterySignalType_Emit(swigCPtr, (int)arg);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        public LowBatterySignalType() : this(NDalicPINVOKE.new_LowBatterySignalType(), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+    }
+
+}
diff --git a/Tizen.NUI/src/internal/LowMemorySignalType.cs b/Tizen.NUI/src/internal/LowMemorySignalType.cs
new file mode 100755 (executable)
index 0000000..a47eefc
--- /dev/null
@@ -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
+{
+
+    public class LowMemorySignalType : global::System.IDisposable
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+        protected bool swigCMemOwn;
+
+        internal LowMemorySignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
+        {
+            swigCMemOwn = cMemoryOwn;
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LowMemorySignalType obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        //A Flag to check who called Dispose(). (By User or DisposeQueue)
+        private bool isDisposeQueued = false;
+        //A Flat to check if it is already disposed.
+        protected bool disposed = false;
+
+        ~LowMemorySignalType()
+        {
+            if (!isDisposeQueued)
+            {
+                isDisposeQueued = true;
+                DisposeQueue.Instance.Add(this);
+            }
+        }
+
+        public void Dispose()
+        {
+            //Throw excpetion if Dispose() is called in separate thread.
+            if (!Window.IsInstalled())
+            {
+                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+            }
+
+            if (isDisposeQueued)
+            {
+                Dispose(DisposeTypes.Implicit);
+            }
+            else
+            {
+                Dispose(DisposeTypes.Explicit);
+                System.GC.SuppressFinalize(this);
+            }
+        }
+
+        protected virtual void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+
+            if (swigCPtr.Handle != global::System.IntPtr.Zero)
+            {
+                if (swigCMemOwn)
+                {
+                    swigCMemOwn = false;
+                    NDalicPINVOKE.delete_LowMemorySignalType(swigCPtr);
+                }
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+            }
+            disposed = true;
+        }
+
+        public bool Empty()
+        {
+            bool ret = NDalicPINVOKE.LowMemorySignalType_Empty(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public uint GetConnectionCount()
+        {
+            uint ret = NDalicPINVOKE.LowMemorySignalType_GetConnectionCount(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public void Connect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+            {
+                NDalicPINVOKE.LowMemorySignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        public void Disconnect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+            {
+                NDalicPINVOKE.LowMemorySignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        internal void Emit(Application.MemoryStatus arg)
+        {
+            NDalicPINVOKE.LowMemorySignalType_Emit(swigCPtr, (int)arg);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        public LowMemorySignalType() : this(NDalicPINVOKE.new_LowMemorySignalType(), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+    }
+
+}
index ada713d..6119078 100755 (executable)
@@ -6353,6 +6353,12 @@ class NDalicPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_GetStereoBase")]
   public static extern float Application_GetStereoBase(global::System.Runtime.InteropServices.HandleRef jarg1);
 
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_GetLanguage")]
+  public static extern string Application_GetLanguage(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_GetRegion")]
+  public static extern string Application_GetRegion(global::System.Runtime.InteropServices.HandleRef jarg1);
+
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_InitSignal")]
   public static extern global::System.IntPtr Application_InitSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
 
@@ -6428,9 +6434,51 @@ class NDalicPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_ApplicationControlSignal")]
   public static extern void delete_ApplicationControlSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-  [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_Application_New__SWIG_4")]
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_New__SWIG_4")]
   public static extern global::System.IntPtr Application_New__SWIG_4(int jarg1, string jarg3, int jarg4, global::System.Runtime.InteropServices.HandleRef jarg5);
 
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowBatterySignalType_Empty")]
+  public static extern bool LowBatterySignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowBatterySignalType_GetConnectionCount")]
+  public static extern uint LowBatterySignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowBatterySignalType_Connect")]
+  public static extern void LowBatterySignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowBatterySignalType_Disconnect")]
+  public static extern void LowBatterySignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowBatterySignalType_Emit")]
+  public static extern void LowBatterySignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_new_LowBatterySignalType")]
+  public static extern global::System.IntPtr new_LowBatterySignalType();
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_delete_LowBatterySignalType")]
+  public static extern void delete_LowBatterySignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowMemorySignalType_Empty")]
+  public static extern bool LowMemorySignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowMemorySignalType_GetConnectionCount")]
+  public static extern uint LowMemorySignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowMemorySignalType_Connect")]
+  public static extern void LowMemorySignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowMemorySignalType_Disconnect")]
+  public static extern void LowMemorySignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_LowMemorySignalType_Emit")]
+  public static extern void LowMemorySignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_new_LowMemorySignalType")]
+  public static extern global::System.IntPtr new_LowMemorySignalType();
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_delete_LowMemorySignalType")]
+  public static extern void delete_LowMemorySignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_TimerSignalType_Empty")]
   public static extern bool TimerSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
 
index fc2dc9b..81c0467 100755 (executable)
@@ -160,7 +160,7 @@ namespace Tizen.NUI
             Log.Debug("NUI", "NUICorebackend OnRegionChanged Called");
             var handler = Handlers[EventType.RegionFormatChanged] as Action<RegionFormatChangedEventArgs>;
             // Need to make new signal return in native to return right value.
-            handler?.Invoke( new RegionFormatChangedEventArgs(""));
+            handler?.Invoke( new RegionFormatChangedEventArgs(e.Application.GetRegion()));
         }
 
         /// <summary>
@@ -173,7 +173,24 @@ namespace Tizen.NUI
             Log.Debug("NUI", "NUICorebackend OnMemoryLow Called");
             var handler = Handlers[EventType.LowMemory] as Action<LowMemoryEventArgs>;
             // Need to make new signal return in native to return right value.
-            handler?.Invoke( new LowMemoryEventArgs(LowMemoryStatus.None));
+            switch( e.MemoryStatus )
+            {
+                case Application.MemoryStatus.Normal:
+                {
+                    handler?.Invoke(new LowMemoryEventArgs(LowMemoryStatus.None));
+                    break;
+                }
+                case Application.MemoryStatus.SoftWarning:
+                {
+                    handler?.Invoke(new LowMemoryEventArgs(LowMemoryStatus.SoftWarning));
+                    break;
+                }
+                case Application.MemoryStatus.HardWarning:
+                {
+                    handler?.Invoke(new LowMemoryEventArgs(LowMemoryStatus.HardWarning));
+                    break;
+                }
+            }
         }
 
         /// <summary>
@@ -186,7 +203,7 @@ namespace Tizen.NUI
             Log.Debug("NUI", "NUICorebackend OnLanguageChanged Called");
             var handler = Handlers[EventType.LocaleChanged] as Action<LocaleChangedEventArgs>;
             // Need to make new signal return in native to return right value.
-            handler?.Invoke( new LocaleChangedEventArgs(""));
+            handler?.Invoke( new LocaleChangedEventArgs(e.Application.GetLanguage()));
         }
 
         /// <summary>
@@ -199,7 +216,24 @@ namespace Tizen.NUI
             Log.Debug("NUI", "NUICorebackend OnBatteryLow Called");
             var handler = Handlers[EventType.LowBattery] as Action<LowBatteryEventArgs>;
             // Need to make new signal return in native to return right value.
-            handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.None));
+            switch( e.BatteryStatus )
+            {
+                case Application.BatteryStatus.Normal:
+                {
+                    handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.None));
+                    break;
+                }
+                case Application.BatteryStatus.CriticalLow:
+                {
+                    handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.CriticalLow));
+                    break;
+                }
+                case Application.BatteryStatus.PowerOff:
+                {
+                    handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.PowerOff));
+                    break;
+                }
+            }
         }
 
         /// <summary>