\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
- IME_KEY_BackSpace = 0xFF08, /**< The backspace key */\r
- IME_KEY_Tab = 0xFF09, /**< The tab key */\r
- IME_KEY_Linefeed = 0xFF0A, /**< The linefeed key */\r
- IME_KEY_Clear = 0xFF0B, /**< The clear key */\r
- IME_KEY_Return = 0xFF0D, /**< The return key */\r
- IME_KEY_Pause = 0xFF13, /**< The pause key */\r
- IME_KEY_Scroll_Lock = 0xFF14, /**< The scroll lock key */\r
- IME_KEY_Sys_Req = 0xFF15, /**< The sys req key */\r
- IME_KEY_Escape = 0xFF1B, /**< The escape key */\r
- IME_KEY_Delete = 0xFFFF, /**< The delete key */\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
- IME_KEY_Home = 0xFF50, /**< The home key */\r
- IME_KEY_Left = 0xFF51, /**< The left directional key */\r
- IME_KEY_Up = 0xFF52, /**< The up directional key */\r
- IME_KEY_Right = 0xFF53, /**< The right directional key */\r
- IME_KEY_Down = 0xFF54, /**< The down directional key */\r
- IME_KEY_Prior = 0xFF55, /**< The prior, previous key */\r
- IME_KEY_Page_Up = 0xFF55, /**< The page up key */\r
- IME_KEY_Next = 0xFF56, /**< The next key */\r
- IME_KEY_Page_Down = 0xFF56, /**< The page down key */\r
- IME_KEY_End = 0xFF57, /**< The end key */\r
- IME_KEY_Begin = 0xFF58, /**< The begin key */\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
- IME_KEY_Select = 0xFF60, /**< The select key */\r
- IME_KEY_Print = 0xFF61, /**< The print key */\r
- IME_KEY_Execute = 0xFF62, /**< The execute, run, do key */\r
- IME_KEY_Insert = 0xFF63, /**< The insert key */\r
- IME_KEY_Undo = 0xFF65, /**< The undo key */\r
- IME_KEY_Redo = 0xFF66, /**< The redo key */\r
- IME_KEY_Menu = 0xFF67, /**< The menu key */\r
- IME_KEY_Find = 0xFF68, /**< The find key */\r
- IME_KEY_Cancel = 0xFF69, /**< The cancel, stop, abort, exit key */\r
- IME_KEY_Help = 0xFF6A, /**< The help key */\r
- IME_KEY_Break = 0xFF6B, /**< The break key */\r
- IME_KEY_Mode_switch = 0xFF7E, /**< The character set switch key */\r
- IME_KEY_Num_Lock = 0xFF7F, /**< The num lock key */\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
- IME_KEY_KP_Space = 0xFF80, /**< The Numpad space key */\r
- IME_KEY_KP_Tab = 0xFF89, /**< The Numpad tab key */\r
- IME_KEY_KP_Enter = 0xFF8D, /**< The Numpad enter key */\r
- IME_KEY_KP_F1 = 0xFF91, /**< The Numpad function 1 key */\r
- IME_KEY_KP_F2 = 0xFF92, /**< The Numpad function 2 key */\r
- IME_KEY_KP_F3 = 0xFF93, /**< The Numpad function 3 key */\r
- IME_KEY_KP_F4 = 0xFF94, /**< The Numpad function 4 key */\r
- IME_KEY_KP_Home = 0xFF95, /**< The Numpad home key */\r
- IME_KEY_KP_Left = 0xFF96, /**< The Numpad left key */\r
- IME_KEY_KP_Up = 0xFF97, /**< The Numpad up key */\r
- IME_KEY_KP_Right = 0xFF98, /**< The Numpad right key */\r
- IME_KEY_KP_Down = 0xFF99, /**< The Numpad down key */\r
- IME_KEY_KP_Prior = 0xFF9A, /**< The Numpad prior, previous key */\r
- IME_KEY_KP_Page_Up = 0xFF9A, /**< The Numpad page up key */\r
- IME_KEY_KP_Next = 0xFF9B, /**< The Numpad next key */\r
- IME_KEY_KP_Page_Down = 0xFF9B, /**< The Numpad page down key */\r
- IME_KEY_KP_End = 0xFF9C, /**< The Numpad end key */\r
- IME_KEY_KP_Begin = 0xFF9D, /**< The Numpad begin key */\r
- IME_KEY_KP_Insert = 0xFF9E, /**< The Numpad insert key */\r
- IME_KEY_KP_Delete = 0xFF9F, /**< The Numpad delete key */\r
- IME_KEY_KP_Equal = 0xFFBD, /**< The Numpad equal key */\r
- IME_KEY_KP_Multiply = 0xFFAA, /**< The Numpad multiply key */\r
- IME_KEY_KP_Add = 0xFFAB, /**< The Numpad add key */\r
- IME_KEY_KP_Separator = 0xFFAC, /**< The Numpad separator key */\r
- IME_KEY_KP_Subtract = 0xFFAD, /**< The Numpad subtract key */\r
- IME_KEY_KP_Decimal = 0xFFAE, /**< The Numpad decimal key */\r
- IME_KEY_KP_Divide = 0xFFAF, /**< The Numpad divide key */\r
-\r
- IME_KEY_KP_0 = 0xFFB0, /**< The Numpad 0 key */\r
- IME_KEY_KP_1 = 0xFFB1, /**< The Numpad 1 key */\r
- IME_KEY_KP_2 = 0xFFB2, /**< The Numpad 2 key */\r
- IME_KEY_KP_3 = 0xFFB3, /**< The Numpad 3 key */\r
- IME_KEY_KP_4 = 0xFFB4, /**< The Numpad 4 key */\r
- IME_KEY_KP_5 = 0xFFB5, /**< The Numpad 5 key */\r
- IME_KEY_KP_6 = 0xFFB6, /**< The Numpad 6 key */\r
- IME_KEY_KP_7 = 0xFFB7, /**< The Numpad 7 key */\r
- IME_KEY_KP_8 = 0xFFB8, /**< The Numpad 8 key */\r
- IME_KEY_KP_9 = 0xFFB9, /**< The Numpad 9 key */\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
- IME_KEY_F1 = 0xFFBE, /**< The function 1 key */\r
- IME_KEY_F2 = 0xFFBF, /**< The function 2 key */\r
- IME_KEY_F3 = 0xFFC0, /**< The function 3 key */\r
- IME_KEY_F4 = 0xFFC1, /**< The function 4 key */\r
- IME_KEY_F5 = 0xFFC2, /**< The function 5 key */\r
- IME_KEY_F6 = 0xFFC3, /**< The function 6 key */\r
- IME_KEY_F7 = 0xFFC4, /**< The function 7 key */\r
- IME_KEY_F8 = 0xFFC5, /**< The function 8 key */\r
- IME_KEY_F9 = 0xFFC6, /**< The function 9 key */\r
- IME_KEY_F10 = 0xFFC7, /**< The function 10 key */\r
- IME_KEY_F11 = 0xFFC8, /**< The function 11 key */\r
- IME_KEY_F12 = 0xFFC9, /**< The function 12 key */\r
- IME_KEY_F13 = 0xFFCA, /**< The function 13 key */\r
- IME_KEY_F14 = 0xFFCB, /**< The function 14 key */\r
- IME_KEY_F15 = 0xFFCC, /**< The function 15 key */\r
- IME_KEY_F16 = 0xFFCD, /**< The function 16 key */\r
- IME_KEY_F17 = 0xFFCE, /**< The function 17 key */\r
- IME_KEY_F18 = 0xFFCF, /**< The function 18 key */\r
- IME_KEY_F19 = 0xFFD0, /**< The function 19 key */\r
- IME_KEY_F20 = 0xFFD1, /**< The function 20 key */\r
- IME_KEY_F21 = 0xFFD2, /**< The function 21 key */\r
- IME_KEY_F22 = 0xFFD3, /**< The function 22 key */\r
- IME_KEY_F23 = 0xFFD4, /**< The function 23 key */\r
- IME_KEY_F24 = 0xFFD5, /**< The function 24 key */\r
- IME_KEY_F25 = 0xFFD6, /**< The function 25 key */\r
- IME_KEY_F26 = 0xFFD7, /**< The function 26 key */\r
- IME_KEY_F27 = 0xFFD8, /**< The function 27 key */\r
- IME_KEY_F28 = 0xFFD9, /**< The function 28 key */\r
- IME_KEY_F29 = 0xFFDA, /**< The function 29 key */\r
- IME_KEY_F30 = 0xFFDB, /**< The function 30 key */\r
- IME_KEY_F31 = 0xFFDC, /**< The function 31 key */\r
- IME_KEY_F32 = 0xFFDD, /**< The function 32 key */\r
- IME_KEY_F33 = 0xFFDE, /**< The function 33 key */\r
- IME_KEY_F34 = 0xFFDF, /**< The function 34 key */\r
- IME_KEY_F35 = 0xFFE0, /**< The function 35 key */\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
- IME_KEY_Shift_L = 0xFFE1, /**< The left shift key */\r
- IME_KEY_Shift_R = 0xFFE2, /**< The right shift key */\r
- IME_KEY_Control_L = 0xFFE3, /**< The left control key */\r
- IME_KEY_Control_R = 0xFFE4, /**< The right control key */\r
- IME_KEY_Caps_Lock = 0xFFE5, /**< The caps lock key */\r
- IME_KEY_Shift_Lock = 0xFFE6, /**< The shift lock key */\r
-\r
- IME_KEY_Meta_L = 0xFFE7, /**< The left meta key */\r
- IME_KEY_Meta_R = 0xFFE8, /**< The right meta key */\r
- IME_KEY_Alt_L = 0xFFE9, /**< The left alt key */\r
- IME_KEY_Alt_R = 0xFFEA, /**< The right alt key */\r
- IME_KEY_Super_L = 0xFFEB, /**< The left super key */\r
- IME_KEY_Super_R = 0xFFEC, /**< The right super key */\r
- IME_KEY_Hyper_L = 0xFFED, /**< The left hyper key */\r
- IME_KEY_Hyper_R = 0xFFEE, /**< The right hyper key */\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
- IME_KEY_space = 0x020, /**< The space key */\r
- IME_KEY_exclam = 0x021, /**< The exclamation key */\r
- IME_KEY_quotedbl = 0x022, /**< The quotedbl key */\r
- IME_KEY_numbersign = 0x023, /**< The number sign key */\r
- IME_KEY_dollar = 0x024, /**< The dollar key */\r
- IME_KEY_percent = 0x025, /**< The percent key */\r
- IME_KEY_ampersand = 0x026, /**< The ampersand key */\r
- IME_KEY_apostrophe = 0x027, /**< The apostrophe key */\r
- IME_KEY_parenleft = 0x028, /**< The parenleft key */\r
- IME_KEY_parenright = 0x029, /**< The parenright key */\r
- IME_KEY_asterisk = 0x02a, /**< The asterisk key */\r
- IME_KEY_plus = 0x02b, /**< The plus key */\r
- IME_KEY_comma = 0x02c, /**< The comma key */\r
- IME_KEY_minus = 0x02d, /**< The minus key */\r
- IME_KEY_period = 0x02e, /**< The period key */\r
- IME_KEY_slash = 0x02f, /**< The slash key */\r
- IME_KEY_0 = 0x030, /**< The 0 key */\r
- IME_KEY_1 = 0x031, /**< The 1 key */\r
- IME_KEY_2 = 0x032, /**< The 2 key */\r
- IME_KEY_3 = 0x033, /**< The 3 key */\r
- IME_KEY_4 = 0x034, /**< The 4 key */\r
- IME_KEY_5 = 0x035, /**< The 5 key */\r
- IME_KEY_6 = 0x036, /**< The 6 key */\r
- IME_KEY_7 = 0x037, /**< The 7 key */\r
- IME_KEY_8 = 0x038, /**< The 8 key */\r
- IME_KEY_9 = 0x039, /**< The 9 key */\r
- IME_KEY_colon = 0x03a, /**< The colon key */\r
- IME_KEY_semicolon = 0x03b, /**< The semicolon key */\r
- IME_KEY_less = 0x03c, /**< The less key */\r
- IME_KEY_equal = 0x03d, /**< The equal key */\r
- IME_KEY_greater = 0x03e, /**< The greater key */\r
- IME_KEY_question = 0x03f, /**< The question key */\r
- IME_KEY_at = 0x040, /**< The at key */\r
- IME_KEY_A = 0x041, /**< The A key */\r
- IME_KEY_B = 0x042, /**< The B key */\r
- IME_KEY_C = 0x043, /**< The C key */\r
- IME_KEY_D = 0x044, /**< The D key */\r
- IME_KEY_E = 0x045, /**< The E key */\r
- IME_KEY_F = 0x046, /**< The F key */\r
- IME_KEY_G = 0x047, /**< The G key */\r
- IME_KEY_H = 0x048, /**< The H key */\r
- IME_KEY_I = 0x049, /**< The I key */\r
- IME_KEY_J = 0x04a, /**< The J key */\r
- IME_KEY_K = 0x04b, /**< The K key */\r
- IME_KEY_L = 0x04c, /**< The L key */\r
- IME_KEY_M = 0x04d, /**< The M key */\r
- IME_KEY_N = 0x04e, /**< The N key */\r
- IME_KEY_O = 0x04f, /**< The O key */\r
- IME_KEY_P = 0x050, /**< The P key */\r
- IME_KEY_Q = 0x051, /**< The Q key */\r
- IME_KEY_R = 0x052, /**< The R key */\r
- IME_KEY_S = 0x053, /**< The S key */\r
- IME_KEY_T = 0x054, /**< The T key */\r
- IME_KEY_U = 0x055, /**< The U key */\r
- IME_KEY_V = 0x056, /**< The V key */\r
- IME_KEY_W = 0x057, /**< The W key */\r
- IME_KEY_X = 0x058, /**< The X key */\r
- IME_KEY_Y = 0x059, /**< The Y key */\r
- IME_KEY_Z = 0x05a, /**< The Z key */\r
- IME_KEY_bracketleft = 0x05b, /**< The left bracket key */\r
- IME_KEY_backslash = 0x05c, /**< The backslash key */\r
- IME_KEY_bracketright = 0x05d, /**< The right bracket key */\r
- IME_KEY_asciicircum = 0x05e, /**< The circumflex key */\r
- IME_KEY_underscore = 0x05f, /**< The underscore key */\r
- IME_KEY_grave = 0x060, /**< The grave key */\r
- IME_KEY_a = 0x061, /**< The a key */\r
- IME_KEY_b = 0x062, /**< The b key */\r
- IME_KEY_c = 0x063, /**< The c key */\r
- IME_KEY_d = 0x064, /**< The d key */\r
- IME_KEY_e = 0x065, /**< The e key */\r
- IME_KEY_f = 0x066, /**< The f key */\r
- IME_KEY_g = 0x067, /**< The g key */\r
- IME_KEY_h = 0x068, /**< The h key */\r
- IME_KEY_i = 0x069, /**< The i key */\r
- IME_KEY_j = 0x06a, /**< The j key */\r
- IME_KEY_k = 0x06b, /**< The k key */\r
- IME_KEY_l = 0x06c, /**< The l key */\r
- IME_KEY_m = 0x06d, /**< The m key */\r
- IME_KEY_n = 0x06e, /**< The n key */\r
- IME_KEY_o = 0x06f, /**< The o key */\r
- IME_KEY_p = 0x070, /**< The p key */\r
- IME_KEY_q = 0x071, /**< The q key */\r
- IME_KEY_r = 0x072, /**< The r key */\r
- IME_KEY_s = 0x073, /**< The s key */\r
- IME_KEY_t = 0x074, /**< The t key */\r
- IME_KEY_u = 0x075, /**< The u key */\r
- IME_KEY_v = 0x076, /**< The v key */\r
- IME_KEY_w = 0x077, /**< The w key */\r
- IME_KEY_x = 0x078, /**< The x key */\r
- IME_KEY_y = 0x079, /**< The y key */\r
- IME_KEY_z = 0x07a, /**< The z key */\r
- IME_KEY_braceleft = 0x07b, /**< The left brace key */\r
- IME_KEY_bar = 0x07c, /**< The bar key */\r
- IME_KEY_braceright = 0x07d, /**< The right brace key */\r
- IME_KEY_asciitilde = 0x07e /**< The tilde key */\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
- IME_KEY_MASK_PRESSED = 0, /**< Key press event without modifier key */\r
- IME_KEY_MASK_SHIFT = (1 << 0), /**< The Shift key is pressed down */\r
- IME_KEY_MASK_CAPSLOCK = (1 << 1), /**< The CapsLock key is pressed down */\r
- IME_KEY_MASK_CONTROL = (1 << 2), /**< The Control key is pressed down */\r
- IME_KEY_MASK_ALT = (1 << 3), /**< The Alt key is pressed down */\r
- IME_KEY_MASK_META = (1 << 4), /**< The Meta key is pressed down */\r
- IME_KEY_MASK_WIN = (1 << 5), /**< The Win (between Control and Alt) is pressed down */\r
- IME_KEY_MASK_HYPER = (1 << 6), /**< The Hyper key is pressed down */\r
- IME_KEY_MASK_NUMLOCK = (1 << 7), /**< The NumLock key is pressed down */\r
- IME_KEY_MASK_RELEASED = (1 << 15) /**< Key release event */\r
- };\r
-}
\ No newline at end of file
+ /// <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