mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-09 02:15:32 +00:00
fix(windows): restore endpoints for interface stability
Fixes #5245. Interfaces should remain stable between versions of Keyman, so that an upgraded kmcomapi.dll or keyman32.dll will not crash older clients, even if they may not behave entirely as expected.
This commit is contained in:
parent
f62309dedf
commit
cda2272ccb
4 changed files with 51 additions and 10 deletions
|
|
@ -23,13 +23,14 @@ EXPORTS
|
|||
GetKeyboardPreservedKeys
|
||||
|
||||
GetActiveKeymanID
|
||||
Keyman_RegisterControllerThread
|
||||
Keyman_UnregisterControllerThread
|
||||
Keyman_RegisterControllerWindow
|
||||
Keyman_UnregisterControllerWindow
|
||||
Keyman_RegisterMasterController
|
||||
Keyman_UnregisterMasterController
|
||||
Keyman_RestartEngine
|
||||
|
||||
Keyman_SendMasterController
|
||||
Keyman_PostControllers
|
||||
Keyman_PostMasterController
|
||||
|
||||
Keyman_StartExit
|
||||
|
|
@ -40,3 +41,6 @@ EXPORTS
|
|||
Keyman_UpdateTouchPanelVisibility
|
||||
|
||||
Keyman_Diagnostic
|
||||
|
||||
Keyman_RegisterControllerThread
|
||||
Keyman_UnregisterControllerThread
|
||||
|
|
|
|||
|
|
@ -551,6 +551,12 @@ LRESULT Globals::SendMasterController(UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
return dwResult;
|
||||
}
|
||||
|
||||
extern "C" void _declspec(dllexport) WINAPI Keyman_PostControllers(UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// no-op (removed as part of #5060)
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void _declspec(dllexport) WINAPI Keyman_PostMasterController(UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
Globals::PostMasterController(msg, wParam, lParam);
|
||||
|
|
@ -561,6 +567,12 @@ extern "C" LRESULT _declspec(dllexport) WINAPI Keyman_SendMasterController(UINT
|
|||
return Globals::SendMasterController(msg, wParam, lParam);
|
||||
}
|
||||
|
||||
extern "C" BOOL _declspec(dllexport) WINAPI Keyman_RegisterControllerWindow(HWND hwnd)
|
||||
{
|
||||
// no-op (removed as part of #5060)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
extern "C" BOOL _declspec(dllexport) WINAPI Keyman_RegisterControllerThread(DWORD tid)
|
||||
{
|
||||
if(!Globals::Lock())
|
||||
|
|
@ -599,6 +611,12 @@ extern "C" BOOL _declspec(dllexport) WINAPI Keyman_RegisterMasterController(HWN
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
extern "C" BOOL _declspec(dllexport) WINAPI Keyman_UnregisterControllerWindow(HWND hwnd)
|
||||
{
|
||||
// no-op (removed as part of #5060)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
extern "C" BOOL _declspec(dllexport) WINAPI Keyman_UnregisterControllerThread(DWORD tid)
|
||||
{
|
||||
if(!Globals::Lock()) return FALSE;
|
||||
|
|
|
|||
|
|
@ -143,10 +143,8 @@ type
|
|||
procedure StartKeyman32Engine; safecall; // 32 bit only
|
||||
procedure StopKeyman32Engine; safecall; // 32 bit only
|
||||
procedure ResetKeyman32Engine; safecall; // 32 bit only
|
||||
procedure RegisterMasterController(Value: LongWord); safecall; // 32 bit only
|
||||
procedure UnregisterMasterController(Value: LongWord); safecall; // 32 bit only
|
||||
procedure RegisterControllerThread(Value: LongWord); safecall; // 32 bit only
|
||||
procedure UnregisterControllerThread(Value: LongWord); safecall; // 32 bit only
|
||||
procedure RegisterControllerWindow(Value: LongWord); safecall; // deprecated in #5060
|
||||
procedure UnregisterControllerWindow(Value: LongWord); safecall; // deprecated in #5060
|
||||
procedure DisableUserInterface; safecall;
|
||||
procedure EnableUserInterface; safecall;
|
||||
procedure UpdateTouchPanelVisibility(Value: Boolean); safecall;
|
||||
|
|
@ -155,6 +153,12 @@ type
|
|||
|
||||
function LastRefreshToken: IntPtr; safecall;
|
||||
|
||||
// #5060:
|
||||
procedure RegisterMasterController(Value: LongWord); safecall; // 32 bit only
|
||||
procedure UnregisterMasterController(Value: LongWord); safecall; // 32 bit only
|
||||
procedure RegisterControllerThread(Value: LongWord); safecall; // 32 bit only
|
||||
procedure UnregisterControllerThread(Value: LongWord); safecall; // 32 bit only
|
||||
|
||||
{ IIntKeymanControl }
|
||||
procedure AutoApplyKeyman;
|
||||
procedure ApplyKeyman;
|
||||
|
|
@ -533,6 +537,11 @@ begin
|
|||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TKeymanControl.RegisterControllerWindow(Value: LongWord);
|
||||
begin
|
||||
// no-op (removed as part of #5060)
|
||||
end;
|
||||
|
||||
procedure TKeymanControl.RegisterMasterController(Value: LongWord);
|
||||
begin
|
||||
{$IFDEF WIN64}
|
||||
|
|
@ -577,6 +586,11 @@ begin
|
|||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TKeymanControl.UnregisterControllerWindow(Value: LongWord);
|
||||
begin
|
||||
// no-op (removed as part of #5060)
|
||||
end;
|
||||
|
||||
procedure TKeymanControl.UnregisterMasterController(Value: LongWord);
|
||||
begin
|
||||
{$IFDEF WIN64}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,8 @@ type
|
|||
procedure StartKeyman32Engine; safecall; // I5133
|
||||
procedure StopKeyman32Engine; safecall; // I5133
|
||||
procedure ResetKeyman32Engine; safecall; // I5133
|
||||
procedure RegisterMasterController(Value: LongWord); safecall;
|
||||
procedure UnregisterMasterController(Value: LongWord); safecall;
|
||||
procedure RegisterControllerThread(Value: LongWord); safecall;
|
||||
procedure UnregisterControllerThread(Value: LongWord); safecall;
|
||||
procedure RegisterControllerWindow(Value: LongWord); safecall; // deprecated in #5060; remains for interface stability
|
||||
procedure UnregisterControllerWindow(Value: LongWord); safecall; // deprecated in #5060; remains for interface stability
|
||||
procedure DisableUserInterface; safecall;
|
||||
procedure EnableUserInterface; safecall;
|
||||
procedure UpdateTouchPanelVisibility(Value: Boolean); safecall;
|
||||
|
|
@ -38,6 +36,13 @@ type
|
|||
procedure DiagnosticTestException; safecall;
|
||||
|
||||
function LastRefreshToken: IntPtr; safecall;
|
||||
|
||||
// New in #5060:
|
||||
|
||||
procedure RegisterMasterController(Value: LongWord); safecall;
|
||||
procedure UnregisterMasterController(Value: LongWord); safecall;
|
||||
procedure RegisterControllerThread(Value: LongWord); safecall;
|
||||
procedure UnregisterControllerThread(Value: LongWord); safecall;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue