198 Commits

Author SHA1 Message Date
Tom A. Wagner
b5071c09a0 Emit "link-toggled" signal when two ports widgets are connected 2021-05-08 18:06:37 +02:00
Tom A. Wagner
08283bb995 Update CI to Fedora 34 and Rust 1.51 2021-05-06 09:36:24 +02:00
Tom A. Wagner
076fec7eb4 Modify architecture to run pipewire loop in second thread.
The pipewire loop now runs without interruption in a second thread and communicates with
the GTK thread via a channel in each direction, instead of checking for events once a second and using callbacks.

This allows changes to appear instantly in the view, instead of having to wait.
2021-05-05 21:48:00 +02:00
Tom A. Wagner
75aa0a30d0 Turn view::port::Port into a gtk::Button subclass 2021-04-02 14:53:58 +02:00
Tom A. Wagner
9b448f0a30 view: Add some comments to View struct 2021-04-01 16:24:21 +02:00
Tom A. Wagner
2cb155c5ee view: Refactor view to have a manager View struct.
The view struct creates, manages and runs the view, and handles all communication with components outside of the view.
2021-03-31 10:44:04 +02:00
Tom A. Wagner
48821be18d Move port coloring into view
The controller still determines the ports media type, but instead of coloring
the port itself, the media type is passed to the constructor, which then colors the port.
2021-03-28 21:03:43 +02:00
Tom A. Wagner
269ce18b29 Add overview of planned architecture in docs/architecture.md
The new architecture.md file contains a birds-eye overview of the top-level architecture
using box-drawing characters, but does not go into detail yet.
2021-03-28 19:24:25 +02:00
Tom A. Wagner
9519eefa6e Change architecture to controller-centered arch
struct PipewireConnection is now decoupled from any other components, another component (the controller)
can receive updates by registering a callback.

struct PipewireState has been refactored to a struct Controller.
It still keeps state and manages the view, but now also actively requests updates from the pipewire connection via callback.
2021-03-28 19:04:57 +02:00
Tom A. Wagner
d75dee5ea8 Update dependencies
This updates all crates to their newest release.

For pipewire-rs, this includes bumping the version to 0.3, which means this comment has to fix a few breaking changes, but nothing big.
0.3 also lets us create and delete remote objects, which will be needed for link creation and deletion.
2021-03-27 19:57:44 +01:00
Emmanuel Gil Peyrot
aab1f1bde3 Add a ^Q accel to quit
This is a somewhat standard shortcut used in many GTK applications.
2021-03-19 15:23:48 +00:00
Tom A. Wagner
b417ad9827 Update project name in LICENSE 2021-03-14 12:35:24 +01:00
Tom A. Wagner
85ebbda5c9 Add CI
Partly based on pipewire-rs CI
2021-03-14 12:18:38 +01:00
Emmanuel Gil Peyrot
3fccff041a README: Add a link to the AUR package, for ArchLinux users 2021-03-14 06:51:48 +00:00
Emmanuel Gil Peyrot
c414e5cac4 README: Remove last mention of the previous name 2021-03-14 06:51:48 +00:00
Emmanuel Gil Peyrot
279c792345 Update to build with latest glib
glib replaced its glib::object_subclass!() macro with
a #[glib::object_subclass] attribute, to simplify a bunch of things.

See fdc8459b39
2021-03-14 00:25:08 +01:00
Tom A. Wagner
b348339b4e Update dependencies, use pipewire-rs crates from crates.io 2021-03-12 18:04:08 +01:00
Tom A. Wagner
f0d85b7ed3 Prepare Cargo.toml for crates.io publication 2021-03-12 17:55:57 +01:00
Tom A. Wagner
7f4778cb81 Update readme for projet namechange and colored ports 2021-03-12 17:33:02 +01:00
Tom A. Wagner
528694b63e Change application name to 'Helvum' 2021-03-12 17:30:26 +01:00
Tom A. Wagner
27aa39d4ab Update requirements in README 2021-02-20 18:32:17 +01:00
Guillaume Desmottes
5784275d32 fix clippy warnings 2021-02-14 17:24:49 +01:00
Tom A. Wagner
99b2ef274a Update screenshot in README for colored ports 2021-02-10 19:36:10 +01:00
Tom A. Wagner
5ac535ab37 Prevent nodes from being dragged out of the graph view 2021-02-10 10:58:01 +01:00
Tom A. Wagner
ec8de4a4a7 Color ports depending on the type of data (audio,video,midi) they carry 2021-02-09 12:51:35 +01:00
Tom A. Wagner
926829de22 Update dependencies 2021-01-19 15:37:05 +01:00
Tom A. Wagner
618e3abf8d Release version 0.1.0 0.1.0 2021-01-12 11:16:50 +01:00
Tom A. Wagner
63a8657dda Add README 2021-01-12 11:15:59 +01:00
Tom A. Wagner
a3907a1832 Change Node from a frame subclass to a widget subclass. 2021-01-12 10:44:12 +01:00
Tom A. Wagner
5bf62eca6e Use log, env_logger crates to log warnings instead of using eprintln!() macro 2021-01-12 09:48:59 +01:00
Tom A. Wagner
181661a2db Delete items from graph when they are removed by the pipewire server. 2021-01-08 12:34:22 +01:00
Tom A. Wagner
9784b9bae0 Run rustfmt on the codebase 2021-01-08 09:58:58 +01:00
Tom A. Wagner
4744a1a647 Check that a widget is being dragged before checking the event in graphview.
A bug in gtk4-rs makes the library print errors when accessing an event, this change reduces the amount of errors, as they are only printed when the mouse is over a node now.
2021-01-08 09:57:25 +01:00
Tom A. Wagner
323e1a2a8f Refractor graphview.rs by moving accessor functions into wrapper type. 2021-01-08 09:56:36 +01:00
Tom A. Wagner
0e5b9bb1bc Remove unnecessary snapshot downcast into itself 2021-01-07 17:44:23 +01:00
Tom A. Wagner
7f054890ed Make graphview scrollable 2021-01-07 17:43:41 +01:00
Tom A. Wagner
f1b66d9c53 Turn Node into a gtk::Frame subclass. 2021-01-07 17:42:37 +01:00
Tom A. Wagner
d5283c803b Change cursor to grab when node can be dragged 2021-01-06 10:59:28 +01:00
Tom A. Wagner
85b21a920d Start application with a bigger window 2021-01-05 11:27:15 +01:00
Tom A. Wagner
9262308d28 Improve theming
Default to a dark theme and draw a grid on the background of the graphview
2021-01-05 11:24:49 +01:00
Tom A. Wagner
2897543acf Switch to gtk4 2021-01-05 09:46:34 +01:00
Tom A. Wagner
dc40f40479 Add .vscode folder to gitignore 2021-01-04 08:20:27 +01:00
Tom A. Wagner
b129d84fa2 Display Nodes/Ports/Links obtained from pipewire server 2021-01-03 19:01:47 +01:00
Tom A. Wagner
438383e92f Render links as a curve instead of a straight line 2020-12-17 11:27:06 +01:00
Tom A. Wagner
82c9a5bd4d Make Nodes on graph draggable 2020-12-17 11:26:41 +01:00
Tom A. Wagner
c72bef364d Run rustfmt on the codebase 2020-12-14 11:28:06 +01:00
Ryuukyu
53895f8e28 Add LICENSE 2020-12-14 10:24:49 +00:00
Tom A. Wagner
264ccf0982 Add initial project. 2020-12-14 11:20:29 +01:00