ndless_sdl/lib.rs
1#![no_std]
2#![allow(clippy::not_unsafe_ptr_arg_deref)]
3#![allow(clippy::enum_clike_unportable_variant)]
4//! # SDL bindings for Ndless
5//! Get started with:
6//! ```
7//! ndless_sdl::init(&[ndless_sdl::InitFlag::Video]);
8//! let screen = match ndless_sdl::video::set_video_mode(320, 240, 16,
9//! &[SurfaceFlag::SWSurface],
10//! &[VideoFlag::NoFrame]) {
11//! Ok(screen) => screen,
12//! Err(err) => panic!("failed to set video mode: {}", err)
13//! };
14//! loop {
15//! screen.fill_rect(Some(ndless_sdl::Rect {
16//! x: 0,
17//! y: 0,
18//! w: 320,
19//! h: 240,
20//! }), ndless_sdl::video::RGB(142, 120, 255));
21//! }
22//! ndless_sdl::quit();
23//! ```
24//!
25//! It is not recommended to use the input methods from this crate. Rather, use
26//! the ones built into the ndless crate.
27extern crate num;
28
29pub use sdl::*;
30
31pub mod event;
32pub mod gl;
33pub mod keysym;
34pub mod mouse;
35pub mod nsdl;
36pub mod video;
37pub mod wm;
38
39pub mod image;
40pub mod sdl;
41pub mod text;
42
43pub mod gfx;