1. Supports IME window and application.
It is only for internal IME window and application.
These new APIs should be not public.
2. Supports floating window mode.
3. Supports window resized/moved by display server.
return instance;
}
+ public static Application NewApplication(string stylesheet, NUIApplication.WindowMode windowMode, Rectangle positionSize, WindowType type)
+ {
+ if (instance)
+ {
+ return instance;
+ }
+ Application ret = New(1, stylesheet, windowMode, positionSize, type);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ instance = ret;
+ return instance;
+ }
+
/// <summary>
/// Ensures that the function passed in is called from the main loop when it is idle.
/// </summary>
return ret;
}
+ public static Application New(int argc, string stylesheet, NUIApplication.WindowMode windowMode, Rectangle positionSize, WindowType type)
+ {
+ Application ret = new Application(Interop.Application.New(argc, stylesheet, (int)windowMode, Rectangle.getCPtr(positionSize), (int)type), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
public Application() : this(Interop.Application.NewApplication(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
*/
using System;
+using System.ComponentModel;
using System.Collections.Generic;
using Tizen.Applications.CoreBackend;
using Tizen.Applications;
private string stylesheet = "";
private NUIApplication.WindowMode windowMode = NUIApplication.WindowMode.Opaque;
private Rectangle windowRectangle = null;
+ private WindowType defaultWindowType = WindowType.Normal;
/// <summary>
/// The Dictionary to contain each type of event callback.
}
/// <summary>
+ /// The constructor with stylesheet, window mode, window size, window position and default window type.
+ /// This will be hidden as inhouse API. Because it is only for internal IME window.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public NUICoreBackend(string stylesheet, NUIApplication.WindowMode windowMode, Size2D windowSize, Position2D windowPosition, WindowType type)
+ {
+ this.stylesheet = stylesheet;
+ this.windowMode = windowMode;
+ if (windowSize != null && windowPosition != null)
+ {
+ this.windowRectangle = new Rectangle(windowPosition.X, windowPosition.Y, windowSize.Width, windowSize.Height);
+ }
+ this.defaultWindowType = type;
+ }
+
+ /// <summary>
/// Adds NUIApplication event to Application.
/// Puts each type of event callback in Dictionary.
/// </summary>
args[0] = this.GetType().Assembly.FullName.Replace(" ", "");
}
- if (windowRectangle != null)
+ if(defaultWindowType != WindowType.Normal)
{
- application = Application.NewApplication(args, stylesheet, windowMode, windowRectangle);
+ application = Application.NewApplication(stylesheet, windowMode, windowRectangle, defaultWindowType);
}
else
{
- application = Application.NewApplication(args, stylesheet, windowMode);
+ if (windowRectangle != null)
+ {
+ application = Application.NewApplication(args, stylesheet, windowMode, windowRectangle);
+ }
+ else
+ {
+ application = Application.NewApplication(args, stylesheet, windowMode);
+ }
}
application.BatteryLow += OnBatteryLow;
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_New__SWIG_4")]
public static extern global::System.IntPtr New(int jarg1, string jarg3, int jarg4, global::System.Runtime.InteropServices.HandleRef jarg5);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_New__SWIG_5")]
+ public static extern global::System.IntPtr New(int jarg1, string jarg3, int jarg4, global::System.Runtime.InteropServices.HandleRef jarg5, int jarg6);
}
}
}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetNativeId")]
public static extern int GetNativeId(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SetPositionSizeWithOrientation")]
+ public static extern void SetPositionSizeWithOrientation(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_EnableFloatingMode")]
+ public static extern void EnableFloatingMode(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_RequestMoveToServer")]
+ public static extern void RequestMoveToServer(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_RequestResizeToServer")]
+ public static extern void RequestResizeToServer(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+
+
}
}
}
}
/// <summary>
+ /// The constructor with a stylesheet, window mode, window size, position and default window type.
+ /// </summary>
+ /// <param name="styleSheet">The styleSheet URL.</param>
+ /// <param name="windowMode">The windowMode.</param>
+ /// <param name="windowSize">The window size.</param>
+ /// <param name="windowPosition">The window position.</param>
+ /// <param name="type">The default window type.</param>
+ /// <since_tizen> 9 </since_tizen>
+ /// This should be hidden. Because the major purpose is to support IME window as keyboard application.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public NUIApplication(string styleSheet, WindowMode windowMode, Size2D windowSize, Position2D windowPosition, WindowType type) : base(new NUICoreBackend(styleSheet, windowMode, windowSize, windowPosition, type))
+ {
+ ExternalThemeManager.Initialize();
+ }
+
+ /// <summary>
/// Occurs whenever the application is resumed.
/// </summary>
/// <since_tizen> 4 </since_tizen>
/// <summary>
/// Used for simple dialog windows.
/// </summary>
- Dialog
+ Dialog,
+ /// <summary>
+ /// Used for IME window that is used for keyboard window.
+ /// It should be set in Application's New input param when application is created.
+ /// In addition, it is only for internal keyboard application.
+ /// This should be hidden.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Ime
}
/// <since_tizen> 3 </since_tizen>
NotSupported,
}
+ /// <summary>
+ /// Enumeration for window resized mode by display server.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum ResizeDirection
+ {
+ /// <summary>
+ /// Start resizing window to the top-left edge.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ TopLeft = 1,
+ /// <summary>
+ /// Start resizing window to the top side.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Top = 2,
+ /// <summary>
+ /// Start resizing window to the top-right edge.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ TopRight = 3,
+ /// <summary>
+ /// Start resizing window to the left side.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Left = 4,
+ /// <summary>
+ /// Start resizing window to the right side.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Right = 5,
+ /// <summary>
+ /// Start resizing window to the bottom-left edge.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ BottomLeft = 6,
+ /// <summary>
+ /// Start resizing window to the bottom side.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Bottom = 7,
+ /// <summary>
+ /// Start resizing window to the bottom-right edge.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ BottomRight = 8,
+ }
+
/// <summary>
/// The stage instance property (read-only).<br />
}
/// <summary>
+ /// Sets window position and size for specific orientation.
+ /// This api reserves the position and size per orientation to display server.
+ /// When the device is rotated, the window is moved/resized with the reserved position/size by display server.
+ /// Currently, it only works when the window's type is WindowType::Ime.
+ /// It means this function is only for IME window of internal keyboard application.
+ /// It is only for internal keyboard application.
+ /// This should be hidden.
+ /// </summary>
+ /// <param name="positionSize">The reserved position and size for the orientation.</param>
+ /// <param name="orientation">The orientation.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetPositionSizeWithOrientation(Rectangle positionSize, Window.WindowOrientation orientation)
+ {
+ Interop.Window.SetPositionSizeWithOrientation(SwigCPtr, Rectangle.getCPtr(positionSize), (int)orientation);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
/// Get native window ID
/// </summary>
/// <returns>native window ID</returns>
}
/// <summary>
+ /// Enables the floating mode of window.
+ /// The floating mode is to support window is moved or resized by display server.
+ /// For example, if the video-player window sets the floating mode,
+ /// then display server changes its geometry and handles it like a popup.
+ /// The way of handling floating mode window is decided by display server.
+ /// A special display server(as a Tizen display server) supports this mode.
+ /// </summary>
+ /// <param name="enable">Enable floating mode or not.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void EnableFloatingMode(bool enable)
+ {
+ Interop.Window.EnableFloatingMode(SwigCPtr, enable);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Requests to display server for the window is moved by display server.
+ /// It can be work with setting window floating mode.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void RequestMoveToServer()
+ {
+ Interop.Window.RequestMoveToServer(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Requests to display server for the window is resized by display server.
+ /// It can be work with setting window floating mode.
+ /// </summary>
+ /// <param name="direction">It is indicated the window's side or edge for starting point.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void RequestResizeToServer(ResizeDirection direction)
+ {
+ Interop.Window.RequestResizeToServer(SwigCPtr, (int)direction);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
/// Add FrameUpdateCallback
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]