-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-\r
-using System;\r
-using System.Runtime.InteropServices;\r
-using Tizen.Uix.InputMethod;\r
-\r
-/// <summary>\r
-/// Partial Interop Class\r
-/// </summary>\r
-internal static partial class Interop\r
-{\r
- /// <summary>\r
- /// InputMethod Interop Class\r
- /// </summary>\r
- internal static class InputMethod\r
- {\r
- internal static string LogTag = "Tizen.Uix.InputMethod";\r
-\r
- private const int ErrorInputMethod = -0x02F20000;\r
-\r
- internal enum ErrorCode\r
- {\r
- None = Tizen.Internals.Errors.ErrorCode.None, /**< Successful */\r
- InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter, /**< Invalid parameter */\r
- PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied, /**< Permission denied */\r
- NoCallbackFunction = ErrorInputMethod | 0x0001, /**< Necessary callback function is not set */\r
- NotRunning = ErrorInputMethod | 0x0002, /**< IME main loop isn't started yet */\r
- OperationFailed = ErrorInputMethod | 0x0010, /**< Operation failed */\r
- OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory /**< out of memory */\r
- };\r
-\r
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]\r
- internal struct ImeCallbackStruct\r
- {\r
- internal ImeCreateCb create;\r
- internal ImeTerminateCb terminate;\r
- internal ImeShowCb show;\r
- internal ImeHideCb hide;\r
- };\r
-\r
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]\r
- internal struct ImePreEditAttributeStruct\r
- {\r
- internal uint start;\r
- internal uint length;\r
- internal int type;\r
- internal uint value;\r
- };\r
-\r
- internal sealed class ImeCallbackStructGCHandle : IDisposable\r
- {\r
- internal ImeCallbackStruct _imeCallbackStruct;\r
- internal GCHandle _imeCallbackStructHandle;\r
- public ImeCallbackStructGCHandle()\r
- {\r
- _imeCallbackStruct = new ImeCallbackStruct();\r
- _imeCallbackStructHandle = GCHandle.Alloc(_imeCallbackStruct);\r
- }\r
-\r
- #region IDisposable Support\r
- private bool disposedValue = false;\r
-\r
- void Dispose(bool disposing)\r
- {\r
- Tizen.Log.Info(LogTag, "In Dispose");\r
- if (!disposedValue)\r
- {\r
- if (disposing)\r
- {\r
- Tizen.Log.Info(LogTag, "In Dispose free called");\r
- _imeCallbackStructHandle.Free();\r
- }\r
-\r
- disposedValue = true;\r
- }\r
- }\r
-\r
- public void Dispose()\r
- {\r
- Dispose(true);\r
- }\r
- #endregion\r
- }\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_run")]\r
- internal static extern ErrorCode ImeRun(IntPtr basicCB, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_focus_in_cb")]\r
- internal static extern ErrorCode ImeEventSetFocusInCb(ImeFocusInCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_focus_out_cb")]\r
- internal static extern ErrorCode ImeEventSetFocusOutCb(ImeFocusOutCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_surrounding_text_updated_cb")]\r
- internal static extern ErrorCode ImeEventSetSurroundingTextUpdatedCb(ImeSurroundingTextUpdatedCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_input_context_reset_cb")]\r
- internal static extern ErrorCode ImeEventSetInputContextResetCb(ImeInputContextResetCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_cursor_position_updated_cb")]\r
- internal static extern ErrorCode ImeEventSetCursorPositionUpdatedCb(ImeCursorPositionUpdatedCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_language_requested_cb")]\r
- internal static extern ErrorCode ImeEventSetLanguageRequestedCb(ImeLanguageRequestedCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_language_set_cb")]\r
- internal static extern ErrorCode ImeEventSetLanguageSetCb(ImeLanguageSetCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_imdata_set_cb")]\r
- internal static extern ErrorCode ImeEventSetImdataSetCb(ImeImdataSetCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_imdata_requested_cb")]\r
- internal static extern ErrorCode ImeEventSetImdataRequestedCb(ImeImdataRequestedCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_layout_set_cb")]\r
- internal static extern ErrorCode ImeEventSetLayoutSetCb(ImeLayoutSetCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_return_key_type_set_cb")]\r
- internal static extern ErrorCode ImeEventSetReturnKeyTypeSetCb(ImeReturnKeyTypeSetCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_return_key_state_set_cb")]\r
- internal static extern ErrorCode ImeEventSetReturnKeyStateSetCb(ImeReturnKeyStateSetCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_geometry_requested_cb")]\r
- internal static extern ErrorCode ImeEventSetGeometryRequestedCb(ImeGeometryRequestedCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_process_key_event_cb")]\r
- internal static extern ErrorCode ImeEventSetProcessKeyEventCb(ImeProcessKeyEventCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_display_language_changed_cb")]\r
- internal static extern ErrorCode ImeEventSetDisplayLanguageChangedCb(ImeDisplayLanguageChangedCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_rotation_degree_changed_cb")]\r
- internal static extern ErrorCode ImeEventSetRotationDegreeChangedCb(ImeRotationDegreeChangedCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_accessibility_state_changed_cb")]\r
- internal static extern ErrorCode ImeEventSetAccessibilityStateChangedCb(ImeAccessibilityStateChangedCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_option_window_created_cb")]\r
- internal static extern ErrorCode ImeEventSetOptionWindowCreatedCb(ImeOptionWindowCreatedCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_option_window_destroyed_cb")]\r
- internal static extern ErrorCode ImeEventSetOptionWindowDestroyedCb(ImeOptionWindowDestroyedCb callbackFunction, IntPtr userData);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_send_key_event")]\r
- internal static extern ErrorCode ImeSendKeyEvent(KeyCode keycode, KeyMask keymask, bool forwardKey);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_commit_string")]\r
- internal static extern ErrorCode ImeCommitString(string str);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_show_preedit_string")]\r
- internal static extern ErrorCode ImeShowPreeditString();\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_hide_preedit_string")]\r
- internal static extern ErrorCode ImeHidePreeditString();\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_update_preedit_string")]\r
- internal static extern ErrorCode ImeUpdatePreeditString(string str, IntPtr attrs);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_request_surrounding_text")]\r
- internal static extern ErrorCode ImeRequestSurroundingText(int maxlenBefore, int maxlenAfter);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_delete_surrounding_text")]\r
- internal static extern ErrorCode ImeDeleteSurroundingText(int offset, int len);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_get_surrounding_text")]\r
- internal static extern ErrorCode ImeGetSurroundingText(int maxlenBefore, int maxlenAfter, out IntPtr text, out int cursorPos);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_set_selection")]\r
- internal static extern ErrorCode ImeSetSelection(int start, int end);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_get_main_window")]\r
- internal static extern IntPtr ImeGetMainWindow();\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_set_size")]\r
- internal static extern ErrorCode ImeSetSize(int portraitWidth, int portraitHeight, int landscapeWidth, int landscapeHeight);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_create_option_window")]\r
- internal static extern ErrorCode ImeCreateOptionWindow();\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_destroy_option_window")]\r
- internal static extern ErrorCode ImeDestroyOptionWindow(IntPtr window);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_layout")]\r
- internal static extern ErrorCode ImeContextGetLayout(IntPtr context, out EcoreIMFInputPanelLayout layout);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_layout_variation")]\r
- internal static extern ErrorCode ImeContextGetLayoutVariation(IntPtr context, out ImeLayoutVariation layoutVariation);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_cursor_position")]\r
- internal static extern ErrorCode ImeContextGetCursorPosition(IntPtr context, out int cursorPos);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_autocapital_type")]\r
- internal static extern ErrorCode ImeContextGetAutocapitalType(IntPtr context, out EcoreIMFAutocapitalType autocapitalType);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_return_key_type")]\r
- internal static extern ErrorCode ImeContextGetReturnKeyType(IntPtr context, out EcoreIMFInputPanelReturnKeyType returnKeyType);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_return_key_state")]\r
- internal static extern ErrorCode ImeContextGetReturnKeyState(IntPtr context, out bool returnKeyState);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_prediction_mode")]\r
- internal static extern ErrorCode ImeContextGetPredictionMode(IntPtr context, out bool predictionMode);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_password_mode")]\r
- internal static extern ErrorCode ImeContextGetPasswordMode(IntPtr context, out bool passwordMode);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_input_hint")]\r
- internal static extern ErrorCode ImeContextGetInputHint(IntPtr context, out EcoreIMFInputHints inputHint);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_bidi_direction")]\r
- internal static extern ErrorCode ImeContextGetBidiDirection(IntPtr context, out EcoreIMFBiDiDirection bidi);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_language")]\r
- internal static extern ErrorCode ImeContextGetLanguage(IntPtr context, out EcoreIMFInputPanelLang language);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_device_info_get_name")]\r
- internal static extern ErrorCode ImeDeviceInfoGetName(IntPtr dev_info, out string devName);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_device_info_get_class")]\r
- internal static extern ErrorCode ImeDeviceInfoGetClass(IntPtr dev_info, out EcoreIMFDeviceClass devClass);\r
-\r
- [DllImport(Libraries.InputMethod, EntryPoint = "ime_device_info_get_subclass")]\r
- internal static extern ErrorCode ImeDeviceInfoGetSubclass(IntPtr dev_info, out EcoreIMFDeviceSubclass devSubClass);\r
-\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeCreateCb(IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeTerminateCb(IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeShowCb(int contextId, IntPtr context, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeHideCb(int contextId, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeFocusInCb(int contextId, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeFocusOutCb(int contextId, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeSurroundingTextUpdatedCb(int contextId, IntPtr text, int cursorPos, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeInputContextResetCb(IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeCursorPositionUpdatedCb(int cursorPos, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeLanguageRequestedCb(IntPtr userData, out IntPtr langCode);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeLanguageSetCb(EcoreIMFInputPanelLang language, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeImdataSetCb(IntPtr data, uint dataLength, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeImdataRequestedCb(IntPtr userData, out IntPtr data, out uint dataLength);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeLayoutSetCb(EcoreIMFInputPanelLayout layout, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeReturnKeyTypeSetCb(EcoreIMFInputPanelReturnKeyType type, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeReturnKeyStateSetCb(bool disabled, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeGeometryRequestedCb(IntPtr userData, out int x, out int y, out int w, out int h);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate bool ImeProcessKeyEventCb(KeyCode keycode, KeyMask keymask, IntPtr devInfo, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeDisplayLanguageChangedCb(IntPtr language, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeRotationDegreeChangedCb(int degree, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeAccessibilityStateChangedCb(bool state, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeOptionWindowCreatedCb(IntPtr window, ImeOptionWindowType type, IntPtr userData);\r
-\r
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\r
- internal delegate void ImeOptionWindowDestroyedCb(IntPtr window, IntPtr userData);\r
- }\r
-}\r
+/*
+* 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 System;
+using System.Runtime.InteropServices;
+using Tizen.Uix.InputMethod;
+
+/// <summary>
+/// Partial Interop Class
+/// </summary>
+internal static partial class Interop
+{
+ /// <summary>
+ /// InputMethod Interop Class
+ /// </summary>
+ internal static class InputMethod
+ {
+ internal static string LogTag = "Tizen.Uix.InputMethod";
+
+ private const int ErrorInputMethod = -0x02F20000;
+
+ internal enum ErrorCode
+ {
+ None = Tizen.Internals.Errors.ErrorCode.None, /**< Successful */
+ InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter, /**< Invalid parameter */
+ PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied, /**< Permission denied */
+ NoCallbackFunction = ErrorInputMethod | 0x0001, /**< Necessary callback function is not set */
+ NotRunning = ErrorInputMethod | 0x0002, /**< IME main loop isn't started yet */
+ OperationFailed = ErrorInputMethod | 0x0010, /**< Operation failed */
+ OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory /**< out of memory */
+ };
+
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ internal struct ImeCallbackStruct
+ {
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal ImeCreateCb create;
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal ImeTerminateCb terminate;
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal ImeShowCb show;
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal ImeHideCb hide;
+ };
+
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ internal struct ImePreEditAttributeStruct
+ {
+ internal uint start;
+ internal uint length;
+ internal int type;
+ internal uint value;
+ };
+
+ internal sealed class ImeCallbackStructGCHandle : IDisposable
+ {
+ internal ImeCallbackStruct _imeCallbackStruct;
+ internal GCHandle _imeCallbackStructHandle;
+ public ImeCallbackStructGCHandle()
+ {
+ _imeCallbackStruct = new ImeCallbackStruct();
+ _imeCallbackStructHandle = GCHandle.Alloc(_imeCallbackStruct);
+ }
+
+ #region IDisposable Support
+ private bool disposedValue = false;
+
+ void Dispose(bool disposing)
+ {
+ Tizen.Log.Info(LogTag, "In Dispose");
+ if (!disposedValue)
+ {
+ if (disposing)
+ {
+ Tizen.Log.Info(LogTag, "In Dispose free called");
+ _imeCallbackStructHandle.Free();
+ }
+
+ disposedValue = true;
+ }
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ }
+ #endregion
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeRunCb();
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_run")]
+ internal static extern ErrorCode ImeRun(ref ImeCallbackStruct basicCB, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_focus_in_cb")]
+ internal static extern ErrorCode ImeEventSetFocusedInCb(ImeFocusedInCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_focus_out_cb")]
+ internal static extern ErrorCode ImeEventSetFocusedOutCb(ImeFocusedOutCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_surrounding_text_updated_cb")]
+ internal static extern ErrorCode ImeEventSetSurroundingTextUpdatedCb(ImeSurroundingTextUpdatedCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_input_context_reset_cb")]
+ internal static extern ErrorCode ImeEventSetInputContextResetCb(ImeInputContextResetCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_cursor_position_updated_cb")]
+ internal static extern ErrorCode ImeEventSetCursorPositionitionUpdatedCb(ImeCursorPositionitionUpdatedCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_language_requested_cb")]
+ internal static extern ErrorCode ImeEventSetLanguageRequestedCallbackCb(ImeLanguageRequestedCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_language_set_cb")]
+ internal static extern ErrorCode ImeEventSetLanguageSetCb(ImeLanguageSetCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_imdata_set_cb")]
+ internal static extern ErrorCode ImeEventSetImdataSetCb(ImeImdataSetCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_imdata_requested_cb")]
+ internal static extern ErrorCode ImeEventSetImdataRequestedCb(ImeImdataRequestedCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_layout_set_cb")]
+ internal static extern ErrorCode ImeEventSetLayoutSetCb(ImeLayoutSetCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_return_key_type_set_cb")]
+ internal static extern ErrorCode ImeEventSetReturnKeySetCb(ImeReturnKeySetCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_return_key_state_set_cb")]
+ internal static extern ErrorCode ImeEventSetReturnKeyStateSetCb(ImeReturnKeyStateSetCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_geometry_requested_cb")]
+ internal static extern ErrorCode ImeEventSetGeometryRequestedCallbackCb(ImeGeometryRequestedCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_process_key_event_cb")]
+ internal static extern ErrorCode ImeEventSetProcessKeyEventCb(ImeProcessKeyEventCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_display_language_changed_cb")]
+ internal static extern ErrorCode ImeEventSetDisplayLanguageChangedCb(ImeDisplayLanguageChangedCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_rotation_degree_changed_cb")]
+ internal static extern ErrorCode ImeEventSetRotationChangedCb(ImeRotationChangedCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_accessibility_state_changed_cb")]
+ internal static extern ErrorCode ImeEventSetAccessibilityStateChangedCb(ImeAccessibilityStateChangedCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_option_window_created_cb")]
+ internal static extern ErrorCode ImeEventSetOptionWindowCreatedCb(ImeOptionWindowCreatedCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_option_window_destroyed_cb")]
+ internal static extern ErrorCode ImeEventSetOptionWindowDestroyedCb(ImeOptionWindowDestroyedCb callbackFunction, IntPtr userData);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_send_key_event")]
+ internal static extern ErrorCode ImeSendKeyEvent(KeyCode keycode, KeyMask keymask, bool forwardKey);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_commit_string")]
+ internal static extern ErrorCode ImeCommitString(string str);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_show_preedit_string")]
+ internal static extern ErrorCode ImeShowPreeditString();
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_hide_preedit_string")]
+ internal static extern ErrorCode ImeHidePreeditString();
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_update_preedit_string")]
+ internal static extern ErrorCode ImeUpdatePreeditString(string str, IntPtr attrs);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_request_surrounding_text")]
+ internal static extern ErrorCode ImeRequestSurroundingText(int maxlenBefore, int maxlenAfter);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_delete_surrounding_text")]
+ internal static extern ErrorCode ImeDeleteSurroundingText(int offset, int len);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_get_surrounding_text")]
+ internal static extern ErrorCode ImeGetSurroundingText(int maxlenBefore, int maxlenAfter, out IntPtr text, out int cursorPos);
+
+ [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_set_size")]
+ internal static extern ErrorCode ImeSetSize(int portraitWidth, int portraitHeight, int landscapeWidth, int landscapeHeight);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_create_option_window")]
+ internal static extern ErrorCode ImeCreateOptionWindow();
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_destroy_option_window")]
+ internal static extern ErrorCode ImeDestroyOptionWindow(IntPtr window);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_layout")]
+ internal static extern ErrorCode ImeContextGetLayout(IntPtr context, out InputPanelLayout layout);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_layout_variation")]
+ internal static extern ErrorCode ImeContextGetLayoutVariation(IntPtr context, out LayoutVariation layoutVariation);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_cursor_position")]
+ internal static extern ErrorCode ImeContextGetCursorPositionition(IntPtr context, out int cursorPos);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_autocapital_type")]
+ internal static extern ErrorCode ImeContextGetAutocapitalType(IntPtr context, out AutoCapitalization autocapitalType);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_return_key_type")]
+ internal static extern ErrorCode ImeContextGetReturnKey(IntPtr context, out InputPanelReturnKey returnKeyType);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_return_key_state")]
+ internal static extern ErrorCode ImeContextGetReturnKeyState(IntPtr context, out bool returnKeyState);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_prediction_mode")]
+ internal static extern ErrorCode ImeContextGetPredictionMode(IntPtr context, out bool predictionMode);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_password_mode")]
+ internal static extern ErrorCode ImeContextGetPasswordMode(IntPtr context, out bool passwordMode);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_input_hint")]
+ internal static extern ErrorCode ImeContextGetInputHint(IntPtr context, out InputHints inputHint);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_bidi_direction")]
+ internal static extern ErrorCode ImeContextGetBidiDirection(IntPtr context, out BiDirection bidi);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_language")]
+ internal static extern ErrorCode ImeContextGetLanguage(IntPtr context, out InputPanelLanguage language);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_device_info_get_name")]
+ internal static extern ErrorCode ImeDeviceInfoGetName(IntPtr dev_info, out string devName);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_device_info_get_class")]
+ internal static extern ErrorCode ImeDeviceInfoGetClass(IntPtr dev_info, out DeviceClass devClass);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_device_info_get_subclass")]
+ internal static extern ErrorCode ImeDeviceInfoGetSubclass(IntPtr dev_info, out DeviceSubclass devSubClass);
+
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeCreateCb(IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeTerminateCb(IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeShowCb(int contextId, IntPtr context, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeHideCb(int contextId, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeFocusedInCb(int contextId, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeFocusedOutCb(int contextId, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeSurroundingTextUpdatedCb(int contextId, IntPtr text, int cursorPos, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeInputContextResetCb(IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeCursorPositionitionUpdatedCb(int cursorPos, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeLanguageRequestedCb(IntPtr userData, out IntPtr langCode);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeLanguageSetCb(InputPanelLanguage language, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeImdataSetCb(IntPtr data, uint dataLength, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeImdataRequestedCb(IntPtr userData, out IntPtr data, out uint dataLength);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeLayoutSetCb(InputPanelLayout layout, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeReturnKeySetCb(InputPanelReturnKey type, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeReturnKeyStateSetCb(bool disabled, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeGeometryRequestedCb(IntPtr userData, out int x, out int y, out int w, out int h);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate bool ImeProcessKeyEventCb(KeyCode keycode, KeyMask keymask, IntPtr devInfo, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeDisplayLanguageChangedCb(IntPtr language, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeRotationChangedCb(int degree, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeAccessibilityStateChangedCb(bool state, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeOptionWindowCreatedCb(IntPtr window, OptionWindowType type, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void ImeOptionWindowDestroyedCb(IntPtr window, IntPtr userData);
+ }
+}
+++ /dev/null
-{
- "dependencies": {
- "Tizen": "1.0.1"
- },
- "frameworks": {
- "net45": {}
- },
- "runtimes": {
- "win": {}
- }
-}
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <PropertyGroup>\r
- <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>\r
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
- <ProductVersion>8.0.30703</ProductVersion>\r
- <SchemaVersion>2.0</SchemaVersion>\r
- <ProjectGuid>{081C204A-2267-4F10-8751-E3AFE5C30AE9}</ProjectGuid>\r
- <OutputType>Library</OutputType>\r
- <AppDesignerFolder>Properties</AppDesignerFolder>\r
- <RootNamespace>Tizen.Uix.InputMethod</RootNamespace>\r
- <AssemblyName>Tizen.Uix.InputMethod</AssemblyName>\r
- <FileAlignment>512</FileAlignment>\r
- <DefaultLanguage>en-US</DefaultLanguage>\r
- </PropertyGroup>\r
- <PropertyGroup>\r
- <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>\r
- <TargetFrameworkVersion>v1.3</TargetFrameworkVersion>\r
- <NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker>\r
- <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
- <NoStdLib>true</NoStdLib>\r
- <NoWarn>$(NoWarn);1701</NoWarn>\r
- <UseVSHostingProcess>false</UseVSHostingProcess>\r
- </PropertyGroup>\r
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
- <DebugSymbols>true</DebugSymbols>\r
- <DebugType>portable</DebugType>\r
- <Optimize>false</Optimize>\r
- <OutputPath>bin\Debug\</OutputPath>\r
- <DefineConstants>DEBUG;TRACE</DefineConstants>\r
- <ErrorReport>prompt</ErrorReport>\r
- <WarningLevel>4</WarningLevel>\r
- </PropertyGroup>\r
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
- <DebugType>portable</DebugType>\r
- <Optimize>true</Optimize>\r
- <OutputPath>bin\Release\</OutputPath>\r
- <DefineConstants>TRACE</DefineConstants>\r
- <ErrorReport>prompt</ErrorReport>\r
- <WarningLevel>4</WarningLevel>\r
- </PropertyGroup>\r
- <PropertyGroup>\r
- <SignAssembly>true</SignAssembly>\r
- </PropertyGroup>\r
- <PropertyGroup>\r
- <AssemblyOriginatorKeyFile>Tizen.Uix.InputMethod.snk</AssemblyOriginatorKeyFile>\r
- </PropertyGroup>\r
- <ItemGroup>\r
- <Compile Include="Interop\Interop.EinaList.cs" />\r
- <Compile Include="Interop\Interop.InputMethod.cs" />\r
- <Compile Include="Interop\Interop.Libraries.cs" />\r
- <Compile Include="Properties\AssemblyInfo.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\AccessibilityStateChangedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\CursorPositionUpdatedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\DisplayLanaguageChangedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\EditorWindow.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\FocusInEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\FocusOutEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\ImDataSetEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\InputMethodContext.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\InputMethodDeviceInformation.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\InputMethodEditor.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\InputMethodExceptionFactory.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\LangaugeSetEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\LayoutSetEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\OptionWindowCreatedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\OptionWindowDestroyedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\PreEditAttribute.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\ProcessKeyEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\ReturnKeyStateSetEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\ReturnKeyTypeSetEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\RotationDegreeChangedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\SurroundingTextUpdatedArgs.cs" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <None Include="Tizen.Uix.InputMethod.nuspec" />\r
- <None Include="Tizen.Uix.InputMethod.project.json" />\r
- <None Include="Tizen.Uix.InputMethod.snk" />\r
- </ItemGroup>\r
- <ItemGroup />\r
- <ItemGroup>\r
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />\r
- </ItemGroup>\r
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{081C204A-2267-4F10-8751-E3AFE5C30AE9}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Tizen.Uix.InputMethod</RootNamespace>
+ <AssemblyName>Tizen.Uix.InputMethod</AssemblyName>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup>
+ <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v1.3</TargetFrameworkVersion>
+ <NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker>
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
+ <NoStdLib>true</NoStdLib>
+ <NoWarn>$(NoWarn);1701;1702</NoWarn>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>Tizen.Uix.InputMethod.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Interop\Interop.EinaList.cs" />
+ <Compile Include="Interop\Interop.InputMethod.cs" />
+ <Compile Include="Interop\Interop.Libraries.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\AccessibilityStateChangedEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\CursorPositionUpdatedEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\DisplayLanaguageChangedEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\OptionWindow.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\EditorWindow.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\FocusedInEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\FocusedOutEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\DataSetEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\InputMethodContext.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\InputMethodDeviceInformation.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\InputMethodEditor.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\InputMethodExceptionFactory.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\LanguageSetSetEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\LayoutSetEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\OptionWindowCreatedEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\OptionWindowDestroyedEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\PreEditAttribute.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\ReturnKeyStateSetEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\ReturnKeyTypeSetEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\RotationChangedEventArgs.cs" />
+ <Compile Include="Tizen.Uix.InputMethod\SurroundingTextUpdatedArgs.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Tizen.Uix.InputMethod.nuspec" />
+ <None Include="Tizen.Uix.InputMethod.project.json" />
+ <None Include="Tizen.Uix.InputMethod.snk" />
+ </ItemGroup>
+ <ItemGroup />
+ <ItemGroup>
+ <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
- -->\r
- <PropertyGroup>\r
+ -->
+ <PropertyGroup>
<!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and
https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild
- -->\r
+ -->
<!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two
properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and
to prevent it from outputting a warning (MSB3644).
- -->\r
- <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>\r
- <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>\r
- <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>\r
- </PropertyGroup>\r
+ -->
+ <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>
+ <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>
+ <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
+ </PropertyGroup>
</Project>
\ No newline at end of file
<copyright>© Samsung Electronics Co., Ltd All Rights Reserved</copyright>
<description>InputMethod API for Tizen.Net</description>
<dependencies>
- <dependency id="Tizen" version="1.0.2" />
+ <dependency id="Tizen" version="1.0.3" />
</dependencies>
</metadata>
<files>
<file src="bin/$Configuration$/Tizen.Uix.InputMethod.dll" target="lib/netstandard1.3" />
- <file src="bin/$Configuration$/Net45/Tizen.Uix.InputMethod.dll" target="lib/net45" />
</files>
</package>
-{\r
- "dependencies": {\r
- "ElmSharp": "1.0.14",\r
- "NETStandard.Library": "1.6.0",\r
- "Tizen": "1.0.1"\r
- },\r
- "frameworks": {\r
- "netstandard1.3": {}\r
- }\r
+{
+ "dependencies": {
+ "ElmSharp": "1.0.14",
+ "NETStandard.Library": "1.6.0",
+ "Tizen": "1.0.1"
+ },
+ "frameworks": {
+ "netstandard1.3": {}
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This Class contains data related to CursorPositionUpdated Event\r
- /// </summary>\r
- public class CursorPositionUpdatedEventArgs\r
- {\r
- internal CursorPositionUpdatedEventArgs(int cursorPos)\r
- {\r
- CursorPos = cursorPos;\r
- }\r
-\r
- /// <summary>\r
- /// The cursor position\r
- /// </summary>\r
- public int CursorPos\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// This Class contains data related to CursorPositionitionUpdated Event
+ /// </summary>
+ public class CursorPositionitionUpdatedEventArgs
+ {
+ internal CursorPositionitionUpdatedEventArgs(int cursorPos)
+ {
+ CursorPosition = cursorPos;
+ }
+
+ /// <summary>
+ /// The cursor position
+ /// </summary>
+ public int CursorPosition
+ {
+ get;
+ internal set;
+ }
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This Class contains data related to ImDataSet Event\r
- /// </summary>\r
- public class ImDataSetEventArgs\r
- {\r
- internal ImDataSetEventArgs(byte[] destination, uint dataLength)\r
- {\r
- Data = destination;\r
- DataLength = dataLength;\r
- }\r
-\r
- /// <summary>\r
- /// The specific data to be set to the input panel\r
- /// </summary>\r
- public byte[] Data\r
- {\r
- get;\r
- internal set;\r
- }\r
-\r
- /// <summary>\r
- /// The length of data, in bytes, to send to the input panel\r
- /// </summary>\r
- public uint DataLength\r
- {\r
- get;\r
- internal set;\r
- }\r
-\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// This Class contains data related to DataSet Event
+ /// </summary>
+ public class SetDataEventArgs
+ {
+ internal SetDataEventArgs(byte[] destination, uint dataLength)
+ {
+ Data = destination;
+ DataLength = dataLength;
+ }
+
+ /// <summary>
+ /// The specific data to be set to the input panel
+ /// </summary>
+ public byte[] Data
+ {
+ get;
+ internal set;
+ }
+
+ /// <summary>
+ /// The length of data, in bytes, to send to the input panel
+ /// </summary>
+ public uint DataLength
+ {
+ get;
+ internal set;
+ }
+
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-using System;\r
-using ElmSharp;\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- public class EditorWindow : EvasObject\r
- {\r
- internal IntPtr _handle;\r
- internal EditorWindow(IntPtr handle)\r
- {\r
- _handle = handle;\r
- }\r
-\r
- protected override IntPtr CreateHandle(EvasObject parent)\r
- {\r
- return IntPtr.Zero;\r
- }\r
- }\r
+/*
+* 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>
+ public class EditorWindow : Window
+ {
+ internal static IntPtr _handle = IntPtr.Zero;
+ private IntPtr _realHandle = IntPtr.Zero;
+
+ internal EditorWindow():base("Edit")
+ {
+ _realHandle = _handle;
+ }
+
+ protected override IntPtr CreateHandle(EvasObject parent)
+ {
+ 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 portrait mode</param>
+ /// <param name="portraitHeight">The height in portrait mode</param>
+ /// <param name="landscapeWidth">The width in landscape mode</param>
+ /// <param name="landscapeHeight">The height in landscape mode</param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// </exception>
+ 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);
+ }
+ }
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This Class contains data related to FocusIn Event\r
- /// </summary>\r
- public class FocusInEventArgs\r
- {\r
- internal FocusInEventArgs(int contextId)\r
- {\r
- ContextId = contextId;\r
- }\r
-\r
- /// <summary>\r
- /// The input context identification value of an associated text input UI control\r
- /// </summary>\r
- public int ContextId\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// This Class contains data related to FocusedIn Event
+ /// </summary>
+ public class FocusedInEventArgs
+ {
+ internal FocusedInEventArgs(int contextId)
+ {
+ ContextId = contextId;
+ }
+
+ /// <summary>
+ /// The input context identification value of an associated text input UI control
+ /// </summary>
+ public int ContextId
+ {
+ get;
+ internal set;
+ }
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This Class contains data related to FocusOut Event\r
- /// </summary>\r
- public class FocusOutEventArgs\r
- {\r
- internal FocusOutEventArgs(int contextId)\r
- {\r
- ContextId = contextId;\r
- }\r
-\r
- /// <summary>\r
- /// The input context identification value of an associated text input UI control\r
- /// </summary>\r
- public int ContextId\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// This Class contains data related to FocusedOut Event
+ /// </summary>
+ public class FocusedOutEventArgs
+ {
+ internal FocusedOutEventArgs(int contextId)
+ {
+ ContextId = contextId;
+ }
+
+ /// <summary>
+ /// The input context identification value of an associated text input UI control
+ /// </summary>
+ public int ContextId
+ {
+ get;
+ internal set;
+ }
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-\r
-using System;\r
-using static Interop.InputMethod;\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// Enumeration for Input Panel Layout\r
- /// </summary>\r
- public enum EcoreIMFInputPanelLayout\r
- {\r
- /// <summary>\r
- /// Normal\r
- /// </summary>\r
- LayoutNormal,\r
- /// <summary>\r
- /// Number\r
- /// </summary>\r
- LayoutNumber,\r
- /// <summary>\r
- /// Email\r
- /// </summary>\r
- LayoutEMail,\r
- /// <summary>\r
- /// URL\r
- /// </summary>\r
- LayoutURL,\r
- /// <summary>\r
- /// Phone Number\r
- /// </summary>\r
- LayoutPhoneNumber,\r
- /// <summary>\r
- /// IP\r
- /// </summary>\r
- LayoutIP,\r
- /// <summary>\r
- /// Month\r
- /// </summary>\r
- LayoutMonth,\r
- /// <summary>\r
- /// Number Only\r
- /// </summary>\r
- LayoutNumberOnly,\r
- /// <summary>\r
- /// Invalid\r
- /// </summary>\r
- LayoutInvalid,\r
- /// <summary>\r
- /// HEX\r
- /// </summary>\r
- LayoutHEX,\r
- /// <summary>\r
- /// Terminal\r
- /// </summary>\r
- LayoutTerminal,\r
- /// <summary>\r
- /// Password\r
- /// </summary>\r
- LayoutPassword,\r
- /// <summary>\r
- /// Date Time\r
- /// </summary>\r
- LayoutDateTime,\r
- /// <summary>\r
- /// Emoticon\r
- /// </summary>\r
- LayoutEmoticon,\r
- /// <summary>\r
- /// Voice\r
- /// </summary>\r
- LayoutVoice,\r
- /// <summary>\r
- /// Undefined\r
- /// </summary>\r
- Undefined\r
- };\r
-\r
- /// <summary>\r
- /// Enumeration for Layout Variation\r
- /// </summary>\r
- public enum ImeLayoutVariation\r
- {\r
- /// <summary>\r
- /// The plain normal layout\r
- /// </summary>\r
- NormalVariationNormal = 0,\r
- /// <summary>\r
- /// Filename layout; symbols such as '/', '\*', '\', '|', '<', '>', '?', '"' and ':' should be disabled\r
- /// </summary>\r
- NormalVariationFileName,\r
- /// <summary>\r
- /// The name of a person\r
- /// </summary>\r
- NormalVariationPersonName,\r
- /// <summary>\r
- /// The plain normal number layout\r
- /// </summary>\r
- NumberOnlyVariationNormal = 0,\r
- /// <summary>\r
- /// The number layout to allow a negative sign\r
- /// </summary>\r
- NumberOnlyVariationSigned,\r
- /// <summary>\r
- /// The number layout to allow decimal point to provide fractional value\r
- /// </summary>\r
- NumberOnlyVariationDecimal,\r
- /// <summary>\r
- /// The number layout to allow decimal point and negative sign\r
- /// </summary>\r
- NumberOnlyVariationSignedAandDecimal,\r
- /// <summary>\r
- /// The normal password layout\r
- /// </summary>\r
- PasswordVariationNormal = 0,\r
- /// <summary>\r
- /// The password layout to allow only number\r
- /// </summary>\r
- PasswordVariationNumberOnly,\r
- /// <summary>\r
- /// Undefined\r
- /// </summary>\r
- Undefined\r
- };\r
-\r
- /// <summary>\r
- /// Enumeration for AutoCapital Type\r
- /// </summary>\r
- public enum EcoreIMFAutocapitalType\r
- {\r
- /// <summary>\r
- /// None\r
- /// </summary>\r
- None,\r
- /// <summary>\r
- /// Word\r
- /// </summary>\r
- Word,\r
- /// <summary>\r
- /// Sentence\r
- /// </summary>\r
- Sentence,\r
- /// <summary>\r
- /// All Character\r
- /// </summary>\r
- AllCharacter,\r
- /// <summary>\r
- /// Undefined\r
- /// </summary>\r
- Undefined\r
- };\r
-\r
- /// <summary>\r
- /// Enumeration for InputPanel ReturnKey Type\r
- /// </summary>\r
- public enum EcoreIMFInputPanelReturnKeyType\r
- {\r
- /// <summary>\r
- /// Default\r
- /// </summary>\r
- Default,\r
- /// <summary>\r
- /// Done\r
- /// </summary>\r
- Done,\r
- /// <summary>\r
- /// Go\r
- /// </summary>\r
- Go,\r
- /// <summary>\r
- /// Join\r
- /// </summary>\r
- Join,\r
- /// <summary>\r
- /// Login\r
- /// </summary>\r
- Login,\r
- /// <summary>\r
- /// Next\r
- /// </summary>\r
- Next,\r
- /// <summary>\r
- /// Search\r
- /// </summary>\r
- Search,\r
- /// <summary>\r
- /// Send\r
- /// </summary>\r
- Send,\r
- /// <summary>\r
- /// SignIn\r
- /// </summary>\r
- SignIn,\r
- /// <summary>\r
- /// Undefined\r
- /// </summary>\r
- Undefined\r
- };\r
-\r
- /// <summary>\r
- /// Enumeration for InputHints\r
- /// </summary>\r
- public enum EcoreIMFInputHints\r
- {\r
- /// <summary>\r
- /// None\r
- /// </summary>\r
- None,\r
- /// <summary>\r
- /// AutoComplete\r
- /// </summary>\r
- AutoComplete,\r
- /// <summary>\r
- /// SensitiveData\r
- /// </summary>\r
- SensitiveData,\r
- /// <summary>\r
- /// Multiline\r
- /// </summary>\r
- Multiline,\r
- /// <summary>\r
- /// Undefined\r
- /// </summary>\r
- Undefined\r
- };\r
-\r
- /// <summary>\r
- /// Enumeration for BiDi Direction\r
- /// </summary>\r
- public enum EcoreIMFBiDiDirection\r
- {\r
- /// <summary>\r
- /// Neutral\r
- /// </summary>\r
- Neutral,\r
- /// <summary>\r
- /// LTR\r
- /// </summary>\r
- LTR,\r
- /// <summary>\r
- /// RTL\r
- /// </summary>\r
- RTL,\r
- /// <summary>\r
- /// Undefined\r
- /// </summary>\r
- Undefined\r
- };\r
-\r
- /// <summary>\r
- /// Enumeration for InputPanel Language\r
- /// </summary>\r
- public enum EcoreIMFInputPanelLang\r
- {\r
- /// <summary>\r
- /// Automatic\r
- /// </summary>\r
- Automatic,\r
- /// <summary>\r
- /// Alphabet\r
- /// </summary>\r
- Alphabet,\r
- /// <summary>\r
- /// Undefined\r
- /// </summary>\r
- Undefined\r
- };\r
-\r
- /// <summary>\r
- /// This class represents the context of InputMethodEditor\r
- /// </summary>\r
- public class InputMethodContext\r
- {\r
- private IntPtr _handle;\r
- internal InputMethodContext(IntPtr handle)\r
- {\r
- _handle = handle;\r
- }\r
-\r
- /// <summary>\r
- /// Gets the layout information.\r
- /// </summary>\r
- public EcoreIMFInputPanelLayout Layout\r
- {\r
- get\r
- {\r
- EcoreIMFInputPanelLayout layout;\r
- ErrorCode error = ImeContextGetLayout(_handle, out layout);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetLayout Failed with error " + error);\r
- return EcoreIMFInputPanelLayout.Undefined;\r
- }\r
- return layout;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the layout variation information.\r
- /// </summary>\r
- public ImeLayoutVariation LayoutVariation\r
- {\r
- get\r
- {\r
- ImeLayoutVariation layoutVariation;\r
- ErrorCode error = ImeContextGetLayoutVariation(_handle, out layoutVariation);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetLayoutVariation Failed with error " + error);\r
- return ImeLayoutVariation.Undefined;\r
- }\r
- return layoutVariation;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the cursor position information.\r
- /// </summary>\r
- public int CursorPosition\r
- {\r
- get\r
- {\r
- int cursorPosition;\r
- ErrorCode error = ImeContextGetCursorPosition(_handle, out cursorPosition);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetCursorPosition Failed with error " + error);\r
- return -1;\r
- }\r
- return cursorPosition;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the autocapital type information.\r
- /// </summary>\r
- public EcoreIMFAutocapitalType AutoCapitalType\r
- {\r
- get\r
- {\r
- EcoreIMFAutocapitalType autoCapitalType;\r
- ErrorCode error = ImeContextGetAutocapitalType(_handle, out autoCapitalType);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetAutoCapitalType Failed with error " + error);\r
- return EcoreIMFAutocapitalType.Undefined;\r
- }\r
- return autoCapitalType;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the Return key label type information.\r
- /// </summary>\r
- public EcoreIMFInputPanelReturnKeyType ReturnKeyType\r
- {\r
- get\r
- {\r
- EcoreIMFInputPanelReturnKeyType returnKeyType;\r
- ErrorCode error = ImeContextGetReturnKeyType(_handle, out returnKeyType);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetReturnKeyType Failed with error " + error);\r
- return EcoreIMFInputPanelReturnKeyType.Undefined;\r
- }\r
- return returnKeyType;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the Return key state information.\r
- /// </summary>\r
- public bool ReturnKeyState\r
- {\r
- get\r
- {\r
- bool returnKeyState;\r
- ErrorCode error = ImeContextGetReturnKeyState(_handle, out returnKeyState);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetReturnKeyState Failed with error " + error);\r
- return false;\r
- }\r
- return returnKeyState;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the prediction mode information.\r
- /// </summary>\r
- public bool PredictionMode\r
- {\r
- get\r
- {\r
- bool predictionMode;\r
- ErrorCode error = ImeContextGetPredictionMode(_handle, out predictionMode);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetPredictionMode Failed with error " + error);\r
- return false;\r
- }\r
- return predictionMode;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the password mode information.\r
- /// </summary>\r
- public bool PasswordMode\r
- {\r
- get\r
- {\r
- bool passwordMode;\r
- ErrorCode error = ImeContextGetPasswordMode(_handle, out passwordMode);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetPasswordMode Failed with error " + error);\r
- return false;\r
- }\r
- return passwordMode;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the input hint information.\r
- /// </summary>\r
- public EcoreIMFInputHints InputHint\r
- {\r
- get\r
- {\r
- EcoreIMFInputHints inputHint;\r
- ErrorCode error = ImeContextGetInputHint(_handle, out inputHint);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetInputHint Failed with error " + error);\r
- return EcoreIMFInputHints.Undefined;\r
- }\r
- return inputHint;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the text bidirectional information.\r
- /// </summary>\r
- public EcoreIMFBiDiDirection BiDiDirection\r
- {\r
- get\r
- {\r
- EcoreIMFBiDiDirection biDiDirection;\r
- ErrorCode error = ImeContextGetBidiDirection(_handle, out biDiDirection);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetBiDiDirection Failed with error " + error);\r
- return EcoreIMFBiDiDirection.Undefined;\r
- }\r
- return biDiDirection;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the preferred language information.\r
- /// </summary>\r
- public EcoreIMFInputPanelLang Langauge\r
- {\r
- get\r
- {\r
- EcoreIMFInputPanelLang langauge;\r
- ErrorCode error = ImeContextGetLanguage(_handle, out langauge);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetLangauge Failed with error " + error);\r
- return EcoreIMFInputPanelLang.Undefined;\r
- }\r
- return langauge;\r
- }\r
- }\r
- }\r
-}\r
+/*
+* 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 System;
+using static Interop.InputMethod;
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// Enumeration for Input Panel Layout
+ /// </summary>
+ public enum InputPanelLayout
+ {
+ /// <summary>
+ /// Normal
+ /// </summary>
+ LayoutNormal,
+ /// <summary>
+ /// Number
+ /// </summary>
+ LayoutNumber,
+ /// <summary>
+ /// Email
+ /// </summary>
+ LayoutEMail,
+ /// <summary>
+ /// URL
+ /// </summary>
+ LayoutURL,
+ /// <summary>
+ /// Phone Number
+ /// </summary>
+ LayoutPhoneNumber,
+ /// <summary>
+ /// IP
+ /// </summary>
+ LayoutIP,
+ /// <summary>
+ /// Month
+ /// </summary>
+ LayoutMonth,
+ /// <summary>
+ /// Number Only
+ /// </summary>
+ LayoutNumberOnly,
+ /// <summary>
+ /// Invalid
+ /// </summary>
+ LayoutInvalid,
+ /// <summary>
+ /// HEX
+ /// </summary>
+ LayoutHEX,
+ /// <summary>
+ /// Terminal
+ /// </summary>
+ LayoutTerminal,
+ /// <summary>
+ /// Password
+ /// </summary>
+ LayoutPassword,
+ /// <summary>
+ /// Date Time
+ /// </summary>
+ LayoutDateTime,
+ /// <summary>
+ /// Emoticon
+ /// </summary>
+ LayoutEmoticon,
+ /// <summary>
+ /// Voice
+ /// </summary>
+ LayoutVoice,
+ /// <summary>
+ /// Undefined
+ /// </summary>
+ Undefined
+ };
+
+ /// <summary>
+ /// Enumeration for Layout Variation
+ /// </summary>
+ public enum LayoutVariation
+ {
+ /// <summary>
+ /// The plain normal layout
+ /// </summary>
+ NormalNormal = 0,
+ /// <summary>
+ /// Filename layout; symbols such as '/', '\*', '\', '|', '<', '>', '?', '"' and ':' should be disabled
+ /// </summary>
+ NormalFileName,
+ /// <summary>
+ /// The name of a person
+ /// </summary>
+ NormalPersonName,
+ /// <summary>
+ /// The plain normal number layout
+ /// </summary>
+ NumberOnlyNormal = 0,
+ /// <summary>
+ /// The number layout to allow a negative sign
+ /// </summary>
+ NumberOnlySigned,
+ /// <summary>
+ /// The number layout to allow decimal point to provide fractional value
+ /// </summary>
+ NumberOnlyDecimal,
+ /// <summary>
+ /// The number layout to allow decimal point and negative sign
+ /// </summary>
+ NumberOnlySignedAndDecimal,
+ /// <summary>
+ /// The normal password layout
+ /// </summary>
+ PasswordNormal = 0,
+ /// <summary>
+ /// The password layout to allow only number
+ /// </summary>
+ PasswordNumberOnly,
+ /// <summary>
+ /// Undefined
+ /// </summary>
+ Undefined
+ };
+
+ /// <summary>
+ /// Enumeration for AutoCapital Type
+ /// </summary>
+ public enum AutoCapitalization
+ {
+ /// <summary>
+ /// None
+ /// </summary>
+ None,
+ /// <summary>
+ /// Word
+ /// </summary>
+ Word,
+ /// <summary>
+ /// Sentence
+ /// </summary>
+ Sentence,
+ /// <summary>
+ /// All Character
+ /// </summary>
+ AllCharacter,
+ /// <summary>
+ /// Undefined
+ /// </summary>
+ Undefined
+ };
+
+ /// <summary>
+ /// Enumeration for InputPanel ReturnKey Type
+ /// </summary>
+ public enum InputPanelReturnKey
+ {
+ /// <summary>
+ /// Default
+ /// </summary>
+ Default,
+ /// <summary>
+ /// Done
+ /// </summary>
+ Done,
+ /// <summary>
+ /// Go
+ /// </summary>
+ Go,
+ /// <summary>
+ /// Join
+ /// </summary>
+ Join,
+ /// <summary>
+ /// Login
+ /// </summary>
+ Login,
+ /// <summary>
+ /// Next
+ /// </summary>
+ Next,
+ /// <summary>
+ /// Search
+ /// </summary>
+ Search,
+ /// <summary>
+ /// Send
+ /// </summary>
+ Send,
+ /// <summary>
+ /// SignIn
+ /// </summary>
+ SignIn,
+ /// <summary>
+ /// Undefined
+ /// </summary>
+ Undefined
+ };
+
+ /// <summary>
+ /// Enumeration for InputHints
+ /// </summary>
+ public enum InputHints
+ {
+ /// <summary>
+ /// None
+ /// </summary>
+ None,
+ /// <summary>
+ /// AutoComplete
+ /// </summary>
+ AutoComplete,
+ /// <summary>
+ /// SensitiveData
+ /// </summary>
+ SensitiveData,
+ /// <summary>
+ /// Multiline
+ /// </summary>
+ Multiline,
+ /// <summary>
+ /// Undefined
+ /// </summary>
+ Undefined
+ };
+
+ /// <summary>
+ /// Enumeration for BiDi Direction
+ /// </summary>
+ public enum BiDirection
+ {
+ /// <summary>
+ /// Neutral
+ /// </summary>
+ Neutral,
+ /// <summary>
+ /// LTR
+ /// </summary>
+ LTR,
+ /// <summary>
+ /// RTL
+ /// </summary>
+ RTL,
+ /// <summary>
+ /// Undefined
+ /// </summary>
+ Undefined
+ };
+
+ /// <summary>
+ /// Enumeration for InputPanel Language
+ /// </summary>
+ public enum InputPanelLanguage
+ {
+ /// <summary>
+ /// Automatic
+ /// </summary>
+ Automatic,
+ /// <summary>
+ /// Alphabet
+ /// </summary>
+ Alphabet,
+ /// <summary>
+ /// Undefined
+ /// </summary>
+ Undefined
+ };
+
+ /// <summary>
+ /// This class represents the context of InputMethodEditor
+ /// </summary>
+ public class InputMethodContext
+ {
+ private IntPtr _handle;
+ internal InputMethodContext(IntPtr handle)
+ {
+ _handle = handle;
+ }
+
+ /// <summary>
+ /// Gets the layout information.
+ /// </summary>
+ public InputPanelLayout Layout
+ {
+ get
+ {
+ InputPanelLayout layout;
+ ErrorCode error = ImeContextGetLayout(_handle, out layout);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetLayout Failed with error " + error);
+ return InputPanelLayout.Undefined;
+ }
+ return layout;
+ }
+ }
+
+ /// <summary>
+ /// Gets the layout variation information.
+ /// </summary>
+ public LayoutVariation LayoutVariation
+ {
+ get
+ {
+ LayoutVariation layoutVariation;
+ ErrorCode error = ImeContextGetLayoutVariation(_handle, out layoutVariation);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetLayoutVariation Failed with error " + error);
+ return LayoutVariation.Undefined;
+ }
+ return layoutVariation;
+ }
+ }
+
+ /// <summary>
+ /// Gets the cursor position information.
+ /// </summary>
+ public int CursorPositionition
+ {
+ get
+ {
+ int cursorPosition;
+ ErrorCode error = ImeContextGetCursorPositionition(_handle, out cursorPosition);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetCursorPositionition Failed with error " + error);
+ return -1;
+ }
+ return cursorPosition;
+ }
+ }
+
+ /// <summary>
+ /// Gets the autocapital type information.
+ /// </summary>
+ public AutoCapitalization AutoCapitalization
+ {
+ get
+ {
+ AutoCapitalization autoCapitalType;
+ ErrorCode error = ImeContextGetAutocapitalType(_handle, out autoCapitalType);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetAutoCapitalization Failed with error " + error);
+ return AutoCapitalization.Undefined;
+ }
+ return autoCapitalType;
+ }
+ }
+
+ /// <summary>
+ /// Gets the Return key label type information.
+ /// </summary>
+ public InputPanelReturnKey ReturnKey
+ {
+ get
+ {
+ InputPanelReturnKey returnKeyType;
+ ErrorCode error = ImeContextGetReturnKey(_handle, out returnKeyType);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetReturnKey Failed with error " + error);
+ return InputPanelReturnKey.Undefined;
+ }
+ return returnKeyType;
+ }
+ }
+
+ /// <summary>
+ /// Gets the Return key state information.
+ /// </summary>
+ public bool ReturnKeyState
+ {
+ get
+ {
+ bool returnKeyState;
+ ErrorCode error = ImeContextGetReturnKeyState(_handle, out returnKeyState);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetReturnKeyState Failed with error " + error);
+ return false;
+ }
+ return returnKeyState;
+ }
+ }
+
+ /// <summary>
+ /// Gets the prediction mode information.
+ /// </summary>
+ public bool PredictionMode
+ {
+ get
+ {
+ bool predictionMode;
+ ErrorCode error = ImeContextGetPredictionMode(_handle, out predictionMode);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetPredictionMode Failed with error " + error);
+ return false;
+ }
+ return predictionMode;
+ }
+ }
+
+ /// <summary>
+ /// Gets the password mode information.
+ /// </summary>
+ public bool PasswordMode
+ {
+ get
+ {
+ bool passwordMode;
+ ErrorCode error = ImeContextGetPasswordMode(_handle, out passwordMode);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetPasswordMode Failed with error " + error);
+ return false;
+ }
+ return passwordMode;
+ }
+ }
+
+ /// <summary>
+ /// Gets the input hint information.
+ /// </summary>
+ public InputHints InputHint
+ {
+ get
+ {
+ InputHints inputHint;
+ ErrorCode error = ImeContextGetInputHint(_handle, out inputHint);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetInputHint Failed with error " + error);
+ return InputHints.Undefined;
+ }
+ return inputHint;
+ }
+ }
+
+ /// <summary>
+ /// Gets the text bidirectional information.
+ /// </summary>
+ public BiDirection BiDirection
+ {
+ get
+ {
+ BiDirection biDiDirection;
+ ErrorCode error = ImeContextGetBidiDirection(_handle, out biDiDirection);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetBiDirection Failed with error " + error);
+ return BiDirection.Undefined;
+ }
+ return biDiDirection;
+ }
+ }
+
+ /// <summary>
+ /// Gets the preferred language information.
+ /// </summary>
+ public InputPanelLanguage Language
+ {
+ get
+ {
+ InputPanelLanguage langauge;
+ ErrorCode error = ImeContextGetLanguage(_handle, out langauge);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetLanguage Failed with error " + error);
+ return InputPanelLanguage.Undefined;
+ }
+ return langauge;
+ }
+ }
+ }
+}
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Text;\r
-using static Interop.InputMethod;\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// Enumeration for Device Class\r
- /// </summary>\r
- public enum EcoreIMFDeviceClass\r
- {\r
- /// <summary>\r
- /// None\r
- /// </summary>\r
- None,\r
- /// <summary>\r
- /// Seat\r
- /// </summary>\r
- Seat,\r
- /// <summary>\r
- /// Keyboard\r
- /// </summary>\r
- Keyboard,\r
- /// <summary>\r
- /// Mouse\r
- /// </summary>\r
- Mouse,\r
- /// <summary>\r
- /// Touch\r
- /// </summary>\r
- Touch,\r
- /// <summary>\r
- /// Pen\r
- /// </summary>\r
- Pen,\r
- /// <summary>\r
- /// Pointer\r
- /// </summary>\r
- Pointer,\r
- /// <summary>\r
- /// Gamepad\r
- /// </summary>\r
- Gamepad,\r
- /// <summary>\r
- /// Undefined\r
- /// </summary>\r
- Undefined\r
- };\r
-\r
- /// <summary>\r
- /// Enumeration for Device SubClass\r
- /// </summary>\r
- public enum EcoreIMFDeviceSubclass\r
- {\r
- /// <summary>\r
- /// None\r
- /// </summary>\r
- None,\r
- /// <summary>\r
- /// Finger\r
- /// </summary>\r
- Finger,\r
- /// <summary>\r
- /// FingerNail\r
- /// </summary>\r
- FingerNail,\r
- /// <summary>\r
- /// Knuckle\r
- /// </summary>\r
- Knuckle,\r
- /// <summary>\r
- /// Palm\r
- /// </summary>\r
- Palm,\r
- /// <summary>\r
- /// HandSIze\r
- /// </summary>\r
- HandSIze,\r
- /// <summary>\r
- /// HandFlat\r
- /// </summary>\r
- HandFlat,\r
- /// <summary>\r
- /// PenTip\r
- /// </summary>\r
- PenTip,\r
- /// <summary>\r
- /// Trackpad\r
- /// </summary>\r
- Trackpad,\r
- /// <summary>\r
- /// Trackpoint\r
- /// </summary>\r
- Trackpoint,\r
- /// <summary>\r
- /// Trackball\r
- /// </summary>\r
- Trackball,\r
- /// <summary>\r
- /// Undefined\r
- /// </summary>\r
- Undefined\r
- };\r
-\r
- /// <summary>\r
- /// this class gives the device information\r
- /// </summary>\r
- public class VoiceControlDeviceInformation\r
- {\r
- private IntPtr _handle;\r
- internal VoiceControlDeviceInformation(IntPtr handle)\r
- {\r
- _handle = handle;\r
- }\r
-\r
- /// <summary>\r
- /// Gets the device name of the key event.\r
- /// </summary>\r
- public string Name\r
- {\r
- get\r
- {\r
- string name;\r
- ErrorCode error = ImeDeviceInfoGetName(_handle, out name);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetName Failed with error " + error);\r
- return "";\r
- }\r
- return name;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the device class of the key event.\r
- /// </summary>\r
- public EcoreIMFDeviceClass DeviceClass\r
- {\r
- get\r
- {\r
- EcoreIMFDeviceClass devClass;\r
- ErrorCode error = ImeDeviceInfoGetClass(_handle, out devClass);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetClass Failed with error " + error);\r
- return EcoreIMFDeviceClass.Undefined;\r
- }\r
- return devClass;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the device subclass of the key event.\r
- /// </summary>\r
- public EcoreIMFDeviceSubclass Subclass\r
- {\r
- get\r
- {\r
- EcoreIMFDeviceSubclass subclass;\r
- ErrorCode error = ImeDeviceInfoGetSubclass(_handle, out subclass);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetSubclass Failed with error " + error);\r
- return EcoreIMFDeviceSubclass.Undefined;\r
- }\r
- return subclass;\r
- }\r
- }\r
- }\r
-}\r
+/*
+* 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 System;
+using System.Collections.Generic;
+using System.Text;
+using static Interop.InputMethod;
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// Enumeration for Device Class
+ /// </summary>
+ public enum DeviceClass
+ {
+ /// <summary>
+ /// None
+ /// </summary>
+ None,
+ /// <summary>
+ /// Seat
+ /// </summary>
+ Seat,
+ /// <summary>
+ /// Keyboard
+ /// </summary>
+ Keyboard,
+ /// <summary>
+ /// Mouse
+ /// </summary>
+ Mouse,
+ /// <summary>
+ /// Touch
+ /// </summary>
+ Touch,
+ /// <summary>
+ /// Pen
+ /// </summary>
+ Pen,
+ /// <summary>
+ /// Pointer
+ /// </summary>
+ Pointer,
+ /// <summary>
+ /// Gamepad
+ /// </summary>
+ Gamepad,
+ /// <summary>
+ /// Undefined
+ /// </summary>
+ Undefined
+ };
+
+ /// <summary>
+ /// Enumeration for Device SubClass
+ /// </summary>
+ public enum DeviceSubclass
+ {
+ /// <summary>
+ /// None
+ /// </summary>
+ None,
+ /// <summary>
+ /// Finger
+ /// </summary>
+ Finger,
+ /// <summary>
+ /// FingerNail
+ /// </summary>
+ FingerNail,
+ /// <summary>
+ /// Knuckle
+ /// </summary>
+ Knuckle,
+ /// <summary>
+ /// Palm
+ /// </summary>
+ Palm,
+ /// <summary>
+ /// HandSIze
+ /// </summary>
+ HandSIze,
+ /// <summary>
+ /// HandFlat
+ /// </summary>
+ HandFlat,
+ /// <summary>
+ /// PenTip
+ /// </summary>
+ PenTip,
+ /// <summary>
+ /// Trackpad
+ /// </summary>
+ Trackpad,
+ /// <summary>
+ /// Trackpoint
+ /// </summary>
+ Trackpoint,
+ /// <summary>
+ /// Trackball
+ /// </summary>
+ Trackball,
+ /// <summary>
+ /// Undefined
+ /// </summary>
+ Undefined
+ };
+
+ /// <summary>
+ /// this class gives the device information, like the name, class and subclass
+ /// </summary>
+ public class VoiceControlDeviceInformation
+ {
+ private IntPtr _handle;
+ internal VoiceControlDeviceInformation(IntPtr handle)
+ {
+ _handle = handle;
+ }
+
+ /// <summary>
+ /// Gets the device name of the key event.
+ /// </summary>
+ public string Name
+ {
+ get
+ {
+ string name;
+ ErrorCode error = ImeDeviceInfoGetName(_handle, out name);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetName Failed with error " + error);
+ return "";
+ }
+ return name;
+ }
+ }
+
+ /// <summary>
+ /// Gets the device class of the key event.
+ /// </summary>
+ public DeviceClass DeviceClass
+ {
+ get
+ {
+ DeviceClass devClass;
+ ErrorCode error = ImeDeviceInfoGetClass(_handle, out devClass);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetClass Failed with error " + error);
+ return DeviceClass.Undefined;
+ }
+ return devClass;
+ }
+ }
+
+ /// <summary>
+ /// Gets the device subclass of the key event.
+ /// </summary>
+ public DeviceSubclass DeviceSubclass
+ {
+ get
+ {
+ DeviceSubclass subclass;
+ ErrorCode error = ImeDeviceInfoGetSubclass(_handle, out subclass);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetSubclass Failed with error " + error);
+ return DeviceSubclass.Undefined;
+ }
+ return subclass;
+ }
+ }
+ }
+}
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Runtime.InteropServices;\r
-using static Interop.InputMethod;\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// Enumeration of the key codes.\r
- /// If keycode & 0xff000000 == 0x01000000 then this key code is directly encoded 24-bit UCS character.The UCS value is keycode & 0x00ffffff.\r
- /// Defines the list of keys supported by the system.Note that certain keys may not be available on all devices.\r
- /// </summary>\r
- public enum KeyCode\r
- {\r
- /// <summary>\r
- /// The backspace key\r
- /// </summary>\r
- IME_KEY_BackSpace = 0xFF08,\r
- /// <summary>\r
- /// The tab key\r
- /// </summary>\r
- IME_KEY_Tab = 0xFF09,\r
- /// <summary>\r
- /// The linefeed key\r
- /// </summary>\r
- IME_KEY_Linefeed = 0xFF0A,\r
- /// <summary>\r
- /// The clear key\r
- /// </summary>\r
- IME_KEY_Clear = 0xFF0B,\r
- /// <summary>\r
- /// The return key\r
- /// </summary>\r
- IME_KEY_Return = 0xFF0D,\r
- /// <summary>\r
- /// The pause key\r
- /// </summary>\r
- IME_KEY_Pause = 0xFF13,\r
- /// <summary>\r
- /// The scroll lock key\r
- /// </summary>\r
- IME_KEY_Scroll_Lock = 0xFF14,\r
- /// <summary>\r
- /// The sys req key\r
- /// </summary>\r
- IME_KEY_Sys_Req = 0xFF15,\r
- /// <summary>\r
- /// The escape key\r
- /// </summary>\r
- IME_KEY_Escape = 0xFF1B,\r
- /// <summary>\r
- /// The delete key\r
- /// </summary>\r
- IME_KEY_Delete = 0xFFFF,\r
-\r
- /* Cursor control & motion */\r
- /// <summary>\r
- /// The home key\r
- /// </summary>\r
- IME_KEY_Home = 0xFF50,\r
- /// <summary>\r
- /// The left directional key\r
- /// </summary>\r
- IME_KEY_Left = 0xFF51,\r
- /// <summary>\r
- /// The up directional key\r
- /// </summary>\r
- IME_KEY_Up = 0xFF52,\r
- /// <summary>\r
- /// The right directional key\r
- /// </summary>\r
- IME_KEY_Right = 0xFF53,\r
- /// <summary>\r
- /// The down directional key\r
- /// </summary>\r
- IME_KEY_Down = 0xFF54,\r
- /// <summary>\r
- /// The prior, previous key\r
- /// </summary>\r
- IME_KEY_Prior = 0xFF55,\r
- /// <summary>\r
- /// The page up key\r
- /// </summary>\r
- IME_KEY_Page_Up = 0xFF55,\r
- /// <summary>\r
- /// The next key\r
- /// </summary>\r
- IME_KEY_Next = 0xFF56,\r
- /// <summary>\r
- /// The page down key\r
- /// </summary>\r
- IME_KEY_Page_Down = 0xFF56,\r
- /// <summary>\r
- /// The end key\r
- /// </summary>\r
- IME_KEY_End = 0xFF57,\r
- /// <summary>\r
- /// The begin key\r
- /// </summary>\r
- IME_KEY_Begin = 0xFF58,\r
-\r
- /* Misc Functions */\r
- /// <summary>\r
- /// The select key\r
- /// </summary>\r
- IME_KEY_Select = 0xFF60,\r
- /// <summary>\r
- /// The print key\r
- /// </summary>\r
- IME_KEY_Print = 0xFF61,\r
- /// <summary>\r
- /// The execute, run, do key\r
- /// </summary>\r
- IME_KEY_Execute = 0xFF62,\r
- /// <summary>\r
- /// The insert key\r
- /// </summary>\r
- IME_KEY_Insert = 0xFF63,\r
- /// <summary>\r
- /// The undo key\r
- /// </summary>\r
- IME_KEY_Undo = 0xFF65,\r
- /// <summary>\r
- /// The redo key\r
- /// </summary>\r
- IME_KEY_Redo = 0xFF66,\r
- /// <summary>\r
- /// The menu key\r
- /// </summary>\r
- IME_KEY_Menu = 0xFF67,\r
- /// <summary>\r
- /// The find key\r
- /// </summary>\r
- IME_KEY_Find = 0xFF68,\r
- /// <summary>\r
- /// The cancel, stop, abort, exit key\r
- /// </summary>\r
- IME_KEY_Cancel = 0xFF69,\r
- /// <summary>\r
- /// The help key\r
- /// </summary>\r
- IME_KEY_Help = 0xFF6A,\r
- /// <summary>\r
- /// The break key\r
- /// </summary>\r
- IME_KEY_Break = 0xFF6B,\r
- /// <summary>\r
- /// The character set switch key\r
- /// </summary>\r
- IME_KEY_Mode_switch = 0xFF7E,\r
- /// <summary>\r
- /// The num lock key\r
- /// </summary>\r
- IME_KEY_Num_Lock = 0xFF7F,\r
-\r
- /* Keypad */\r
- /// <summary>\r
- /// The Numpad space key\r
- /// </summary>\r
- IME_KEY_KP_Space = 0xFF80,\r
- /// <summary>\r
- /// The Numpad tab key\r
- /// </summary>\r
- IME_KEY_KP_Tab = 0xFF89,\r
- /// <summary>\r
- /// The Numpad enter key\r
- /// </summary>\r
- IME_KEY_KP_Enter = 0xFF8D,\r
- /// <summary>\r
- /// The Numpad function 1 key\r
- /// </summary>\r
- IME_KEY_KP_F1 = 0xFF91,\r
- /// <summary>\r
- /// The Numpad function 2 key\r
- /// </summary>\r
- IME_KEY_KP_F2 = 0xFF92,\r
- /// <summary>\r
- /// The Numpad function 3 key\r
- /// </summary>\r
- IME_KEY_KP_F3 = 0xFF93,\r
- /// <summary>\r
- /// The Numpad function 4 key\r
- /// </summary>\r
- IME_KEY_KP_F4 = 0xFF94,\r
- /// <summary>\r
- /// The Numpad home key\r
- /// </summary>\r
- IME_KEY_KP_Home = 0xFF95,\r
- /// <summary>\r
- /// The Numpad left key\r
- /// </summary>\r
- IME_KEY_KP_Left = 0xFF96,\r
- /// <summary>\r
- /// The Numpad up key\r
- /// </summary>\r
- IME_KEY_KP_Up = 0xFF97,\r
- /// <summary>\r
- /// The Numpad right key\r
- /// </summary>\r
- IME_KEY_KP_Right = 0xFF98,\r
- /// <summary>\r
- /// The Numpad down key\r
- /// </summary>\r
- IME_KEY_KP_Down = 0xFF99,\r
- /// <summary>\r
- /// The Numpad prior, previous key\r
- /// </summary>\r
- IME_KEY_KP_Prior = 0xFF9A,\r
- /// <summary>\r
- /// The Numpad page up key\r
- /// </summary>\r
- IME_KEY_KP_Page_Up = 0xFF9A,\r
- /// <summary>\r
- /// The Numpad next key\r
- /// </summary>\r
- IME_KEY_KP_Next = 0xFF9B,\r
- /// <summary>\r
- /// The Numpad page down key\r
- /// </summary>\r
- IME_KEY_KP_Page_Down = 0xFF9B,\r
- /// <summary>\r
- /// The Numpad end key\r
- /// </summary>\r
- IME_KEY_KP_End = 0xFF9C,\r
- /// <summary>\r
- /// The Numpad begin key\r
- /// </summary>\r
- IME_KEY_KP_Begin = 0xFF9D,\r
- /// <summary>\r
- /// The Numpad insert key\r
- /// </summary>\r
- IME_KEY_KP_Insert = 0xFF9E,\r
- /// <summary>\r
- /// The Numpad delete key\r
- /// </summary>\r
- IME_KEY_KP_Delete = 0xFF9F,\r
- /// <summary>\r
- /// The Numpad equal key\r
- /// </summary>\r
- IME_KEY_KP_Equal = 0xFFBD,\r
- /// <summary>\r
- /// The Numpad multiply key\r
- /// </summary>\r
- IME_KEY_KP_Multiply = 0xFFAA,\r
- /// <summary>\r
- /// The Numpad add key\r
- /// </summary>\r
- IME_KEY_KP_Add = 0xFFAB,\r
- /// <summary>\r
- /// The Numpad separator key\r
- /// </summary>\r
- IME_KEY_KP_Separator = 0xFFAC,\r
- /// <summary>\r
- /// The Numpad subtract key\r
- /// </summary>\r
- IME_KEY_KP_Subtract = 0xFFAD,\r
- /// <summary>\r
- /// The Numpad decimal key\r
- /// </summary>\r
- IME_KEY_KP_Decimal = 0xFFAE,\r
- /// <summary>\r
- /// The Numpad divide key\r
- /// </summary>\r
- IME_KEY_KP_Divide = 0xFFAF,\r
- /// <summary>\r
- /// The Numpad 0 key\r
- /// </summary>\r
- IME_KEY_KP_0 = 0xFFB0,\r
- /// <summary>\r
- /// The Numpad 1 key\r
- /// </summary>\r
- IME_KEY_KP_1 = 0xFFB1,\r
- /// <summary>\r
- /// The Numpad 2 key\r
- /// </summary>\r
- IME_KEY_KP_2 = 0xFFB2,\r
- /// <summary>\r
- /// The Numpad 3 key\r
- /// </summary>\r
- IME_KEY_KP_3 = 0xFFB3,\r
- /// <summary>\r
- /// The Numpad 4 key\r
- /// </summary>\r
- IME_KEY_KP_4 = 0xFFB4,\r
- /// <summary>\r
- /// The Numpad 5 key\r
- /// </summary>\r
- IME_KEY_KP_5 = 0xFFB5,\r
- /// <summary>\r
- /// The Numpad 6 key\r
- /// </summary>\r
- IME_KEY_KP_6 = 0xFFB6,\r
- /// <summary>\r
- /// The Numpad 7 key\r
- /// </summary>\r
- IME_KEY_KP_7 = 0xFFB7,\r
- /// <summary>\r
- /// The Numpad 8 key\r
- /// </summary>\r
- IME_KEY_KP_8 = 0xFFB8,\r
- /// <summary>\r
- /// The Numpad 9 key\r
- /// </summary>\r
- IME_KEY_KP_9 = 0xFFB9,\r
-\r
- /* Auxilliary Functions */\r
- /// <summary>\r
- /// The function 1 key\r
- /// </summary>\r
- IME_KEY_F1 = 0xFFBE,\r
- /// <summary>\r
- /// The function 2 key\r
- /// </summary>\r
- IME_KEY_F2 = 0xFFBF,\r
- /// <summary>\r
- /// The function 3 key\r
- /// </summary>\r
- IME_KEY_F3 = 0xFFC0,\r
- /// <summary>\r
- /// The function 4 key\r
- /// </summary>\r
- IME_KEY_F4 = 0xFFC1,\r
- /// <summary>\r
- /// The function 5 key\r
- /// </summary>\r
- IME_KEY_F5 = 0xFFC2,\r
- /// <summary>\r
- /// The function 6 key\r
- /// </summary>\r
- IME_KEY_F6 = 0xFFC3,\r
- /// <summary>\r
- /// The function 7 key\r
- /// </summary>\r
- IME_KEY_F7 = 0xFFC4,\r
- /// <summary>\r
- /// The function 8 key\r
- /// </summary>\r
- IME_KEY_F8 = 0xFFC5,\r
- /// <summary>\r
- /// The function 9 key\r
- /// </summary>\r
- IME_KEY_F9 = 0xFFC6,\r
- /// <summary>\r
- /// The function 10 key\r
- /// </summary>\r
- IME_KEY_F10 = 0xFFC7,\r
- /// <summary>\r
- /// The function 11 key\r
- /// </summary>\r
- IME_KEY_F11 = 0xFFC8,\r
- /// <summary>\r
- /// The function 12 key\r
- /// </summary>\r
- IME_KEY_F12 = 0xFFC9,\r
- /// <summary>\r
- /// The function 13 key\r
- /// </summary>\r
- IME_KEY_F13 = 0xFFCA,\r
- /// <summary>\r
- /// The function 14 key\r
- /// </summary>\r
- IME_KEY_F14 = 0xFFCB,\r
- /// <summary>\r
- /// The function 15 key\r
- /// </summary>\r
- IME_KEY_F15 = 0xFFCC,\r
- /// <summary>\r
- /// The function 16 key\r
- /// </summary>\r
- IME_KEY_F16 = 0xFFCD,\r
- /// <summary>\r
- /// The function 17 key\r
- /// </summary>\r
- IME_KEY_F17 = 0xFFCE,\r
- /// <summary>\r
- /// The function 18 key\r
- /// </summary>\r
- IME_KEY_F18 = 0xFFCF,\r
- /// <summary>\r
- /// The function 19 key\r
- /// </summary>\r
- IME_KEY_F19 = 0xFFD0,\r
- /// <summary>\r
- /// The function 20 key\r
- /// </summary>\r
- IME_KEY_F20 = 0xFFD1,\r
- /// <summary>\r
- /// The function 21 key\r
- /// </summary>\r
- IME_KEY_F21 = 0xFFD2,\r
- /// <summary>\r
- /// The function 22 key\r
- /// </summary>\r
- IME_KEY_F22 = 0xFFD3,\r
- /// <summary>\r
- /// The function 23 key\r
- /// </summary>\r
- IME_KEY_F23 = 0xFFD4,\r
- /// <summary>\r
- /// The function 24 key\r
- /// </summary>\r
- IME_KEY_F24 = 0xFFD5,\r
- /// <summary>\r
- /// The function 25 key\r
- /// </summary>\r
- IME_KEY_F25 = 0xFFD6,\r
- /// <summary>\r
- /// The function 26 key\r
- /// </summary>\r
- IME_KEY_F26 = 0xFFD7,\r
- /// <summary>\r
- /// The function 27 key\r
- /// </summary>\r
- IME_KEY_F27 = 0xFFD8,\r
- /// <summary>\r
- /// The function 28 key\r
- /// </summary>\r
- IME_KEY_F28 = 0xFFD9,\r
- /// <summary>\r
- /// The function 29 key\r
- /// </summary>\r
- IME_KEY_F29 = 0xFFDA,\r
- /// <summary>\r
- /// The function 30 key\r
- /// </summary>\r
- IME_KEY_F30 = 0xFFDB,\r
- /// <summary>\r
- /// The function 31 key\r
- /// </summary>\r
- IME_KEY_F31 = 0xFFDC,\r
- /// <summary>\r
- /// The function 32 key\r
- /// </summary>\r
- IME_KEY_F32 = 0xFFDD,\r
- /// <summary>\r
- /// The function 33 key\r
- /// </summary>\r
- IME_KEY_F33 = 0xFFDE,\r
- /// <summary>\r
- /// The function 34 key\r
- /// </summary>\r
- IME_KEY_F34 = 0xFFDF,\r
- /// <summary>\r
- /// The function 35 key\r
- /// </summary>\r
- IME_KEY_F35 = 0xFFE0,\r
-\r
- /* Modifier keys */\r
- /// <summary>\r
- /// The left shift key\r
- /// </summary>\r
- IME_KEY_Shift_L = 0xFFE1,\r
- /// <summary>\r
- /// The right shift key\r
- /// </summary>\r
- IME_KEY_Shift_R = 0xFFE2,\r
- /// <summary>\r
- /// The left control key\r
- /// </summary>\r
- IME_KEY_Control_L = 0xFFE3,\r
- /// <summary>\r
- /// The right control key\r
- /// </summary>\r
- IME_KEY_Control_R = 0xFFE4,\r
- /// <summary>\r
- /// The caps lock key\r
- /// </summary>\r
- IME_KEY_Caps_Lock = 0xFFE5,\r
- /// <summary>\r
- /// The shift lock key\r
- /// </summary>\r
- IME_KEY_Shift_Lock = 0xFFE6,\r
- /// <summary>\r
- /// The left meta key\r
- /// </summary>\r
- IME_KEY_Meta_L = 0xFFE7,\r
- /// <summary>\r
- /// The right meta key\r
- /// </summary>\r
- IME_KEY_Meta_R = 0xFFE8,\r
- /// <summary>\r
- /// The left alt key\r
- /// </summary>\r
- IME_KEY_Alt_L = 0xFFE9,\r
- /// <summary>\r
- /// The right alt key\r
- /// </summary>\r
- IME_KEY_Alt_R = 0xFFEA,\r
- /// <summary>\r
- /// The left super key\r
- /// </summary>\r
- IME_KEY_Super_L = 0xFFEB,\r
- /// <summary>\r
- /// The right super key\r
- /// </summary>\r
- IME_KEY_Super_R = 0xFFEC,\r
- /// <summary>\r
- /// The left hyper key\r
- /// </summary>\r
- IME_KEY_Hyper_L = 0xFFED,\r
- /// <summary>\r
- /// The right hyper key\r
- /// </summary>\r
- IME_KEY_Hyper_R = 0xFFEE,\r
-\r
- /* Latin 1 */\r
- /// <summary>\r
- /// The space key\r
- /// </summary>\r
- IME_KEY_space = 0x020,\r
- /// <summary>\r
- /// The exclamation key\r
- /// </summary>\r
- IME_KEY_exclam = 0x021,\r
- /// <summary>\r
- /// The quotedbl key\r
- /// </summary>\r
- IME_KEY_quotedbl = 0x022,\r
- /// <summary>\r
- /// The number sign key\r
- /// </summary>\r
- IME_KEY_numbersign = 0x023,\r
- /// <summary>\r
- /// The dollar key\r
- /// </summary>\r
- IME_KEY_dollar = 0x024,\r
- /// <summary>\r
- /// The percent key\r
- /// </summary>\r
- IME_KEY_percent = 0x025,\r
- /// <summary>\r
- /// The ampersand key\r
- /// </summary>\r
- IME_KEY_ampersand = 0x026,\r
- /// <summary>\r
- /// The apostrophe key\r
- /// </summary>\r
- IME_KEY_apostrophe = 0x027,\r
- /// <summary>\r
- /// The parenleft key\r
- /// </summary>\r
- IME_KEY_parenleft = 0x028,\r
- /// <summary>\r
- /// The parenright key\r
- /// </summary>\r
- IME_KEY_parenright = 0x029,\r
- /// <summary>\r
- /// The asterisk key\r
- /// </summary>\r
- IME_KEY_asterisk = 0x02a,\r
- /// <summary>\r
- /// The plus key\r
- /// </summary>\r
- IME_KEY_plus = 0x02b,\r
- /// <summary>\r
- /// The comma key\r
- /// </summary>\r
- IME_KEY_comma = 0x02c,\r
- /// <summary>\r
- /// The minus key\r
- /// </summary>\r
- IME_KEY_minus = 0x02d,\r
- /// <summary>\r
- /// The period key\r
- /// </summary>\r
- IME_KEY_period = 0x02e,\r
- /// <summary>\r
- /// The slash key\r
- /// </summary>\r
- IME_KEY_slash = 0x02f,\r
- /// <summary>\r
- /// The 0 key\r
- /// </summary>\r
- IME_KEY_0 = 0x030,\r
- /// <summary>\r
- /// The 1 key\r
- /// </summary>\r
- IME_KEY_1 = 0x031,\r
- /// <summary>\r
- /// The 2 key\r
- /// </summary>\r
- IME_KEY_2 = 0x032,\r
- /// <summary>\r
- /// The 3 key\r
- /// </summary>\r
- IME_KEY_3 = 0x033,\r
- /// <summary>\r
- /// The 4 key\r
- /// </summary>\r
- IME_KEY_4 = 0x034,\r
- /// <summary>\r
- /// The 5 key\r
- /// </summary>\r
- IME_KEY_5 = 0x035,\r
- /// <summary>\r
- /// The 6 key\r
- /// </summary>\r
- IME_KEY_6 = 0x036,\r
- /// <summary>\r
- /// The 7 key\r
- /// </summary>\r
- IME_KEY_7 = 0x037,\r
- /// <summary>\r
- /// The 8 key\r
- /// </summary>\r
- IME_KEY_8 = 0x038,\r
- /// <summary>\r
- /// The 9 key\r
- /// </summary>\r
- IME_KEY_9 = 0x039,\r
- /// <summary>\r
- /// The colon key\r
- /// </summary>\r
- IME_KEY_colon = 0x03a,\r
- /// <summary>\r
- /// The semicolon key\r
- /// </summary>\r
- IME_KEY_semicolon = 0x03b,\r
- /// <summary>\r
- /// The less key\r
- /// </summary>\r
- IME_KEY_less = 0x03c,\r
- /// <summary>\r
- /// The equal key\r
- /// </summary>\r
- IME_KEY_equal = 0x03d,\r
- /// <summary>\r
- /// The greater key\r
- /// </summary>\r
- IME_KEY_greater = 0x03e,\r
- /// <summary>\r
- /// The question key\r
- /// </summary>\r
- IME_KEY_question = 0x03f,\r
- /// <summary>\r
- /// The at key\r
- /// </summary>\r
- IME_KEY_at = 0x040,\r
- /// <summary>\r
- /// The A key\r
- /// </summary>\r
- IME_KEY_A = 0x041,\r
- /// <summary>\r
- /// The B key\r
- /// </summary>\r
- IME_KEY_B = 0x042,\r
- /// <summary>\r
- /// The C key\r
- /// </summary>\r
- IME_KEY_C = 0x043,\r
- /// <summary>\r
- /// The D key\r
- /// </summary>\r
- IME_KEY_D = 0x044,\r
- /// <summary>\r
- /// The E key\r
- /// </summary>\r
- IME_KEY_E = 0x045,\r
- /// <summary>\r
- /// The F key\r
- /// </summary>\r
- IME_KEY_F = 0x046,\r
- /// <summary>\r
- /// The G key\r
- /// </summary>\r
- IME_KEY_G = 0x047,\r
- /// <summary>\r
- /// The H key\r
- /// </summary>\r
- IME_KEY_H = 0x048,\r
- /// <summary>\r
- /// The I key\r
- /// </summary>\r
- IME_KEY_I = 0x049,\r
- /// <summary>\r
- /// The J key\r
- /// </summary>\r
- IME_KEY_J = 0x04a,\r
- /// <summary>\r
- /// The K key\r
- /// </summary>\r
- IME_KEY_K = 0x04b,\r
- /// <summary>\r
- /// The L key\r
- /// </summary>\r
- IME_KEY_L = 0x04c,\r
- /// <summary>\r
- /// The M key\r
- /// </summary>\r
- IME_KEY_M = 0x04d,\r
- /// <summary>\r
- /// The N key\r
- /// </summary>\r
- IME_KEY_N = 0x04e,\r
- /// <summary>\r
- /// The O key\r
- /// </summary>\r
- IME_KEY_O = 0x04f,\r
- /// <summary>\r
- /// The P key\r
- /// </summary>\r
- IME_KEY_P = 0x050,\r
- /// <summary>\r
- /// The Q key\r
- /// </summary>\r
- IME_KEY_Q = 0x051,\r
- /// <summary>\r
- /// The R key\r
- /// </summary>\r
- IME_KEY_R = 0x052,\r
- /// <summary>\r
- /// The S key\r
- /// </summary>\r
- IME_KEY_S = 0x053,\r
- /// <summary>\r
- /// The T key\r
- /// </summary>\r
- IME_KEY_T = 0x054,\r
- /// <summary>\r
- /// The U key\r
- /// </summary>\r
- IME_KEY_U = 0x055,\r
- /// <summary>\r
- /// The V key\r
- /// </summary>\r
- IME_KEY_V = 0x056,\r
- /// <summary>\r
- /// The W key\r
- /// </summary>\r
- IME_KEY_W = 0x057,\r
- /// <summary>\r
- /// The X key\r
- /// </summary>\r
- IME_KEY_X = 0x058,\r
- /// <summary>\r
- /// The Y key\r
- /// </summary>\r
- IME_KEY_Y = 0x059,\r
- /// <summary>\r
- /// The Z key\r
- /// </summary>\r
- IME_KEY_Z = 0x05a,\r
- /// <summary>\r
- /// The left bracket key\r
- /// </summary>\r
- IME_KEY_bracketleft = 0x05b,\r
- /// <summary>\r
- /// The backslash key\r
- /// </summary>\r
- IME_KEY_backslash = 0x05c,\r
- /// <summary>\r
- /// The right bracket key\r
- /// </summary>\r
- IME_KEY_bracketright = 0x05d,\r
- /// <summary>\r
- /// The circumflex key\r
- /// </summary>\r
- IME_KEY_asciicircum = 0x05e,\r
- /// <summary>\r
- /// The underscore key\r
- /// </summary>\r
- IME_KEY_underscore = 0x05f,\r
- /// <summary>\r
- /// The grave key\r
- /// </summary>\r
- IME_KEY_grave = 0x060,\r
- /// <summary>\r
- /// The a key\r
- /// </summary>\r
- IME_KEY_a = 0x061,\r
- /// <summary>\r
- /// The b key\r
- /// </summary>\r
- IME_KEY_b = 0x062,\r
- /// <summary>\r
- /// The c key\r
- /// </summary>\r
- IME_KEY_c = 0x063,\r
- /// <summary>\r
- /// The d key\r
- /// </summary>\r
- IME_KEY_d = 0x064,\r
- /// <summary>\r
- /// The e key\r
- /// </summary>\r
- IME_KEY_e = 0x065,\r
- /// <summary>\r
- /// The f key\r
- /// </summary>\r
- IME_KEY_f = 0x066,\r
- /// <summary>\r
- /// The g key\r
- /// </summary>\r
- IME_KEY_g = 0x067,\r
- /// <summary>\r
- /// The h key\r
- /// </summary>\r
- IME_KEY_h = 0x068,\r
- /// <summary>\r
- /// The i key\r
- /// </summary>\r
- IME_KEY_i = 0x069,\r
- /// <summary>\r
- /// The j key\r
- /// </summary>\r
- IME_KEY_j = 0x06a,\r
- /// <summary>\r
- /// The k key\r
- /// </summary>\r
- IME_KEY_k = 0x06b,\r
- /// <summary>\r
- /// The l key\r
- /// </summary>\r
- IME_KEY_l = 0x06c,\r
- /// <summary>\r
- /// The m key\r
- /// </summary>\r
- IME_KEY_m = 0x06d,\r
- /// <summary>\r
- /// The n key\r
- /// </summary>\r
- IME_KEY_n = 0x06e,\r
- /// <summary>\r
- /// The o key\r
- /// </summary>\r
- IME_KEY_o = 0x06f,\r
- /// <summary>\r
- /// The p key\r
- /// </summary>\r
- IME_KEY_p = 0x070,\r
- /// <summary>\r
- /// The q key\r
- /// </summary>\r
- IME_KEY_q = 0x071,\r
- /// <summary>\r
- /// The r key\r
- /// </summary>\r
- IME_KEY_r = 0x072,\r
- /// <summary>\r
- /// The s key\r
- /// </summary>\r
- IME_KEY_s = 0x073,\r
- /// <summary>\r
- /// The t key\r
- /// </summary>\r
- IME_KEY_t = 0x074,\r
- /// <summary>\r
- /// The u key\r
- /// </summary>\r
- IME_KEY_u = 0x075,\r
- /// <summary>\r
- /// The v key\r
- /// </summary>\r
- IME_KEY_v = 0x076,\r
- /// <summary>\r
- /// The w key\r
- /// </summary>\r
- IME_KEY_w = 0x077,\r
- /// <summary>\r
- /// The x key\r
- /// </summary>\r
- IME_KEY_x = 0x078,\r
- /// <summary>\r
- /// The y key\r
- /// </summary>\r
- IME_KEY_y = 0x079,\r
- /// <summary>\r
- /// The z key\r
- /// </summary>\r
- IME_KEY_z = 0x07a,\r
- /// <summary>\r
- /// The left brace key\r
- /// </summary>\r
- IME_KEY_braceleft = 0x07b,\r
- /// <summary>\r
- /// The bar key\r
- /// </summary>\r
- IME_KEY_bar = 0x07c,\r
- /// <summary>\r
- /// The right brace key\r
- /// </summary>\r
- IME_KEY_braceright = 0x07d,\r
- /// <summary>\r
- /// The tilde key\r
- /// </summary>\r
- IME_KEY_asciitilde = 0x07e,\r
- };\r
-\r
- /// <summary>\r
- /// Enumeration of the key masks.\r
- /// The key masks indicate which modifier keys is pressed down during the keyboard hit.The special IME_KEY_MASK_RELEASED indicates the key release event.\r
- /// </summary>\r
- public enum KeyMask\r
- {\r
- /// <summary>\r
- /// Key press event without modifier key\r
- /// </summary>\r
- IME_KEY_MASK_PRESSED = 0,\r
- /// <summary>\r
- /// The Shift key is pressed down\r
- /// </summary>\r
- IME_KEY_MASK_SHIFT = (1 << 0),\r
- /// <summary>\r
- /// The CapsLock key is pressed down\r
- /// </summary>\r
- IME_KEY_MASK_CAPSLOCK = (1 << 1),\r
- /// <summary>\r
- /// The Control key is pressed down\r
- /// </summary>\r
- IME_KEY_MASK_CONTROL = (1 << 2),\r
- /// <summary>\r
- /// The Alt key is pressed down\r
- /// </summary>\r
- IME_KEY_MASK_ALT = (1 << 3),\r
- /// <summary>\r
- /// The Meta key is pressed down\r
- /// </summary>\r
- IME_KEY_MASK_META = (1 << 4),\r
- /// <summary>\r
- /// The Win (between Control and Alt) is pressed down\r
- /// </summary>\r
- IME_KEY_MASK_WIN = (1 << 5),\r
- /// <summary>\r
- /// The Hyper key is pressed down\r
- /// </summary>\r
- IME_KEY_MASK_HYPER = (1 << 6),\r
- /// <summary>\r
- /// The NumLock key is pressed down\r
- /// </summary>\r
- IME_KEY_MASK_NUMLOCK = (1 << 7),\r
- /// <summary>\r
- /// Key release event\r
- /// </summary>\r
- IME_KEY_MASK_RELEASED = (1 << 15),\r
- }\r
-\r
- /// <summary>\r
- /// This class contains api's related to IME(Input method editor)\r
- /// </summary>\r
- public static class InputMethodEditor\r
- {\r
- private static Object thisLock = new Object();\r
- private static ImeCallbackStructGCHandle _imeCallbackStructGCHandle = new ImeCallbackStructGCHandle();\r
- private static event EventHandler<FocusInEventArgs> _focusIn;\r
- private static ImeFocusInCb _imeFocusInDelegate;\r
- private static event EventHandler<FocusOutEventArgs> _focusOut;\r
- private static ImeFocusOutCb _imeFocusOutDelegate;\r
- private static event EventHandler<SurroundingTextUpdatedEventArgs> _surroundingTextUpdated;\r
- private static ImeSurroundingTextUpdatedCb _imeSurroundingTextUpdatedDelegate;\r
- private static event EventHandler<System.EventArgs> _inputContextReset;\r
- private static ImeInputContextResetCb _imeInputContextResetDelegate;\r
- private static event EventHandler<CursorPositionUpdatedEventArgs> _cursorPositionUpdated;\r
- private static ImeCursorPositionUpdatedCb _imeCursorPositionUpdatedDelegate;\r
- private static event EventHandler<LangaugeSetEventArgs> _langaugeSet;\r
- private static ImeLanguageSetCb _imeLangaugeSetDelegate;\r
- private static event EventHandler<ImDataSetEventArgs> _imDataSet;\r
- private static ImeImdataSetCb _imeImDataSetDelegate;\r
- private static event EventHandler<LayoutSetEventArgs> _layoutSet;\r
- private static ImeLayoutSetCb _imeLayoutSetDelegate;\r
- private static event EventHandler<ReturnKeyTypeSetEventArgs> _returnKeyTypeSet;\r
- private static ImeReturnKeyTypeSetCb _imeReturnKeyTypeSetDelegate;\r
- private static event EventHandler<ReturnKeyStateSetEventArgs> _returnKeyStateSet;\r
- private static ImeReturnKeyStateSetCb _imeReturnKeyStateSetDelegate;\r
- private static event ProcessKeyEventHandler _processKey;\r
- private static ImeProcessKeyEventCb _imeProcessKeyDelegate;\r
- private static event EventHandler<DisplayLanaguageChangedEventArgs> _displayLanaguageChanged;\r
- private static ImeDisplayLanguageChangedCb _imeDisplayLanaguageChangedDelegate;\r
- private static event EventHandler<RotationDegreeChangedEventArgs> _rotationDegreeChanged;\r
- private static ImeRotationDegreeChangedCb _imeRotationDegreeChangedDelegate;\r
- private static event EventHandler<AccessibilityStateChangedEventArgs> _accessibilityStateChanged;\r
- private static ImeAccessibilityStateChangedCb _imeAccessibilityStateChangedDelegate;\r
- private static event EventHandler<OptionWindowCreatedEventArgs> _optionWindowCreated;\r
- private static ImeOptionWindowCreatedCb _imeOptionWindowCreatedDelegate;\r
- private static event EventHandler<OptionWindowDestroyedEventArgs> _optionWindowDestroyed;\r
- private static ImeOptionWindowDestroyedCb _imeOptionWindowDestroyedDelegate;\r
- private static ImeLanguageRequestedCb _imeLanguageRequestedDelegate;\r
- private static OutAction<string> _languageRequestedDelegate;\r
- private static ImeImdataRequestedCb _imeImDataRequestedDelegate;\r
- private static OutAction<byte, uint> _imDataRequestedDelegate;\r
- private static ImeGeometryRequestedCb _imeGeometryRequestedDelegate;\r
- private static OutAction1<int> _geometryRequestedDelegate;\r
- private static Action _userCreate;\r
- private static Action _userTerminate;\r
- private static Action<int, InputMethodContext> _userShow;\r
- private static Action<int> _userHide;\r
- private static ImeCreateCb _create = (IntPtr userData) =>\r
- {\r
- Log.Info(LogTag, "In Create Delegate");\r
- _userCreate?.Invoke();\r
- };\r
- private static ImeTerminateCb _terminate = (IntPtr userData) =>\r
- {\r
- Log.Info(LogTag, "In terminate Delegate");\r
- _userTerminate?.Invoke();\r
- };\r
- private static ImeShowCb _show = (int contextId, IntPtr context, IntPtr userData) =>\r
- {\r
- Log.Info(LogTag, "In Show Delegate");\r
- _userShow?.Invoke(contextId, new InputMethodContext(context));\r
- };\r
- private static ImeHideCb _hide = (int contextId, IntPtr userData) =>\r
- {\r
- Log.Info(LogTag, "In Hide Delegate");\r
- _userHide?.Invoke(contextId);\r
- };\r
-\r
-\r
- /// <summary>\r
- /// An Action with 1 out parameter\r
- /// </summary>\r
- /// <typeparam name="T">Generic Type</typeparam>\r
- /// <param name="a">The out parameter</param>\r
- public delegate void OutAction<T>(out T a);\r
-\r
- /// <summary>\r
- /// An Action with 2 out parameter's\r
- /// </summary>\r
- /// <typeparam name="T">Generic Type</typeparam>\r
- /// <typeparam name="T1">Generic Type</typeparam>\r
- /// <param name="a">The out parameter 1</param>\r
- /// <param name="b">The out parameter 2</param>\r
- public delegate void OutAction<T,T1>(out T[] a, out T1 b);\r
-\r
- /// <summary>\r
- /// An Action with 4 out parameter's\r
- /// </summary>\r
- /// <typeparam name="T">Generic Type</typeparam>\r
- /// <param name="a">The out parameter 1</param>\r
- /// <param name="b">The out parameter 2</param>\r
- /// <param name="c">The out parameter 3</param>\r
- /// <param name="d">The out parameter 4</param>\r
- public delegate void OutAction1<T>(out T a, out T b, out T c, out T d);\r
-\r
-\r
- /// <summary>\r
- /// Called when an associated text input UI control has focus.\r
- /// </summary>\r
- public static event EventHandler<FocusInEventArgs> FocusIn\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeFocusInDelegate = (int contextId, IntPtr userData) =>\r
- {\r
- FocusInEventArgs args = new FocusInEventArgs(contextId);\r
- _focusIn?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetFocusInCb(_imeFocusInDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add FocusIn Failed with error " + error);\r
- }\r
- else\r
- {\r
- _focusIn += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _focusIn -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called when an associated text input UI control loses focus.\r
- /// </summary>\r
- public static event EventHandler<FocusOutEventArgs> FocusOut\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeFocusOutDelegate = (int contextId, IntPtr userData) =>\r
- {\r
- FocusOutEventArgs args = new FocusOutEventArgs(contextId);\r
- _focusOut?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetFocusOutCb(_imeFocusOutDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add FocusOut Failed with error " + error);\r
- }\r
- else\r
- {\r
- _focusOut += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _focusOut -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called when an associated text input UI control responds to a request with the surrounding text.\r
- /// </summary>\r
- public static event EventHandler<SurroundingTextUpdatedEventArgs> SurroundingTextUpdated\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeSurroundingTextUpdatedDelegate = (int contextId, IntPtr text, int cursorPos, IntPtr userData) =>\r
- {\r
- SurroundingTextUpdatedEventArgs args = new SurroundingTextUpdatedEventArgs(contextId, Marshal.PtrToStringAnsi(text), cursorPos);\r
- _surroundingTextUpdated?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetSurroundingTextUpdatedCb(_imeSurroundingTextUpdatedDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add SurroundingTextUpdated Failed with error " + error);\r
- }\r
- else\r
- {\r
- _surroundingTextUpdated += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _surroundingTextUpdated -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called to reset the input context of an associated text input UI control.\r
- /// </summary>\r
- public static event EventHandler<System.EventArgs> InputContextReset\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeInputContextResetDelegate = (IntPtr userData) =>\r
- {\r
- _inputContextReset?.Invoke(null, System.EventArgs.Empty);\r
- };\r
- ErrorCode error = ImeEventSetInputContextResetCb(_imeInputContextResetDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add InputContextReset Failed with error " + error);\r
- }\r
- else\r
- {\r
- _inputContextReset += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _inputContextReset -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called when the position of the cursor in an associated text input UI control changes.\r
- /// </summary>\r
- public static event EventHandler<CursorPositionUpdatedEventArgs> CursorPositionUpdated\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeCursorPositionUpdatedDelegate = (int cursorPos, IntPtr userData) =>\r
- {\r
- CursorPositionUpdatedEventArgs args = new CursorPositionUpdatedEventArgs(cursorPos);\r
- _cursorPositionUpdated?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetCursorPositionUpdatedCb(_imeCursorPositionUpdatedDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add CursorPositionUpdated Failed with error " + error);\r
- }\r
- else\r
- {\r
- _cursorPositionUpdated += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _cursorPositionUpdated -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called to set the preferred language to the input panel.\r
- /// It will be only called when the client application changes the edit field's language attribute after the input panel is shown.\r
- /// </summary>\r
- public static event EventHandler<LangaugeSetEventArgs> LangaugeSet\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeLangaugeSetDelegate = (EcoreIMFInputPanelLang language, IntPtr userData) =>\r
- {\r
- LangaugeSetEventArgs args = new LangaugeSetEventArgs(language);\r
- _langaugeSet?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetLanguageSetCb(_imeLangaugeSetDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add LangaugeSet Failed with error " + error);\r
- }\r
- else\r
- {\r
- _langaugeSet += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _langaugeSet -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called to set the application specific data to deliver to the input panel.\r
- /// </summary>\r
- public static event EventHandler<ImDataSetEventArgs> ImDataSet\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeImDataSetDelegate = (IntPtr data, uint dataLength, IntPtr userData) =>\r
- {\r
- byte[] destination = new byte[dataLength];\r
- Marshal.Copy(data, destination, 0, (int)dataLength);\r
- ImDataSetEventArgs args = new ImDataSetEventArgs(destination, dataLength);\r
- _imDataSet?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetImdataSetCb(_imeImDataSetDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add ImDataSet Failed with error " + error);\r
- }\r
- else\r
- {\r
- _imDataSet += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _imDataSet -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called when an associated text input UI control requests the input panel to set its layout.\r
- /// It will be only called when the client application changes the edit field's layout attribute after the input panel is shown.\r
- /// </summary>\r
- public static event EventHandler<LayoutSetEventArgs> LayoutSet\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeLayoutSetDelegate = (EcoreIMFInputPanelLayout layout, IntPtr userData) =>\r
- {\r
- LayoutSetEventArgs args = new LayoutSetEventArgs(layout);\r
- _layoutSet?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetLayoutSetCb(_imeLayoutSetDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add LayoutSet Failed with error " + error);\r
- }\r
- else\r
- {\r
- _layoutSet += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _layoutSet -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called when an associated text input UI control requests the input panel to set the Return key label.\r
- /// The input panel can show text or image on the Return button according to the Return key action.\r
- /// </summary>\r
- public static event EventHandler<ReturnKeyTypeSetEventArgs> ReturnKeyTypeSet\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeReturnKeyTypeSetDelegate = (EcoreIMFInputPanelReturnKeyType type, IntPtr userData) =>\r
- {\r
- ReturnKeyTypeSetEventArgs args = new ReturnKeyTypeSetEventArgs(type);\r
- _returnKeyTypeSet?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetReturnKeyTypeSetCb(_imeReturnKeyTypeSetDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add ReturnKeyTypeSet Failed with error " + error);\r
- }\r
- else\r
- {\r
- _returnKeyTypeSet += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _returnKeyTypeSet -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called when an associated text input UI control requests the input panel to enable or disable the Return key state.\r
- /// </summary>\r
- public static event EventHandler<ReturnKeyStateSetEventArgs> ReturnKeyStateSet\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeReturnKeyStateSetDelegate = (bool state, IntPtr userData) =>\r
- {\r
- ReturnKeyStateSetEventArgs args = new ReturnKeyStateSetEventArgs(state);\r
- _returnKeyStateSet?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetReturnKeyStateSetCb(_imeReturnKeyStateSetDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add ReturnKeyStateSet Failed with error " + error);\r
- }\r
- else\r
- {\r
- _returnKeyStateSet += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _returnKeyStateSet -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// This Handler is associated with ProcessKey\r
- /// </summary>\r
- /// <param name="sender">The object raising the event</param>\r
- /// <param name="e">An object of ProcessKeyEventArgs class</param>\r
- /// <returns>true if the event is processed, otherwise the event is not processed and is forwarded to the client application.</returns>\r
- public delegate bool ProcessKeyEventHandler(object sender, ProcessKeyEventArgs e);\r
-\r
- /// <summary>\r
- /// Called when the key event is received from the external devices or SendKey function.\r
- /// This Event processes the key event before an associated text input UI control does.\r
- /// </summary>\r
- /// <remarks>\r
- /// If the key event is from the external device, DeviceInfo will have its name, class and subclass information.\r
- /// </remarks>\r
- public static event ProcessKeyEventHandler ProcessKey\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeProcessKeyDelegate = (KeyCode keycode, KeyMask keymask, IntPtr devInfo, IntPtr userData) =>\r
- {\r
- ProcessKeyEventArgs args = new ProcessKeyEventArgs(keycode, keymask, devInfo);\r
- bool res = _processKey.Invoke(null, args);\r
- return res;\r
- };\r
- ErrorCode error = ImeEventSetProcessKeyEventCb(_imeProcessKeyDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add ProcessKey Failed with error " + error);\r
- }\r
- else\r
- {\r
- _processKey += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _processKey -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called when the system display language is changed.\r
- /// </summary>\r
- public static event EventHandler<DisplayLanaguageChangedEventArgs> DisplayLanaguageChanged\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeDisplayLanaguageChangedDelegate = (IntPtr language, IntPtr userData) =>\r
- {\r
- DisplayLanaguageChangedEventArgs args = new DisplayLanaguageChangedEventArgs(Marshal.PtrToStringAnsi(language));\r
- _displayLanaguageChanged?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetDisplayLanguageChangedCb(_imeDisplayLanaguageChangedDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add DisplayLanaguageChanged Failed with error " + error);\r
- }\r
- else\r
- {\r
- _displayLanaguageChanged += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _displayLanaguageChanged -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called when the device is rotated.\r
- /// </summary>\r
- public static event EventHandler<RotationDegreeChangedEventArgs> RotationDegreeChanged\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeRotationDegreeChangedDelegate = (int degree, IntPtr userData) =>\r
- {\r
- RotationDegreeChangedEventArgs args = new RotationDegreeChangedEventArgs(degree);\r
- _rotationDegreeChanged?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetRotationDegreeChangedCb(_imeRotationDegreeChangedDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add RotationDegreeChanged Failed with error " + error);\r
- }\r
- else\r
- {\r
- _rotationDegreeChanged += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _rotationDegreeChanged -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called when Accessibility in Settings application is on or off.\r
- /// </summary>\r
- public static event EventHandler<AccessibilityStateChangedEventArgs> AccessibilityStateChanged\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeAccessibilityStateChangedDelegate = (bool state, IntPtr userData) =>\r
- {\r
- AccessibilityStateChangedEventArgs args = new AccessibilityStateChangedEventArgs(state);\r
- _accessibilityStateChanged?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetAccessibilityStateChangedCb(_imeAccessibilityStateChangedDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add AccessibilityStateChanged Failed with error " + error);\r
- }\r
- else\r
- {\r
- _accessibilityStateChanged += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _accessibilityStateChanged -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called to create the option window.\r
- /// </summary>\r
- /// <remarks>\r
- /// if Input panel requests to open the option window, type will be ImeOptionWindowType.Keyboard.\r
- /// And if Settings application requests to open it, type will be ImeOptionWindowType.SettingApplication.\r
- /// </remarks>\r
- public static event EventHandler<OptionWindowCreatedEventArgs> OptionWindowCreated\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeOptionWindowCreatedDelegate = (IntPtr window, ImeOptionWindowType type, IntPtr userData) =>\r
- {\r
- OptionWindowCreatedEventArgs args = new OptionWindowCreatedEventArgs(new EditorWindow(window), type);\r
- _optionWindowCreated?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetOptionWindowCreatedCb(_imeOptionWindowCreatedDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add OptionWindowCreated Failed with error " + error);\r
- }\r
- else\r
- {\r
- _optionWindowCreated += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _optionWindowCreated -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Called to destroy the option window.\r
- /// </summary>\r
- public static event EventHandler<OptionWindowDestroyedEventArgs> OptionWindowDestroyed\r
- {\r
- add\r
- {\r
- lock (thisLock)\r
- {\r
- _imeOptionWindowDestroyedDelegate = (IntPtr window, IntPtr userData) =>\r
- {\r
- OptionWindowDestroyedEventArgs args = new OptionWindowDestroyedEventArgs(new EditorWindow(window));\r
- _optionWindowDestroyed?.Invoke(null, args);\r
- };\r
- ErrorCode error = ImeEventSetOptionWindowDestroyedCb(_imeOptionWindowDestroyedDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add OptionWindowDestroyed Failed with error " + error);\r
- }\r
- else\r
- {\r
- _optionWindowDestroyed += value;\r
- }\r
- }\r
- }\r
- remove\r
- {\r
- lock (thisLock)\r
- {\r
- _optionWindowDestroyed -= value;\r
- }\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Sets the languageRequested Action\r
- /// </summary>\r
- /// <param name="languageRequested">\r
- /// Called when an associated text input UI control requests the language from the input panel, requesting for language code.\r
- /// </param>\r
- public static void SetLanguageRequested(OutAction<string> languageRequested)\r
- {\r
- _imeLanguageRequestedDelegate = (IntPtr userData, out IntPtr langCode) =>\r
- {\r
- string langauage;\r
- _languageRequestedDelegate(out langauage);\r
- char[] languageArray = langauage.ToCharArray();\r
- langCode = new IntPtr();\r
- Marshal.Copy(languageArray, 0, langCode, languageArray.Length);\r
- };\r
- ErrorCode error = ImeEventSetLanguageRequestedCb(_imeLanguageRequestedDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add SetLanguageRequested Failed with error " + error);\r
- }\r
- _languageRequestedDelegate = languageRequested;\r
- }\r
-\r
- /// <summary>\r
- /// Sets the imDataRequested Action\r
- /// </summary>\r
- /// <param name="imDataRequested">\r
- /// Called when an associated text input UI control requests the application specific data from the input panel, requesting for data array and it's length.\r
- /// </param>\r
- public static void SetImDataRequested(OutAction<byte, uint> imDataRequested)\r
- {\r
- _imeImDataRequestedDelegate = (IntPtr userData, out IntPtr data, out uint dataLength) =>\r
- {\r
- byte[] dataArr;\r
- uint lenghtArr;\r
- _imDataRequestedDelegate(out dataArr, out lenghtArr);\r
- data = new IntPtr();\r
- Marshal.Copy(dataArr, 0, data, (int)lenghtArr);\r
- dataLength = lenghtArr;\r
- };\r
- ErrorCode error = ImeEventSetImdataRequestedCb(_imeImDataRequestedDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add SetImDataRequested Failed with error " + error);\r
- }\r
- _imDataRequestedDelegate = imDataRequested;\r
- }\r
-\r
- /// <summary>\r
- /// Sets the GeometryRequested Action\r
- /// </summary>\r
- /// <param name="GeometryRequested">\r
- /// Called when an associated text input UI control requests the position and size from the input panel, requesting for x,y,w,h values.\r
- /// </param>\r
- public static void SetGeometryRequested(OutAction1<int> GeometryRequested)\r
- {\r
- _imeGeometryRequestedDelegate = (IntPtr userData, out int x, out int y, out int w, out int h) =>\r
- {\r
- int x1, y1, w1, h1;\r
- _geometryRequestedDelegate(out x1, out y1, out w1, out h1);\r
- x = x1;\r
- y = y1;\r
- w = w1;\r
- h = h1;\r
- };\r
- ErrorCode error = ImeEventSetGeometryRequestedCb(_imeGeometryRequestedDelegate, IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Add SetGeometryRequested Failed with error " + error);\r
- }\r
- _geometryRequestedDelegate = GeometryRequested;\r
- }\r
-\r
- /// <summary>\r
- /// Runs the main loop of IME application.\r
- /// This function starts to run IME application's main loop.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <param name="create">This is called to initialize IME application before the main loop starts up</param>\r
- /// <param name="terminate">This is called when IME application is terminated</param>\r
- /// <param name="show">This is called when IME application is shown</param>\r
- /// <param name="hide">This is called when IME application is hidden</param>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) Operation failed\r
- /// </exception>\r
- public static void Run(Action create, Action terminate, Action<int, InputMethodContext> show, Action<int> hide)\r
- {\r
- _userCreate = create;\r
- _userTerminate = terminate;\r
- _userShow = show;\r
- _userHide = hide;\r
-\r
- ImeCallbackStruct _imeCallbackStruct = _imeCallbackStructGCHandle._imeCallbackStruct;\r
- _imeCallbackStruct.create = _create;\r
- _imeCallbackStruct.terminate = _terminate;\r
- _imeCallbackStruct.hide = _hide;\r
- _imeCallbackStruct.show = _show;\r
-\r
- ErrorCode error = ImeRun(GCHandle.ToIntPtr(_imeCallbackStructGCHandle._imeCallbackStructHandle), IntPtr.Zero);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "Run Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Sends a key event to the associated text input UI control.\r
- /// </summary>\r
- /// <remarks>\r
- /// This function sends key down or up event with key mask to the client application. If forwardKey is true, this key event goes to the edit filed directly.\r
- /// And if forwardKey is false, the ProcessKey event receives the key event before the edit field.\r
- /// </remarks>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <param name="keyCode">The key code to be sent</param>\r
- /// <param name="keyMask">The modifier key mask</param>\r
- /// <param name="forwardKey">The flag to send the key event directly to the edit field</param>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// </exception>\r
- public static void SendKeyEvent(KeyCode keyCode, KeyMask keyMask, bool forwardKey)\r
- {\r
- ErrorCode error = ImeSendKeyEvent(keyCode, keyMask, forwardKey);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "SendEvent Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Sends the text to the associated text input UI control.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <param name="str">The UTF-8 string to be committed</param>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// </exception>\r
- public static void CommitString(string str)\r
- {\r
- ErrorCode error = ImeCommitString(str);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "CommitString Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Requests to show preedit string.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// </exception>\r
- public static void ShowPreEditString()\r
- {\r
- ErrorCode error = ImeShowPreeditString();\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "ShowPreEditString Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Requests to hide preedit string.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// </exception>\r
- public static void HidePreEditString()\r
- {\r
- ErrorCode error = ImeHidePreeditString();\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "HidePreEditString Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Updates a new preedit string.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <param name="str">The UTF-8 string to be updated in preedit</param>\r
- /// <param name="attrs">\r
- /// The list which has ime_preedit_attribute lists, strings can be composed of multiple string attributes: underline, highlight color and reversal color.\r
- /// The attrs can be null if no attributes to set\r
- /// </param>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// 3) Invalid Parameter\r
- /// </exception>\r
- public static void UpdatePreEditString(string str, List<PreEditAttribute> attrs)\r
- {\r
- IntPtr einaList = IntPtr.Zero;\r
- GCHandle einaListHandle = GCHandle.Alloc(einaList);\r
- List<GCHandle> attributeHandleList = new List<GCHandle>();\r
- foreach (PreEditAttribute attribute in attrs)\r
- {\r
- ImePreEditAttributeStruct imePreEditAttribute = new ImePreEditAttributeStruct();\r
- imePreEditAttribute.start = attribute.Start;\r
- imePreEditAttribute.length = attribute.Length;\r
- imePreEditAttribute.type = (int)attribute.Type;\r
- imePreEditAttribute.value = attribute.Value;\r
- GCHandle attributeHandle = GCHandle.Alloc(imePreEditAttribute);\r
- attributeHandleList.Add(attributeHandle);\r
- einaList = Interop.EinaList.EinaListAppend(einaListHandle.AddrOfPinnedObject(),attributeHandle.AddrOfPinnedObject());\r
- }\r
- ErrorCode error = ImeUpdatePreeditString(str, einaListHandle.AddrOfPinnedObject());\r
- einaListHandle.Free();\r
- foreach(GCHandle handle in attributeHandleList)\r
- {\r
- handle.Free();\r
- }\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "UpdatePreEditString Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Requests the surrounding text from the position of the cursor, asynchronously.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <param name="maxLenBefore">The maximum length of string to be retrieved before the cursor, -1 means unlimited</param>\r
- /// <param name="maxLenAfter">The maximum length of string to be retrieved after the cursor, -1 means unlimited</param>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// </exception>\r
- public static void RequestSurroundingText(int maxLenBefore, int maxLenAfter)\r
- {\r
- ErrorCode error = ImeRequestSurroundingText(maxLenBefore, maxLenAfter);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "RequestSurroundingText Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Requests to delete surrounding text.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <param name="offset">The offset value from the cursor position</param>\r
- /// <param name="len">The length of the text to delete</param>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// 3) Invalid Parameter\r
- /// </exception>\r
- public static void DeleteSurroundingText(int offset, int len)\r
- {\r
- ErrorCode error = ImeDeleteSurroundingText(offset, len);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "DeleteSurroundingText Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets the surrounding text from the position of the cursor, synchronously.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <param name="maxLenBefore">The maximum length of string to be retrieved before the cursor, -1 means unlimited</param>\r
- /// <param name="maxLenAfter">The maximum length of string to be retrieved after the cursor, -1 means unlimited</param>\r
- /// <param name="text">The surrounding text</param>\r
- /// <param name="cursorPosition">The cursor position</param>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// 3) Invalid Parameter\r
- /// 4) Failed to obtain text due to out of memory\r
- /// </exception>\r
- public static void GetSurroundingText(int maxLenBefore, int maxLenAfter, out string text, out int cursorPosition)\r
- {\r
- IntPtr txt;\r
- ErrorCode error = ImeGetSurroundingText(maxLenBefore, maxLenAfter, out txt, out cursorPosition);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetSurroundingText Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- text = Marshal.PtrToStringAnsi(txt);\r
- }\r
-\r
- /// <summary>\r
- /// Requests to set selection.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <param name="start">The start cursor position in text (in characters not bytes)</param>\r
- /// <param name="end">The end cursor position in text (in characters not bytes)</param>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// 3) Invalid Parameter\r
- /// </exception>\r
- public static void SetSelection(int start, int end)\r
- {\r
- ErrorCode error = ImeSetSelection(start, end);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "SetSelection Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// This API returns the input panel main window.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <returns>The input panel main window object on success, otherwise null</returns>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// 3) Operation Failed\r
- /// </exception>\r
- public static EditorWindow GetMainWindow()\r
- {\r
- EditorWindow obj = new EditorWindow(ImeGetMainWindow());\r
- ErrorCode error = (ErrorCode)Tizen.Internals.Errors.ErrorFacts.GetLastResult();\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "GetMainWindow Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- return obj;\r
- }\r
-\r
- /// <summary>\r
- /// This API updates the input panel window's size information.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <param name="portraitWidth">The width in portrait mode</param>\r
- /// <param name="portraitHeight">The height in portrait mode</param>\r
- /// <param name="landscapeWidth">The width in landscape mode</param>\r
- /// <param name="landscapeHeight">The height in landscape mode</param>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) IME main loop isn't started yet\r
- /// </exception>\r
- public static void SetSize(int portraitWidth, int portraitHeight, int landscapeWidth, int landscapeHeight)\r
- {\r
- ErrorCode error = ImeSetSize(portraitWidth, portraitHeight, landscapeWidth, landscapeHeight);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "SetSize Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Requests to create an option window from the input panel.\r
- /// The input panel can call this function to open the option window. This function calls OptionWindowCreated Event with ImeOptionWindowType.Keyboard.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) Operation failed\r
- /// 3) IME main loop isn't started yet\r
- /// 4) OptionWindowCreated event has not been set\r
- /// </exception>\r
- /// <precondition>\r
- /// OptionWindowCreated and OptionWindowDestroyed event should be set\r
- /// </precondition>\r
- public static void CreateOptionWindow()\r
- {\r
- ErrorCode error = ImeCreateOptionWindow();\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "CreapteOptionWindow Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Requests to destroy an option window.\r
- /// The input panel can call this function to close the option window which is created from either the input panel or Settings application.\r
- /// </summary>\r
- /// <priviledge>\r
- /// http://tizen.org/privilege/ime\r
- /// </priviledge>\r
- /// <param name="window">The option window to destroy</param>\r
- /// <exception cref="InvalidOperationException">\r
- /// This can occur due to the following reasons:\r
- /// 1) The application does not have the privilege to call this function\r
- /// 2) Invalid Parameter\r
- /// 3) IME main loop isn't started yet\r
- /// </exception>\r
- public static void DestroyOptionWindow(EditorWindow window)\r
- {\r
- ErrorCode error = ImeDestroyOptionWindow(window._handle);\r
- if (error != ErrorCode.None)\r
- {\r
- Log.Error(LogTag, "DestroyOptionWindow Failed with error " + error);\r
- throw InputMethodExceptionFactory.CreateException(error);\r
- }\r
- }\r
- }\r
-}\r
+/*
+* 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 System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using static Interop.InputMethod;
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// Enumeration of the key codes.
+ /// If keycode & 0xff000000 == 0x01000000 then this key code is directly encoded 24-bit UCS character.The UCS value is keycode & 0x00ffffff.
+ /// Defines the list of keys supported by the system.Note that certain keys may not be available on all devices.
+ /// </summary>
+ public enum KeyCode
+ {
+ /// <summary>
+ /// The backspace key
+ /// </summary>
+ BackSpace = 0xFF08,
+ /// <summary>
+ /// The tab key
+ /// </summary>
+ Tab = 0xFF09,
+ /// <summary>
+ /// The linefeed key
+ /// </summary>
+ Linefeed = 0xFF0A,
+ /// <summary>
+ /// The clear key
+ /// </summary>
+ Clear = 0xFF0B,
+ /// <summary>
+ /// The return key
+ /// </summary>
+ Return = 0xFF0D,
+ /// <summary>
+ /// The pause key
+ /// </summary>
+ Pause = 0xFF13,
+ /// <summary>
+ /// The scroll lock key
+ /// </summary>
+ ScrollLock = 0xFF14,
+ /// <summary>
+ /// The sys req key
+ /// </summary>
+ SysReq = 0xFF15,
+ /// <summary>
+ /// The escape key
+ /// </summary>
+ Escape = 0xFF1B,
+ /// <summary>
+ /// The delete key
+ /// </summary>
+ Delete = 0xFFFF,
+
+ /* Cursor control & motion */
+ /// <summary>
+ /// The home key
+ /// </summary>
+ Home = 0xFF50,
+ /// <summary>
+ /// The left directional key
+ /// </summary>
+ Left = 0xFF51,
+ /// <summary>
+ /// The up directional key
+ /// </summary>
+ Up = 0xFF52,
+ /// <summary>
+ /// The right directional key
+ /// </summary>
+ Right = 0xFF53,
+ /// <summary>
+ /// The down directional key
+ /// </summary>
+ Down = 0xFF54,
+ /// <summary>
+ /// The prior, previous key
+ /// </summary>
+ Prior = 0xFF55,
+ /// <summary>
+ /// The page up key
+ /// </summary>
+ Page_Up = 0xFF55,
+ /// <summary>
+ /// The next key
+ /// </summary>
+ Next = 0xFF56,
+ /// <summary>
+ /// The page down key
+ /// </summary>
+ Page_Down = 0xFF56,
+ /// <summary>
+ /// The end key
+ /// </summary>
+ End = 0xFF57,
+ /// <summary>
+ /// The begin key
+ /// </summary>
+ Begin = 0xFF58,
+
+ /* Misc Functions */
+ /// <summary>
+ /// The select key
+ /// </summary>
+ Select = 0xFF60,
+ /// <summary>
+ /// The print key
+ /// </summary>
+ Print = 0xFF61,
+ /// <summary>
+ /// The execute, run, do key
+ /// </summary>
+ Execute = 0xFF62,
+ /// <summary>
+ /// The insert key
+ /// </summary>
+ Insert = 0xFF63,
+ /// <summary>
+ /// The undo key
+ /// </summary>
+ Undo = 0xFF65,
+ /// <summary>
+ /// The redo key
+ /// </summary>
+ Redo = 0xFF66,
+ /// <summary>
+ /// The menu key
+ /// </summary>
+ Menu = 0xFF67,
+ /// <summary>
+ /// The find key
+ /// </summary>
+ Find = 0xFF68,
+ /// <summary>
+ /// The cancel, stop, abort, exit key
+ /// </summary>
+ Cancel = 0xFF69,
+ /// <summary>
+ /// The help key
+ /// </summary>
+ Help = 0xFF6A,
+ /// <summary>
+ /// The break key
+ /// </summary>
+ Break = 0xFF6B,
+ /// <summary>
+ /// The character set switch key
+ /// </summary>
+ Mode_switch = 0xFF7E,
+ /// <summary>
+ /// The num lock key
+ /// </summary>
+ Num_Lock = 0xFF7F,
+
+ /* Keypad */
+ /// <summary>
+ /// The Numpad space key
+ /// </summary>
+ KPSpace = 0xFF80,
+ /// <summary>
+ /// The Numpad tab key
+ /// </summary>
+ KPTab = 0xFF89,
+ /// <summary>
+ /// The Numpad enter key
+ /// </summary>
+ KPEnter = 0xFF8D,
+ /// <summary>
+ /// The Numpad function 1 key
+ /// </summary>
+ KPF1 = 0xFF91,
+ /// <summary>
+ /// The Numpad function 2 key
+ /// </summary>
+ KPF2 = 0xFF92,
+ /// <summary>
+ /// The Numpad function 3 key
+ /// </summary>
+ KPF3 = 0xFF93,
+ /// <summary>
+ /// The Numpad function 4 key
+ /// </summary>
+ KPF4 = 0xFF94,
+ /// <summary>
+ /// The Numpad home key
+ /// </summary>
+ KPHome = 0xFF95,
+ /// <summary>
+ /// The Numpad left key
+ /// </summary>
+ KPLeft = 0xFF96,
+ /// <summary>
+ /// The Numpad up key
+ /// </summary>
+ KPUp = 0xFF97,
+ /// <summary>
+ /// The Numpad right key
+ /// </summary>
+ KPRight = 0xFF98,
+ /// <summary>
+ /// The Numpad down key
+ /// </summary>
+ KPDown = 0xFF99,
+ /// <summary>
+ /// The Numpad prior, previous key
+ /// </summary>
+ KPPrior = 0xFF9A,
+ /// <summary>
+ /// The Numpad page up key
+ /// </summary>
+ KPPage_Up = 0xFF9A,
+ /// <summary>
+ /// The Numpad next key
+ /// </summary>
+ KPNext = 0xFF9B,
+ /// <summary>
+ /// The Numpad page down key
+ /// </summary>
+ KPPage_Down = 0xFF9B,
+ /// <summary>
+ /// The Numpad end key
+ /// </summary>
+ KPEnd = 0xFF9C,
+ /// <summary>
+ /// The Numpad begin key
+ /// </summary>
+ KPBegin = 0xFF9D,
+ /// <summary>
+ /// The Numpad insert key
+ /// </summary>
+ KPInsert = 0xFF9E,
+ /// <summary>
+ /// The Numpad delete key
+ /// </summary>
+ KPDelete = 0xFF9F,
+ /// <summary>
+ /// The Numpad equal key
+ /// </summary>
+ KPEqual = 0xFFBD,
+ /// <summary>
+ /// The Numpad multiply key
+ /// </summary>
+ KPMultiply = 0xFFAA,
+ /// <summary>
+ /// The Numpad add key
+ /// </summary>
+ KPAdd = 0xFFAB,
+ /// <summary>
+ /// The Numpad separator key
+ /// </summary>
+ KPSeparator = 0xFFAC,
+ /// <summary>
+ /// The Numpad subtract key
+ /// </summary>
+ KPSubtract = 0xFFAD,
+ /// <summary>
+ /// The Numpad decimal key
+ /// </summary>
+ KPDecimal = 0xFFAE,
+ /// <summary>
+ /// The Numpad divide key
+ /// </summary>
+ KPDivide = 0xFFAF,
+ /// <summary>
+ /// The Numpad 0 key
+ /// </summary>
+ KP0 = 0xFFB0,
+ /// <summary>
+ /// The Numpad 1 key
+ /// </summary>
+ KP1 = 0xFFB1,
+ /// <summary>
+ /// The Numpad 2 key
+ /// </summary>
+ KP2 = 0xFFB2,
+ /// <summary>
+ /// The Numpad 3 key
+ /// </summary>
+ KP3 = 0xFFB3,
+ /// <summary>
+ /// The Numpad 4 key
+ /// </summary>
+ KP4 = 0xFFB4,
+ /// <summary>
+ /// The Numpad 5 key
+ /// </summary>
+ KP5 = 0xFFB5,
+ /// <summary>
+ /// The Numpad 6 key
+ /// </summary>
+ KP6 = 0xFFB6,
+ /// <summary>
+ /// The Numpad 7 key
+ /// </summary>
+ KP7 = 0xFFB7,
+ /// <summary>
+ /// The Numpad 8 key
+ /// </summary>
+ KP8 = 0xFFB8,
+ /// <summary>
+ /// The Numpad 9 key
+ /// </summary>
+ KP9 = 0xFFB9,
+
+ /* Auxilliary Functions */
+ /// <summary>
+ /// The function 1 key
+ /// </summary>
+ F1 = 0xFFBE,
+ /// <summary>
+ /// The function 2 key
+ /// </summary>
+ F2 = 0xFFBF,
+ /// <summary>
+ /// The function 3 key
+ /// </summary>
+ F3 = 0xFFC0,
+ /// <summary>
+ /// The function 4 key
+ /// </summary>
+ F4 = 0xFFC1,
+ /// <summary>
+ /// The function 5 key
+ /// </summary>
+ F5 = 0xFFC2,
+ /// <summary>
+ /// The function 6 key
+ /// </summary>
+ F6 = 0xFFC3,
+ /// <summary>
+ /// The function 7 key
+ /// </summary>
+ F7 = 0xFFC4,
+ /// <summary>
+ /// The function 8 key
+ /// </summary>
+ F8 = 0xFFC5,
+ /// <summary>
+ /// The function 9 key
+ /// </summary>
+ F9 = 0xFFC6,
+ /// <summary>
+ /// The function 10 key
+ /// </summary>
+ F10 = 0xFFC7,
+ /// <summary>
+ /// The function 11 key
+ /// </summary>
+ F11 = 0xFFC8,
+ /// <summary>
+ /// The function 12 key
+ /// </summary>
+ F12 = 0xFFC9,
+ /// <summary>
+ /// The function 13 key
+ /// </summary>
+ F13 = 0xFFCA,
+ /// <summary>
+ /// The function 14 key
+ /// </summary>
+ F14 = 0xFFCB,
+ /// <summary>
+ /// The function 15 key
+ /// </summary>
+ F15 = 0xFFCC,
+ /// <summary>
+ /// The function 16 key
+ /// </summary>
+ F16 = 0xFFCD,
+ /// <summary>
+ /// The function 17 key
+ /// </summary>
+ F17 = 0xFFCE,
+ /// <summary>
+ /// The function 18 key
+ /// </summary>
+ F18 = 0xFFCF,
+ /// <summary>
+ /// The function 19 key
+ /// </summary>
+ F19 = 0xFFD0,
+ /// <summary>
+ /// The function 20 key
+ /// </summary>
+ F20 = 0xFFD1,
+ /// <summary>
+ /// The function 21 key
+ /// </summary>
+ F21 = 0xFFD2,
+ /// <summary>
+ /// The function 22 key
+ /// </summary>
+ F22 = 0xFFD3,
+ /// <summary>
+ /// The function 23 key
+ /// </summary>
+ F23 = 0xFFD4,
+ /// <summary>
+ /// The function 24 key
+ /// </summary>
+ F24 = 0xFFD5,
+ /// <summary>
+ /// The function 25 key
+ /// </summary>
+ F25 = 0xFFD6,
+ /// <summary>
+ /// The function 26 key
+ /// </summary>
+ F26 = 0xFFD7,
+ /// <summary>
+ /// The function 27 key
+ /// </summary>
+ F27 = 0xFFD8,
+ /// <summary>
+ /// The function 28 key
+ /// </summary>
+ F28 = 0xFFD9,
+ /// <summary>
+ /// The function 29 key
+ /// </summary>
+ F29 = 0xFFDA,
+ /// <summary>
+ /// The function 30 key
+ /// </summary>
+ F30 = 0xFFDB,
+ /// <summary>
+ /// The function 31 key
+ /// </summary>
+ F31 = 0xFFDC,
+ /// <summary>
+ /// The function 32 key
+ /// </summary>
+ F32 = 0xFFDD,
+ /// <summary>
+ /// The function 33 key
+ /// </summary>
+ F33 = 0xFFDE,
+ /// <summary>
+ /// The function 34 key
+ /// </summary>
+ F34 = 0xFFDF,
+ /// <summary>
+ /// The function 35 key
+ /// </summary>
+ F35 = 0xFFE0,
+
+ /* Modifier keys */
+ /// <summary>
+ /// The left shift key
+ /// </summary>
+ ShiftL = 0xFFE1,
+ /// <summary>
+ /// The right shift key
+ /// </summary>
+ ShiftR = 0xFFE2,
+ /// <summary>
+ /// The left control key
+ /// </summary>
+ ControlL = 0xFFE3,
+ /// <summary>
+ /// The right control key
+ /// </summary>
+ ControlR = 0xFFE4,
+ /// <summary>
+ /// The caps lock key
+ /// </summary>
+ CapsLock = 0xFFE5,
+ /// <summary>
+ /// The shift lock key
+ /// </summary>
+ ShiftLock = 0xFFE6,
+ /// <summary>
+ /// The left meta key
+ /// </summary>
+ MetaL = 0xFFE7,
+ /// <summary>
+ /// The right meta key
+ /// </summary>
+ MetaR = 0xFFE8,
+ /// <summary>
+ /// The left alt key
+ /// </summary>
+ AltL = 0xFFE9,
+ /// <summary>
+ /// The right alt key
+ /// </summary>
+ AltR = 0xFFEA,
+ /// <summary>
+ /// The left super key
+ /// </summary>
+ SuperL = 0xFFEB,
+ /// <summary>
+ /// The right super key
+ /// </summary>
+ SuperR = 0xFFEC,
+ /// <summary>
+ /// The left hyper key
+ /// </summary>
+ HyperL = 0xFFED,
+ /// <summary>
+ /// The right hyper key
+ /// </summary>
+ HyperR = 0xFFEE,
+
+ /* Latin 1 */
+ /// <summary>
+ /// The space key
+ /// </summary>
+ Space = 0x020,
+ /// <summary>
+ /// The exclamation key
+ /// </summary>
+ Exclam = 0x021,
+ /// <summary>
+ /// The quotedbl key
+ /// </summary>
+ Quotedbl = 0x022,
+ /// <summary>
+ /// The number sign key
+ /// </summary>
+ NumberSign = 0x023,
+ /// <summary>
+ /// The dollar key
+ /// </summary>
+ Dollar = 0x024,
+ /// <summary>
+ /// The percent key
+ /// </summary>
+ Percent = 0x025,
+ /// <summary>
+ /// The ampersand key
+ /// </summary>
+ Ampersand = 0x026,
+ /// <summary>
+ /// The apostrophe key
+ /// </summary>
+ Apostrophe = 0x027,
+ /// <summary>
+ /// The parenleft key
+ /// </summary>
+ Parenleft = 0x028,
+ /// <summary>
+ /// The parenright key
+ /// </summary>
+ Parenright = 0x029,
+ /// <summary>
+ /// The asterisk key
+ /// </summary>
+ Asterisk = 0x02a,
+ /// <summary>
+ /// The plus key
+ /// </summary>
+ Plus = 0x02b,
+ /// <summary>
+ /// The comma key
+ /// </summary>
+ Comma = 0x02c,
+ /// <summary>
+ /// The minus key
+ /// </summary>
+ Minus = 0x02d,
+ /// <summary>
+ /// The period key
+ /// </summary>
+ Period = 0x02e,
+ /// <summary>
+ /// The slash key
+ /// </summary>
+ Slash = 0x02f,
+ /// <summary>
+ /// The 0 key
+ /// </summary>
+ Keypad0 = 0x030,
+ /// <summary>
+ /// The 1 key
+ /// </summary>
+ Keypad1 = 0x031,
+ /// <summary>
+ /// The 2 key
+ /// </summary>
+ Keypad2 = 0x032,
+ /// <summary>
+ /// The 3 key
+ /// </summary>
+ Keypad3 = 0x033,
+ /// <summary>
+ /// The 4 key
+ /// </summary>
+ Keypad4 = 0x034,
+ /// <summary>
+ /// The 5 key
+ /// </summary>
+ Keypad5 = 0x035,
+ /// <summary>
+ /// The 6 key
+ /// </summary>
+ Keypad6 = 0x036,
+ /// <summary>
+ /// The 7 key
+ /// </summary>
+ Keypad7 = 0x037,
+ /// <summary>
+ /// The 8 key
+ /// </summary>
+ Keypad8 = 0x038,
+ /// <summary>
+ /// The 9 key
+ /// </summary>
+ Keypad9 = 0x039,
+ /// <summary>
+ /// The colon key
+ /// </summary>
+ Colon = 0x03a,
+ /// <summary>
+ /// The semicolon key
+ /// </summary>
+ Semicolon = 0x03b,
+ /// <summary>
+ /// The less key
+ /// </summary>
+ Less = 0x03c,
+ /// <summary>
+ /// The equal key
+ /// </summary>
+ Equal = 0x03d,
+ /// <summary>
+ /// The greater key
+ /// </summary>
+ Greater = 0x03e,
+ /// <summary>
+ /// The question key
+ /// </summary>
+ Question = 0x03f,
+ /// <summary>
+ /// The at key
+ /// </summary>
+ At = 0x040,
+ /// <summary>
+ /// The A key
+ /// </summary>
+ KeypadA = 0x041,
+ /// <summary>
+ /// The B key
+ /// </summary>
+ KeypadB = 0x042,
+ /// <summary>
+ /// The C key
+ /// </summary>
+ KeypadC = 0x043,
+ /// <summary>
+ /// The D key
+ /// </summary>
+ KeypadD = 0x044,
+ /// <summary>
+ /// The E key
+ /// </summary>
+ KeypadE = 0x045,
+ /// <summary>
+ /// The F key
+ /// </summary>
+ KeypadF = 0x046,
+ /// <summary>
+ /// The G key
+ /// </summary>
+ KeypadG = 0x047,
+ /// <summary>
+ /// The H key
+ /// </summary>
+ KeypadH = 0x048,
+ /// <summary>
+ /// The I key
+ /// </summary>
+ KeypadI = 0x049,
+ /// <summary>
+ /// The J key
+ /// </summary>
+ KeypadJ = 0x04a,
+ /// <summary>
+ /// The K key
+ /// </summary>
+ KeypadK = 0x04b,
+ /// <summary>
+ /// The L key
+ /// </summary>
+ KeypadL = 0x04c,
+ /// <summary>
+ /// The M key
+ /// </summary>
+ KeypadM = 0x04d,
+ /// <summary>
+ /// The N key
+ /// </summary>
+ KeypadN = 0x04e,
+ /// <summary>
+ /// The O key
+ /// </summary>
+ KeypadO = 0x04f,
+ /// <summary>
+ /// The P key
+ /// </summary>
+ KeypadP = 0x050,
+ /// <summary>
+ /// The Q key
+ /// </summary>
+ KeypadQ = 0x051,
+ /// <summary>
+ /// The R key
+ /// </summary>
+ KeypadR = 0x052,
+ /// <summary>
+ /// The S key
+ /// </summary>
+ KeypadS = 0x053,
+ /// <summary>
+ /// The T key
+ /// </summary>
+ KeypadT = 0x054,
+ /// <summary>
+ /// The U key
+ /// </summary>
+ KeypadU = 0x055,
+ /// <summary>
+ /// The V key
+ /// </summary>
+ KeypadV = 0x056,
+ /// <summary>
+ /// The W key
+ /// </summary>
+ KeypadW = 0x057,
+ /// <summary>
+ /// The X key
+ /// </summary>
+ KeypadX = 0x058,
+ /// <summary>
+ /// The Y key
+ /// </summary>
+ KeypadY = 0x059,
+ /// <summary>
+ /// The Z key
+ /// </summary>
+ KeypadZ = 0x05a,
+ /// <summary>
+ /// The left bracket key
+ /// </summary>
+ BracketLeft = 0x05b,
+ /// <summary>
+ /// The backslash key
+ /// </summary>
+ Backslash = 0x05c,
+ /// <summary>
+ /// The right bracket key
+ /// </summary>
+ BracketRight = 0x05d,
+ /// <summary>
+ /// The circumflex key
+ /// </summary>
+ AsciiCircum = 0x05e,
+ /// <summary>
+ /// The underscore key
+ /// </summary>
+ Underscore = 0x05f,
+ /// <summary>
+ /// The grave key
+ /// </summary>
+ Grave = 0x060,
+ /// <summary>
+ /// The a key
+ /// </summary>
+ Keypada = 0x061,
+ /// <summary>
+ /// The b key
+ /// </summary>
+ Keypadb = 0x062,
+ /// <summary>
+ /// The c key
+ /// </summary>
+ Keypadc = 0x063,
+ /// <summary>
+ /// The d key
+ /// </summary>
+ Keypadd = 0x064,
+ /// <summary>
+ /// The e key
+ /// </summary>
+ Keypade = 0x065,
+ /// <summary>
+ /// The f key
+ /// </summary>
+ Keypadf = 0x066,
+ /// <summary>
+ /// The g key
+ /// </summary>
+ Keypadg = 0x067,
+ /// <summary>
+ /// The h key
+ /// </summary>
+ Keypadh = 0x068,
+ /// <summary>
+ /// The i key
+ /// </summary>
+ Keypadi = 0x069,
+ /// <summary>
+ /// The j key
+ /// </summary>
+ Keypadj = 0x06a,
+ /// <summary>
+ /// The k key
+ /// </summary>
+ Keypadk = 0x06b,
+ /// <summary>
+ /// The l key
+ /// </summary>
+ Keypadl = 0x06c,
+ /// <summary>
+ /// The m key
+ /// </summary>
+ Keypadm = 0x06d,
+ /// <summary>
+ /// The n key
+ /// </summary>
+ Keypadn = 0x06e,
+ /// <summary>
+ /// The o key
+ /// </summary>
+ Keypado = 0x06f,
+ /// <summary>
+ /// The p key
+ /// </summary>
+ Keypadp = 0x070,
+ /// <summary>
+ /// The q key
+ /// </summary>
+ Keypadq = 0x071,
+ /// <summary>
+ /// The r key
+ /// </summary>
+ Keypadr = 0x072,
+ /// <summary>
+ /// The s key
+ /// </summary>
+ Keypads = 0x073,
+ /// <summary>
+ /// The t key
+ /// </summary>
+ Keypadt = 0x074,
+ /// <summary>
+ /// The u key
+ /// </summary>
+ Keypadu = 0x075,
+ /// <summary>
+ /// The v key
+ /// </summary>
+ Keypadv = 0x076,
+ /// <summary>
+ /// The w key
+ /// </summary>
+ Keypadw = 0x077,
+ /// <summary>
+ /// The x key
+ /// </summary>
+ Keypadx = 0x078,
+ /// <summary>
+ /// The y key
+ /// </summary>
+ Keypady = 0x079,
+ /// <summary>
+ /// The z key
+ /// </summary>
+ Keypadz = 0x07a,
+ /// <summary>
+ /// The left brace key
+ /// </summary>
+ BraceLeft = 0x07b,
+ /// <summary>
+ /// The bar key
+ /// </summary>
+ Bar = 0x07c,
+ /// <summary>
+ /// The right brace key
+ /// </summary>
+ BraceRight = 0x07d,
+ /// <summary>
+ /// The tilde key
+ /// </summary>
+ AsciiTilde = 0x07e,
+ };
+
+ /// <summary>
+ /// Enumeration of the key masks.
+ /// The key masks indicate which modifier keys is pressed down during the keyboard hit.The special MASK_RELEASED indicates the key release event.
+ /// </summary>
+ public enum KeyMask
+ {
+ /// <summary>
+ /// Key press event without modifier key
+ /// </summary>
+ Pressed = 0,
+ /// <summary>
+ /// The Shift key is pressed down
+ /// </summary>
+ Shift = (1 << 0),
+ /// <summary>
+ /// The CapsLock key is pressed down
+ /// </summary>
+ CapsLock = (1 << 1),
+ /// <summary>
+ /// The Control key is pressed down
+ /// </summary>
+ Control = (1 << 2),
+ /// <summary>
+ /// The Alt key is pressed down
+ /// </summary>
+ Alt = (1 << 3),
+ /// <summary>
+ /// The Meta key is pressed down
+ /// </summary>
+ Meta = (1 << 4),
+ /// <summary>
+ /// The Win (between Control and Alt) is pressed down
+ /// </summary>
+ Win = (1 << 5),
+ /// <summary>
+ /// The Hyper key is pressed down
+ /// </summary>
+ Hyper = (1 << 6),
+ /// <summary>
+ /// The NumLock key is pressed down
+ /// </summary>
+ NumLock = (1 << 7),
+ /// <summary>
+ /// Key release event
+ /// </summary>
+ Released = (1 << 15),
+ }
+
+ /// <summary>
+ /// This class contains api's related to IME(Input method editor)
+ /// </summary>
+ public static class InputMethodEditor
+ {
+ private static Object thisLock = new Object();
+ private static ImeCallbackStructGCHandle _imeCallbackStructGCHandle = new ImeCallbackStructGCHandle();
+ private static event EventHandler<FocusedInEventArgs> _focusIn;
+ private static ImeFocusedInCb _imeFocusedInDelegate;
+ private static event EventHandler<FocusedOutEventArgs> _focusOut;
+ private static ImeFocusedOutCb _imeFocusedOutDelegate;
+ private static event EventHandler<SurroundingTextUpdatedEventArgs> _surroundingTextUpdated;
+ private static ImeSurroundingTextUpdatedCb _imeSurroundingTextUpdatedDelegate;
+ private static event EventHandler<System.EventArgs> _inputContextReset;
+ private static ImeInputContextResetCb _imeInputContextResetDelegate;
+ private static event EventHandler<CursorPositionitionUpdatedEventArgs> _cursorPositionUpdated;
+ private static ImeCursorPositionitionUpdatedCb _imeCursorPositionitionUpdatedDelegate;
+ private static event EventHandler<LanguageSetEventArgs> _langaugeSet;
+ private static ImeLanguageSetCb _imeLanguageSetDelegate;
+ private static event EventHandler<SetDataEventArgs> _imDataSet;
+ private static ImeImdataSetCb _imeDataSetDelegate;
+ private static event EventHandler<LayoutSetEventArgs> _layoutSet;
+ private static ImeLayoutSetCb _imeLayoutSetDelegate;
+ private static event EventHandler<ReturnKeySetEventArgs> _returnKeyTypeSet;
+ private static ImeReturnKeySetCb _imeReturnKeySetDelegate;
+ private static event EventHandler<ReturnKeyStateSetEventArgs> _returnKeyStateSet;
+ private static ImeReturnKeyStateSetCb _imeReturnKeyStateSetDelegate;
+ private static ImeProcessKeyEventCb _imeProcessKeyDelegate;
+ private static event EventHandler<DisplayLanaguageChangedEventArgs> _displayLanaguageChanged;
+ private static ImeDisplayLanguageChangedCb _imeDisplayLanaguageChangedDelegate;
+ private static event EventHandler<RotationChangedEventArgs> _rotationDegreeChanged;
+ private static ImeRotationChangedCb _imeRotationChangedDelegate;
+ private static event EventHandler<AccessibilityStateChangedEventArgs> _accessibilityStateChanged;
+ private static ImeAccessibilityStateChangedCb _imeAccessibilityStateChangedDelegate;
+ private static event EventHandler<OptionWindowCreatedEventArgs> _optionWindowCreated;
+ private static ImeOptionWindowCreatedCb _imeOptionWindowCreatedDelegate;
+ private static event EventHandler<OptionWindowDestroyedEventArgs> _optionWindowDestroyed;
+ private static ImeOptionWindowDestroyedCb _imeOptionWindowDestroyedDelegate;
+ private static ImeLanguageRequestedCb _imeLanguageRequestedDelegate;
+ private static OutAction<string> _languageRequestedDelegate;
+ private static BoolAction<KeyCode, KeyMask, VoiceControlDeviceInformation> _processKeyDelagate;
+ private static ImeImdataRequestedCb _imeImDataRequestedDelegate;
+ private static OutArrayAction<byte> _imDataRequestedDelegate;
+ private static ImeGeometryRequestedCb _imeGeometryRequestedDelegate;
+ private static OutAction<Rect> _geometryRequestedDelegate;
+ private static Action _userCreate;
+ private static Action _userTerminate;
+ private static Action<ContextId, InputMethodContext> _userShow;
+ private static Action<ContextId> _userHide;
+ private static ImeCreateCb _create = (IntPtr userData) =>
+ {
+ Log.Info(LogTag, "In Create Delegate");
+ _userCreate?.Invoke();
+ };
+ private static ImeTerminateCb _terminate = (IntPtr userData) =>
+ {
+ Log.Info(LogTag, "In terminate Delegate");
+ _userTerminate?.Invoke();
+ _imeCallbackStructGCHandle.Dispose();
+ };
+ private static ImeShowCb _show = (int contextId, IntPtr context, IntPtr userData) =>
+ {
+ Log.Info(LogTag, "In Show Delegate");
+ _userShow?.Invoke(new ContextId(contextId), new InputMethodContext(context));
+ };
+ private static ImeHideCb _hide = (int contextId, IntPtr userData) =>
+ {
+ Log.Info(LogTag, "In Hide Delegate");
+ _userHide?.Invoke(new ContextId(contextId));
+ };
+
+ /// <summary>
+ /// Structure representing ContextId
+ /// </summary>
+ public struct ContextId : IEquatable<ContextId>
+ {
+ internal ContextId(int id)
+ {
+ Id = id;
+ }
+
+ internal int Id
+ {
+ get;
+ private set;
+ }
+
+ public bool Equals(ContextId other)
+ {
+ return this.Id == other.Id;
+ }
+ }
+
+ /// <summary>
+ /// rectangle representing the position and size of UI Control
+ /// </summary>
+ public struct Rect
+ {
+ /// <summary>
+ /// The x position in screen
+ /// </summary>
+ public int x;
+
+ /// <summary>
+ /// The y position in screen
+ /// </summary>
+ public int y;
+
+ /// <summary>
+ /// The window width
+ /// </summary>
+ public int w;
+
+ /// <summary>
+ /// The window height
+ /// </summary>
+ public int h;
+ }
+
+ /// <summary>
+ /// An Action with 1 out parameter
+ /// </summary>
+ /// <typeparam name="T">Generic Type</typeparam>
+ /// <param name="a">The out parameter</param>
+ public delegate void OutAction<T>(out T a);
+
+ /// <summary>
+ /// An Action with an array out parameter
+ /// </summary>
+ /// <typeparam name="T">Generic Type</typeparam>
+ /// <param name="a">The out parameter 1</param>
+ public delegate void OutArrayAction<T>(out T[] a);
+
+ /// <summary>
+ /// An Action with 3 Input Parameter returning a bool
+ /// </summary>
+ /// <typeparam name="T">Generic Type for Parameter 1</typeparam>
+ /// <typeparam name="T1">Generic Type for Parameter 2</typeparam>
+ /// <typeparam name="T2">Generic Type for Parameter 3</typeparam>
+ /// <param name="a">The Input Parameter 1</param>
+ /// <param name="b">The Input Parameter 2</param>
+ /// <param name="c">The Input Parameter 3</param>
+ /// <returns></returns>
+ public delegate bool BoolAction<T, T1, T2>(T a, T1 b, T2 c);
+
+ /// <summary>
+ /// Called when an associated text input UI control has focus.
+ /// </summary>
+ public static event EventHandler<FocusedInEventArgs> FocusedIn
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeFocusedInDelegate = (int contextId, IntPtr userData) =>
+ {
+ FocusedInEventArgs args = new FocusedInEventArgs(contextId);
+ _focusIn?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetFocusedInCb(_imeFocusedInDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add FocusedIn Failed with error " + error);
+ }
+ else
+ {
+ _focusIn += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _focusIn -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when an associated text input UI control loses focus.
+ /// </summary>
+ public static event EventHandler<FocusedOutEventArgs> FocusedOut
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeFocusedOutDelegate = (int contextId, IntPtr userData) =>
+ {
+ FocusedOutEventArgs args = new FocusedOutEventArgs(contextId);
+ _focusOut?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetFocusedOutCb(_imeFocusedOutDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add FocusedOut Failed with error " + error);
+ }
+ else
+ {
+ _focusOut += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _focusOut -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when an associated text input UI control responds to a request with the surrounding text.
+ /// </summary>
+ public static event EventHandler<SurroundingTextUpdatedEventArgs> SurroundingTextUpdated
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeSurroundingTextUpdatedDelegate = (int contextId, IntPtr text, int cursorPos, IntPtr userData) =>
+ {
+ SurroundingTextUpdatedEventArgs args = new SurroundingTextUpdatedEventArgs(contextId, Marshal.PtrToStringAnsi(text), cursorPos);
+ _surroundingTextUpdated?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetSurroundingTextUpdatedCb(_imeSurroundingTextUpdatedDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add SurroundingTextUpdated Failed with error " + error);
+ }
+ else
+ {
+ _surroundingTextUpdated += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _surroundingTextUpdated -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called to reset the input context of an associated text input UI control.
+ /// </summary>
+ public static event EventHandler<System.EventArgs> InputContextReset
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeInputContextResetDelegate = (IntPtr userData) =>
+ {
+ _inputContextReset?.Invoke(null, System.EventArgs.Empty);
+ };
+ ErrorCode error = ImeEventSetInputContextResetCb(_imeInputContextResetDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add InputContextReset Failed with error " + error);
+ }
+ else
+ {
+ _inputContextReset += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _inputContextReset -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the position of the cursor in an associated text input UI control changes.
+ /// </summary>
+ public static event EventHandler<CursorPositionitionUpdatedEventArgs> CursorPositionitionUpdated
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeCursorPositionitionUpdatedDelegate = (int cursorPos, IntPtr userData) =>
+ {
+ CursorPositionitionUpdatedEventArgs args = new CursorPositionitionUpdatedEventArgs(cursorPos);
+ _cursorPositionUpdated?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetCursorPositionitionUpdatedCb(_imeCursorPositionitionUpdatedDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add CursorPositionitionUpdated Failed with error " + error);
+ }
+ else
+ {
+ _cursorPositionUpdated += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _cursorPositionUpdated -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called to set the preferred language to the input panel.
+ /// It will be only called when the client application changes the edit field's language attribute after the input panel is shown.
+ /// </summary>
+ public static event EventHandler<LanguageSetEventArgs> LanguageSet
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeLanguageSetDelegate = (InputPanelLanguage language, IntPtr userData) =>
+ {
+ LanguageSetEventArgs args = new LanguageSetEventArgs(language);
+ _langaugeSet?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetLanguageSetCb(_imeLanguageSetDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add LanguageSet Failed with error " + error);
+ }
+ else
+ {
+ _langaugeSet += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _langaugeSet -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called to set the application specific data to deliver to the input panel.
+ /// </summary>
+ public static event EventHandler<SetDataEventArgs> DataSet
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeDataSetDelegate = (IntPtr data, uint dataLength, IntPtr userData) =>
+ {
+ byte[] destination = new byte[dataLength];
+ Marshal.Copy(data, destination, 0, (int)dataLength);
+ SetDataEventArgs args = new SetDataEventArgs(destination, dataLength);
+ _imDataSet?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetImdataSetCb(_imeDataSetDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add DataSet Failed with error " + error);
+ }
+ else
+ {
+ _imDataSet += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _imDataSet -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when an associated text input UI control requests the input panel to set its layout.
+ /// It will be only called when the client application changes the edit field's layout attribute after the input panel is shown.
+ /// </summary>
+ public static event EventHandler<LayoutSetEventArgs> LayoutSet
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeLayoutSetDelegate = (InputPanelLayout layout, IntPtr userData) =>
+ {
+ LayoutSetEventArgs args = new LayoutSetEventArgs(layout);
+ _layoutSet?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetLayoutSetCb(_imeLayoutSetDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add LayoutSet Failed with error " + error);
+ }
+ else
+ {
+ _layoutSet += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _layoutSet -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when an associated text input UI control requests the input panel to set the Return key label.
+ /// The input panel can show text or image on the Return button according to the Return key action.
+ /// </summary>
+ public static event EventHandler<ReturnKeySetEventArgs> ReturnKeySet
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeReturnKeySetDelegate = (InputPanelReturnKey type, IntPtr userData) =>
+ {
+ ReturnKeySetEventArgs args = new ReturnKeySetEventArgs(type);
+ _returnKeyTypeSet?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetReturnKeySetCb(_imeReturnKeySetDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add ReturnKeySet Failed with error " + error);
+ }
+ else
+ {
+ _returnKeyTypeSet += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _returnKeyTypeSet -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when an associated text input UI control requests the input panel to enable or disable the Return key state.
+ /// </summary>
+ public static event EventHandler<ReturnKeyStateSetEventArgs> ReturnKeyStateSet
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeReturnKeyStateSetDelegate = (bool state, IntPtr userData) =>
+ {
+ ReturnKeyStateSetEventArgs args = new ReturnKeyStateSetEventArgs(state);
+ _returnKeyStateSet?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetReturnKeyStateSetCb(_imeReturnKeyStateSetDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add ReturnKeyStateSet Failed with error " + error);
+ }
+ else
+ {
+ _returnKeyStateSet += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _returnKeyStateSet -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the system display language is changed.
+ /// </summary>
+ public static event EventHandler<DisplayLanaguageChangedEventArgs> DisplayLanaguageChanged
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeDisplayLanaguageChangedDelegate = (IntPtr language, IntPtr userData) =>
+ {
+ DisplayLanaguageChangedEventArgs args = new DisplayLanaguageChangedEventArgs(Marshal.PtrToStringAnsi(language));
+ _displayLanaguageChanged?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetDisplayLanguageChangedCb(_imeDisplayLanaguageChangedDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add DisplayLanaguageChanged Failed with error " + error);
+ }
+ else
+ {
+ _displayLanaguageChanged += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _displayLanaguageChanged -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when the device is rotated.
+ /// </summary>
+ public static event EventHandler<RotationChangedEventArgs> RotationChanged
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeRotationChangedDelegate = (int degree, IntPtr userData) =>
+ {
+ RotationChangedEventArgs args = new RotationChangedEventArgs(degree);
+ _rotationDegreeChanged?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetRotationChangedCb(_imeRotationChangedDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add RotationChanged Failed with error " + error);
+ }
+ else
+ {
+ _rotationDegreeChanged += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _rotationDegreeChanged -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when Accessibility in Settings application is on or off.
+ /// </summary>
+ public static event EventHandler<AccessibilityStateChangedEventArgs> AccessibilityStateChanged
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeAccessibilityStateChangedDelegate = (bool state, IntPtr userData) =>
+ {
+ AccessibilityStateChangedEventArgs args = new AccessibilityStateChangedEventArgs(state);
+ _accessibilityStateChanged?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetAccessibilityStateChangedCb(_imeAccessibilityStateChangedDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add AccessibilityStateChanged Failed with error " + error);
+ }
+ else
+ {
+ _accessibilityStateChanged += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _accessibilityStateChanged -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called to create the option window.
+ /// </summary>
+ /// <remarks>
+ /// if Input panel requests to open the option window, type will be OptionWindowType.Keyboard.
+ /// And if Settings application requests to open it, type will be OptionWindowType.SettingApplication.
+ /// </remarks>
+ public static event EventHandler<OptionWindowCreatedEventArgs> OptionWindowCreated
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeOptionWindowCreatedDelegate = (IntPtr window, OptionWindowType type, IntPtr userData) =>
+ {
+ OptionWindow._handle = window;
+ OptionWindowCreatedEventArgs args = new OptionWindowCreatedEventArgs(new OptionWindow(), type);
+ _optionWindowCreated?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetOptionWindowCreatedCb(_imeOptionWindowCreatedDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add OptionWindowCreated Failed with error " + error);
+ }
+ else
+ {
+ _optionWindowCreated += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _optionWindowCreated -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called to destroy the option window.
+ /// </summary>
+ public static event EventHandler<OptionWindowDestroyedEventArgs> OptionWindowDestroyed
+ {
+ add
+ {
+ lock (thisLock)
+ {
+ _imeOptionWindowDestroyedDelegate = (IntPtr window, IntPtr userData) =>
+ {
+ OptionWindow._handle = window;
+ OptionWindowDestroyedEventArgs args = new OptionWindowDestroyedEventArgs(new OptionWindow());
+ _optionWindowDestroyed?.Invoke(null, args);
+ };
+ ErrorCode error = ImeEventSetOptionWindowDestroyedCb(_imeOptionWindowDestroyedDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add OptionWindowDestroyed Failed with error " + error);
+ }
+ else
+ {
+ _optionWindowDestroyed += value;
+ }
+ }
+ }
+ remove
+ {
+ lock (thisLock)
+ {
+ _optionWindowDestroyed -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Sets the languageRequested Action
+ /// </summary>
+ /// <param name="languageRequested">
+ /// Called when an associated text input UI control requests the language from the input panel, requesting for language code.
+ /// </param>
+ public static void SetLanguageRequestedCallback(OutAction<string> languageRequested)
+ {
+ _imeLanguageRequestedDelegate = (IntPtr userData, out IntPtr langCode) =>
+ {
+ string langauage;
+ _languageRequestedDelegate(out langauage);
+ char[] languageArray = langauage.ToCharArray();
+ langCode = new IntPtr();
+ Marshal.Copy(languageArray, 0, langCode, languageArray.Length);
+ };
+ ErrorCode error = ImeEventSetLanguageRequestedCallbackCb(_imeLanguageRequestedDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add SetLanguageRequestedCallback Failed with error " + error);
+ }
+ _languageRequestedDelegate = languageRequested;
+ }
+
+ /// <summary>
+ /// Sets the processKey Action
+ /// If the key event is from the external device, DeviceInfo will have its name, class and subclass information.
+ /// </summary>
+ /// <param name="processKey">
+ /// The Action is alled when the key event is received from the external devices or SendKey function.
+ /// This Event processes the key event before an associated text input UI control does.
+ /// </param>
+ public static void SetProcessKeyCallback(BoolAction<KeyCode, KeyMask, VoiceControlDeviceInformation> processKey)
+ {
+ _imeProcessKeyDelegate = (KeyCode keyCode, KeyMask keyMask, IntPtr devInfo, IntPtr userData) =>
+ {
+ return _processKeyDelagate(keyCode, keyMask, new VoiceControlDeviceInformation(devInfo));
+ };
+ ErrorCode error = ImeEventSetProcessKeyEventCb(_imeProcessKeyDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add ProcessKey Failed with error " + error);
+ }
+ _processKeyDelagate = processKey;
+ }
+
+ /// <summary>
+ /// Sets the imDataRequested Action
+ /// </summary>
+ /// <param name="imDataRequested">
+ /// Called when an associated text input UI control requests the application specific data from the input panel, requesting for data array and it's length.
+ /// </param>
+ public static void SetDataRequestedCallback(OutArrayAction<byte> imDataRequested)
+ {
+ _imeImDataRequestedDelegate = (IntPtr userData, out IntPtr data, out uint dataLength) =>
+ {
+ byte[] dataArr;
+ _imDataRequestedDelegate(out dataArr);
+ data = new IntPtr();
+ Marshal.Copy(dataArr, 0, data, dataArr.Length);
+ dataLength = (uint)dataArr.Length;
+ };
+ ErrorCode error = ImeEventSetImdataRequestedCb(_imeImDataRequestedDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add SetDataRequestedCallback Failed with error " + error);
+ }
+ _imDataRequestedDelegate = imDataRequested;
+ }
+
+ /// <summary>
+ /// Sets the GeometryRequested Action
+ /// </summary>
+ /// <param name="geometryRequested">
+ /// Called when an associated text input UI control requests the position and size from the input panel, requesting for x,y,w,h values.
+ /// </param>
+ public static void SetGeometryRequestedCallback(OutAction<Rect> geometryRequested)
+ {
+ _imeGeometryRequestedDelegate = (IntPtr userData, out int x, out int y, out int w, out int h) =>
+ {
+ Rect rect = new Rect();
+ _geometryRequestedDelegate(out rect);
+ x = rect.x;
+ y = rect.y;
+ w = rect.w;
+ h = rect.h;
+ };
+ ErrorCode error = ImeEventSetGeometryRequestedCallbackCb(_imeGeometryRequestedDelegate, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Add SetGeometryRequestedCallback Failed with error " + error);
+ }
+ _geometryRequestedDelegate = geometryRequested;
+ }
+
+ /// <summary>
+ /// Runs the main loop of IME application.
+ /// This function starts to run IME application's main loop.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <remarks>
+ /// This API is a blocking call, as it starts the main loop of the application.
+ /// </remarks>
+ /// <param name="create">This is called to initialize IME application before the main loop starts up</param>
+ /// <param name="terminate">This is called when IME application is terminated</param>
+ /// <param name="show">
+ /// This is called when IME application is shown
+ /// It provides the Context Inofrmation and the Context Id
+ /// </param>
+ /// <param name="hide">
+ /// This is called when IME application is hidden
+ /// It provides the Context Id
+ /// </param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) Operation failed
+ /// </exception>
+ public static void Run(Action create, Action terminate, Action<ContextId, InputMethodContext> show, Action<ContextId> hide)
+ {
+ _userCreate = create;
+ _userTerminate = terminate;
+ _userShow = show;
+ _userHide = hide;
+ _imeCallbackStructGCHandle._imeCallbackStruct.create = _create;
+ _imeCallbackStructGCHandle._imeCallbackStruct.terminate = _terminate;
+ _imeCallbackStructGCHandle._imeCallbackStruct.hide = _hide;
+ _imeCallbackStructGCHandle._imeCallbackStruct.show = _show;
+
+ ErrorCode error = ImeRun(ref _imeCallbackStructGCHandle._imeCallbackStruct, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "Run Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+
+ }
+
+ /// <summary>
+ /// Sends a key event to the associated text input UI control.
+ /// </summary>
+ /// <remarks>
+ /// This function sends key down or up event with key mask to the client application. If forwardKey is true, this key event goes to the edit filed directly.
+ /// And if forwardKey is false, the ProcessKey event receives the key event before the edit field.
+ /// </remarks>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <param name="keyCode">The key code to be sent</param>
+ /// <param name="keyMask">The modifier key mask</param>
+ /// <param name="forwardKey">The flag to send the key event directly to the edit field</param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// </exception>
+ public static void SendKeyEvent(KeyCode keyCode, KeyMask keyMask, bool forwardKey)
+ {
+ ErrorCode error = ImeSendKeyEvent(keyCode, keyMask, forwardKey);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "SendEvent Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Sends the text to the associated text input UI control.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <param name="str">The string to be committed</param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// </exception>
+ public static void CommitString(string str)
+ {
+ ErrorCode error = ImeCommitString(str);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "CommitString Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Requests to show preedit string.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// </exception>
+ public static void ShowPreEditString()
+ {
+ ErrorCode error = ImeShowPreeditString();
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "ShowPreEditString Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Requests to hide preedit string.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// </exception>
+ public static void HidePreEditString()
+ {
+ ErrorCode error = ImeHidePreeditString();
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "HidePreEditString Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Updates a new preedit string.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <param name="str">The string to be updated in preedit</param>
+ /// <param name="attrs">
+ /// The list which has ime_preedit_attribute lists, strings can be composed of multiple string attributes: underline, highlight color and reversal color.
+ /// The attrs list can be empty if no attributes to set
+ /// </param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// 3) Invalid Parameter
+ /// </exception>
+ public static void UpdatePreEditString(string str, IEnumerable<PreEditAttribute> attrs)
+ {
+ IntPtr einaList = IntPtr.Zero;
+ List<GCHandle> attributeHandleList = new List<GCHandle>();
+ foreach (PreEditAttribute attribute in attrs)
+ {
+ ImePreEditAttributeStruct imePreEditAttribute = new ImePreEditAttributeStruct();
+ imePreEditAttribute.start = attribute.Start;
+ imePreEditAttribute.length = attribute.Length;
+ imePreEditAttribute.type = (int)attribute.Type;
+ imePreEditAttribute.value = attribute.Value;
+ GCHandle attributeHandle = GCHandle.Alloc(imePreEditAttribute, GCHandleType.Pinned);
+ attributeHandleList.Add(attributeHandle);
+ einaList = Interop.EinaList.EinaListAppend(einaList, attributeHandle.AddrOfPinnedObject());
+ }
+ ErrorCode error = ImeUpdatePreeditString(str, einaList);
+ foreach (GCHandle handle in attributeHandleList)
+ {
+ handle.Free();
+ }
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "UpdatePreEditString Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Requests the surrounding text from the position of the cursor, asynchronously.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <param name="maxLenBefore">The maximum length of string to be retrieved before the cursor, -1 means unlimited</param>
+ /// <param name="maxLenAfter">The maximum length of string to be retrieved after the cursor, -1 means unlimited</param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// </exception>
+ /// <postcondition>
+ /// The requested surrounding text can be received using the SurroundingTextUpdated Event, only if it is set.
+ /// </postcondition>
+ public static void RequestSurroundingText(int maxLenBefore, int maxLenAfter)
+ {
+ ErrorCode error = ImeRequestSurroundingText(maxLenBefore, maxLenAfter);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "RequestSurroundingText Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Requests to delete surrounding text.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <param name="offset">The offset value from the cursor position</param>
+ /// <param name="len">The length of the text to delete</param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// 3) Invalid Parameter
+ /// </exception>
+ public static void DeleteSurroundingText(int offset, int len)
+ {
+ ErrorCode error = ImeDeleteSurroundingText(offset, len);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "DeleteSurroundingText Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Gets the surrounding text from the position of the cursor, synchronously.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <param name="maxLenBefore">The maximum length of string to be retrieved before the cursor, -1 means unlimited</param>
+ /// <param name="maxLenAfter">The maximum length of string to be retrieved after the cursor, -1 means unlimited</param>
+ /// <param name="text">The surrounding text</param>
+ /// <param name="cursorPosition">The cursor position</param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// 3) Invalid Parameter
+ /// 4) Failed to obtain text due to out of memory
+ /// </exception>
+ public static void GetSurroundingText(int maxLenBefore, int maxLenAfter, out string text, out int cursorPosition)
+ {
+ IntPtr txt;
+ ErrorCode error = ImeGetSurroundingText(maxLenBefore, maxLenAfter, out txt, out cursorPosition);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetSurroundingText Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ text = Marshal.PtrToStringAnsi(txt);
+ }
+
+ /// <summary>
+ /// Requests to set selection.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <param name="start">The start cursor position in text (in characters not bytes)</param>
+ /// <param name="end">The end cursor position in text (in characters not bytes)</param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// 3) Invalid Parameter
+ /// </exception>
+ public static void SetSelection(int start, int end)
+ {
+ ErrorCode error = ImeSetSelection(start, end);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "SetSelection 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="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) IME main loop isn't started yet
+ /// 3) Operation Failed
+ /// </exception>
+ 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>
+ /// Requests to create an option window from the input panel.
+ /// The input panel can call this function to open the option window. This function calls OptionWindowCreated Event with OptionWindowType.Keyboard.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) Operation failed
+ /// 3) IME main loop isn't started yet
+ /// 4) OptionWindowCreated event has not been set
+ /// </exception>
+ /// <precondition>
+ /// OptionWindowCreated and OptionWindowDestroyed event should be set
+ /// </precondition>
+ public static void CreateOptionWindow()
+ {
+ ErrorCode error = ImeCreateOptionWindow();
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "CreapteOptionWindow Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Requests to destroy an option window.
+ /// The input panel can call this function to close the option window which is created from either the input panel or Settings application.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <param name="window">The option window to destroy</param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function
+ /// 2) Invalid Parameter
+ /// 3) IME main loop isn't started yet
+ /// </exception>
+ /// <precondition>
+ /// OptionWindowDestroyed Event must be set.
+ /// </precondition>
+ /// <postcondition>
+ /// This function triggers the OptionWindowDestroyed Event if it is set.
+ /// </postcondition>
+ public static void DestroyOptionWindow(OptionWindow window)
+ {
+ ErrorCode error = ImeDestroyOptionWindow(window);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "DestroyOptionWindow Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+ }
+}
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This Class contains data related to LangaugeSet Event\r
- /// </summary>\r
- public class LangaugeSetEventArgs\r
- {\r
- internal LangaugeSetEventArgs(EcoreIMFInputPanelLang language)\r
- {\r
- Language = language;\r
- }\r
-\r
- /// <summary>\r
- /// The preferred language that the client application wants\r
- /// </summary>\r
- public EcoreIMFInputPanelLang Language\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// This Class contains data related to LanguageSet Event
+ /// </summary>
+ public class LanguageSetEventArgs
+ {
+ internal LanguageSetEventArgs(InputPanelLanguage language)
+ {
+ Language = language;
+ }
+
+ /// <summary>
+ /// The preferred language that the client application wants
+ /// </summary>
+ public InputPanelLanguage Language
+ {
+ get;
+ internal set;
+ }
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This Class contains data related to LayoutSet Event\r
- /// </summary>\r
- public class LayoutSetEventArgs\r
- {\r
- internal LayoutSetEventArgs(EcoreIMFInputPanelLayout layout)\r
- {\r
- Layout = layout;\r
- }\r
-\r
- /// <summary>\r
- /// The input panel layout\r
- /// </summary>\r
- public EcoreIMFInputPanelLayout Layout\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// This Class contains data related to LayoutSet Event
+ /// </summary>
+ public class LayoutSetEventArgs
+ {
+ internal LayoutSetEventArgs(InputPanelLayout layout)
+ {
+ Layout = layout;
+ }
+
+ /// <summary>
+ /// The input panel layout
+ /// </summary>
+ public InputPanelLayout Layout
+ {
+ get;
+ internal set;
+ }
+ }
}
\ No newline at end of file
--- /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>
+ /// Option window Class
+ /// </summary>
+ public class OptionWindow : Window
+ {
+ internal static IntPtr _handle = IntPtr.Zero;
+ private IntPtr _realHandle = IntPtr.Zero;
+
+ internal OptionWindow():base("Option")
+ {
+ _realHandle = _handle;
+ }
+
+ protected override IntPtr CreateHandle(EvasObject parent)
+ {
+ return _handle;
+ }
+
+ /// <summary>
+ /// The type of option window
+ /// </summary>
+ public OptionWindowType Type
+ {
+ get;
+ internal set;
+ }
+ }
+}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// Enumeration of the option window type.\r
- /// </summary>\r
- public enum ImeOptionWindowType\r
- {\r
- /// <summary>\r
- /// Open from Keyboard\r
- /// </summary>\r
- Keyboard,\r
- /// <summary>\r
- /// Open from Setting application\r
- /// </summary>\r
- SettingApplication\r
- };\r
-\r
- /// <summary>\r
- /// This class information relted to OptionWindowCreated event\r
- /// </summary>\r
- public class OptionWindowCreatedEventArgs\r
- {\r
- internal OptionWindowCreatedEventArgs(EditorWindow window, ImeOptionWindowType type)\r
- {\r
- Window = window;\r
- Type = type;\r
- }\r
-\r
- /// <summary>\r
- /// The type of option window\r
- /// </summary>\r
- public ImeOptionWindowType Type\r
- {\r
- get;\r
- internal set;\r
- }\r
-\r
- /// <summary>\r
- /// The created window object\r
- /// </summary>\r
- public EditorWindow Window\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// Enumeration of the option window type.
+ /// </summary>
+ public enum OptionWindowType
+ {
+ /// <summary>
+ /// Open from Keyboard
+ /// </summary>
+ Keyboard,
+ /// <summary>
+ /// Open from Setting application
+ /// </summary>
+ SettingApplication
+ };
+
+ /// <summary>
+ /// This class contains information related to OptionWindowCreated event
+ /// </summary>
+ public class OptionWindowCreatedEventArgs
+ {
+ internal OptionWindowCreatedEventArgs(OptionWindow window, OptionWindowType type)
+ {
+ Window = window;
+ Window.Type = type;
+ }
+
+ /// <summary>
+ /// The created window object
+ /// </summary>
+ public OptionWindow Window
+ {
+ get;
+ internal set;
+ }
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This class contains information related to the OptionWindowDestroyed event\r
- /// </summary>\r
- public class OptionWindowDestroyedEventArgs\r
- {\r
- internal OptionWindowDestroyedEventArgs(EditorWindow window)\r
- {\r
- Window = window;\r
- }\r
-\r
- /// <summary>\r
- /// The window object to destroy\r
- /// </summary>\r
- public EditorWindow Window\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// This class contains information related to the OptionWindowDestroyed event
+ /// </summary>
+ public class OptionWindowDestroyedEventArgs
+ {
+ internal OptionWindowDestroyedEventArgs(OptionWindow window)
+ {
+ Window = window;
+ }
+
+ /// <summary>
+ /// The window object to destroy
+ /// </summary>
+ public OptionWindow Window
+ {
+ get;
+ internal set;
+ }
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Text;\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// Enumeration for Attribute Type\r
- /// </summary>\r
- public enum AttributeType\r
- {\r
- /// <summary>\r
- /// No attribute\r
- /// </summary>\r
- None,\r
- /// <summary>\r
- /// A font style attribute, e.g., underline, etc.\r
- /// </summary>\r
- FontStyle\r
- };\r
- /// <summary>\r
- /// This class represents the attributes for preedit string.\r
- /// </summary>\r
- public class PreEditAttribute\r
- {\r
- /// <summary>\r
- /// The start position in the string of this attribute\r
- /// </summary>\r
- public uint Start\r
- {\r
- get;\r
- set;\r
- }\r
-\r
- /// <summary>\r
- /// The character length of this attribute, the range is [Start, Start+Length]\r
- /// </summary>\r
- public uint Length\r
- {\r
- get;\r
- set;\r
- }\r
-\r
- /// <summary>\r
- /// The type of this attribute\r
- /// </summary>\r
- public AttributeType Type\r
- {\r
- get;\r
- set;\r
- }\r
-\r
- /// <summary>\r
- /// The value of this attribute\r
- /// </summary>\r
- public uint Value\r
- {\r
- get;\r
- set;\r
- }\r
- }\r
-}\r
+/*
+* 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 System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// Enumeration for Attribute Type
+ /// </summary>
+ public enum AttributeType
+ {
+ /// <summary>
+ /// No attribute
+ /// </summary>
+ None,
+ /// <summary>
+ /// A font style attribute, e.g., underline, etc.
+ /// </summary>
+ FontStyle
+ };
+ /// <summary>
+ /// This class represents the attributes for preedit string.
+ /// </summary>
+ public class PreEditAttribute
+ {
+ /// <summary>
+ /// The start position in the string of this attribute
+ /// </summary>
+ public uint Start
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// The character length of this attribute, the range is [Start, Start+Length]
+ /// </summary>
+ public uint Length
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// The type of this attribute
+ /// </summary>
+ public AttributeType Type
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// The value of this attribute
+ /// </summary>
+ public uint Value
+ {
+ get;
+ set;
+ }
+ }
+}
+++ /dev/null
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-using System;\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This Class contains data related to ProcessKey Event\r
- /// </summary>\r
- public class ProcessKeyEventArgs\r
- {\r
- internal ProcessKeyEventArgs(KeyCode keycode, KeyMask keymask, IntPtr devInfo)\r
- {\r
- Keycode = keycode;\r
- Keymask = keymask;\r
- DeviceInfo = new VoiceControlDeviceInformation(devInfo);\r
- }\r
-\r
- /// <summary>\r
- /// The device information handle\r
- /// </summary>\r
- public VoiceControlDeviceInformation DeviceInfo\r
- {\r
- get;\r
- internal set;\r
- }\r
-\r
- /// <summary>\r
- /// The key code to be sent\r
- /// </summary>\r
- public KeyCode Keycode\r
- {\r
- get;\r
- internal set;\r
- }\r
-\r
- /// <summary>\r
- /// The modifier key mask\r
- /// </summary>\r
- public KeyMask Keymask\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
-}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This Class contains data related to ReturnKeyTypeSet Event\r
- /// </summary>\r
- public class ReturnKeyTypeSetEventArgs\r
- {\r
- internal ReturnKeyTypeSetEventArgs(EcoreIMFInputPanelReturnKeyType type)\r
- {\r
- Type = type;\r
- }\r
-\r
- /// <summary>\r
- /// The type of Return key on the input panel\r
- /// </summary>\r
- public EcoreIMFInputPanelReturnKeyType Type\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// This Class contains data related to ReturnKeySet Event
+ /// </summary>
+ public class ReturnKeySetEventArgs
+ {
+ internal ReturnKeySetEventArgs(InputPanelReturnKey type)
+ {
+ Type = type;
+ }
+
+ /// <summary>
+ /// The type of Return key on the input panel
+ /// </summary>
+ public InputPanelReturnKey Type
+ {
+ get;
+ internal set;
+ }
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This Class contains data related to RotationDegreeChanged Event\r
- /// </summary>\r
- public class RotationDegreeChangedEventArgs\r
- {\r
- internal RotationDegreeChangedEventArgs(int degree)\r
- {\r
- Degree = degree;\r
- }\r
-\r
- /// <summary>\r
- /// The rotation degree\r
- /// </summary>\r
- public int Degree\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// This Class contains data related to RotationChanged Event
+ /// </summary>
+ public class RotationChangedEventArgs
+ {
+ internal RotationChangedEventArgs(int degree)
+ {
+ Degree = degree;
+ }
+
+ /// <summary>
+ /// The rotation degree
+ /// </summary>
+ public int Degree
+ {
+ get;
+ internal set;
+ }
+ }
}
\ No newline at end of file
-/*\r
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the License);\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an AS IS BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*/\r
-\r
-namespace Tizen.Uix.InputMethod\r
-{\r
- /// <summary>\r
- /// This Class contains data related to SurroundingTextUpdated Event\r
- /// </summary>\r
- public class SurroundingTextUpdatedEventArgs\r
- {\r
- internal SurroundingTextUpdatedEventArgs(int contextId, string text, int cursorPos)\r
- {\r
- ContextId = contextId;\r
- Text = text;\r
- CursorPos = cursorPos;\r
- }\r
-\r
- /// <summary>\r
- /// The input context identification value of an associated text input UI control\r
- /// </summary>\r
- public int ContextId\r
- {\r
- get;\r
- internal set;\r
- }\r
-\r
- /// <summary>\r
- /// The cursor position\r
- /// </summary>\r
- public int CursorPos\r
- {\r
- get;\r
- internal set;\r
- }\r
-\r
- /// <summary>\r
- /// The UTF-8 string requested\r
- /// </summary>\r
- public string Text\r
- {\r
- get;\r
- internal set;\r
- }\r
- }\r
+/*
+* 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.
+*/
+
+namespace Tizen.Uix.InputMethod
+{
+ /// <summary>
+ /// This Class contains data related to SurroundingTextUpdated Event
+ /// </summary>
+ public class SurroundingTextUpdatedEventArgs
+ {
+ internal SurroundingTextUpdatedEventArgs(int contextId, string text, int cursorPos)
+ {
+ ContextId = contextId;
+ Text = text;
+ CursorPosition = cursorPos;
+ }
+
+ /// <summary>
+ /// The input context identification value of an associated text input UI control
+ /// </summary>
+ public int ContextId
+ {
+ get;
+ internal set;
+ }
+
+ /// <summary>
+ /// The cursor position
+ /// </summary>
+ public int CursorPosition
+ {
+ get;
+ internal set;
+ }
+
+ /// <summary>
+ /// The string requested
+ /// </summary>
+ public string Text
+ {
+ get;
+ internal set;
+ }
+ }
}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <PropertyGroup>\r
- <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>\r
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
- <ProductVersion>8.0.30703</ProductVersion>\r
- <SchemaVersion>2.0</SchemaVersion>\r
- <ProjectGuid>{081C204A-2267-4F10-8751-E3AFE5C30AE9}</ProjectGuid>\r
- <OutputType>Library</OutputType>\r
- <AppDesignerFolder>Properties</AppDesignerFolder>\r
- <RootNamespace>Tizen.Uix.InputMethod</RootNamespace>\r
- <AssemblyName>Tizen.Uix.InputMethod</AssemblyName>\r
- <FileAlignment>512</FileAlignment>\r
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
- </PropertyGroup>\r
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
- <DebugSymbols>true</DebugSymbols>\r
- <DebugType>full</DebugType>\r
- <Optimize>false</Optimize>\r
- <OutputPath>bin\Debug\Net45\</OutputPath>\r
- <DefineConstants>DEBUG;TRACE</DefineConstants>\r
- <ErrorReport>prompt</ErrorReport>\r
- <WarningLevel>4</WarningLevel>\r
- <Prefer32Bit>false</Prefer32Bit>\r
- </PropertyGroup>\r
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
- <DebugType>pdbonly</DebugType>\r
- <Optimize>true</Optimize>\r
- <OutputPath>bin\Release\Net45\</OutputPath>\r
- <DefineConstants>TRACE</DefineConstants>\r
- <ErrorReport>prompt</ErrorReport>\r
- <WarningLevel>4</WarningLevel>\r
- <Prefer32Bit>false</Prefer32Bit>\r
- </PropertyGroup>\r
- <PropertyGroup>\r
- <SignAssembly>true</SignAssembly>\r
- </PropertyGroup>\r
- <PropertyGroup>\r
- <AssemblyOriginatorKeyFile>Tizen.Uix.InputMethod.snk</AssemblyOriginatorKeyFile>\r
- </PropertyGroup>\r
- <ItemGroup>\r
- <Compile Include="Interop\Interop.EinaList.cs" />\r
- <Compile Include="Interop\Interop.InputMethod.cs" />\r
- <Compile Include="Interop\Interop.Libraries.cs" />\r
- <Compile Include="Properties\AssemblyInfo.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\AccessibilityStateChangedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\CursorPositionUpdatedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\DisplayLanaguageChangedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\EditorWindow.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\FocusInEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\FocusOutEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\ImDataSetEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\InputMethodContext.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\InputMethodDeviceInformation.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\InputMethodEditor.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\InputMethodExceptionFactory.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\LangaugeSetEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\LayoutSetEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\OptionWindowCreatedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\OptionWindowDestroyedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\PreEditAttribute.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\ProcessKeyEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\ReturnKeyStateSetEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\ReturnKeyTypeSetEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\RotationDegreeChangedEventArgs.cs" />\r
- <Compile Include="Tizen.Uix.InputMethod\SurroundingTextUpdatedArgs.cs" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <None Include="packages.config" />\r
- <None Include="Tizen.Uix.InputMethod.nuspec" />\r
- <None Include="Tizen.Uix.InputMethod.project.json" />\r
- <None Include="Tizen.Uix.InputMethod.snk" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <Reference Include="ElmSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3836ec6cd2c91e8b, processorArchitecture=MSIL">\r
- <HintPath>..\..\..\packages\ElmSharp.1.0.14\lib\net45\ElmSharp.dll</HintPath>\r
- <Private>True</Private>\r
- </Reference>\r
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />\r
- <Reference Include="Tizen, Version=1.0.0.0, Culture=neutral, PublicKeyToken=432d9645c4160ccc, processorArchitecture=MSIL">\r
- <HintPath>..\..\..\packages\Tizen.1.0.2\lib\net45\Tizen.dll</HintPath>\r
- <Private>True</Private>\r
- </Reference>\r
- </ItemGroup>\r
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->\r
-</Project>
\ No newline at end of file