Skip to content

Commit

Permalink
准备发布 v0.8.0 版本
Browse files Browse the repository at this point in the history
准备发布 v0.8.0 版本
  • Loading branch information
GuoJikun authored Jan 6, 2025
2 parents e9e13d0 + e754595 commit 8a577a8
Show file tree
Hide file tree
Showing 16 changed files with 256 additions and 127 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quicklook",
"version": "0.7.2",
"version": "0.8.0",
"description": "Windows 平台的文件预览工具",
"private": true,
"type": "module",
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "app"
version = "0.7.2"
version = "0.8.0"
description = "Windows 平台的文件预览工具"
authors = ["GuoJikun <[email protected]>"]
license = ""
Expand Down Expand Up @@ -35,6 +35,7 @@ windows = { version = "0.58.0", features = [
"Win32_System_Ole",
"Win32_System_Registry",
"Win32_Graphics_Gdi",
"Win32_UI_Accessibility",
] }
infer = { version = "0.16.0", features = ["std"] }
tauri-plugin-fs = "2"
Expand All @@ -47,6 +48,7 @@ calamine = "0.26.1"
csv = "1.3.1"
tauri-plugin-sql = { version = "2", features = ["sqlite"] }
docx-rs = "0.4.17"
regex = "1.11.1"

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-autostart = "2"
Expand Down
7 changes: 7 additions & 0 deletions src-tauri/src/helper/win.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,11 @@ pub fn get_default_program_name(path: &str) -> Result<String, String> {
let name = String::from_utf16_lossy(&buffer[..size as usize - 1]);
Ok(name)
}
}

pub fn get_window_text(hwnd: HWND) -> String {
let len = unsafe { WindowsAndMessaging::GetWindowTextLengthW(hwnd) + 1 };
let mut buffer = vec![0u16; len as usize];
let len = unsafe { WindowsAndMessaging::GetWindowTextW(hwnd, &mut buffer) };
String::from_utf16_lossy(&buffer[0..len as usize])
}
Loading

0 comments on commit 8a577a8

Please sign in to comment.