1
0
Fork 0
Go to file
Adrien Prokopowicz 998ced845c
Added functional open_parented example (#172)
This PR adds a simple example that allows to test and showcase the `Window::open_parented` method.

That example first creates a parent window using `Window::open_blocking`, and then creates a smaller child window using `Window::open_parented`.

Both window's handlers log all of their events to the console, in a similar fashion to the `open_window` example.

Both windows actually do rendering (unlike the `open_window` example for now): the parent fills its window with a grey backround, and the child fills its window with a red background.

This example also uses the `softbuffer` crate to perform the rendering, which allows testing it in a more portable manner and in the simplest use case possible, without having to involve OpenGL or any 3D rendering pipeline at all.
2024-03-24 17:16:16 -05:00
.github/workflows Build both with and without opengl on CI 2022-02-07 20:25:01 +01:00
examples Added functional open_parented example (#172) 2024-03-24 17:16:16 -05:00
src Merge branch 'master' into feature/windows-cursor-enter-leave 2024-01-09 01:38:14 +01:00
.gitignore Add Windows initial code 2020-05-25 21:35:03 +02:00
.rustfmt.toml Run rustfmt (#154) 2023-12-12 10:41:03 -06:00
Cargo.toml Added functional open_parented example (#172) 2024-03-24 17:16:16 -05:00
LICENSE-APACHE Add license statement and files (dual MIT or Apache 2.0) 2020-11-12 21:52:49 +01:00
LICENSE-MIT Add license statement and files (dual MIT or Apache 2.0) 2020-11-12 21:52:49 +01:00
README.md Mention OpenGL contexts in the readme 2022-02-07 17:59:40 +01:00

baseview

A low-level windowing system geared towards making audio plugin UIs.

baseview abstracts the platform-specific windowing APIs (winapi, cocoa, xcb) into a platform-independent API, but otherwise gets out of your way so you can write plugin UIs.

Interested in learning more about the project? Join us on discord, channel #plugin-gui.

Roadmap

Below is a proposed list of milestones (roughly in-order) and their status. Subject to change at any time.

Feature Windows Mac OS Linux
Spawns a window, no parent ✔️ ✔️ ✔️
Cross-platform API for window spawning ✔️ ✔️ ✔️
Can find DPI scale factor ✔️ ✔️
Basic event handling (mouse, keyboard) ✔️ ✔️ ✔️
Parent window support ✔️ ✔️ ✔️
OpenGL context creation (behind the opengl feature) ✔️ ✔️ ✔️

Prerequisites

Linux

Install dependencies, e.g.,

sudo apt-get install libx11-dev libxcursor-dev libxcb-dri2-0-dev libxcb-icccm4-dev libx11-xcb-dev

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

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