[![License:Zlib](https://img.shields.io/badge/License-Zlib-brightgreen.svg)](https://opensource.org/licenses/Zlib) ![Minimum Rust Version](https://img.shields.io/badge/Min%20Rust-1.38-green.svg) [![travis.ci](https://travis-ci.org/Lokathor/fenestroj.svg?branch=master)](https://travis-ci.org/Lokathor/fenestroj) [![AppVeyor](https://ci.appveyor.com/api/projects/status/56xmkqs9l51ml5vu/branch/master?svg=true)](https://ci.appveyor.com/project/Lokathor/fenestroj/branch/master) [![crates.io](https://img.shields.io/crates/v/fenestroj.svg)](https://crates.io/crates/fenestroj) [![docs.rs](https://docs.rs/fenestroj/badge.svg)](https://docs.rs/fenestroj/) # fenestroj Easier to use wrappers for [winapi](https://docs.rs/winapi/) stuff. All wrappers are kept in feature gated modules the same as how `winapi` works. ## Conventions * **Names:** * Snake case function names: `GetLastError` becomes `get_last_error` * If there's an `A` and `W` variant of a `winapi` function, the `W` variant is used without "_w" on the end: `GetMessageW` becomes `get_message` * Some functions are new utilities to this crate, they just have names that don't conflict with any `winapi` name. * **Arguments:** * Enums are used when possible. * If there's some "obvious" default for the user to calculate then `Option` is sometimes used and it will do the calculation for you. * Functions with a large number of arguments are converted to take a single struct with a field for each argument so you don't have to remember the ordering perfectly. * **Return Values:** * Usage of `bool`, `Option`, or `Result` is done whenever possible. * Numeric codes are given newtype wrappers as often as possible: `u32` error values become wrapped in `pub struct ErrorCode(pub u32)` for example. * **Safety:** * Things are all still left as `unsafe` until a careful investigation of the safety involved can be done. * The investigation process is generally "ask WinBun and hope they're not too busy to answer".