aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/android/mod.rs12
-rw-r--r--src/api/cocoa/headless.rs7
-rw-r--r--src/api/cocoa/mod.rs10
-rw-r--r--src/api/ios/mod.rs6
4 files changed, 28 insertions, 7 deletions
diff --git a/src/api/android/mod.rs b/src/api/android/mod.rs
index f42caeb..433472c 100644
--- a/src/api/android/mod.rs
+++ b/src/api/android/mod.rs
@@ -65,6 +65,11 @@ impl MonitorId {
}
}
+#[derive(Default)]
+pub struct PlatformSpecificWindowBuilderAttributes;
+#[derive(Default)]
+pub struct PlatformSpecificHeadlessBuilderAttributes;
+
pub struct PollEventsIterator<'a> {
window: &'a Window,
}
@@ -116,7 +121,8 @@ impl<'a> Iterator for WaitEventsIterator<'a> {
impl Window {
pub fn new(win_attribs: &WindowAttributes, pf_reqs: &PixelFormatRequirements,
- opengl: &GlAttributes<&Window>) -> Result<Window, CreationError>
+ opengl: &GlAttributes<&Window>, _: &PlatformSpecificWindowBuilderAttributes)
+ -> Result<Window, CreationError>
{
use std::{mem, ptr};
@@ -302,7 +308,9 @@ pub struct HeadlessContext(EglContext);
impl HeadlessContext {
/// See the docs in the crate root file.
pub fn new(dimensions: (u32, u32), pf_reqs: &PixelFormatRequirements,
- opengl: &GlAttributes<&HeadlessContext>) -> Result<HeadlessContext, CreationError>
+ opengl: &GlAttributes<&HeadlessContext>,
+ _: &PlatformSpecificHeadlessBuilderAttributes)
+ -> Result<HeadlessContext, CreationError>
{
let opengl = opengl.clone().map_sharing(|c| &c.0);
let context = try!(EglContext::new(egl::ffi::egl::Egl, pf_reqs, &opengl,
diff --git a/src/api/cocoa/headless.rs b/src/api/cocoa/headless.rs
index 7fe2046..ac6c4e0 100644
--- a/src/api/cocoa/headless.rs
+++ b/src/api/cocoa/headless.rs
@@ -13,6 +13,9 @@ use cocoa::appkit::*;
use PixelFormat;
use api::cocoa::helpers;
+#[derive(Default)]
+pub struct PlatformSpecificHeadlessBuilderAttributes;
+
pub struct HeadlessContext {
width: u32,
height: u32,
@@ -21,7 +24,9 @@ pub struct HeadlessContext {
impl HeadlessContext {
pub fn new((width, height): (u32, u32), pf_reqs: &PixelFormatRequirements,
- opengl: &GlAttributes<&HeadlessContext>) -> Result<HeadlessContext, CreationError>
+ opengl: &GlAttributes<&HeadlessContext>,
+ _: &PlatformSpecificHeadlessBuilderAttributes)
+ -> Result<HeadlessContext, CreationError>
{
let context = unsafe {
diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs
index d35182e..4502405 100644
--- a/src/api/cocoa/mod.rs
+++ b/src/api/cocoa/mod.rs
@@ -1,7 +1,5 @@
#![cfg(target_os = "macos")]
-pub use self::headless::HeadlessContext;
-
use {CreationError, Event, MouseCursor, CursorState};
use CreationError::OsError;
use libc;
@@ -50,6 +48,8 @@ use events::MouseButton;
use events;
pub use self::monitor::{MonitorId, get_available_monitors, get_primary_monitor};
+pub use self::headless::HeadlessContext;
+pub use self::headless::PlatformSpecificHeadlessBuilderAttributes;
mod monitor;
mod event;
@@ -179,6 +179,9 @@ impl Drop for WindowDelegate {
}
}
+#[derive(Default)]
+pub struct PlatformSpecificWindowBuilderAttributes;
+
pub struct Window {
view: IdRef,
window: IdRef,
@@ -264,7 +267,8 @@ impl<'a> Iterator for WaitEventsIterator<'a> {
impl Window {
pub fn new(win_attribs: &WindowAttributes, pf_reqs: &PixelFormatRequirements,
- opengl: &GlAttributes<&Window>) -> Result<Window, CreationError>
+ opengl: &GlAttributes<&Window>, _: &PlatformSpecificWindowBuilderAttributes)
+ -> Result<Window, CreationError>
{
if opengl.sharing.is_some() {
unimplemented!()
diff --git a/src/api/ios/mod.rs b/src/api/ios/mod.rs
index 852d97c..afcc6f4 100644
--- a/src/api/ios/mod.rs
+++ b/src/api/ios/mod.rs
@@ -177,10 +177,14 @@ impl MonitorId {
}
}
+#[derive(Default)]
+pub struct PlatformSpecificWindowBuilderAttributes;
impl Window {
- pub fn new(builder: &WindowAttributes, _: &PixelFormatRequirements, _: &GlAttributes<&Window>) -> Result<Window, CreationError> {
+ pub fn new(builder: &WindowAttributes, _: &PixelFormatRequirements, _: &GlAttributes<&Window>,
+ _: &PlatformSpecificWindowBuilderAttributes) -> Result<Window, CreationError>
+ {
unsafe {
if setjmp(mem::transmute(&mut jmpbuf)) != 0 {
let app: id = msg_send![Class::get("UIApplication").unwrap(), sharedApplication];