mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[CONIME][BOOTDATA][GITHUB][SDK] Add conime.exe (#8678)
Prepare for Console IME Input for East Asian. JIRA issue: CORE-20243 - Modify .github/labeler.yml. - Add base/system/conime/ . - Modify boot/bootdata/hivesft.inf for Console settings. - Add imm32!ImmCallImeConsoleIME prototype into <imm32_undoc.h>. - Add IMS_CONSOLEIME_1A and IMS_CONSOLEIME_1B values into <imm32_undoc.h>, for WM_IME_SYSTEM message.
This commit is contained in:
@@ -48,6 +48,7 @@ Win32SS:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- base/ctf/**
|
||||
- base/system/conime/**
|
||||
- win32ss/user/imm32/**
|
||||
- win32ss/user/ntuser/ime.c
|
||||
- win32ss/user/user32/misc/imm.c
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
add_subdirectory(autochk)
|
||||
add_subdirectory(bootok)
|
||||
add_subdirectory(chkdsk)
|
||||
add_subdirectory(conime)
|
||||
add_subdirectory(diskpart)
|
||||
add_subdirectory(dllhost)
|
||||
add_subdirectory(expand)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
add_executable(conime WIN32 conime.c conime_res.rc)
|
||||
set_module_type(conime win32gui UNICODE)
|
||||
target_link_libraries(conime wine ${PSEH_LIB})
|
||||
add_importlibs(conime msvcrt imm32 advapi32 user32 gdi32 kernel32 ntdll)
|
||||
add_cd_file(TARGET conime DESTINATION reactos/system32 FOR all)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* PROJECT: ReactOS Console IME
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: Implementing Console IME Input for Far-East Asian
|
||||
* COPYRIGHT: Copyright 2026 Katayama Hirofumi MZ <[email protected]>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define LANGID_CHINESE_SIMPLIFIED 0x804 // Simplified Chinese language
|
||||
#define LANGID_CHINESE_TRADITIONAL 0x404 // Traditional Chinese language
|
||||
#define LANGID_JAPANESE 0x411 // Japanese language
|
||||
#define LANGID_KOREAN 0x412 // Korean language
|
||||
|
||||
#define WM_USER_INIT (WM_USER + 0x00) // 0x400
|
||||
#define WM_USER_UNINIT (WM_USER + 0x01) // 0x401
|
||||
#define WM_USER_SWITCHIME (WM_USER + 0x02) // 0x402
|
||||
#define WM_USER_DEACTIVATE (WM_USER + 0x03) // 0x403
|
||||
#define WM_USER_SIMHOTKEY (WM_USER + 0x04) // 0x404
|
||||
#define WM_USER_GETIMESTATE (WM_USER + 0x05) // 0x405
|
||||
#define WM_USER_SETIMESTATE (WM_USER + 0x06) // 0x406
|
||||
#define WM_USER_SETSCREENSIZE (WM_USER + 0x07) // 0x407
|
||||
#define WM_USER_SENDIMESTATUS (WM_USER + 0x08) // 0x408
|
||||
#define WM_USER_CHANGEKEYBOARD (WM_USER + 0x09) // 0x409
|
||||
#define WM_USER_SETCODEPAGE (WM_USER + 0x0A) // 0x40A
|
||||
#define WM_USER_GO (WM_USER + 0x0B) // 0x40B
|
||||
#define WM_USER_GONEXT (WM_USER + 0x0C) // 0x40C
|
||||
#define WM_USER_GOBACK (WM_USER + 0x0D) // 0x40D
|
||||
|
||||
#define WM_ROUTE 0x800
|
||||
#define WM_ROUTE_KEYDOWN (WM_KEYDOWN + WM_ROUTE) // 0x900
|
||||
#define WM_ROUTE_KEYUP (WM_KEYUP + WM_ROUTE) // 0x901
|
||||
#define WM_ROUTE_CHAR (WM_CHAR + WM_ROUTE) // 0x902
|
||||
#define WM_ROUTE_DEADCHAR (WM_DEADCHAR + WM_ROUTE) // 0x903
|
||||
#define WM_ROUTE_SYSKEYDOWN (WM_SYSKEYDOWN + WM_ROUTE) // 0x904
|
||||
#define WM_ROUTE_SYSKEYUP (WM_SYSKEYUP + WM_ROUTE) // 0x905
|
||||
#define WM_ROUTE_SYSCHAR (WM_SYSCHAR + WM_ROUTE) // 0x906
|
||||
#define WM_ROUTE_SYSDEADCHAR (WM_SYSDEADCHAR + WM_ROUTE) // 0x907
|
||||
|
||||
#define _GCS_SINGLECHAR 0x2000
|
||||
|
||||
#define IMEDISPLAY_MAX_X 160
|
||||
|
||||
// IME display-related
|
||||
typedef struct tagIMEDISPLAY
|
||||
{
|
||||
UINT uCharInfoLen;
|
||||
BOOL bFlag;
|
||||
CHAR_INFO CharInfo[IMEDISPLAY_MAX_X];
|
||||
} IMEDISPLAY, *PIMEDISPLAY; // 0x288
|
||||
|
||||
// Keyboard layout info
|
||||
typedef struct tagKLINFO
|
||||
{
|
||||
HKL hKL;
|
||||
DWORD dwConversion;
|
||||
} KLINFO, *PKLINFO;
|
||||
|
||||
// Flags for KLINFO.dwConversion
|
||||
#define _IME_CMODE_OPEN 0x20000000
|
||||
#define _IME_CMODE_DEACTIVATE 0x40000000
|
||||
#define _IME_CMODE_MASK (_IME_CMODE_OPEN | _IME_CMODE_DEACTIVATE)
|
||||
|
||||
#define MAX_CANDLIST 32
|
||||
#define MAX_ATTR_COLORS 8
|
||||
|
||||
// IME composition string info
|
||||
typedef struct tagCOMPSTRINFO
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwCompAttrLen;
|
||||
DWORD dwCompAttrOffset;
|
||||
DWORD dwCompStrLen;
|
||||
DWORD dwCompStrOffset;
|
||||
DWORD dwResultStrLen;
|
||||
DWORD dwResultStrOffset;
|
||||
WORD awAttrColor[MAX_ATTR_COLORS];
|
||||
} COMPSTRINFO, *PCOMPSTRINFO;
|
||||
|
||||
// IME candidate info
|
||||
typedef struct tagCANDINFO
|
||||
{
|
||||
DWORD dwAttrsOffset;
|
||||
WCHAR szCandStr[ANYSIZE_ARRAY];
|
||||
} CANDINFO, *PCANDINFO;
|
||||
|
||||
// Console entry
|
||||
typedef struct tagCONENTRY
|
||||
{
|
||||
HANDLE hConsole;
|
||||
HWND hwndConsole;
|
||||
COORD ScreenSize;
|
||||
HKL hKL;
|
||||
HIMC hOldIMC;
|
||||
HIMC hNewIMC;
|
||||
BOOL bOpened;
|
||||
DWORD dwConversion;
|
||||
DWORD dwSentence;
|
||||
WORD nCodePage;
|
||||
WORD nOutputCodePage;
|
||||
WCHAR szLayoutText[256];
|
||||
WCHAR szMode[10];
|
||||
BOOL bInComposition;
|
||||
PCOMPSTRINFO pCompStr;
|
||||
WORD awAttrColor[MAX_ATTR_COLORS]; // See COMPSTRINFO.awAttrColor
|
||||
BOOL bHasAnyCand;
|
||||
PCANDIDATELIST apCandList[MAX_CANDLIST]; // See acbCandList below
|
||||
PCANDINFO pCandInfo;
|
||||
DWORD dwSystemLineSize;
|
||||
DWORD acbCandList[MAX_CANDLIST]; // See apCandList above
|
||||
DWORD dwCandOffset;
|
||||
DWORD dwCandIndexMax;
|
||||
PDWORD pdwCandPageStart;
|
||||
DWORD cbCandPageData;
|
||||
BOOL bSkipPageMsg;
|
||||
DWORD dwImeProp;
|
||||
BOOL bConsoleEnabled;
|
||||
BOOL bWndEnabled;
|
||||
INT cKLs;
|
||||
PKLINFO pKLInfo;
|
||||
} CONENTRY, *PCONENTRY;
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* PROJECT: ReactOS Console IME
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: Implementing Console IME Input for Far-East Asian
|
||||
* COPYRIGHT: Copyright 2026 Katayama Hirofumi MZ <[email protected]>
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
#include <windef.h>
|
||||
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "Console IME"
|
||||
#define REACTOS_STR_INTERNAL_NAME "conime"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "conime.exe"
|
||||
#define REACTOS_STR_ORIGINAL_COPYRIGHT "(C) 2026 Katayama Hirofumi MZ"
|
||||
#include <reactos/version.rc>
|
||||
|
||||
#pragma code_page(65001) // UTF-8
|
||||
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
||||
IDI_MAINICON ICON "res/Icon_2.ico"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64"
|
||||
height="64"
|
||||
viewBox="0 0 16.933333 16.933333"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
|
||||
sodipodi:docname="conime.svg"
|
||||
inkscape:export-filename="conime.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="1.1767058"
|
||||
inkscape:cx="259.19817"
|
||||
inkscape:cy="12.322536"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showguides="false" />
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.24089;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
id="rect1"
|
||||
width="16.933332"
|
||||
height="16.933332"
|
||||
x="-7.7715612e-16"
|
||||
y="-2.553513e-15" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:6.35px;line-height:1.15;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
|
||||
x="8.5682659"
|
||||
y="6.9613204"
|
||||
id="text1"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:6.35px;line-height:1.15;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';text-align:center;text-anchor:middle;fill:#ffff00;stroke-width:0.264583"
|
||||
x="8.5682659"
|
||||
y="6.9613204">CON</tspan><tspan
|
||||
sodipodi:role="line"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:6.35px;line-height:1.15;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';text-align:center;text-anchor:middle;fill:#ffff00;stroke-width:0.264583"
|
||||
x="8.5682659"
|
||||
y="14.575763"
|
||||
id="tspan2">IME</tspan></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* PROJECT: ReactOS Console IME
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: Implementing Console IME Input for Far-East Asian
|
||||
* COPYRIGHT: Copyright 2026 Katayama Hirofumi MZ <[email protected]>
|
||||
*/
|
||||
|
||||
#define IDI_MAINICON 2
|
||||
@@ -616,6 +616,7 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping",,0x00000012
|
||||
|
||||
; Global Console settings
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console",,0x00000012
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console","EnableConImeOnSystemProcess",0x00010003,0
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\Nls","00000409",2,""
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont","0",2,"Lucida Console"
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ extern "C" {
|
||||
#define IMS_IMEACTIVATE 0x17
|
||||
#define IMS_IMEDEACTIVATE 0x18
|
||||
#define IMS_ACTIVATELAYOUT 0x19
|
||||
#define IMS_CONSOLEIME_1A 0x1A /* Undocumented console IME WM_IME_SYSTEM subcommand (0x1A), used internally by conime for Windows compatibility. */
|
||||
#define IMS_CONSOLEIME_1B 0x1B /* Undocumented console IME WM_IME_SYSTEM subcommand (0x1B), used internally by conime for Windows compatibility. */
|
||||
#define IMS_GETIMEMENU 0x1C
|
||||
#define IMS_IMEMENUITEMSELECTED 0x1D
|
||||
#define IMS_GETCONTEXT 0x1E
|
||||
@@ -288,6 +290,14 @@ ImmSystemHandler(
|
||||
_Inout_opt_ WPARAM wParam,
|
||||
_Inout_opt_ LPARAM lParam);
|
||||
|
||||
DWORD WINAPI
|
||||
ImmCallImeConsoleIME(
|
||||
_In_ HWND hWnd,
|
||||
_In_ UINT uMsg,
|
||||
_In_ WPARAM wParam,
|
||||
_In_ LPARAM lParam,
|
||||
_Out_ LPUINT puVK);
|
||||
|
||||
BOOL WINAPI ImmIMPGetIMEA(_In_opt_ HWND hWnd, _Out_ LPIMEPROA pImePro);
|
||||
BOOL WINAPI ImmIMPGetIMEW(_In_opt_ HWND hWnd, _Out_ LPIMEPROW pImePro);
|
||||
BOOL WINAPI ImmIMPQueryIMEA(_Inout_ LPIMEPROA pImePro);
|
||||
|
||||
Reference in New Issue
Block a user