user32/edit: Implement EM_GETIMESTATUS.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
This commit is contained in:
Zhiyi Zhang 2022-08-12 11:32:54 +08:00 committed by Alexandre Julliard
parent 6baf1198ba
commit 89ee2b0204
2 changed files with 4 additions and 9 deletions

View file

@ -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?
*/

View file

@ -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);