Module: wine Branch: master Commit: 89ee2b020412a6cec846288c622df37fdd0af0c8 URL: https://gitlab.winehq.org/wine/wine/-/commit/89ee2b020412a6cec846288c622df37...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Fri Aug 12 11:32:54 2022 +0800
user32/edit: Implement EM_GETIMESTATUS.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com
---
dlls/user32/edit.c | 5 ++++- dlls/user32/tests/msg.c | 8 -------- 2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 7bfe18e952e..bee158586b9 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -21,7 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * TODO: - * - EM_GETIMESTATUS * - EN_ALIGN_LTR_EC * - EN_ALIGN_RTL_EC * - ES_OEMCONVERT @@ -4936,6 +4935,10 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B result = 1; break;
+ case EM_GETIMESTATUS: + result = wParam == EMSIS_COMPOSITIONSTRING ? es->ime_status : 1; + break; + /* End of the EM_ messages which were in numerical order; what order * are these in? vaguely alphabetical? */ diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index dcfeb329abc..adda16a0f3b 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -12201,26 +12201,22 @@ static DWORD WINAPI test_edit_ime_messages(void *unused_arg) lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_GETCOMPSTRATONCE); ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); - todo_wine ok(lr == EIMES_GETCOMPSTRATONCE, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_CANCELCOMPSTRINFOCUS); ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); - todo_wine ok(lr == EIMES_CANCELCOMPSTRINFOCUS, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_COMPLETECOMPSTRKILLFOCUS); ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); - todo_wine ok(lr == EIMES_COMPLETECOMPSTRKILLFOCUS, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_GETCOMPSTRATONCE | EIMES_CANCELCOMPSTRINFOCUS | EIMES_COMPLETECOMPSTRKILLFOCUS); ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); - todo_wine ok(lr == (EIMES_GETCOMPSTRATONCE | EIMES_CANCELCOMPSTRINFOCUS | EIMES_COMPLETECOMPSTRKILLFOCUS), "Got unexpected lr %#Ix.\n", lr);
@@ -12231,11 +12227,9 @@ static DWORD WINAPI test_edit_ime_messages(void *unused_arg)
/* Invalid EM_{GET|SET}IMESTATUS status types and flags */ lr = SendMessageA(hwnd, EM_GETIMESTATUS, 0, 0); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING + 1, 0); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, 0, EIMES_GETCOMPSTRATONCE); @@ -12251,7 +12245,6 @@ static DWORD WINAPI test_edit_ime_messages(void *unused_arg) lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0xFFFFFFFF); ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); - todo_wine ok(lr == 0xFFFF, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); @@ -12284,7 +12277,6 @@ static DWORD WINAPI test_edit_ime_messages(void *unused_arg) lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_GETCOMPSTRATONCE); ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); - todo_wine ok(lr == EIMES_GETCOMPSTRATONCE, "Got unexpected lr %#Ix.\n", lr);
ret = ImmSetCompositionStringA(himc, SCS_SETSTR, "Wine", 4, NULL, 0);