Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove api_transition macro #279

Merged
merged 3 commits into from
Sep 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 0 additions & 144 deletions src/api_transition.rs

This file was deleted.

5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ extern crate wayland_client;
pub use events::*;
pub use window::{AvailableMonitorsIter, MonitorId};

#[macro_use]
mod api_transition;

mod platform;
mod events;
mod window;
Expand All @@ -144,7 +141,7 @@ pub mod os;
/// });
/// ```
pub struct Window {
window: platform::Window2,
window: platform::Window,
}

/// Identifier of a window. Unique for each window.
Expand Down
2 changes: 1 addition & 1 deletion src/os/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use EventsLoop;
use MonitorId;
use Window;
use platform::EventsLoop as LinuxEventsLoop;
use platform::Window2 as LinuxWindow;
use platform::Window as LinuxWindow;
use WindowBuilder;
use platform::x11::XConnection;
use platform::x11::ffi::XVisualInfo;
Expand Down
12 changes: 6 additions & 6 deletions src/platform/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub struct WindowId;
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DeviceId;

pub struct Window2 {
pub struct Window {
native_window: *const c_void,
}

Expand All @@ -159,10 +159,10 @@ pub struct PlatformSpecificWindowBuilderAttributes;
#[derive(Clone, Default)]
pub struct PlatformSpecificHeadlessBuilderAttributes;

impl Window2 {
impl Window {
pub fn new(_: &EventsLoop, win_attribs: &WindowAttributes,
_: &PlatformSpecificWindowBuilderAttributes)
-> Result<Window2, CreationError>
-> Result<Window, CreationError>
{
// not implemented
assert!(win_attribs.min_dimensions.is_none());
Expand All @@ -175,7 +175,7 @@ impl Window2 {

android_glue::set_multitouch(win_attribs.multitouch);

Ok(Window2 {
Ok(Window {
native_window: native_window as *const _,
})
}
Expand Down Expand Up @@ -269,8 +269,8 @@ impl Window2 {
}
}

unsafe impl Send for Window2 {}
unsafe impl Sync for Window2 {}
unsafe impl Send for Window {}
unsafe impl Sync for Window {}

// Constant device ID, to be removed when this backend is updated to report real device IDs.
const DEVICE_ID: ::DeviceId = ::DeviceId(DeviceId);
8 changes: 4 additions & 4 deletions src/platform/ios/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static mut jmpbuf: [c_int;27] = [0;27];
#[derive(Clone)]
pub struct MonitorId;

pub struct Window2 {
pub struct Window {
delegate_state: *mut DelegateState
}

Expand Down Expand Up @@ -258,11 +258,11 @@ pub struct DeviceId;
#[derive(Clone, Default)]
pub struct PlatformSpecificWindowBuilderAttributes;

impl Window2 {
impl Window {
pub fn new(ev: &EventsLoop, _: &WindowAttributes, _: &PlatformSpecificWindowBuilderAttributes)
-> Result<Window2, CreationError>
-> Result<Window, CreationError>
{
Ok(Window2 {
Ok(Window {
delegate_state: ev.delegate_state,
})
}
Expand Down
Loading