Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rodrigocfd/winsafe-examples
Examples of native Windows applications written in Rust with WinSafe.
https://github.com/rodrigocfd/winsafe-examples
directx ffi gui native rust win32 windows
Last synced: 4 days ago
JSON representation
Examples of native Windows applications written in Rust with WinSafe.
- Host: GitHub
- URL: https://github.com/rodrigocfd/winsafe-examples
- Owner: rodrigocfd
- License: mit
- Created: 2021-03-30T20:00:56.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-01T18:25:09.000Z (6 months ago)
- Last Synced: 2025-01-15T23:50:10.767Z (11 days ago)
- Topics: directx, ffi, gui, native, rust, win32, windows
- Language: Rust
- Homepage: https://crates.io/crates/winsafe
- Size: 1.29 MB
- Stars: 72
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# WinSafe examples
This repo contains several examples of native Win32 applications written in [Rust](https://www.rust-lang.org) with [WinSafe](https://github.com/rodrigocfd/winsafe). All examples follow the same program structure, which is the recommended way to build a WinSafe application.
Each directory is a full application, with is own `Cargo.toml`.
## Resources
Each example has a `.res` file with its [application resources](https://en.wikipedia.org/wiki/Resource_(Windows)) (manifests, icons, dialogs and so on). You can edit the `.res` file with any resource editor, or even generate your own `.res` by compiling a `.rc` script.
The `.res` file is linked into the final `.exe` by the `build.rs`, which is a [Cargo build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html).
## Examples list
Note that the order can change with new examples being added.
| Example | Screenshot |
| - | - |
| 01 [Button click](01_button_click/) | ![Example 01](01_button_click/screen.gif) |
| 02 [Native controls](02_native_controls/) | ![Example 02](02_native_controls/screen.gif) |
| 03 [Dialog resources](03_dialog_resources/) | ![Example 03](03_dialog_resources/screen.gif) |
| 04 [Custom control](04_custom_control/) | ![Example 04](04_custom_control/screen.gif) |
| 05 [Resizable layout](05_resizable_layout/) | ![Example 05](05_resizable_layout/screen.gif) |
| 06 [Tabs](06_tabs/) | ![Example 06](06_tabs/screen.gif) |
| 07 [Video playback](07_video_playback/) | ![Example 07](07_video_playback/screen.gif) |## License
Licensed under [MIT license](https://opensource.org/licenses/MIT), see [LICENSE.md](LICENSE.md) for details.