- extension/src/{port,platform,codepage} -> src/; native_render -> src/host
(+ dxt, shaders/); libgr2 -> src/gr2; extension/third_party -> third_party
- extension/tests -> tests/port, libgr2/tests -> tests/gr2
- android-native -> android (build.sh, push-client.sh moved in)
- script -> scripts; tools/40250 -> tools/server; oracle -> tools/granny-oracle;
perf tools -> tools/perf
- all build trees under build/ (native, release, android, port-gate)
- xrender:: CMake aliases -> mt::; port-map ledger impl paths rewritten
No code changes. ctest 15/15, port_gate macos+android PASS, port_map check 0 errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
120 lines
1.9 KiB
C++
120 lines
1.9 KiB
C++
#include "StdAfx.h"
|
|
#include "PythonIME.h"
|
|
#include "AbstractApplication.h"
|
|
|
|
CPythonIME::CPythonIME()
|
|
: CIME()
|
|
{
|
|
ms_pEvent = this;
|
|
}
|
|
|
|
CPythonIME::~CPythonIME()
|
|
{
|
|
Tracen("PythonIME Clear");
|
|
}
|
|
|
|
void CPythonIME::Create(HWND hWnd)
|
|
{
|
|
Initialize(hWnd);
|
|
}
|
|
|
|
void CPythonIME::MoveLeft()
|
|
{
|
|
DecCurPos();
|
|
}
|
|
|
|
void CPythonIME::MoveRight()
|
|
{
|
|
IncCurPos();
|
|
}
|
|
|
|
void CPythonIME::MoveHome()
|
|
{
|
|
ms_curpos = 0;
|
|
}
|
|
|
|
void CPythonIME::MoveEnd()
|
|
{
|
|
ms_curpos = ms_lastpos;
|
|
}
|
|
|
|
void CPythonIME::SetCursorPosition(int iPosition)
|
|
{
|
|
SetCurPos(iPosition);
|
|
}
|
|
|
|
void CPythonIME::Delete()
|
|
{
|
|
DelCurPos();
|
|
}
|
|
|
|
void CPythonIME::OnUpdate()
|
|
{
|
|
IAbstractApplication::GetSingleton().RunIMEUpdate();
|
|
}
|
|
|
|
void CPythonIME::OnTab()
|
|
{
|
|
IAbstractApplication::GetSingleton().RunIMETabEvent();
|
|
}
|
|
|
|
void CPythonIME::OnReturn()
|
|
{
|
|
IAbstractApplication::GetSingleton().RunIMEReturnEvent();
|
|
}
|
|
|
|
void CPythonIME::OnEscape()
|
|
{
|
|
// IAbstractApplication::GetSingleton().RunIMEEscapeEvent();
|
|
}
|
|
|
|
bool CPythonIME::OnWM_CHAR( WPARAM wParam, LPARAM lParam )
|
|
{
|
|
unsigned char c = (unsigned char)(wParam & 0xff); // PORT: functional cast of a two-word type is MSVC-only.
|
|
|
|
switch (c)
|
|
{
|
|
case VK_RETURN:
|
|
OnReturn();
|
|
return true;
|
|
|
|
case VK_TAB:
|
|
if(ms_bCaptureInput == false)
|
|
return 0;
|
|
OnTab();
|
|
return true;
|
|
|
|
case VK_ESCAPE:
|
|
if(ms_bCaptureInput == false)
|
|
return 0;
|
|
OnEscape();
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
void CPythonIME::OnChangeCodePage()
|
|
{
|
|
IAbstractApplication::GetSingleton().RunIMEChangeCodePage();
|
|
}
|
|
|
|
void CPythonIME::OnOpenCandidateList()
|
|
{
|
|
IAbstractApplication::GetSingleton().RunIMEOpenCandidateListEvent();
|
|
}
|
|
|
|
void CPythonIME::OnCloseCandidateList()
|
|
{
|
|
IAbstractApplication::GetSingleton().RunIMECloseCandidateListEvent();
|
|
}
|
|
|
|
void CPythonIME::OnOpenReadingWnd()
|
|
{
|
|
IAbstractApplication::GetSingleton().RunIMEOpenReadingWndEvent();
|
|
}
|
|
|
|
void CPythonIME::OnCloseReadingWnd()
|
|
{
|
|
IAbstractApplication::GetSingleton().RunIMECloseReadingWndEvent();
|
|
}
|