mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-13 07:33:53 +08:00
.
This commit is contained in:
parent
33b92dba89
commit
972e7346a0
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user