Unify WindowBuilder and HeadlessRendererBuilder for easier implementations

This commit is contained in:
Pierre Krieger 2014-12-28 15:08:41 +01:00
parent fb42768a14
commit b9710f05a9
8 changed files with 76 additions and 61 deletions

View file

@ -1,4 +1,4 @@
use {Event, WindowBuilder};
use {Event, BuilderAttribs};
use CreationError;
use CreationError::OsError;
use libc;
@ -89,7 +89,7 @@ pub struct Window {
}
impl Window {
pub fn new(builder: WindowBuilder) -> Result<Window, CreationError> {
pub fn new(builder: BuilderAttribs) -> Result<Window, CreationError> {
ensure_thread_init();
let dimensions = builder.dimensions.unwrap_or((800, 600));
@ -308,7 +308,7 @@ impl Window {
});
let share = if let Some(win) = builder.sharing {
win.window.x.context
win.x.context
} else {
ptr::null()
};