namespace PowerToys
{
    namespace PowerAccentKeyboardService
    {
        enum LetterKey
        {
            None = 0x00,
            VK_0 = 0x30,
            VK_1 = 0x31,
            VK_2 = 0x32,
            VK_3 = 0x33,
            VK_4 = 0x34,
            VK_5 = 0x35,
            VK_6 = 0x36,
            VK_7 = 0x37,
            VK_8 = 0x38,
            VK_9 = 0x39,
            VK_A = 0x41,
            VK_B = 0x42,
            VK_C = 0x43,
            VK_D = 0x44,
            VK_E = 0x45,
            VK_F = 0x46,
            VK_G = 0x47,
            VK_H = 0x48,
            VK_I = 0x49,
            VK_J = 0x4A,
            VK_K = 0x4B,
            VK_L = 0x4C,
            VK_M = 0x4D,
            VK_N = 0x4E,
            VK_O = 0x4F,
            VK_P = 0x50,
            VK_Q = 0x51,
            VK_R = 0x52,
            VK_S = 0x53,
            VK_T = 0x54,
            VK_U = 0x55,
            VK_V = 0x56,
            VK_W = 0x57,
            VK_X = 0x58,
            VK_Y = 0x59,
            VK_Z = 0x5A,
            VK_PLUS = 0xBB,
            VK_COMMA = 0xBC,
            VK_PERIOD = 0xBE,
            VK_MINUS = 0xBD,
            VK_MULTIPLY_ = 0x6A,
            VK_SLASH_ = 0xBF,
            VK_DIVIDE_ = 0x6F,
            VK_BACKSLASH = 0xDC
        };

        enum TriggerKey
        {
            Right = 0x27, // VK_RIGHT
            Left = 0x25, // VK_LEFT
            Space = 0x20 // VK_SPACE
        };

        enum InputType
        {
            None,
            Space,
            Left,
            Right,
            Char
        };

        [version(1.0), uuid(37197089-5438-4479-af57-30ab3f3c8be4)] delegate void ShowToolbar(LetterKey key);
        [version(1.0), uuid(8eb79d6b-1826-424f-9fbc-af21ae19725e)] delegate void HideToolbar(InputType inputType);
        [version(1.0), uuid(db72d45c-a5a2-446f-bdc1-506e9121764a)] delegate void NextChar(TriggerKey inputSpace, boolean shiftPressed);
        [version(1.0), uuid(20be2919-2b91-4313-b6e0-4c3484fe91ef)] delegate void IsLanguageLetter(LetterKey key, [out] boolean* result);

        [default_interface] runtimeclass KeyboardListener {
            KeyboardListener();
            void InitHook();
            void UnInitHook();
            void SetShowToolbarEvent(event ShowToolbar showToolbarEvent);
            void SetHideToolbarEvent(event HideToolbar hideToolbarEvent);
            void SetNextCharEvent(event NextChar nextCharEvent);
            void SetIsLanguageLetterDelegate(IsLanguageLetter isLanguageLetterDelegate);
            void UpdateActivationKey(Int32 activationKey);
            void UpdateDoNotActivateOnGameMode(Boolean doNotActivateOnGameMode);
            void UpdateInputTime(Int32 inputTime);
            void UpdateExcludedApps(String excludedApps);
        }
    }
}
