Comments (3)
The reason everything in unsafe
is forward compat, I guess? Because unsafe -> safe is a breaking change, but not otherwise.
from raw-window-handle.
Also, isn't Default
basically it?
from raw-window-handle.
I was thinking more along these lines:
impl DisplayHandle<'static> {
pub fn windows() -> Self {
unsafe { Self::borrow_raw(WindowsDisplayHandle::new().into()) }
}
pub fn xlib_no_display() -> Self {
unsafe { Self::borrow_raw(XlibDisplayHandle::new(None).into()) }
}
}
Basically, to allow for more ways of creating DisplayHandle
and WindowHandle
without needing to go through borrow_raw
.
from raw-window-handle.
Related Issues (20)
- `v0.6` release planning HOT 6
- Type-system relationship between `HasRaw*Handle` and `Has*Handle` traits HOT 3
- Does `RawWindowHandle` need to be `Copy`? HOT 3
- Should X display/connection handles be nullable? HOT 4
- Proposal: Remove `Copy` from `RawDisplayHandle` HOT 3
- Proposal: Make the error type implementor-selectable? HOT 2
- Follow the Rust API Guidelines HOT 2
- Take `self` instead of `&self` in raw window handles? HOT 9
- Figure out missing display handle implementations HOT 6
- Add tests for Rust subleties HOT 2
- Add relevant categories to `Cargo.toml`
- Improve documentation
- Question: Why are we exposing canvas elements instead of just any node? HOT 2
- What is the right way of handling web handles? HOT 2
- Add a bitset that allows libraries to state what types of raw window/display handles are supported HOT 1
- Remove `WebWindowHandle`? HOT 2
- Make safe `WindowHandle` s to imilictly ref-count HOT 27
- Info about sdl HOT 2
- Support DirectFB in RawWindowHandle and RawDisplayHandle? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raw-window-handle.