windows: Rename some constants and functions in GPUI (#23348)
This PR renames the constants and functions previously introduced in PR#23283. Since the changes are within the GPUI crate, I renamed these from `**_ZED_**` to `**_GPUI_**`. Release Notes: - N/A
This commit is contained in:
parent
ac8220bb2e
commit
1d5499bee7
3 changed files with 15 additions and 13 deletions
|
@ -184,14 +184,15 @@ impl WindowsPlatform {
|
|||
}
|
||||
}
|
||||
|
||||
// Returns true if the app should quit.
|
||||
fn handle_events(&self) -> bool {
|
||||
let mut msg = MSG::default();
|
||||
unsafe {
|
||||
while PeekMessageW(&mut msg, None, 0, 0, PM_REMOVE).as_bool() {
|
||||
match msg.message {
|
||||
WM_QUIT => return true,
|
||||
WM_ZED_CLOSE_ONE_WINDOW | WM_ZED_EVENT_DISPATCHED_ON_MAIN_THREAD => {
|
||||
if self.handle_zed_evnets(msg.message, msg.wParam, msg.lParam, &msg) {
|
||||
WM_GPUI_CLOSE_ONE_WINDOW | WM_GPUI_TASK_DISPATCHED_ON_MAIN_THREAD => {
|
||||
if self.handle_gpui_evnets(msg.message, msg.wParam, msg.lParam, &msg) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +208,8 @@ impl WindowsPlatform {
|
|||
false
|
||||
}
|
||||
|
||||
fn handle_zed_evnets(
|
||||
// Returns true if the app should quit.
|
||||
fn handle_gpui_evnets(
|
||||
&self,
|
||||
message: u32,
|
||||
wparam: WPARAM,
|
||||
|
@ -219,12 +221,12 @@ impl WindowsPlatform {
|
|||
return false;
|
||||
}
|
||||
match message {
|
||||
WM_ZED_CLOSE_ONE_WINDOW => {
|
||||
WM_GPUI_CLOSE_ONE_WINDOW => {
|
||||
if self.close_one_window(HWND(lparam.0 as _)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
WM_ZED_EVENT_DISPATCHED_ON_MAIN_THREAD => self.run_foreground_task(),
|
||||
WM_GPUI_TASK_DISPATCHED_ON_MAIN_THREAD => self.run_foreground_task(),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
false
|
||||
|
@ -506,7 +508,7 @@ impl Platform for WindowsPlatform {
|
|||
let mut lock = self.state.borrow_mut();
|
||||
if lock.current_cursor.0 != hcursor.0 {
|
||||
self.post_message(
|
||||
WM_ZED_CURSOR_STYLE_CHANGED,
|
||||
WM_GPUI_CURSOR_STYLE_CHANGED,
|
||||
WPARAM(0),
|
||||
LPARAM(hcursor.0 as isize),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue