#[macro_use]
extern crate bitflags;
#[macro_use]
extern crate lazy_static;
extern crate winapi;
#[cfg(feature="flexbox")]
pub extern crate stretch;
#[cfg(feature="all")]
#[cfg(test)]
mod tests;
mod errors;
pub use errors::{NwgError};
mod events;
pub use events::*;
mod common_types;
pub use common_types::*;
pub(crate) mod win32;
pub use win32::{
dispatch_thread_events, dispatch_thread_events_with_callback, stop_thread_dispatch, enable_visual_styles, init_common_controls,
window::{
EventHandler, RawEventHandler,
full_bind_event_handler, bind_event_handler, unbind_event_handler,
bind_raw_event_handler, has_raw_handler, unbind_raw_event_handler
},
message_box::*
};
pub(crate) use win32::window::bind_raw_event_handler_inner;
#[allow(deprecated)]
pub use win32::high_dpi::{set_dpi_awareness, scale_factor, dpi};
pub use win32::monitor::Monitor;
#[cfg(feature="cursor")]
pub use win32::cursor::GlobalCursor;
#[cfg(feature="clipboard")]
pub use win32::clipboard::{Clipboard, ClipboardFormat, ClipboardData};
mod resources;
pub use resources::*;
mod controls;
pub use controls::*;
mod layouts;
pub use layouts::*;
#[cfg(feature = "winnls")]
mod winnls;
#[cfg(feature = "winnls")]
pub use winnls::*;
pub trait PartialUi {
fn build_partial<W: Into<ControlHandle>>(data: &mut Self, parent: Option<W>) -> Result<(), NwgError>;
fn process_event(&self, _evt: Event, _evt_data: &EventData, _handle: ControlHandle) {}
fn handles<'a>(&'a self) -> Vec<&'a ControlHandle> { vec![] }
}
pub trait NativeUi<UI> {
fn build_ui(inital_state: Self) -> Result<UI, NwgError>;
}
pub fn init() -> std::result::Result<(), errors::NwgError> {
if cfg!(not(feature="no-styling")) {
enable_visual_styles();
}
init_common_controls()
}