pub fn new(
        context: &Context,
        pixmap: u32,
        automatic_updates: bool,
    ) -> Result<TexturePixmapX11, glib::Error> {
        unsafe {
            let mut error = ptr::null_mut();
            let ret = ffi::cogl_texture_pixmap_x11_new(
                context.to_glib_none().0,
                pixmap,
                automatic_updates as i32,
                &mut error,
            );
            if error.is_null() {
                Ok(from_glib_full(ret))
            } else {
                Err(from_glib_full(error))
            }
        }
    }
/// Creates a texture that contains the contents of `pixmap`. If
/// `automatic_updates` is `true` then Cogl will attempt to listen for
/// damage events on the pixmap and automatically update the texture
/// when it changes.
/// ## `context`
/// A `Context`
/// ## `pixmap`
/// A X11 pixmap ID
/// ## `automatic_updates`
/// Whether to automatically copy the contents of
/// the pixmap to the texture.
///
/// # Returns
///
/// a new `TexturePixmapX11` instance
Creates a texture that contains the contents of `pixmap`. If
`automatic_updates` is `true` then Cogl will attempt to listen for
damage events on the pixmap and automatically update the texture
when it changes.
Creates a texture that contains the contents of ` pixmap ` . If ` automatic_updates ` is ` true ` then Cogl will attempt to listen for damage events on the pixmap and automatically update the texture when it changes .
pub fn new(
        context: &Context,
        pixmap: u32,
        automatic_updates: bool,
    ) -> Result<TexturePixmapX11, glib::Error> {
        unsafe {
            let mut error = ptr::null_mut();
            let ret = ffi::cogl_texture_pixmap_x11_new(
                context.to_glib_none().0,
                pixmap,
                automatic_updates as i32,
                &mut error,
            );
            if error.is_null() {
                Ok(from_glib_full(ret))
            } else {
                Err(from_glib_full(error))
            }
        }
    }
pub fn new ( context : & Context , pixmap : u32 , automatic_updates : bool , ) -> Result < TexturePixmapX11 , glib :: Error > { unsafe { let mut error = ptr :: null_mut ( ) ; let ret = ffi :: cogl_texture_pixmap_x11_new ( context . to_glib_none ( ) . 0 , pixmap , automatic_updates as i32 , & mut error , ) ; if error . is_null ( ) { Ok ( from_glib_full ( ret ) ) } else { Err ( from_glib_full ( error ) ) } } }
Creates a texture that contains the contents of `pixmap`.
Creates a texture that contains the contents of ` pixmap ` .
context
&Context
pixmap
u32
automatic_updates
bool
a new `TexturePixmapX11` instance
a new ` TexturePixmapX11 ` instance
context
&Context
pixmap
u32
automatic_updates
bool
`context`
None
`pixmap`
A X11 pixmap ID
A X11 pixmap ID
`automatic_updates`
Whether to automatically copy the contents of
the pixmap to the texture.
Whether to automatically copy the contents of the pixmap to the texture .