Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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.