Skip to content

Instantly share code, notes, and snippets.

@Skrylar
Created January 3, 2014 05:39
Show Gist options
  • Save Skrylar/8233390 to your computer and use it in GitHub Desktop.
Save Skrylar/8233390 to your computer and use it in GitHub Desktop.
fn main() {
let mut sentry = sdl::init(sdl::init::Video).unwrap();
let win = sentry.new_window("Foof wob", 32, 32, 800, 600, 0).unwrap();
let mut x = win.borrow_mut();
/* does this work for putting the trait types in? */
sentry.set_application_delegate(&Foof as &sdl::ApplicationDelegate);
x.get().set_mouse_delegate(&Foof as &sdl::MouseDelegate);
'core : loop {
sentry.dispatch_all_events();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment