extern crate libc; #[cfg(target_os = "macos")] #[macro_use] extern crate objc; #[cfg(target_os = "macos")] extern crate cgl; #[cfg(target_os = "macos")] extern crate cocoa; #[cfg(target_os = "macos")] extern crate core_foundation; /// Scale will scale the frame buffer and the window that is being sent in when calling the update /// function. This is useful if you for example want to display a 320 x 256 window on a screen with /// much higher resolution which would result in that the window is very small. #[derive(Clone, Copy)] pub enum Scale { /// This mode checks your current screen resolution and will caluclate the largest window size /// that can be used within that limit and resize it. Useful if you have a small buffer to /// display on a high resolution screen. FitScreen, /// 1X scale (which means leave the corrdinates sent into Window::new untouched) X1, /// 2X window scale (Example: 320 x 200 -> 640 x 400) X2, /// 4X window scale (Example: 320 x 200 -> 1280 x 800) X4, /// 8X window scale (Example: 320 x 200 -> 2560 x 1600) X8, /// 16X window scale (Example: 320 x 200 -> 5120 x 3200) X16, /// 32 window scale (Example: 320 x 200 -> 10240 x 6400) X32, } /// Vsync will allow syncronized rendering with the screen refresh rate. /// Currently Vsync isn't implemented so nothing will change regardless of given value right now pub enum Vsync { /// No vsync No, /// Require accurate vsync. Notice that if the library is unable to to setup an accurate /// syncing the window creation will fail. Accurate, /// Setup a best guess syncing with the screen. This will always succesed but may not be /// accurate. What this means is if the lib is unable to create a accurate syncing approach /// a 'emulated' one will be used (for example using a timer to approximate syncing) BestGuess, } pub enum Key { Key0 = 0, Key1 = 1, Key2 = 2, Key3 = 3, Key4 = 4, Key5 = 5, Key6 = 6, Key7 = 7, Key8 = 8, Key9 = 9, A = 10, B = 11, C = 12, D = 13, E = 14, F = 15, G = 16, H = 17, I = 18, J = 19, K = 20, L = 21, M = 22, N = 23, O = 24, P = 25, Q = 26, R = 27, S = 28, T = 29, U = 30, V = 31, W = 32, X = 33, Y = 34, Z = 35, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, Down, Left, Right, Up, Apostrophe, Backslash, Comma, Equal, LeftBracket, Minus, Period, RightBracket, Semicolon, Slash, Backspace, Delete, End, Enter, Escape, Home, Insert, Menu, PageDown, PageUp, Pause, Space, Tab, CapsLock, Count = 80, } #[cfg(target_os = "windows")] pub mod windows; #[cfg(target_os = "windows")] pub use windows::*; //#[cfg(target_os = "macos")] //pub mod macos; //#[cfg(target_os = "macos")] //pub use macos::*;