Unify WindowBuilder and HeadlessRendererBuilder for easier implementations
This commit is contained in:
parent
fb42768a14
commit
b9710f05a9
8 changed files with 76 additions and 61 deletions
|
|
@ -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()
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue