pub fn new(display: Option<&Display>) -> Result<Context, glib::Error> {
        unsafe {
            let mut error = ptr::null_mut();
            let ret = ffi::cogl_context_new(display.to_glib_none().0, &mut error);
            if error.is_null() {
                Ok(from_glib_full(ret))
            } else {
                Err(from_glib_full(error))
            }
        }
    }
/// Creates a new `Context` which acts as an application sandbox
/// for any state objects that are allocated.
/// ## `display`
/// A `Display` pointer
///
/// # Returns
///
/// A newly allocated `Context`
Creates a new `Context` which acts as an application sandbox
for any state objects that are allocated.
Creates a new ` Context ` which acts as an application sandbox for any state objects that are allocated .
pub fn new(display: Option<&Display>) -> Result<Context, glib::Error> {
        unsafe {
            let mut error = ptr::null_mut();
            let ret = ffi::cogl_context_new(display.to_glib_none().0, &mut error);
            if error.is_null() {
                Ok(from_glib_full(ret))
            } else {
                Err(from_glib_full(error))
            }
        }
    }
pub fn new ( display : Option < & Display > ) -> Result < Context , glib :: Error > { unsafe { let mut error = ptr :: null_mut ( ) ; let ret = ffi :: cogl_context_new ( display . to_glib_none ( ) . 0 , & mut error ) ; if error . is_null ( ) { Ok ( from_glib_full ( ret ) ) } else { Err ( from_glib_full ( error ) ) } } }
Creates a new `Context` which acts as an application sandbox
for any state objects that are allocated.
Creates a new ` Context ` which acts as an application sandbox for any state objects that are allocated .
display
Option<&Display>
A newly allocated `Context`
A newly allocated ` Context `
display
Option<&Display>
`display`
A `Display` pointer
A ` Display ` pointer