Rename EventsLoop and associated types to EventLoop

This commit is contained in:
Osspial
2018-07-12 22:04:38 -04:00
parent 30aa5a5057
commit 529c08555f
38 changed files with 246 additions and 247 deletions

View File

@@ -26,19 +26,19 @@ use CreationError::OsError;
use events::{Touch, TouchPhase};
use window::MonitorId as RootMonitorId;
pub struct EventsLoop {
pub struct EventLoop {
event_rx: Receiver<android_glue::Event>,
suspend_callback: RefCell<Option<Box<Fn(bool) -> ()>>>,
}
#[derive(Clone)]
pub struct EventsLoopProxy;
pub struct EventLoopProxy;
impl EventsLoop {
pub fn new() -> EventsLoop {
impl EventLoop {
pub fn new() -> EventLoop {
let (tx, rx) = channel();
android_glue::add_sender(tx);
EventsLoop {
EventLoop {
event_rx: rx,
suspend_callback: Default::default(),
}
@@ -155,13 +155,13 @@ impl EventsLoop {
}
}
pub fn create_proxy(&self) -> EventsLoopProxy {
EventsLoopProxy
pub fn create_proxy(&self) -> EventLoopProxy {
EventLoopProxy
}
}
impl EventsLoopProxy {
pub fn wakeup(&self) -> Result<(), ::EventsLoopClosed> {
impl EventLoopProxy {
pub fn wakeup(&self) -> Result<(), ::EventLoopClosed> {
android_glue::wake_event_loop();
Ok(())
}
@@ -236,7 +236,7 @@ pub struct PlatformSpecificWindowBuilderAttributes;
pub struct PlatformSpecificHeadlessBuilderAttributes;
impl Window {
pub fn new(_: &EventsLoop, win_attribs: WindowAttributes,
pub fn new(_: &EventLoop, win_attribs: WindowAttributes,
_: PlatformSpecificWindowBuilderAttributes)
-> Result<Window, CreationError>
{