Modified not to create ELM window 02/320502/1 accepted/tizen_unified accepted/tizen_unified_x tizen accepted/tizen/unified/20250328.082305 accepted/tizen/unified/x/20250330.015847
authorInhong Han <inhong1.han@samsung.com>
Tue, 4 Mar 2025 08:46:56 +0000 (17:46 +0900)
committerInhong Han <inhong1.han@samsung.com>
Tue, 4 Mar 2025 08:47:49 +0000 (17:47 +0900)
Change-Id: Ia1f69502a4d8b475b9d55e6983520c6a651d2e4f

ISEDefaultNUI/Interop/Interop.SclNui.cs
ISEDefaultNUI/SCLNUI.cs
packaging/org.tizen.ISEDefaultNUI-1.0.0.tpk

index 063ffe3e099e0a19960de8ba4203a34d58d6ba70..07e010139cae64bf4a61ccbce693291531831b6a 100644 (file)
@@ -19,7 +19,7 @@
 
 using System;
 using System.Collections.Generic;
-using System.Linq;\r
+using System.Linq;
 using System.Runtime.InteropServices;
 using Tizen;
 using Tizen.Internals;
@@ -106,10 +106,10 @@ internal static partial class Interop
             Done           /* We're done with this event, do not call any other default SCL event handlers */
         }
 
-        internal enum SclNuiCandidateEvent\r
-        {\r
-            Start = 0,\r
-            End\r
+        internal enum SclNuiCandidateEvent
+        {
+            Start = 0,
+            End
         }
 
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
@@ -158,7 +158,7 @@ internal static partial class Interop
         internal delegate void CandidateForeachCallback(IntPtr candidate, IntPtr user_data);
 
         [DllImport(Libraries.SclNui, EntryPoint = "scl_nui_init")]
-        internal static extern int SclNuiInit(string entry_filepath);
+        internal static extern int SclNuiInit(IntPtr obj, string entry_filepath);
 
         [DllImport(Libraries.SclNui, EntryPoint = "scl_nui_fini")]
         internal static extern int SclNuiFini();
index 778851909d997099447c6d77b972ac4c62ebfbc2..34df8db62d7094d0d87d1b853a386d0a4da19fbf 100644 (file)
@@ -37,6 +37,8 @@ namespace ISEDefaultNUI
 
         private int beforePositionX = 0;
         private int afterPositionX = 0;
+        private int rectWidth = 0;
+        private int rectHeight = 0;
 
         private MagnifierWindow magnifier = MagnifierWindow.Instance;
         private DimView dim = DimView.Instance;
@@ -236,7 +238,7 @@ namespace ISEDefaultNUI
                 Log.Info("NUIIME", "rectangle: x=" + pos_x + ", y=" + pos_y + ", w=" + width + ", h=" + height);
                 Log.Info("NUIIME", "fill: " + fill + ", r=" + fill_color_r + ", g=" + fill_color_g + ", b=" + fill_color_b + ", a=" + fill_color_a);
 
-                if (width <= 1 && height <= 1)
+                if (rectWidth == width && rectHeight == height)
                     return;
 
                 WindowAttribute.WindowType windowType = (WindowAttribute.WindowType)type;
@@ -244,6 +246,8 @@ namespace ISEDefaultNUI
                 {
                     case WindowAttribute.WindowType.Keypad:
                         {
+                            rectWidth = width;
+                            rectHeight = height;
                             rectView = draw_rectangle(pos_x, pos_y, width, height, fill, fill_color_r, fill_color_g, fill_color_b, fill_color_a);
                             Add(rectView);
                             break;
@@ -585,10 +589,7 @@ namespace ISEDefaultNUI
                     if (imePortraitSize == null || imeLandscapeSize == null)
                         GetDefaultSize();
 
-                    if (deviceAngle == 0 || deviceAngle == 180)
-                        magnifier.SetPosition(new WindowAttribute.Position(x, screenSize.Height - imePortraitSize.Height + y, rotationX, screenSize.Width - imeLandscapeSize.Height + rotationY));
-                    else
-                        magnifier.SetPosition(new WindowAttribute.Position(x, screenSize.Width - imeLandscapeSize.Height + y, rotationX, screenSize.Height - imePortraitSize.Height + rotationY));
+                    magnifier.SetPosition(new WindowAttribute.Position(x, y, rotationX, rotationY));
                 }
             };
             SclNuiUpdateWindowPositionCb(_updateWindowPositionChangedEvent, (IntPtr)null);
@@ -903,7 +904,8 @@ namespace ISEDefaultNUI
 
         public int Init(string entry_filepath)
         {
-            return SclNuiInit(entry_filepath);
+            IntPtr nativeHandle = new Window.SafeNativeWindowHandle().DangerousGetHandle();
+            return SclNuiInit(nativeHandle, entry_filepath);
         }
 
         public int Fini()
index 3649b03ec541cddb5892a050a86171c9f9672f77..75b06d44d91caf872954b870c014f91307c78c1e 100644 (file)
Binary files a/packaging/org.tizen.ISEDefaultNUI-1.0.0.tpk and b/packaging/org.tizen.ISEDefaultNUI-1.0.0.tpk differ