mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
Rename WindowEvent::Refresh to WindowEvent::Redraw
This commit is contained in:
@@ -91,7 +91,7 @@ pub enum WindowEvent {
|
|||||||
AxisMotion { device_id: DeviceId, axis: AxisId, value: f64 },
|
AxisMotion { device_id: DeviceId, axis: AxisId, value: f64 },
|
||||||
|
|
||||||
/// The window needs to be redrawn.
|
/// The window needs to be redrawn.
|
||||||
Refresh,
|
Redraw,
|
||||||
|
|
||||||
/// Touch event has been received
|
/// Touch event has been received
|
||||||
Touch(Touch),
|
Touch(Touch),
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ impl EventLoop {
|
|||||||
// The activity needs to be redrawn.
|
// The activity needs to be redrawn.
|
||||||
Some(Event::WindowEvent {
|
Some(Event::WindowEvent {
|
||||||
window_id: RootWindowId(WindowId),
|
window_id: RootWindowId(WindowId),
|
||||||
event: WindowEvent::Refresh,
|
event: WindowEvent::Redraw,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
android_glue::Event::Wake => {
|
android_glue::Event::Wake => {
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ impl EventLoop {
|
|||||||
sink.send_event(::WindowEvent::HiDpiFactorChanged(dpi as f64), wid);
|
sink.send_event(::WindowEvent::HiDpiFactorChanged(dpi as f64), wid);
|
||||||
}
|
}
|
||||||
if refresh {
|
if refresh {
|
||||||
sink.send_event(::WindowEvent::Refresh, wid);
|
sink.send_event(::WindowEvent::Redraw, wid);
|
||||||
}
|
}
|
||||||
if closed {
|
if closed {
|
||||||
sink.send_event(::WindowEvent::CloseRequested, wid);
|
sink.send_event(::WindowEvent::CloseRequested, wid);
|
||||||
|
|||||||
@@ -580,7 +580,7 @@ impl EventLoop {
|
|||||||
let window = xev.window;
|
let window = xev.window;
|
||||||
let window_id = mkwid(window);
|
let window_id = mkwid(window);
|
||||||
|
|
||||||
callback(Event::WindowEvent { window_id, event: WindowEvent::Refresh });
|
callback(Event::WindowEvent { window_id, event: WindowEvent::Redraw });
|
||||||
}
|
}
|
||||||
|
|
||||||
ffi::KeyPress | ffi::KeyRelease => {
|
ffi::KeyPress | ffi::KeyRelease => {
|
||||||
|
|||||||
@@ -480,10 +480,10 @@ pub unsafe extern "system" fn callback(
|
|||||||
},
|
},
|
||||||
|
|
||||||
winuser::WM_PAINT => {
|
winuser::WM_PAINT => {
|
||||||
use events::WindowEvent::Refresh;
|
use events::WindowEvent::Redraw;
|
||||||
send_event(Event::WindowEvent {
|
send_event(Event::WindowEvent {
|
||||||
window_id: SuperWindowId(WindowId(window)),
|
window_id: SuperWindowId(WindowId(window)),
|
||||||
event: Refresh,
|
event: Redraw,
|
||||||
});
|
});
|
||||||
winuser::DefWindowProcW(window, msg, wparam, lparam)
|
winuser::DefWindowProcW(window, msg, wparam, lparam)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user