• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ev_Win32Keyboard.h

Go to the documentation of this file.
00001 /* AbiSource Program Utilities
00002  * Copyright (C) 1998-2000 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 
00021 #ifndef EV_WIN32KEYBOARD_H
00022 #define EV_WIN32KEYBOARD_H
00023 
00024 #include "ev_Keyboard.h"
00025 #include "ev_EditBits.h"
00026 #include "ut_iconv.h"
00027 
00028 class AV_View;
00029 
00030 class ABI_EXPORT ev_Win32Keyboard : public EV_Keyboard
00031 {
00032 public:
00033     ev_Win32Keyboard(EV_EditEventMapper * pEEM);
00034     virtual ~ev_Win32Keyboard();
00035 
00036     void remapKeyboard(HKL hKeyboardLayout);
00037 
00038     bool onKeyDown(AV_View * pView,
00039                       HWND hWnd, UINT iMsg, WPARAM nVirtKey, LPARAM keyData);
00040 
00041     bool onIMEChar(AV_View * pView,
00042                       HWND hWnd, UINT iMsg, WPARAM nVirtKey, LPARAM keyData);
00043 
00044     bool onChar(AV_View * pView,
00045                    HWND hWnd, UINT iMsg, WPARAM nVirtKey, LPARAM keyData);
00046 
00047     bool onUniChar(AV_View * pView,
00048                    HWND hWnd, UINT iMsg, WPARAM nVirtKey, LPARAM keyData);
00049 
00050 protected:
00051     EV_EditBits         _getModifierState(void);
00052     void                _emitChar(AV_View * pView,
00053                                   HWND hWnd, UINT iMsg, WPARAM nVirtKey, LPARAM keyData,
00054                                   UT_uint32 b, EV_EditModifierState ems);
00055     int                 _scanCodeToChars(UINT nVirtKey, UINT wScanCode,
00056                                          CONST PBYTE lpKeyState, LPWSTR pwszBuff, int cchBuff);
00057 
00058     int                 (*m_pToUnicodeEx)(UINT wVirtKey, UINT wScanCode,
00059                                           CONST PBYTE lpKeyState, LPWSTR pwszBuff, int cchBuff,
00060                                           UINT wFlags, HKL dwhkl);
00061     HKL                 m_hKeyboardLayout;
00062     UT_iconv_t          m_iconv; /* Selected translation to Unicode */
00063     bool                m_bIsUnicodeInput;
00064     bool                m_bWasAnAbiCommand;
00065 };
00066 
00067 #endif /* EV_WIN32KEYBOARD_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1