Rename UI bridge
This commit is contained in:
parent
db902ab425
commit
68fd2fccc1
|
@ -331,7 +331,7 @@ LRESULT CALLBACK notification_worker_procedure(HWND window, unsigned int msg, WP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t initialize_notification(wchar_t * icon_path) {
|
int32_t initialize_ui(wchar_t * icon_path) {
|
||||||
g_espanso_icon = (HBITMAP)LoadImage(NULL, icon_path, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
|
g_espanso_icon = (HBITMAP)LoadImage(NULL, icon_path, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
|
||||||
|
|
||||||
SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);
|
SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);
|
||||||
|
|
|
@ -59,7 +59,7 @@ extern "C" int32_t get_active_window_executable(wchar_t * buffer, int32_t size);
|
||||||
/*
|
/*
|
||||||
* Initialize the notification window.
|
* Initialize the notification window.
|
||||||
*/
|
*/
|
||||||
extern "C" int32_t initialize_notification(wchar_t * icon_path);
|
extern "C" int32_t initialize_ui(wchar_t * icon_path);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show a window containing the notification.
|
* Show a window containing the notification.
|
||||||
|
|
|
@ -8,7 +8,7 @@ extern {
|
||||||
pub fn get_active_window_executable(buffer: *mut u16, size: i32) -> i32;
|
pub fn get_active_window_executable(buffer: *mut u16, size: i32) -> i32;
|
||||||
|
|
||||||
// UI
|
// UI
|
||||||
pub fn initialize_notification(icon_path: *const u16) -> i32;
|
pub fn initialize_ui(icon_path: *const u16) -> i32;
|
||||||
pub fn show_notification(message: *const u16) -> i32;
|
pub fn show_notification(message: *const u16) -> i32;
|
||||||
pub fn close_notification();
|
pub fn close_notification();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use crate::bridge::windows::{show_notification, close_notification, initialize_notification};
|
use crate::bridge::windows::{show_notification, close_notification, initialize_ui};
|
||||||
use widestring::U16CString;
|
use widestring::U16CString;
|
||||||
use std::{fs, thread, time};
|
use std::{fs, thread, time};
|
||||||
use log::{info, debug};
|
use log::{info, debug};
|
||||||
|
@ -69,7 +69,7 @@ impl WindowsUIManager {
|
||||||
|
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
unsafe {
|
unsafe {
|
||||||
initialize_notification(icon_file_c.as_ptr());
|
initialize_ui(icon_file_c.as_ptr());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user