NVDA Helper
In-process and lite high-speed utilities for NVDA
|
#include <windows.h>
#include <wchar.h>
#include "nvdaHelperRemote.h"
#include <remote/nvdaControllerInternal.h>
#include "typedCharacter.h"
#include "tsf.h"
#include <common/log.h>
#include "ime.h"
Go to the source code of this file.
Classes | |
struct | LPINPUTCONTEXT2 |
Macros | |
#define | GETLANG() |
#define | GETPRIMLANG() |
#define | GETSUBLANG() |
#define | LANG_CHS MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED) |
#define | LANG_CHT MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL) |
#define | MAKEIMEVERSION(major, minor) |
#define | IMEID_VER(dwId) |
#define | IMEID_LANG(dwId) |
#define | _CHT_HKL_DAYI ( (DWORD_PTR)0xE0060404 ) |
#define | _CHT_HKL_NEW_PHONETIC ( (DWORD_PTR)0xE0080404 ) |
#define | _CHT_HKL_NEW_CHANG_JIE ( (DWORD_PTR)0xE0090404 ) |
#define | _CHT_HKL_NEW_QUICK ( (DWORD_PTR)0xE00A0404 ) |
#define | _CHT_HKL_HK_CANTONESE ( (DWORD_PTR)0xE00B0404 ) |
#define | _CHT_IMEFILENAME "TINTLGNT.IME" |
#define | _CHT_IMEFILENAME2 "CINTLGNT.IME" |
#define | _CHT_IMEFILENAME3 "MSTCIPHA.IME" |
#define | IMEID_CHT_VER42 ( LANG_CHT | MAKEIMEVERSION( 4, 2 ) ) |
#define | IMEID_CHT_VER43 ( LANG_CHT | MAKEIMEVERSION( 4, 3 ) ) |
#define | IMEID_CHT_VER44 ( LANG_CHT | MAKEIMEVERSION( 4, 4 ) ) |
#define | IMEID_CHT_VER50 ( LANG_CHT | MAKEIMEVERSION( 5, 0 ) ) |
#define | IMEID_CHT_VER51 ( LANG_CHT | MAKEIMEVERSION( 5, 1 ) ) |
#define | IMEID_CHT_VER52 ( LANG_CHT | MAKEIMEVERSION( 5, 2 ) ) |
#define | IMEID_CHT_VER60 ( LANG_CHT | MAKEIMEVERSION( 6, 0 ) ) |
#define | IMEID_CHT_VER_VISTA ( LANG_CHT | MAKEIMEVERSION( 7, 0 ) ) |
#define | _CHS_HKL ( (DWORD_PTR)0xE00E0804 ) |
#define | _CHS_IMEFILENAME "PINTLGNT.IME" |
#define | _CHS_IMEFILENAME2 "MSSCIPYA.IME" |
#define | IMEID_CHS_VER41 ( LANG_CHS | MAKEIMEVERSION( 4, 1 ) ) |
#define | IMEID_CHS_VER42 ( LANG_CHS | MAKEIMEVERSION( 4, 2 ) ) |
#define | IMEID_CHS_VER53 ( LANG_CHS | MAKEIMEVERSION( 5, 3 ) ) |
Typedefs | |
typedef UINT(WINAPI * | GetReadingString_funcType) (HIMC, UINT, LPWSTR, PINT, BOOL *, PUINT) |
Functions | |
static | LPINPUTCONTEXT2 (WINAPI *immLockIMC)(HIMC) |
static | BOOL (WINAPI *immUnlockIMC)(HIMC) = NULL |
static | LPVOID (WINAPI *immLockIMCC)(HIMCC) |
DWORD | getIMEVersion (HKL kbd_layout, wchar_t *filename) |
bool | getTIPFilename (REFCLSID clsid, WCHAR *filename, DWORD len) |
void | handleOpenStatus (HWND hwnd) |
void | handleReadingStringUpdate (HWND hwnd) |
void | handleIMEConversionModeUpdate (HWND hwnd, bool report) |
void | handleCandidatesClosed (HWND hwnd) |
static bool | handleCandidates (HWND hwnd) |
static WCHAR * | getCompositionString (HIMC imc, DWORD index) |
static bool | handleComposition (HWND hwnd, WPARAM wParam, LPARAM lParam) |
static bool | handleEndComposition (HWND hwnd, WPARAM wParam, LPARAM lParam) |
bool | hasValidIMEContext (HWND hwnd) |
static LRESULT | handleIMEWindowMessage (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) |
static LRESULT CALLBACK | IME_callWndProcHook (int code, WPARAM wParam, LPARAM lParam) |
WCHAR * | IME_getCompositionString () |
LRESULT CALLBACK | IME_getMessageHook (int code, WPARAM wParam, LPARAM lParam) |
void | IME_inProcess_initialize () |
void | IME_inProcess_terminate () |
Variables | |
HWND | curIMEWindow =NULL |
static HWND | candidateIMEWindow =0 |
static BOOL | lastOpenStatus =true |
static HMODULE | gImm32Module = NULL |
static DWORD | lastConversionModeFlags =0 |
UINT | wm_candidateChange =0 |
UINT | wm_handleIMEConversionModeUpdate =0 |
#define GETLANG | ( | ) |
#define GETPRIMLANG | ( | ) |
#define GETSUBLANG | ( | ) |
#define LANG_CHS MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED) |
#define LANG_CHT MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL) |
#define MAKEIMEVERSION | ( | major, | |
minor ) |
#define IMEID_VER | ( | dwId | ) |
#define IMEID_LANG | ( | dwId | ) |
#define _CHT_HKL_DAYI ( (DWORD_PTR)0xE0060404 ) |
#define _CHT_HKL_NEW_PHONETIC ( (DWORD_PTR)0xE0080404 ) |
Referenced by getIMEVersion().
#define _CHT_HKL_NEW_CHANG_JIE ( (DWORD_PTR)0xE0090404 ) |
Referenced by getIMEVersion().
#define _CHT_HKL_NEW_QUICK ( (DWORD_PTR)0xE00A0404 ) |
Referenced by getIMEVersion().
#define _CHT_HKL_HK_CANTONESE ( (DWORD_PTR)0xE00B0404 ) |
Referenced by getIMEVersion().
#define _CHT_IMEFILENAME "TINTLGNT.IME" |
#define _CHT_IMEFILENAME2 "CINTLGNT.IME" |
#define _CHT_IMEFILENAME3 "MSTCIPHA.IME" |
#define IMEID_CHT_VER42 ( LANG_CHT | MAKEIMEVERSION( 4, 2 ) ) |
Referenced by handleReadingStringUpdate().
#define IMEID_CHT_VER43 ( LANG_CHT | MAKEIMEVERSION( 4, 3 ) ) |
Referenced by handleReadingStringUpdate().
#define IMEID_CHT_VER44 ( LANG_CHT | MAKEIMEVERSION( 4, 4 ) ) |
Referenced by handleReadingStringUpdate().
#define IMEID_CHT_VER50 ( LANG_CHT | MAKEIMEVERSION( 5, 0 ) ) |
#define IMEID_CHT_VER51 ( LANG_CHT | MAKEIMEVERSION( 5, 1 ) ) |
Referenced by handleReadingStringUpdate().
#define IMEID_CHT_VER52 ( LANG_CHT | MAKEIMEVERSION( 5, 2 ) ) |
Referenced by handleReadingStringUpdate().
#define IMEID_CHT_VER60 ( LANG_CHT | MAKEIMEVERSION( 6, 0 ) ) |
#define IMEID_CHT_VER_VISTA ( LANG_CHT | MAKEIMEVERSION( 7, 0 ) ) |
#define _CHS_HKL ( (DWORD_PTR)0xE00E0804 ) |
Referenced by getIMEVersion().
#define _CHS_IMEFILENAME "PINTLGNT.IME" |
#define _CHS_IMEFILENAME2 "MSSCIPYA.IME" |
#define IMEID_CHS_VER41 ( LANG_CHS | MAKEIMEVERSION( 4, 1 ) ) |
#define IMEID_CHS_VER42 ( LANG_CHS | MAKEIMEVERSION( 4, 2 ) ) |
Referenced by handleReadingStringUpdate().
#define IMEID_CHS_VER53 ( LANG_CHS | MAKEIMEVERSION( 5, 3 ) ) |
Referenced by handleReadingStringUpdate().
typedef UINT(WINAPI * GetReadingString_funcType) (HIMC, UINT, LPWSTR, PINT, BOOL *, PUINT) |
|
static |
Referenced by handleReadingStringUpdate(), hasValidIMEContext(), and IME_inProcess_initialize().
|
static |
Referenced by collectSpellingErrorOffsets(), decBackendLibRefCount(), ExtTextOutHelper(), fake_BitBlt(), fake_DeleteDC(), fake_DestroyWindow(), fake_DrawFocusRect(), fake_GdiTransparentBlt(), fake_PatBlt(), fake_ScriptStringOut(), fake_ScrollWindow(), fake_ScrollWindowEx(), fake_StretchBlt(), hookClass_ExtTextOut< charType >::fakeFunction(), hookClass_PolyTextOut< WA_POLYTEXT >::fakeFunction(), hookClass_TextOut< charType >::fakeFunction(), fetchTableInfo(), MshtmlVBufBackend_t::fillVBuf(), generateFormFieldXML(), generateInlineShapeXML(), getCellStates(), getCellTextWidth(), handleOpenStatus(), handleReadingStringUpdate(), IME_inProcess_initialize(), incBackendLibRefCount(), displayModel_t::renderText(), winword_expandToLine_helper(), and winword_moveByLine_helper().
|
static |
DWORD getIMEVersion | ( | HKL | kbd_layout, |
wchar_t * | filename ) |
References _CHS_HKL, _CHT_HKL_HK_CANTONESE, _CHT_HKL_NEW_CHANG_JIE, _CHT_HKL_NEW_PHONETIC, and _CHT_HKL_NEW_QUICK.
Referenced by handleReadingStringUpdate().
bool getTIPFilename | ( | REFCLSID | clsid, |
WCHAR * | filename, | ||
DWORD | len ) |
Referenced by handleReadingStringUpdate().
void handleOpenStatus | ( | HWND | hwnd | ) |
References BOOL(), lastOpenStatus, and nvdaControllerInternal_IMEOpenStatusUpdate().
Referenced by handleIMEWindowMessage().
void handleReadingStringUpdate | ( | HWND | hwnd | ) |
References BOOL(), curTSFClsID, getIMEVersion(), getTIPFilename(), IMEID_CHS_VER42, IMEID_CHS_VER53, IMEID_CHT_VER42, IMEID_CHT_VER43, IMEID_CHT_VER44, IMEID_CHT_VER51, IMEID_CHT_VER52, isTSFThread(), long, LPINPUTCONTEXT2(), and nvdaControllerInternal_inputCompositionUpdate().
Referenced by handleIMEWindowMessage().
void handleIMEConversionModeUpdate | ( | HWND | hwnd, |
bool | report ) |
References lastConversionModeFlags, and nvdaControllerInternal_inputConversionModeUpdate().
Referenced by handleIMEWindowMessage(), IME_getMessageHook(), and TsfSink::OnActivated().
|
inline |
References candidateIMEWindow, and nvdaControllerInternal_inputCandidateListUpdate().
Referenced by IME_getMessageHook().
|
static |
References candidateIMEWindow, and nvdaControllerInternal_inputCandidateListUpdate().
Referenced by handleIMEWindowMessage(), and IME_getMessageHook().
|
static |
Referenced by handleComposition(), handleEndComposition(), and IME_getCompositionString().
|
static |
References getCompositionString(), long, and nvdaControllerInternal_inputCompositionUpdate().
Referenced by handleIMEWindowMessage().
|
static |
References getCompositionString(), and nvdaControllerInternal_inputCompositionUpdate().
Referenced by handleIMEWindowMessage().
bool hasValidIMEContext | ( | HWND | hwnd | ) |
References LPINPUTCONTEXT2().
Referenced by handleIMEWindowMessage().
|
static |
References curIMEWindow, handleCandidates(), handleComposition(), handleEndComposition(), handleIMEConversionModeUpdate(), handleOpenStatus(), handleReadingStringUpdate(), hasValidIMEContext(), isTSFThread(), nvdaControllerInternal_inputCandidateListUpdate(), typedCharacter_window, wm_candidateChange, and wm_handleIMEConversionModeUpdate.
Referenced by IME_callWndProcHook(), and IME_getMessageHook().
|
static |
References handleIMEWindowMessage().
Referenced by IME_inProcess_initialize(), and IME_inProcess_terminate().
WCHAR * IME_getCompositionString | ( | ) |
References getCompositionString().
LRESULT CALLBACK IME_getMessageHook | ( | int | code, |
WPARAM | wParam, | ||
LPARAM | lParam ) |
void IME_inProcess_initialize | ( | ) |
References BOOL(), gImm32Module, IME_callWndProcHook(), IME_getMessageHook(), LPINPUTCONTEXT2(), LPVOID(), registerWindowsHook(), wm_candidateChange, and wm_handleIMEConversionModeUpdate.
Referenced by inProcess_initialize().
void IME_inProcess_terminate | ( | ) |
References gImm32Module, IME_callWndProcHook(), IME_getMessageHook(), and unregisterWindowsHook().
Referenced by inProcess_terminate().
HWND curIMEWindow =NULL |
Referenced by handleIMEWindowMessage(), and TsfSink::OnEndEdit().
|
static |
Referenced by handleCandidates(), and handleCandidatesClosed().
|
static |
Referenced by handleOpenStatus().
|
static |
Referenced by IME_inProcess_initialize(), and IME_inProcess_terminate().
|
static |
Referenced by handleIMEConversionModeUpdate().
UINT wm_candidateChange =0 |
Referenced by handleIMEWindowMessage(), IME_getMessageHook(), and IME_inProcess_initialize().
UINT wm_handleIMEConversionModeUpdate =0 |
Referenced by handleIMEWindowMessage(), IME_getMessageHook(), and IME_inProcess_initialize().