aboutsummaryrefslogtreecommitdiffstats
path: root/src/platform/linux
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2016-02-10 18:33:13 +0100
committertomaka <pierre.krieger1708@gmail.com>2016-02-10 18:33:13 +0100
commitc6c9ef4fca1e235572e34a6976df2482a14aae87 (patch)
tree6a16b4f7559cfb4504b7993df1a0d55632499c5e /src/platform/linux
parent86dd75f7e9b6078919387c356bca7dd1738d5777 (diff)
parentec76d991adc3522512f07935f78569dc4a9d089b (diff)
downloadglutin-c6c9ef4fca1e235572e34a6976df2482a14aae87.tar.gz
glutin-c6c9ef4fca1e235572e34a6976df2482a14aae87.zip
Merge pull request #702 from tomaka/platform-specific
Unlocks platform-specific attributes
Diffstat (limited to 'src/platform/linux')
-rw-r--r--src/platform/linux/api_dispatch.rs6
-rw-r--r--src/platform/linux/mod.rs8
2 files changed, 12 insertions, 2 deletions
diff --git a/src/platform/linux/api_dispatch.rs b/src/platform/linux/api_dispatch.rs
index 2373770..2e135e2 100644
--- a/src/platform/linux/api_dispatch.rs
+++ b/src/platform/linux/api_dispatch.rs
@@ -22,6 +22,9 @@ use api::x11::XConnection;
use api::x11::XError;
use api::x11::XNotSupported;
+#[derive(Default)]
+pub struct PlatformSpecificWindowBuilderAttributes;
+
enum Backend {
X(Arc<XConnection>),
Wayland,
@@ -172,7 +175,8 @@ impl<'a> Iterator for WaitEventsIterator<'a> {
impl Window {
#[inline]
pub fn new(window: &WindowAttributes, pf_reqs: &PixelFormatRequirements,
- opengl: &GlAttributes<&Window>) -> Result<Window, CreationError>
+ opengl: &GlAttributes<&Window>, _: &PlatformSpecificWindowBuilderAttributes)
+ -> Result<Window, CreationError>
{
match *BACKEND {
Backend::Wayland => {
diff --git a/src/platform/linux/mod.rs b/src/platform/linux/mod.rs
index d010a89..9a9eb3f 100644
--- a/src/platform/linux/mod.rs
+++ b/src/platform/linux/mod.rs
@@ -12,13 +12,19 @@ use api::osmesa::{self, OsMesaContext};
pub use self::api_dispatch::{Window, WindowProxy, MonitorId, get_available_monitors, get_primary_monitor};
pub use self::api_dispatch::{WaitEventsIterator, PollEventsIterator};
+pub use self::api_dispatch::PlatformSpecificWindowBuilderAttributes;
mod api_dispatch;
+#[derive(Default)]
+pub struct PlatformSpecificHeadlessBuilderAttributes;
+
pub struct HeadlessContext(OsMesaContext);
impl HeadlessContext {
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);