Comments (5)
The only discrepancy I'm aware of is that when you call GetModuleHandle
from a DLL, the module handle is from the parent executable, not from the DLL. Since Rust links downstream libraries directly into the executable that shouldn't cause any issues. I'd be surprised if that were an issue even with a Rust library compiled to a DLL, but I'd need to test that to know for sure.
from raw-window-handle.
Is this necessary? I'm pretty sure you can call GetModuleHandle(ptr::null()) as HINSTANCE
to get the HINSTANCE
from anywhere in the program.
from raw-window-handle.
IIRC there is some discrepancy when the hwnd comes from an external library or something like that
from raw-window-handle.
Since Rust links downstream libraries directly into the executable that shouldn't cause any issues
Is this really an assumption we want to bake in? It's perfectly reasonable for people to manually dynamically load libraries containing rust code from both rust and foreign processes. If there was really never any case in which being explicit was necessary, I don't think it would be in the Vulkan interface.
from raw-window-handle.
@Ralith Fair enough. I've submitted a PR to add HINSTANCE
in #30.
from raw-window-handle.
Related Issues (20)
- Would it make sense to have some kind of "view" or "renderable" handle? HOT 5
- `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
- Add safe constructors for display and window handles HOT 3
- Remove `WebWindowHandle`? HOT 2
- Make safe `WindowHandle` s to imilictly ref-count HOT 27
- Info about sdl HOT 2
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.