Rename WindowEvent::Refresh to WindowEvent::Redraw

This commit is contained in:
Osspial
2018-07-12 22:13:07 -04:00
parent 529c08555f
commit 64b8a9c6a5
5 changed files with 6 additions and 6 deletions

View File

@@ -91,7 +91,7 @@ pub enum WindowEvent {
AxisMotion { device_id: DeviceId, axis: AxisId, value: f64 },
/// The window needs to be redrawn.
Refresh,
Redraw,
/// Touch event has been received
Touch(Touch),

View File

@@ -116,7 +116,7 @@ impl EventLoop {
// The activity needs to be redrawn.
Some(Event::WindowEvent {
window_id: RootWindowId(WindowId),
event: WindowEvent::Refresh,
event: WindowEvent::Redraw,
})
}
android_glue::Event::Wake => {

View File

@@ -264,7 +264,7 @@ impl EventLoop {
sink.send_event(::WindowEvent::HiDpiFactorChanged(dpi as f64), wid);
}
if refresh {
sink.send_event(::WindowEvent::Refresh, wid);
sink.send_event(::WindowEvent::Redraw, wid);
}
if closed {
sink.send_event(::WindowEvent::CloseRequested, wid);

View File

@@ -580,7 +580,7 @@ impl EventLoop {
let window = xev.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 => {

View File

@@ -480,10 +480,10 @@ pub unsafe extern "system" fn callback(
},
winuser::WM_PAINT => {
use events::WindowEvent::Refresh;
use events::WindowEvent::Redraw;
send_event(Event::WindowEvent {
window_id: SuperWindowId(WindowId(window)),
event: Refresh,
event: Redraw,
});
winuser::DefWindowProcW(window, msg, wparam, lparam)
},