[DllImport(Libraries.InputMethod, EntryPoint = "ime_set_selection")]
internal static extern ErrorCode ImeSetSelection(int start, int end);
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_get_main_window")]
- internal static extern IntPtr ImeGetMainWindow();
-
[DllImport(Libraries.InputMethod, EntryPoint = "ime_request_hide")]
internal static extern ErrorCode ImeRequestHide();
[DllImport(Libraries.InputMethod, EntryPoint = "ime_set_dotnet_flag")]
internal static extern ErrorCode ImeSetDotnetFlag(bool set);
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_set_size")]
- internal static extern ErrorCode ImeSetSize(int portraitWidth, int portraitHeight, int landscapeWidth, int landscapeHeight);
-
[DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_layout")]
internal static extern ErrorCode ImeContextGetLayout(IntPtr context, out InputPanelLayout layout);
+++ /dev/null
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* 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.
-*/
-
-using Tizen;
-using System;
-using ElmSharp;
-using static Interop.InputMethod;
-
-namespace Tizen.Uix.InputMethod
-{
- /// <summary>
- /// The editor window class.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API10. Will be removed in API12. Use NUIApplication.GetDefaultWindow() to get window in NUI application")]
- public class EditorWindow : Window
- {
- internal static IntPtr _handle = IntPtr.Zero;
- private IntPtr _realHandle = IntPtr.Zero;
-
- internal EditorWindow():base("Edit")
- {
- _realHandle = _handle;
- }
-
- /// <summary>
- /// This API creates a handle for the editor window.
- /// </summary>
- /// <param name="parent">Parent EvasObject.</param>
- /// <returns>Handle IntPtr.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API10. Will be removed in API12.")]
- protected override IntPtr CreateHandle(EvasObject parent)
- {
- return _handle;
- }
-
- /// <summary>
- /// This API gets a handle for the editor window.
- /// </summary>
- /// <returns>Handle IntPtr.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API10. Will be removed in API12.")]
- public IntPtr GetHandle()
- {
- return _handle;
- }
-
- /// <summary>
- /// This API updates the input panel window's size information.
- /// </summary>
- /// <privilege>
- /// http://tizen.org/privilege/ime
- /// </privilege>
- /// <param name="portraitWidth">The width in the portrait mode.</param>
- /// <param name="portraitHeight">The height in the portrait mode.</param>
- /// <param name="landscapeWidth">The width in the landscape mode.</param>
- /// <param name="landscapeHeight">The height in the landscape mode.</param>
- /// <exception cref="ArgumentException">This exception can be due to an invalid parameter.</exception>
- /// <exception cref="UnauthorizedAccessException">This exception can be due to permission denied.</exception>
- /// <exception cref="InvalidOperationException">The IME main loop has not started yet.</exception>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API10. Will be removed in API12.")]
- public static void SetSize(int portraitWidth, int portraitHeight, int landscapeWidth, int landscapeHeight)
- {
- ErrorCode error = ImeSetSize(portraitWidth, portraitHeight, landscapeWidth, landscapeHeight);
- if (error != ErrorCode.None)
- {
- Log.Error(LogTag, "SetSize Failed with error " + error);
- throw InputMethodExceptionFactory.CreateException(error);
- }
- }
- }
-}
}
}
- /// <summary>
- /// This API returns the input panel main window.
- /// </summary>
- /// <privilege>
- /// http://tizen.org/privilege/ime
- /// </privilege>
- /// <returns>The input panel main window object on success, otherwise null.</returns>
- /// <exception cref="UnauthorizedAccessException">This exception can be due to permission denied.</exception>
- /// <exception cref="InvalidOperationException">
- /// This can occur due to the following reasons:
- /// 1) The IME main loop has not started yet.
- /// 2) Operation failed.
- /// </exception>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API10. Will be removed in API12.")]
- public static EditorWindow GetMainWindow()
- {
- EditorWindow._handle = ImeGetMainWindow();
- EditorWindow obj = new EditorWindow();
- ErrorCode error = (ErrorCode)Tizen.Internals.Errors.ErrorFacts.GetLastResult();
- if (error != ErrorCode.None)
- {
- Log.Error(LogTag, "GetMainWindow Failed with error " + error);
- throw InputMethodExceptionFactory.CreateException(error);
- }
- return obj;
- }
-
/// <summary>
/// Sends the request to hide the IME.
/// </summary>