This commit is contained in:
恍兮惚兮 2025-01-01 21:09:12 +08:00
parent 33b92dba89
commit 972e7346a0
2 changed files with 2 additions and 16 deletions

View File

@ -10,7 +10,7 @@ generate_product_version(
VERSION_MINOR ${VERSION_MINOR}
VERSION_PATCH ${VERSION_PATCH}
)
add_library(winsharedutils MODULE webview2_extra.cpp AreoAcrylic.cpp screenshot.cpp ../implsapi.cpp hwnd.cpp globalmessagelistener.cpp theme.cpp version.cpp otsu.cpp clipboard.cpp lnk.cpp levenshtein.cpp muteprocess.cpp sapi_dll.cpp simplemecab.cpp
add_library(winsharedutils MODULE webview2_extra.cpp AreoAcrylic.cpp screenshot.cpp ../implsapi.cpp hwnd.cpp globalmessagelistener.cpp theme.cpp version.cpp clipboard.cpp lnk.cpp levenshtein.cpp muteprocess.cpp sapi_dll.cpp simplemecab.cpp
applicationloopbackaudio/runer.cpp applicationloopbackaudio/LoopbackCapture.cpp
SimpleBrowser.cpp MWebBrowser.cpp icon.cpp ${versioninfo})
target_precompile_headers(winsharedutils REUSE_FROM pch)

View File

@ -9,17 +9,14 @@ from ctypes import (
c_int,
c_void_p,
cast,
memmove,
create_unicode_buffer,
create_string_buffer,
c_size_t,
windll,
c_double,
c_char,
CFUNCTYPE,
c_long,
)
from ctypes.wintypes import WORD, HWND, DWORD, RECT, UINT, HANDLE
from ctypes.wintypes import WORD, HWND, DWORD, RECT, HANDLE
import gobject, windows, functools
utilsdll = CDLL(gobject.GetDllpath(("winsharedutils32.dll", "winsharedutils64.dll")))
@ -174,17 +171,6 @@ def GetLnkTargetPath(lnk):
return exe.value, arg.value, icon.value, dirp.value
_otsu_binary = utilsdll.otsu_binary
_otsu_binary.argtypes = c_void_p, c_int
def otsu_binary(image, thresh):
buf = create_string_buffer(len(image))
memmove(buf, image, len(image))
_otsu_binary(buf, thresh)
return buf
_extracticon2data = utilsdll.extracticon2data
_extracticon2data.argtypes = c_wchar_p, c_void_p
_extracticon2data.restype = c_bool