pub unsafe fn register_events(&self, nr: u32) -> Result<Vec<u32>, String> {
        let result = sys::SDL_RegisterEvents(nr as ::libc::c_int);
        const ERR_NR:u32 = ::std::u32::MAX - 1;

        match result {
            ERR_NR => {
                Err("No more user events can be created; SDL_LASTEVENT reached"
                    .to_owned())
            },
            _ => {
                let event_ids = (result..(result+nr)).collect();
                Ok(event_ids)
            }
        }
    }
/// Registers custom SDL events.
///
/// Returns an error, if no more user events can be created.
Registers custom SDL events.
Returns an error, if no more user events can be created.
Registers custom SDL events . Returns an error if no more user events can be created .
pub unsafe fn register_events(&self, nr: u32) -> Result<Vec<u32>, String> {
        let result = sys::SDL_RegisterEvents(nr as ::libc::c_int);
        const ERR_NR:u32 = ::std::u32::MAX - 1;
        match result {
            ERR_NR => {
                Err("No more user events can be created; SDL_LASTEVENT reached"
                    .to_owned())
            },
            _ => {
                let event_ids = (result..(result+nr)).collect();
                Ok(event_ids)
            }
        }
    }
pub unsafe fn register_events ( & self , nr : u32 ) -> Result < Vec < u32 > , String > { let result = sys :: SDL_RegisterEvents ( nr as :: libc :: c_int ) ; const ERR_NR : u32 = :: std :: u32 :: MAX - 1 ; match result { ERR_NR => { Err ( " " . to_owned ( ) ) } , _ => { let event_ids = ( result .. ( result + nr ) ) . collect ( ) ; Ok ( event_ids ) } } }
Registers custom SDL events.
Registers custom SDL events .
&self
nr
u32
&self
nr
u32