Giter VIP home page Giter VIP logo

hwnd's Introduction

Well documented, safe-leaning, sound, low-level API bindings to HWND-adjacent APIs.

GitHub crates.io docs.rs License Build Status

Raison d'être

Intended use cases include:

  • Building block for higher level APIs.
  • Interop with existing win32-consuming C or C++ codebases (incrementally RIIRing?)
  • Direct use for cases where extra abstraction / higher level APIs are overkill.

Goals to service these use cases, in order of priority, are:

  1. APIs should be as sound as possible.
    • Spam unit tests and/or doc-tests to try to break safe APIs.
    • Thorough safety documentation of any fns or traits that must remain unsafe.
  2. Keep a 1:1 mapping to raw windows types and APIs as much as possible.
    • Maximum interoperability with existing C or C++ codebases.
    • Avoids infinite yak shaving.
    • Additional error checking / debug spam is generally discouraged to avoid suprising RIIRers with new edge cases, except to avoid soundness issues.
  3. Make APIs as safe as possible.
    • Some unsafe will generally still be required to implement said APIs.
    • Eliminating unsafe for perfectly sound APIs will make auditing the remaining unsafe code easier.
  4. Provide excellent documentation.
    • Rust specific examples for everything.
    • Thoroughly document edge cases, error codes, etc.
    • Aiming to be even better than MSDN.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

hwnd's People

Contributors

maulingmonkey avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

hwnd's Issues

Keikaku: VTEC

API

  • Window creation
  • Basic queries (size, visilibity, etc.)
  • Thread/process queries

Metadata

  • keywords
  • categories
  • desc
  • readme
  • license in package

Misc

  • CI

Publish

  • publish to crates.io
  • make github public

Timers

Functions

  • set_coalescable_timer
  • set_timer
  • kill_timer
  • SetUserObjectInformationW(handle, UOI_TIMERPROC_EXCEPTION_SUPPRESSION, ...)

Constants

  • TIMERV_*
  • USER_TIMER_*
  • UOI_* ? Nah, hardcode the constant in the specific fn call

Misc.

  • ### Errors lists
  • Tests w/ null hwnd
  • Tests w/ message loops
  • Test "dangling" timers
  • Test "dangling" hwnds
  • Test timer replacement
  • Examples for set_coalescable_timer
  • Duration-adjacent traits? Nah, too high level
  • 2e7a19e Fix soundness issues (safe set_timer etc. can invoke unsafe timer_proc without enforcing any preconditions)

Keikaku

Functions

Constants

Structures

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.