-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use 9-patch bitmap to draw candidate window
- Loading branch information
Showing
14 changed files
with
498 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,71 @@ | ||
project(libIME) | ||
find_package(Corrosion QUIET) | ||
if(NOT Corrosion_FOUND) | ||
FetchContent_Declare( | ||
Corrosion | ||
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git | ||
GIT_TAG 64289b1d79d6d19cd2e241db515381a086bb8407 # v0.5 | ||
FIND_PACKAGE_ARGS | ||
) | ||
FetchContent_MakeAvailable(Corrosion) | ||
endif() | ||
|
||
corrosion_import_crate(MANIFEST_PATH ../rustlib/Cargo.toml CRATES rustlib CRATE_TYPES staticlib) | ||
# corrosion_set_env_vars(rustlib "CFLAGS=-MDd" "CXXFLAGS=-MDd") | ||
corrosion_add_cxxbridge(rustlib_bridge | ||
CRATE rustlib | ||
FILES lib.rs | ||
) | ||
|
||
add_library(libIME_static STATIC | ||
# Core TSF part | ||
${PROJECT_SOURCE_DIR}/ImeModule.cpp | ||
${PROJECT_SOURCE_DIR}/ImeModule.h | ||
${PROJECT_SOURCE_DIR}/libIME.cpp | ||
${PROJECT_SOURCE_DIR}/libIME.h | ||
${PROJECT_SOURCE_DIR}/TextService.cpp | ||
${PROJECT_SOURCE_DIR}/TextService.h | ||
${PROJECT_SOURCE_DIR}/KeyEvent.cpp | ||
${PROJECT_SOURCE_DIR}/KeyEvent.h | ||
${PROJECT_SOURCE_DIR}/EditSession.cpp | ||
${PROJECT_SOURCE_DIR}/EditSession.h | ||
${PROJECT_SOURCE_DIR}/DisplayAttributeInfo.cpp | ||
${PROJECT_SOURCE_DIR}/DisplayAttributeInfo.h | ||
${PROJECT_SOURCE_DIR}/DisplayAttributeInfoEnum.cpp | ||
${PROJECT_SOURCE_DIR}/DisplayAttributeInfoEnum.h | ||
${PROJECT_SOURCE_DIR}/DisplayAttributeProvider.cpp | ||
${PROJECT_SOURCE_DIR}/DisplayAttributeProvider.h | ||
${PROJECT_SOURCE_DIR}/LangBarButton.cpp | ||
${PROJECT_SOURCE_DIR}/LangBarButton.h | ||
${PROJECT_SOURCE_DIR}/Utils.cpp | ||
${PROJECT_SOURCE_DIR}/Utils.h | ||
${PROJECT_SOURCE_DIR}/ComPtr.h | ||
${PROJECT_SOURCE_DIR}/WindowsVersion.h | ||
ImeModule.cpp | ||
ImeModule.h | ||
libIME.cpp | ||
libIME.h | ||
TextService.cpp | ||
TextService.h | ||
KeyEvent.cpp | ||
KeyEvent.h | ||
EditSession.cpp | ||
EditSession.h | ||
DisplayAttributeInfo.cpp | ||
DisplayAttributeInfo.h | ||
DisplayAttributeInfoEnum.cpp | ||
DisplayAttributeInfoEnum.h | ||
DisplayAttributeProvider.cpp | ||
DisplayAttributeProvider.h | ||
LangBarButton.cpp | ||
LangBarButton.h | ||
Utils.cpp | ||
Utils.h | ||
ComPtr.h | ||
WindowsVersion.h | ||
# GUI-related code | ||
${PROJECT_SOURCE_DIR}/DrawUtils.h | ||
${PROJECT_SOURCE_DIR}/DrawUtils.cpp | ||
${PROJECT_SOURCE_DIR}/Window.cpp | ||
${PROJECT_SOURCE_DIR}/Window.h | ||
${PROJECT_SOURCE_DIR}/ImeWindow.cpp | ||
${PROJECT_SOURCE_DIR}/ImeWindow.h | ||
${PROJECT_SOURCE_DIR}/MessageWindow.cpp | ||
${PROJECT_SOURCE_DIR}/MessageWindow.h | ||
${PROJECT_SOURCE_DIR}/CandidateWindow.h | ||
${PROJECT_SOURCE_DIR}/CandidateWindow.cpp | ||
DrawUtils.h | ||
DrawUtils.cpp | ||
Window.cpp | ||
Window.h | ||
ImeWindow.cpp | ||
ImeWindow.h | ||
MessageWindow.cpp | ||
MessageWindow.h | ||
CandidateWindow.h | ||
CandidateWindow.cpp | ||
NinePatch.h | ||
NinePatch.cpp | ||
) | ||
|
||
target_compile_features(libIME_static PUBLIC cxx_std_17) | ||
|
||
target_link_libraries(libIME_static | ||
PUBLIC rustlib_bridge | ||
PUBLIC shlwapi.lib | ||
PUBLIC d2d1.lib | ||
PUBLIC d3d11.lib | ||
PUBLIC dwrite.lib | ||
PUBLIC dcomp.lib | ||
) | ||
set_target_properties(rustlib_bridge PROPERTIES | ||
MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") | ||
set_target_properties(libIME_static PROPERTIES | ||
MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.