pub fn load_theme(name: Option<&str>, size: u32, shm: &WlShm) -> CursorTheme {
    let ptr = if let Some(theme) = name {
        let cstr = CString::new(theme).expect("Theme name contained an interior null.");
        unsafe {
            ffi_dispatch!(
                WAYLAND_CURSOR_HANDLE,
                wl_cursor_theme_load,
                cstr.as_ptr(),
                size as c_int,
                shm.as_ref().c_ptr()
            )
        }
    } else {
        unsafe {
            ffi_dispatch!(
                WAYLAND_CURSOR_HANDLE,
                wl_cursor_theme_load,
                ptr::null(),
                size as c_int,
                shm.as_ref().c_ptr()
            )
        }
    };

    assert!(!ptr.is_null(), "Memory allocation failure while loading a theme.");

    CursorTheme { theme: ptr }
}
/// Attempts to load a cursor theme.
///
/// If no name is given or the requested theme is not found, the default theme
/// will be loaded.
///
/// Other arguments are the requested size for the cursor images (ex: 16)
/// and a handle to the global `WlShm` object.
///
/// # Panics
///
/// - Panics if the `wayland-cursor` lib is not available
///   (see `is_available()` function) in this module.
/// - Panics in case of memory allocation failure.
/// - Panics if `name` contains an interior null.
Attempts to load a cursor theme.
If no name is given or the requested theme is not found, the default theme
will be loaded.

Other arguments are the requested size for the cursor images (ex: 16)
and a handle to the global `WlShm` object.
Attempts to load a cursor theme . If no name is given or the requested theme is not found the default theme will be loaded . Other arguments are the requested size for the cursor images ( ex : 16 ) and a handle to the global ` WlShm ` object .
pub fn load_theme(name: Option<&str>, size: u32, shm: &WlShm) -> CursorTheme {
    let ptr = if let Some(theme) = name {
        let cstr = CString::new(theme).expect("Theme name contained an interior null.");
        unsafe {
            ffi_dispatch!(
                WAYLAND_CURSOR_HANDLE,
                wl_cursor_theme_load,
                cstr.as_ptr(),
                size as c_int,
                shm.as_ref().c_ptr()
            )
        }
    } else {
        unsafe {
            ffi_dispatch!(
                WAYLAND_CURSOR_HANDLE,
                wl_cursor_theme_load,
                ptr::null(),
                size as c_int,
                shm.as_ref().c_ptr()
            )
        }
    };
    assert!(!ptr.is_null(), "Memory allocation failure while loading a theme.");
    CursorTheme { theme: ptr }
}
pub fn load_theme ( name : Option < & str > , size : u32 , shm : & WlShm ) -> CursorTheme { let ptr = if let Some ( theme ) = name { let cstr = CString :: new ( theme ) . expect ( " " ) ; unsafe { ffi_dispatch ! ( WAYLAND_CURSOR_HANDLE wl_cursor_theme_load cstr as_ptr ( ) size as c_int shm as_ref ( ) c_ptr ( ) ) } } else { unsafe { ffi_dispatch ! ( WAYLAND_CURSOR_HANDLE wl_cursor_theme_load ptr null ( ) size as c_int shm as_ref ( ) c_ptr ( ) ) } } ; assert ! ( ptr is_null ( ) " " ) ; CursorTheme { theme : ptr } }
Attempts to load a cursor theme.
Attempts to load a cursor theme .
name
Option<&str>
size
u32
shm
&WlShm
name
Option<&str>
size
u32
shm
&WlShm
panics
Panics if the `wayland-cursor` lib is not available
` function) in this module.
Panics in case of memory allocation failure.
Panics if `name` contains an interior null.
Panics if the ` wayland - cursor ` lib is not available ` function ) in this module . Panics in case of memory allocation failure . Panics if ` name ` contains an interior null .