Skip to content

Commit

Permalink
feat: add get_process_id tauri api
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed May 1, 2024
1 parent de9b3a4 commit 5faaaed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

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

6 changes: 5 additions & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ fn _get_window_labels(app: tauri::AppHandle) -> Vec<String> {
.collect()
}

#[tauri::command]
fn get_process_id() -> u32 {
std::process::id()
}

#[tauri::command]
fn _get_clipboard_files() -> Option<Vec<String>> {
Expand Down Expand Up @@ -336,7 +340,7 @@ fn main() {
}))
.on_window_event(|event| process_window_event(&event))
.invoke_handler(tauri::generate_handler![
get_mac_deep_link_requests,
get_mac_deep_link_requests, get_process_id,
toggle_devtools, console_log, console_error, _get_commandline_args, get_current_working_dir,
_get_window_labels,
put_item, get_item, get_all_items, delete_item,
Expand Down

0 comments on commit 5faaaed

Please sign in to comment.