using System;
using System.Collections.Generic;
-using System.Linq;\r
+using System.Linq;
using System.Runtime.InteropServices;
using Tizen;
using Tizen.Internals;
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)]
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();
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;
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;
{
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;
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);
public int Init(string entry_filepath)
{
- return SclNuiInit(entry_filepath);
+ IntPtr nativeHandle = new Window.SafeNativeWindowHandle().DangerousGetHandle();
+ return SclNuiInit(nativeHandle, entry_filepath);
}
public int Fini()