45 Commits
0.3.0 ... 0.3.4

Author SHA1 Message Date
Tom A. Wagner
094681637e Release v0.3.4 2022-02-02 10:08:12 +01:00
Tom A. Wagner
6f92fbdb8f readme: Add flathub badge 2022-01-31 13:32:03 +01:00
Tom A. Wagner
e38426c09f Update dependencies, fix segmentation fault
Updating glib to 0.15.4 fixes a segmentation fault that could occur when logging a message with glib structured logging.
2022-01-31 13:17:55 +01:00
Tom A. Wagner
85e249cb32 Release 0.3.3 2022-01-28 13:49:49 +01:00
Tom A. Wagner
c54aed2e14 Update dependencies 2022-01-28 13:49:49 +01:00
Tom A. Wagner
6da232debf meson: Fix incorrect output file name
This fixes a typo from 96c61e43 that caused the binary to be generated with the wrong name.
2022-01-28 13:48:46 +01:00
Tom A. Wagner
96c61e43d2 meson: Remove custom build scripts 2022-01-28 13:01:35 +01:00
Tom A. Wagner
872ef7890d readme: Credit gtk-rust-template 2022-01-28 12:11:32 +01:00
Tom A. Wagner
76ad8d11d7 Change application id to org.pipewire.Helvum 2022-01-28 10:14:21 +01:00
Tom A. Wagner
4075b66865 deps: Update gtk-rs to latest release 2022-01-17 12:00:00 +01:00
Tom A. Wagner
96182826e4 logging: Use glib as log backend instead of env_logger.
This makes log output use the same logger as gtk itself and as most other gtk applications
2022-01-11 12:15:14 +01:00
Mihai Fufezan
e1fbb0cf49 Use gtk4-update-icon-cache instead of gtk3 one 2021-12-18 19:50:39 +00:00
Alireza Haghshenas
3653f2bb11 Emphasized that the flatpak-builder command needs be run inside a local clone of the project 2021-12-10 04:34:49 +00:00
Tom A. Wagner
56523f1b30 docs: Add documentation for making a release 2021-12-01 19:56:17 +01:00
Tom A. Wagner
7818bed159 Add appstream metadata file 2021-12-01 19:56:17 +01:00
Tom A. Wagner
c1ec56e115 Release 0.3.2 2021-11-30 18:25:58 +01:00
Tom A. Wagner
110e9ef67f meson: Add dist script to vendor cargo dependencies for offline builds 2021-11-30 09:59:56 +01:00
Jan Beich
3c507683b7 build-aux: relax shebang in cargo.sh after 7b1b5ea336
/bin/sh: /bin/bash: not found
2021-11-27 21:57:03 +00:00
Thomas Rosendal
1d1f8bd3d7 Add instruction to add the flatpak remote 'flathub' 2021-11-25 07:59:45 +00:00
Sebastian Grabowski
b25f6f9abb Update the extension versions in flatpak build instructions to 21.08
The extensions need to match the SDK version, that was updated to
org.gnome.Sdk//41 in Commit e5e02b13. (Version 41 is based on
org.freedesktop.Sdk//21.08)
2021-11-24 17:03:23 +01:00
Tom A. Wagner
2d51ea677e ci: use more recent fd.o ci-templates 2021-11-24 16:11:16 +01:00
Tom A. Wagner
beb03d8b09 Update CI container for rust 1.56 2021-11-24 16:11:16 +01:00
Tom A. Wagner
502cf4476b gtk4dep: bump to 4.4 for fixed gtk_pick when using affine transform
This will be needed in a later commit for zooming in on the canvas using an affine (scaling) transformation matrix
2021-11-24 16:11:16 +01:00
Tom A. Wagner
eac973da15 Swap to rust 2021 edition and move rustc version check from meson.build to Cargo.toml 2021-11-24 16:11:16 +01:00
Tom A. Wagner
82a3e4f900 graphview: draw background automatically
This removes the manual painting of the background via cairo and adds the correct color to CSS instead,
which should hopefully improve performance as we do less cpu painting like this.
2021-11-24 16:11:16 +01:00
Suchipi
2cfc8e2e6f Update build instructions to match changes in e5e02b1387 2021-11-19 01:10:14 +00:00
Tom A. Wagner
e5e02b1387 flatpak: Update to gnome runtime 41 2021-11-17 19:49:52 +01:00
Tom A. Wagner
396363cef1 README: Update screenshot 2021-11-17 19:49:52 +01:00
Tom A. Wagner
c887d77f64 graphview: Use #808080 as link color
For good contrast in both dark and light mode, the link color is now a semi-light gray instead of complete black, which had bad contrast in dark mode and good constrast in light mode.

Later, we can seperate color palettes for light and dark mode, but only together with a dark mode toggle button or system-wide darkmode toggle.
2021-11-13 20:32:40 +01:00
Tom A. Wagner
54d7ca83ae graphview: Define link and grid colors in style.css
Previously, these were defined directly in the code,
but defining them in the css helps seperating theming and behaviour
and makes the colors easier to tweak.
2021-11-13 20:08:47 +01:00
Tom A. Wagner
7b1b5ea336 build: fix and improve cargo.sh
cargo.sh previously used bash features but only used `sh` in the shebang,
and also did not properly quote some variables to avoid splitting/globbing from happening.

Also, `-euo pilefail` is now set to avoid other errors that might come up.
2021-10-26 10:04:07 +02:00
Tom A. Wagner
729d4e1555 CI: Update container 2021-10-13 12:11:06 +02:00
Tom A. Wagner
ce6cab8134 Run rustfmt 2021-10-13 12:01:22 +02:00
Tom A. Wagner
8a552d0712 graphview: Add missing }; to fix build. 2021-10-13 11:56:46 +02:00
halfbro
f76235674c Add small control point offset to links that connect from right to left (loopbacks) 2021-10-13 09:11:10 +00:00
Tom A. Wagner
92dcfd61a1 Add gpl snippets to the start of each rust source file. 2021-10-03 11:27:36 +02:00
Tom A. Wagner
02e58e9bfa LICENSE: Replace outdated and edited GPL with the lastest stock version.
The old license file contained project specific edits, but editing the GPL text is disallowed by the fsf.
The new file also contains updated links.
2021-10-03 11:14:30 +02:00
Tom A. Wagner
958fa15230 Release 0.3.1 2021-09-30 08:45:11 +02:00
Tom A. Wagner
e9753dd078 Update dependencies 2021-09-30 08:45:00 +02:00
Tom A. Wagner
dfb1b754c7 Add and install icons.
This adds one new app icon and one new symbolic icon, and makes meson install these to the appropriate
directories, and adds an appropriate entry in the .desktop file.
2021-09-30 08:28:06 +02:00
Tom A. Wagner
497da8b953 graphview: Do not crash when the position of a node not on the graph is requested
While the position of a node not on the graph should never be requested, this seems to occur sometimes,
so instead of panicking, we only log an error now, or ignore that node if it wasn't
important.
2021-09-11 15:03:03 +02:00
Tom A. Wagner
da5da90352 Add .desktop file
This adds a .desktop file (without icon for now), which will automatically be installed when
`meson install` is run.
2021-08-29 18:41:09 +02:00
Tom A. Wagner
a8bfd8383e buildsystem: Move to meson for building the project
Meson will allow us to:
- Verify the used rust compiler is recent enough
- Install ressources such as a .desktop files, icons, etc.
2021-08-29 17:28:55 +02:00
Tom A. Wagner
7ef8677c4c readme: move screenshot.png into docs/ folder 2021-08-29 16:56:56 +02:00
Roger Roger
487dc3b2d3 Group nodes into columns by major type 2021-08-18 07:23:50 +00:00
30 changed files with 4277 additions and 352 deletions

View File

@@ -1,6 +1,6 @@
include:
- project: 'freedesktop/ci-templates' # the project to include from
ref: '98f557799157ebb0395cf11d40f01f61fbbace20' # git ref of that project
ref: '34f4ade99434043f88e164933f570301fd18b125' # git ref of that project
file: '/templates/fedora.yml' # the actual file to include
stages:
@@ -10,14 +10,14 @@ stages:
- extras
variables:
FDO_UPSTREAM_REPO: 'ryuukyu/helvum'
FDO_UPSTREAM_REPO: 'pipewire/helvum'
# Version and tag for our current container
.fedora:
variables:
FDO_DISTRIBUTION_VERSION: '34'
FDO_DISTRIBUTION_VERSION: '35'
# Update this to trigger a container rebuild
FDO_DISTRIBUTION_TAG: '2021-05-06.0'
FDO_DISTRIBUTION_TAG: '2021-11-23.0'
build-fedora-container:
extends:

368
Cargo.lock generated
View File

@@ -13,18 +13,18 @@ dependencies = [
[[package]]
name = "ansi_term"
version = "0.11.0"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
dependencies = [
"winapi",
]
[[package]]
name = "anyhow"
version = "1.0.42"
version = "1.0.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "595d3cfa7a60d4555cb5067b99f07142a08ea778de5cf993f7b75c7d8fabc486"
checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0"
[[package]]
name = "arrayvec"
@@ -51,15 +51,15 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]]
name = "bindgen"
version = "0.59.1"
version = "0.59.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "453c49e5950bb0eb63bb3df640e31618846c89d5b7faa54040d76e98e0134375"
checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8"
dependencies = [
"bitflags",
"cexpr",
"clang-sys",
"clap",
"env_logger 0.8.4",
"env_logger",
"lazy_static",
"lazycell",
"log",
@@ -74,15 +74,15 @@ dependencies = [
[[package]]
name = "bitflags"
version = "1.2.1"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitvec"
version = "0.19.5"
version = "0.19.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321"
checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33"
dependencies = [
"funty",
"radium",
@@ -92,9 +92,9 @@ dependencies = [
[[package]]
name = "cairo-rs"
version = "0.14.1"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a408c13bbc04c3337b94194c1a4d04067097439b79dbc1dcbceba299d828b9ea"
checksum = "b869e97a87170f96762f9f178eae8c461147e722ba21dd8814105bf5716bf14a"
dependencies = [
"bitflags",
"cairo-sys-rs",
@@ -105,28 +105,28 @@ dependencies = [
[[package]]
name = "cairo-sys-rs"
version = "0.14.0"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7c9c3928781e8a017ece15eace05230f04b647457d170d2d9641c94a444ff80"
checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8"
dependencies = [
"glib-sys",
"libc",
"system-deps",
"system-deps 6.0.1",
]
[[package]]
name = "cc"
version = "1.0.69"
version = "1.0.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2"
checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
[[package]]
name = "cexpr"
version = "0.5.0"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db507a7679252d2276ed0dd8113c6875ec56d3089f9225b2b42c30cc1f8e5c89"
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
dependencies = [
"nom",
"nom 7.1.0",
]
[[package]]
@@ -138,6 +138,15 @@ dependencies = [
"smallvec",
]
[[package]]
name = "cfg-expr"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3431df59f28accaf4cb4eed4a9acc66bea3f3c3753aa6cdc2f024174ef232af7"
dependencies = [
"smallvec",
]
[[package]]
name = "cfg-if"
version = "0.1.10"
@@ -152,9 +161,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clang-sys"
version = "1.2.0"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c"
checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90"
dependencies = [
"glob",
"libc",
@@ -163,9 +172,9 @@ dependencies = [
[[package]]
name = "clap"
version = "2.33.3"
version = "2.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
dependencies = [
"ansi_term",
"atty",
@@ -188,19 +197,6 @@ version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]]
name = "env_logger"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3"
dependencies = [
"atty",
"humantime",
"log",
"regex",
"termcolor",
]
[[package]]
name = "env_logger"
version = "0.9.0"
@@ -216,9 +212,9 @@ dependencies = [
[[package]]
name = "errno"
version = "0.2.7"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe"
checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
dependencies = [
"errno-dragonfly",
"libc",
@@ -227,11 +223,11 @@ dependencies = [
[[package]]
name = "errno-dragonfly"
version = "0.1.1"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067"
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
dependencies = [
"gcc",
"cc",
"libc",
]
@@ -253,24 +249,24 @@ checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7"
[[package]]
name = "futures-channel"
version = "0.3.16"
version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9"
checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b"
dependencies = [
"futures-core",
]
[[package]]
name = "futures-core"
version = "0.3.16"
version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99"
checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7"
[[package]]
name = "futures-executor"
version = "0.3.16"
version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d0d535a57b87e1ae31437b892713aee90cd2d7b0ee48727cd11fc72ef54761c"
checksum = "29d6d2ff5bb10fb95c85b8ce46538a2e5f5e7fdc755623a7d4529ab8a4ed9d2a"
dependencies = [
"futures-core",
"futures-task",
@@ -279,23 +275,22 @@ dependencies = [
[[package]]
name = "futures-io"
version = "0.3.16"
version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582"
checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2"
[[package]]
name = "futures-task"
version = "0.3.16"
version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2"
checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72"
[[package]]
name = "futures-util"
version = "0.3.16"
version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78"
checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164"
dependencies = [
"autocfg",
"futures-core",
"futures-task",
"pin-project-lite",
@@ -303,18 +298,13 @@ dependencies = [
"slab",
]
[[package]]
name = "gcc"
version = "0.3.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
[[package]]
name = "gdk-pixbuf"
version = "0.14.0"
version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "534192cb8f01daeb8fab2c8d4baa8f9aae5b7a39130525779f5c2608e235b10f"
checksum = "73aa2f5de1b45710da90a55863276667dc3a3264aaf6a2aeace62bb015244d49"
dependencies = [
"bitflags",
"gdk-pixbuf-sys",
"gio",
"glib",
@@ -323,22 +313,22 @@ dependencies = [
[[package]]
name = "gdk-pixbuf-sys"
version = "0.14.0"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f097c0704201fbc8f69c1762dc58c6947c8bb188b8ed0bc7e65259f1894fe590"
checksum = "413424d9818621fa3cfc8a3a915cdb89a7c3c507d56761b4ec83a9a98e587171"
dependencies = [
"gio-sys",
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
"system-deps 6.0.1",
]
[[package]]
name = "gdk4"
version = "0.2.0"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce41092cc569129a0afa34926e6dd1cf8411e25652d87febdea36859f7ff7ba"
checksum = "d9df40006277ff44538fe758400fc671146f6f2665978b6b57d2408db3c2becf"
dependencies = [
"bitflags",
"cairo-rs",
@@ -352,26 +342,26 @@ dependencies = [
[[package]]
name = "gdk4-sys"
version = "0.2.0"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce39c71861b5bcde319fd4711a74e1bd6f4f474911170d51096597fef0b56011"
checksum = "48a39e34abe35ee2cf54a1e29dd983accecd113ad30bdead5050418fa92f2a1b"
dependencies = [
"cairo-sys-rs",
"gdk-pixbuf-sys",
"gio-sys",
"glib-sys",
"gobject-sys",
"graphene-sys",
"libc",
"pango-sys",
"system-deps",
"pkg-config",
"system-deps 6.0.1",
]
[[package]]
name = "gio"
version = "0.14.0"
version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86c6823b39d46d22cac2466de261f28d7f049ebc18f7b35296a42c7ed8a88325"
checksum = "56f906022fe89505b4e7b6c59a62d4ca3c090904f286cf61f1b245afcb20897d"
dependencies = [
"bitflags",
"futures-channel",
@@ -386,22 +376,22 @@ dependencies = [
[[package]]
name = "gio-sys"
version = "0.14.0"
version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0a41df66e57fcc287c4bcf74fc26b884f31901ea9792ec75607289b456f48fa"
checksum = "97225e1b9c7c48ed7fec4377fdc72702965bfbfd3a944b928ccbb5d8ed82ccc9"
dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
"system-deps 6.0.1",
"winapi",
]
[[package]]
name = "glib"
version = "0.14.2"
version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbecad7a3a898ee749d491ce2ae0decb0bce9e736f9747bc49159b1cea5d37f4"
checksum = "e385b6c17a1add7d0fbc64d38e2e742346d3e8b22e5fa3734e5cdca2be24028d"
dependencies = [
"bitflags",
"futures-channel",
@@ -412,18 +402,20 @@ dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"log",
"once_cell",
"smallvec",
"thiserror",
]
[[package]]
name = "glib-macros"
version = "0.14.1"
version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2aad66361f66796bfc73f530c51ef123970eb895ffba991a234fcf7bea89e518"
checksum = "e58b262ff65ef771003873cea8c10e0fe854f1c508d48d62a4111a1ff163f7d1"
dependencies = [
"anyhow",
"heck",
"heck 0.4.0",
"proc-macro-crate",
"proc-macro-error",
"proc-macro2",
@@ -433,12 +425,12 @@ dependencies = [
[[package]]
name = "glib-sys"
version = "0.14.0"
version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c1d60554a212445e2a858e42a0e48cece1bd57b311a19a9468f70376cf554ae"
checksum = "0c4f08dd67f74b223fedbbb30e73145b9acd444e67cc4d77d0598659b7eebe7e"
dependencies = [
"libc",
"system-deps",
"system-deps 6.0.1",
]
[[package]]
@@ -449,20 +441,20 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "gobject-sys"
version = "0.14.0"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa92cae29759dae34ab5921d73fff5ad54b3d794ab842c117e36cafc7994c3f5"
checksum = "6edb1f0b3e4c08e2a0a490d1082ba9e902cdff8ff07091e85c6caec60d17e2ab"
dependencies = [
"glib-sys",
"libc",
"system-deps",
"system-deps 6.0.1",
]
[[package]]
name = "graphene-rs"
version = "0.14.0"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1460a39f06e491e6112f27e71e51435c833ba370723224dd1743dfd1f201f19"
checksum = "7c54f9fbbeefdb62c99f892dfca35f83991e2cb5b46a8dc2a715e58612f85570"
dependencies = [
"glib",
"graphene-sys",
@@ -471,21 +463,21 @@ dependencies = [
[[package]]
name = "graphene-sys"
version = "0.14.0"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7d23fb7a9547e5f072a7e0cd49cd648fedeb786d122b106217511980cbb8962"
checksum = "03f311acb023cf7af5537f35de028e03706136eead7f25a31e8fd26f5011e0b3"
dependencies = [
"glib-sys",
"libc",
"pkg-config",
"system-deps",
"system-deps 6.0.1",
]
[[package]]
name = "gsk4"
version = "0.2.0"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64932b730eaad3340378a03d633616eeed6d6705b59b81c9f579c88be8932475"
checksum = "1bf63d454e2f75abd92ee6de0ac9fc5aaf1018cd9c458aaf9de296c5cbab6bb9"
dependencies = [
"bitflags",
"cairo-rs",
@@ -499,9 +491,9 @@ dependencies = [
[[package]]
name = "gsk4-sys"
version = "0.2.0"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "685ffc776bedd91d68f47b41239525778b669432889721d7050d045270549b9a"
checksum = "e31d21d7ce02ba261bb24c50c4ab238a10b41a2c97c32afffae29471b7cca69b"
dependencies = [
"cairo-sys-rs",
"gdk4-sys",
@@ -510,14 +502,14 @@ dependencies = [
"graphene-sys",
"libc",
"pango-sys",
"system-deps",
"system-deps 6.0.1",
]
[[package]]
name = "gtk4"
version = "0.2.0"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c49e0311dac847a8ebc05e31f5c44c596314ee3b16c5f638ccfe24086d24bf1b"
checksum = "9e841556e3fe55d8a43ada76b7b08a5f65570bbdfe3b8f72c333053b8832c626"
dependencies = [
"bitflags",
"cairo-rs",
@@ -538,13 +530,11 @@ dependencies = [
[[package]]
name = "gtk4-macros"
version = "0.2.0"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbe4b77996bcf1ef20208c00043edda854ca2091b4be5e6a7c367f0f3846fa67"
checksum = "573db42bb64973a4d5f718b73caa7204285a1a665308a23b11723d0ee56ec305"
dependencies = [
"anyhow",
"heck",
"itertools",
"proc-macro-crate",
"proc-macro-error",
"proc-macro2",
@@ -554,9 +544,9 @@ dependencies = [
[[package]]
name = "gtk4-sys"
version = "0.2.0"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3737e91619cf4257d8a07834f7a2c035d4daeaf9ad8e3958e56b2c411dbdca18"
checksum = "c47c075e8f795c38f6e9a47b51a73eab77b325f83c0154979ed4d4245c36490d"
dependencies = [
"cairo-sys-rs",
"gdk-pixbuf-sys",
@@ -568,7 +558,7 @@ dependencies = [
"gsk4-sys",
"libc",
"pango-sys",
"system-deps",
"system-deps 6.0.1",
]
[[package]]
@@ -580,11 +570,17 @@ dependencies = [
"unicode-segmentation",
]
[[package]]
name = "heck"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
[[package]]
name = "helvum"
version = "0.3.0"
version = "0.3.4"
dependencies = [
"env_logger 0.9.0",
"glib",
"gtk4",
"log",
"once_cell",
@@ -608,9 +604,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "itertools"
version = "0.10.1"
version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf"
checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3"
dependencies = [
"either",
]
@@ -642,15 +638,15 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.98"
version = "0.2.116"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74"
[[package]]
name = "libloading"
version = "0.7.0"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a"
checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
dependencies = [
"cfg-if 1.0.0",
"winapi",
@@ -668,8 +664,8 @@ dependencies = [
"errno",
"libc",
"libspa-sys",
"nom",
"system-deps",
"nom 6.2.1",
"system-deps 3.2.0",
]
[[package]]
@@ -679,7 +675,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d301a2fc2fed0a97c13836408a4d98f419af0c2695ecf74e634a214c17beefa6"
dependencies = [
"bindgen",
"system-deps",
"system-deps 3.2.0",
]
[[package]]
@@ -699,13 +695,19 @@ checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
[[package]]
name = "memoffset"
version = "0.6.4"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9"
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
dependencies = [
"autocfg",
]
[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "nix"
version = "0.14.1"
@@ -733,16 +735,27 @@ dependencies = [
]
[[package]]
name = "once_cell"
version = "1.8.0"
name = "nom"
version = "7.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109"
dependencies = [
"memchr",
"minimal-lexical",
"version_check",
]
[[package]]
name = "once_cell"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
[[package]]
name = "pango"
version = "0.14.0"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "415823a4fb9f1789785cd6e2d2413816f2ecff92380382969aaca9c400e13a19"
checksum = "79211eff430c29cc38c69e0ab54bc78fa1568121ca9737707eee7f92a8417a94"
dependencies = [
"bitflags",
"glib",
@@ -753,14 +766,14 @@ dependencies = [
[[package]]
name = "pango-sys"
version = "0.14.0"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2367099ca5e761546ba1d501955079f097caa186bb53ce0f718dca99ac1942fe"
checksum = "7022c2fb88cd2d9d55e1a708a8c53a3ae8678234c4a54bf623400aeb7f31fac2"
dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"system-deps",
"system-deps 6.0.1",
]
[[package]]
@@ -780,9 +793,9 @@ dependencies = [
[[package]]
name = "pin-project-lite"
version = "0.2.7"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443"
checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
[[package]]
name = "pin-utils"
@@ -816,20 +829,20 @@ checksum = "9b4aa5ef9f3afef7dbb335106f69bd6bb541259e8796c693810cde20db1eb949"
dependencies = [
"bindgen",
"libspa-sys",
"system-deps",
"system-deps 3.2.0",
]
[[package]]
name = "pkg-config"
version = "0.3.19"
version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe"
[[package]]
name = "proc-macro-crate"
version = "1.0.0"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92"
checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83"
dependencies = [
"thiserror",
"toml",
@@ -861,18 +874,18 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.28"
version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612"
checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
dependencies = [
"unicode-xid",
]
[[package]]
name = "quote"
version = "1.0.9"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
dependencies = [
"proc-macro2",
]
@@ -917,9 +930,9 @@ dependencies = [
[[package]]
name = "ryu"
version = "1.0.5"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
[[package]]
name = "semver"
@@ -941,15 +954,15 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.127"
version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8"
checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
[[package]]
name = "shlex"
version = "1.0.0"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d"
checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
[[package]]
name = "signal"
@@ -963,15 +976,15 @@ dependencies = [
[[package]]
name = "slab"
version = "0.4.4"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590"
checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
[[package]]
name = "smallvec"
version = "1.6.1"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
[[package]]
name = "static_assertions"
@@ -997,7 +1010,7 @@ version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec"
dependencies = [
"heck",
"heck 0.3.3",
"proc-macro2",
"quote",
"syn",
@@ -1005,9 +1018,9 @@ dependencies = [
[[package]]
name = "syn"
version = "1.0.74"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c"
checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
dependencies = [
"proc-macro2",
"quote",
@@ -1021,15 +1034,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "480c269f870722b3b08d2f13053ce0c2ab722839f472863c3e2d61ff3a1c2fa6"
dependencies = [
"anyhow",
"cfg-expr",
"heck",
"cfg-expr 0.8.1",
"heck 0.3.3",
"itertools",
"pkg-config",
"strum",
"strum_macros",
"thiserror",
"toml",
"version-compare",
"version-compare 0.0.11",
]
[[package]]
name = "system-deps"
version = "6.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad3a97fdef3daf935d929b3e97e5a6a680cd4622e40c2941ca0875d6566416f8"
dependencies = [
"cfg-expr 0.9.1",
"heck 0.4.0",
"pkg-config",
"toml",
"version-compare 0.1.0",
]
[[package]]
@@ -1058,18 +1084,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.26"
version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2"
checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.26"
version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745"
checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
dependencies = [
"proc-macro2",
"quote",
@@ -1099,9 +1125,9 @@ checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
[[package]]
name = "unicode-width"
version = "0.1.8"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
[[package]]
name = "unicode-xid"
@@ -1122,10 +1148,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b"
[[package]]
name = "version_check"
version = "0.9.3"
name = "version-compare"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
checksum = "fe88247b92c1df6b6de80ddc290f3976dbdf2f5f5d3fd049a9fb598c6dd5ca73"
[[package]]
name = "version_check"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "void"
@@ -1135,10 +1167,12 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
[[package]]
name = "which"
version = "3.1.1"
version = "4.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724"
checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
dependencies = [
"either",
"lazy_static",
"libc",
]

View File

@@ -1,11 +1,12 @@
[package]
name = "helvum"
version = "0.3.0"
version = "0.3.4"
authors = ["Tom A. Wagner <tom.a.wagner@protonmail.com>"]
edition = "2018"
edition = "2021"
rust-version = "1.56"
license = "GPL-3.0-only"
description = "A GTK patchbay for pipewire"
repository = "https://gitlab.freedesktop.org/ryuukyu/helvum"
repository = "https://gitlab.freedesktop.org/pipewire/helvum"
readme = "README.md"
keywords = ["pipewire", "gtk", "patchbay", "gui", "utility"]
categories = ["gui", "multimedia"]
@@ -14,9 +15,9 @@ categories = ["gui", "multimedia"]
[dependencies]
pipewire = "0.4"
gtk = { version = "0.2", package = "gtk4" }
gtk = { version = "0.4.1", package = "gtk4" }
glib = { version = "0.15.1", features = ["log"] }
log = "0.4.11"
env_logger = "0.9.0"
once_cell = "1.7.2"

14
LICENSE
View File

@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Helvum
Copyright (C) 2020 Ryuukyu
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -645,14 +645,14 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Helvum Copyright (C) 2020 Ryuukyu
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@@ -1,9 +1,10 @@
Helvum is a GTK-based patchbay for pipewire, inspired by the JACK tool [catia](https://kx.studio/Applications:Catia).
![Screenshot](screenshot.png)
![Screenshot](docs/screenshot.png)
[![Packaging status](https://repology.org/badge/vertical-allrepos/helvum.svg)](https://repology.org/project/helvum/versions)
<a href="https://flathub.org/apps/details/org.pipewire.Helvum"><img src="https://flathub.org/assets/badges/flathub-badge-en.png" width="300"/></a>
<a href="https://repology.org/project/helvum/versions"><img src="https://repology.org/badge/vertical-allrepos/helvum.svg" width="300"/></a>
# Features planned
@@ -14,38 +15,49 @@ More suggestions are welcome!
# Building
## Via flatpak (recommended)
The recommended way to build is using flatpak, which will take care of all dependencies and avoid any problems that may come from different system configurations.
First, install the required flatpak platform and SDK, if you dont have them already:
## Via flatpak
If you don't have the flathub repo in your remote-list for flatpak you will need to add that first:
```shell
$ flatpak install org.gnome.{Platform,Sdk}//40 org.freedesktop.Sdk.Extension.rust-stable//20.08
$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
```
To compile and install as a flatpak, run
Then install the required flatpak platform and SDK, if you dont have them already:
```shell
$ flatpak-builder --install flatpak-build/ org.freedesktop.ryuukyu.Helvum.json
$ flatpak install org.gnome.{Platform,Sdk}//41 org.freedesktop.Sdk.Extension.rust-stable//21.08 org.freedesktop.Sdk.Extension.llvm12//21.08
```
To compile and install as a flatpak, clone the project, change to the project directory, and run:
```shell
$ flatpak-builder --install flatpak-build/ build-aux/org.pipewire.Helvum.json
```
You can then run the app via
```shell
flatpak run org.freedesktop.ryuukyu.Helvum
$ flatpak run org.pipewire.Helvum
```
## Manually
For compilation, you will need:
- Meson
- An up-to-date rust toolchain
- `libclang-3.7` or higher
- `gtk-4.0` and `pipewire-0.3` development headers
To compile, run
To compile and install, run
$ cargo build --release
```shell
$ meson setup build && cd build
$ meson compile
$ meson install
```
in the repository root.
The resulting binary will be at `target/release/helvum`.
This will install the compiled project files into `/usr/local`.
# License
# License and Credits
Helvum is distributed under the terms of the GPL3 license.
See LICENSE for more information.
See LICENSE for more information.
Parts of the build system were taken from the [gtk-rust-template](https://gitlab.gnome.org/World/Rust/gtk-rust-template) project,
which is provided under the terms of the [MIT license](https://gitlab.gnome.org/World/Rust/gtk-rust-template/-/blob/master/LICENSE.md).

12
build-aux/dist-vendor.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
export DIST="$1"
export SOURCE_ROOT="$2"
cd "$SOURCE_ROOT"
mkdir "$DIST"/.cargo
cargo vendor > $DIST/.cargo/config
# Move vendor into dist tarball directory
mv vendor "$DIST"

View File

@@ -0,0 +1,40 @@
{
"app-id": "org.pipewire.Helvum",
"runtime": "org.gnome.Platform",
"runtime-version": "41",
"sdk": "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.rust-stable",
"org.freedesktop.Sdk.Extension.llvm12"
],
"command": "helvum",
"finish-args": [
"--socket=fallback-x11",
"--socket=wayland",
"--device=dri",
"--share=ipc",
"--filesystem=xdg-run/pipewire-0"
],
"build-options": {
"append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm12/bin",
"prepend-ld-library-path": "/usr/lib/sdk/llvm12/lib",
"build-args": [
"--share=network"
]
},
"modules": [
{
"name": "Helvum",
"buildsystem": "meson",
"sources": [
{
"type": "dir",
"path": "../"
}
],
"config-opts": [
"-Dprofile=development"
]
}
]
}

9
data/icons/meson.build Normal file
View File

@@ -0,0 +1,9 @@
install_data(
'@0@.svg'.format(base_id),
install_dir: iconsdir / 'hicolor' / 'scalable' / 'apps'
)
install_data(
'@0@-symbolic.svg'.format(base_id),
install_dir: iconsdir / 'hicolor' / 'symbolic' / 'apps',
)

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 3.5 2.5 h 9 c 1.378906 0 2.5 1.121094 2.5 2.5 v 5 c 0 1.378906 -1.121094 2.5 -2.5 2.5 h -9 c -1.378906 0 -2.5 -1.121094 -2.5 -2.5 v -5 c 0 -1.378906 1.121094 -2.5 2.5 -2.5 z m 0 0" fill="#241f31" fill-rule="evenodd"/>
<g fill="none" stroke="#8a8891">
<path d="m 11 7.5 h -6"/>
<path d="m 5 7.5 c 0 -4.15625 -1.382812 -10.855469 -3.90625 -13.25" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="4"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 589 B

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 187 KiB

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<linearGradient id="a" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#9a9996"/>
<stop offset="0.5" stop-color="#c0bfbc"/>
<stop offset="1" stop-color="#deddda"/>
</linearGradient>
<linearGradient id="b" x1="26.263471" x2="26.263586" xlink:href="#a" y1="24.848538" y2="37.1125"/>
<linearGradient id="c" gradientUnits="userSpaceOnUse" x1="7.39555839647" x2="120.60350567947" y1="82.86737386462" y2="82.86737386462">
<stop offset="0" stop-color="#5e5c64"/>
<stop offset="0.0384615" stop-color="#77767b"/>
<stop offset="0.0768555" stop-color="#5e5c64"/>
<stop offset="0.923077" stop-color="#5e5c64"/>
<stop offset="0.961538" stop-color="#77767b"/>
<stop offset="1" stop-color="#5e5c64"/>
</linearGradient>
<linearGradient id="d" gradientTransform="matrix(2.571428 0 0 2.454545 22.856596 -228.048061)" x1="16" x2="16" xlink:href="#a" y1="121.582512" y2="127.082512"/>
<linearGradient id="e" gradientTransform="matrix(2.571428 0 0 2.454545 22.856596 -253.563246)" x1="16" x2="16" xlink:href="#a" y1="121.582512" y2="127.082512"/>
<linearGradient id="f" gradientTransform="matrix(2.571428 0 0 2.454545 60.592569 -253.563246)" x1="16" x2="16" xlink:href="#a" y1="121.582512" y2="127.082512"/>
<linearGradient id="g" gradientTransform="matrix(2.571428 0 0 2.454545 60.592569 -228.048061)" x1="16" x2="16" xlink:href="#a" y1="121.582512" y2="127.082512"/>
<linearGradient id="h" gradientTransform="matrix(2.358499 0 0 2.251294 -11.472502 -204.652927)" gradientUnits="userSpaceOnUse" x1="12.5" x2="19.5" y1="113.832512" y2="113.832512">
<stop offset="0" stop-color="#c0bfbc"/>
<stop offset="0.5" stop-color="#9a9996"/>
<stop offset="1" stop-color="#c0bfbc"/>
</linearGradient>
<linearGradient id="i" gradientTransform="matrix(2.571428 0 0 2.454545 -14.879853 -228.048061)" x1="16" x2="16" xlink:href="#a" y1="121.582512" y2="127.082512"/>
<path d="m 34.519531 30.980469 c 0 3.386719 -3.695312 6.132812 -8.257812 6.132812 c -4.558594 0 -8.253907 -2.746093 -8.253907 -6.132812 s 3.695313 -6.132813 8.253907 -6.132813 c 4.5625 0 8.257812 2.746094 8.257812 6.132813 z m 0 0" fill="url(#b)" fill-rule="evenodd"/>
<path d="m 120.601562 82.867188 v 18.867187 c 0 5.226563 -4.207031 9.433594 -9.433593 9.433594 h -94.339844 c -5.226563 0 -9.433594 -4.207031 -9.433594 -9.433594 v -18.867187 z m 0 0" fill="url(#c)" fill-rule="evenodd"/>
<path d="m 16.828125 35.699219 c -5.226563 0 -9.433594 4.207031 -9.433594 9.433593 v 37.734376 c 0 5.226562 4.207031 9.433593 9.433594 9.433593 h 94.339844 c 5.226562 0 9.4375 -4.207031 9.4375 -9.433593 v -37.734376 c 0 -5.226562 -4.210938 -9.433593 -9.4375 -9.433593 h -76.648438 v 2.355469 h -16.511719 v -2.355469 z m 0 0" fill="#77767b" fill-rule="evenodd"/>
<path d="m 93.480469 76.378906 l -30.660157 -24.761718" fill="none" stroke="#77767b" stroke-linecap="square" stroke-width="3.74412"/>
<path d="m 64 58.691406 v 10.613282" fill="none" stroke="#999999" stroke-width="1.5"/>
<g fill-rule="evenodd">
<path d="m 75 77.132812 c 0 4.554688 -4.925781 8.25 -11 8.25 s -11 -3.695312 -11 -8.25 c 0 -4.558593 4.925781 -8.25 11 -8.25 s 11 3.691407 11 8.25 z m 0 0" fill="#e01b24"/>
<path d="m 73 77.132812 c 0 3.726563 -4.03125 6.75 -9 6.75 c -4.972656 0 -9 -3.023437 -9 -6.75 c 0 -3.730468 4.027344 -6.75 9 -6.75 c 4.96875 0 9 3.019532 9 6.75 z m 0 0" fill="url(#d)"/>
<path d="m 71 77.132812 c 0 2.898438 -3.132812 5.25 -7 5.25 s -7 -2.351562 -7 -5.25 c 0 -2.902343 3.132812 -5.25 7 -5.25 s 7 2.347657 7 5.25 z m 0 0" fill="#3d3846"/>
<path d="m 75 51.617188 c 0 4.554687 -4.925781 8.25 -11 8.25 s -11 -3.695313 -11 -8.25 c 0 -4.558594 4.925781 -8.25 11 -8.25 s 11 3.691406 11 8.25 z m 0 0" fill="#1c71d8"/>
<path d="m 73 51.617188 c 0 3.726562 -4.03125 6.75 -9 6.75 c -4.972656 0 -9 -3.023438 -9 -6.75 c 0 -3.730469 4.027344 -6.75 9 -6.75 c 4.96875 0 9 3.019531 9 6.75 z m 0 0" fill="url(#e)"/>
<path d="m 71 51.617188 c 0 2.898437 -3.132812 5.25 -7 5.25 s -7 -2.351563 -7 -5.25 c 0 -2.898438 3.132812 -5.25 7 -5.25 s 7 2.351562 7 5.25 z m 0 0" fill="#3d3846"/>
<path d="m 112.734375 51.617188 c 0 4.554687 -4.921875 8.25 -11 8.25 c -6.074219 0 -11 -3.695313 -11 -8.25 c 0 -4.558594 4.925781 -8.25 11 -8.25 c 6.078125 0 11 3.691406 11 8.25 z m 0 0" fill="#1c71d8"/>
<path d="m 110.734375 51.617188 c 0 3.726562 -4.027344 6.75 -9 6.75 c -4.96875 0 -9 -3.023438 -9 -6.75 c 0 -3.730469 4.03125 -6.75 9 -6.75 c 4.972656 0 9 3.019531 9 6.75 z m 0 0" fill="url(#f)"/>
<path d="m 108.734375 51.617188 c 0 2.898437 -3.132813 5.25 -7 5.25 c -3.863281 0 -7 -2.351563 -7 -5.25 c 0 -2.898438 3.136719 -5.25 7 -5.25 c 3.867187 0 7 2.351562 7 5.25 z m 0 0" fill="#3d3846"/>
</g>
<path d="m 101.734375 58.691406 v 10.613282" fill="none" stroke="#999999" stroke-width="1.5"/>
<path d="m 112.734375 77.132812 c 0 4.554688 -4.921875 8.25 -11 8.25 c -6.074219 0 -11 -3.695312 -11 -8.25 c 0 -4.558593 4.925781 -8.25 11 -8.25 c 6.078125 0 11 3.691407 11 8.25 z m 0 0" fill="#e01b24" fill-rule="evenodd"/>
<path d="m 110.734375 77.132812 c 0 3.726563 -4.027344 6.75 -9 6.75 c -4.96875 0 -9 -3.023437 -9 -6.75 c 0 -3.730468 4.03125 -6.75 9 -6.75 c 4.972656 0 9 3.019532 9 6.75 z m 0 0" fill="url(#g)" fill-rule="evenodd"/>
<path d="m 108.734375 77.132812 c 0 2.898438 -3.132813 5.25 -7 5.25 c -3.863281 0 -7 -2.351562 -7 -5.25 c 0 -2.902343 3.136719 -5.25 7 -5.25 c 3.867187 0 7 2.347657 7 5.25 z m 0 0" fill="#3d3846" fill-rule="evenodd"/>
<path d="m 26.261719 69.339844 v -10.648438" fill="none" stroke="#999999" stroke-width="1.5"/>
<path d="m 37.261719 52.515625 c 0 4.238281 -4.921875 7.671875 -11 7.671875 c -6.074219 0 -11 -3.433594 -11 -7.671875 c 0 -4.234375 4.925781 -7.671875 11 -7.671875 c 6.078125 0 11 3.4375 11 7.671875 z m 0 0" fill="#1c71d8" fill-rule="evenodd"/>
<path d="m 18.007812 30.980469 v 20.636719 c 0.003907 3.417968 3.699219 6.191406 8.253907 6.191406 c 4.554687 0 8.25 -2.765625 8.253906 -6.183594 c 0 0 0 -0.003906 0 -0.007812 v -20.636719 c -1.308594 2.597656 -4.589844 6.132812 -8.253906 6.132812 c -3.660157 0 -6.941407 -3.535156 -8.253907 -6.132812 z m 0 0" fill="url(#h)" fill-rule="evenodd"/>
<path d="m 37.261719 77.132812 c 0 4.554688 -4.921875 8.25 -11 8.25 c -6.074219 0 -11 -3.695312 -11 -8.25 c 0 -4.558593 4.925781 -8.25 11 -8.25 c 6.078125 0 11 3.691407 11 8.25 z m 0 0" fill="#e01b24" fill-rule="evenodd"/>
<path d="m 35.261719 77.132812 c 0 3.726563 -4.027344 6.75 -9 6.75 c -4.96875 0 -9 -3.023437 -9 -6.75 c 0 -3.730468 4.03125 -6.75 9 -6.75 c 4.972656 0 9 3.019532 9 6.75 z m 0 0" fill="url(#i)" fill-rule="evenodd"/>
<path d="m 33.261719 77.132812 c 0 2.898438 -3.132813 5.25 -7 5.25 c -3.863281 0 -7 -2.351562 -7 -5.25 c 0 -2.902343 3.136719 -5.25 7 -5.25 c 3.867187 0 7 2.347657 7 5.25 z m 0 0" fill="#3d3846" fill-rule="evenodd"/>
<path d="m 34.519531 30.980469 c 0 3.386719 -3.695312 6.132812 -8.257812 6.132812 c -4.558594 0 -8.253907 -2.746093 -8.253907 -6.132812 s 3.695313 -6.132813 8.253907 -6.132813 c 4.5625 0 8.257812 2.746094 8.257812 6.132813 z m 0 0" fill="#c0bfbc" fill-rule="evenodd"/>
<path d="m 30.980469 30.980469 c 0 1.953125 -2.113281 3.539062 -4.71875 3.539062 c -2.601563 0 -4.714844 -1.585937 -4.714844 -3.539062 s 2.113281 -3.539063 4.714844 -3.539063 c 2.605469 0 4.71875 1.585938 4.71875 3.539063 z m 0 0" fill="#1a5fb4" fill-rule="evenodd"/>
<path d="m 26.261719 30.980469 c 0 -7.074219 0.628906 -18.371094 -10.285157 -21.847657 c -11.828124 -3.765624 -33.882812 3 -33.882812 3" fill="none" stroke="#1a5fb4" stroke-width="9.434"/>
</svg>

After

Width:  |  Height:  |  Size: 7.7 KiB

49
data/meson.build Normal file
View File

@@ -0,0 +1,49 @@
subdir('icons')
desktop_conf = configuration_data()
desktop_conf.set('icon', base_id)
desktop_file = configure_file(
input: '@0@.desktop.in'.format(base_id),
output: '@BASENAME@',
configuration: desktop_conf
)
if desktop_file_validate.found()
test(
'validate-desktop',
desktop_file_validate,
args: [
desktop_file
],
)
endif
install_data(
desktop_file,
install_dir: datadir / 'applications'
)
appdata_conf = configuration_data()
appdata_conf.set('app-id', base_id)
appdata_file = configure_file(
input: '@0@.metainfo.xml.in'.format(base_id),
output: '@BASENAME@',
configuration: appdata_conf
)
# Validate Appdata
if appstream_util.found()
test(
'validate-appdata',
appstream_util,
args: [
'validate', '--nonet', appdata_file
],
)
endif
install_data(
appdata_file,
install_dir: datadir / 'metainfo'
)

View File

@@ -0,0 +1,9 @@
[Desktop Entry]
Name=Helvum
GenericName=Patchbay
Comment=A patchbay for pipewire
Type=Application
Exec=helvum
Terminal=false
Categories=AudioVideo;Audio;Video;Midi;Settings;GNOME;GTK;
Icon=@icon@

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2021 Tom A. Wagner <tom.a.wagner@protonmail.com> -->
<component type="desktop-application">
<id>@app-id@</id>
<metadata_license>CC-BY-SA-4.0</metadata_license>
<project_license>GPL-3.0-only</project_license>
<name>Helvum</name>
<summary>Patchbay for PipeWire</summary>
<description>
<p>
Helvum is a graphical patchbay for PipeWire.
It allows creating and removing connections between applications and/or devices to reroute
flow of audio, video and MIDI data to where it is needed.
</p>
</description>
<screenshots>
<screenshot type="default">
<image>https://gitlab.freedesktop.org/pipewire/helvum/-/raw/main/docs/screenshot.png</image>
</screenshot>
</screenshots>
<launchable type="desktop-id">@app-id@.desktop</launchable>
<url type="homepage">https://gitlab.freedesktop.org/pipewire/helvum</url>
<url type="bugtracker">https://gitlab.freedesktop.org/pipewire/helvum/-/issues</url>
<content_rating type="oars-1.0" />
<releases>
<release version="0.3.4" date="2022-02-02" />
<release version="0.3.3" date="2022-01-28" />
<release version="0.3.2" date="2021-11-30" />
<release version="0.3.1" date="2021-09-30" />
<release version="0.3.0" date="2021-08-08" />
<release version="0.2.1" date="2021-06-06" />
<release version="0.2.0" date="2021-05-21" />
<release version="0.1.0" date="2021-01-12" />
</releases>
<kudos>
<kodu>HiDpiIcon</kodu>
<kudo>ModernToolkit</kudo>
</kudos>
<developer_name>Tom A. Wagner</developer_name>
<update_contact>tom.a.wagner@protonmail.com</update_contact>
</component>

22
docs/making_a_release.md Normal file
View File

@@ -0,0 +1,22 @@
# Making a release
The following describes the process of making a new release:
1. In `data/org.pipewire.Helvum.metainfo.xml.in`,
add a new `<release>` tag to the releases section with the appropriate version and date.
2. In `meson.build` and `Cargo.toml`, bumb the projects version to the new version.
3. Ensure cargo dependencies are up-to-date by running `cargo outdated` (may require running `cargo install cargo-outdated`) and updating outdated dependencies (including the versions specified in `Cargo.lock`).
4. Commit the changes with the a message of the format "Release x.y.z"
5. Add a tag to the release with the new version and a description from describing the changes as a message (run `git tag -a x.y.z`, then write the message)
6. Make a **new** meson build directory and run `meson dist`.
Two files should be created in a `meson-dist` subdirectory:
`helvum-x.y.z.tar.xz` and
`helvum-x.y.z.tar.xz.sha256sum`
7. Push the new commit and tag to upstream, then create a new release on gitlab from the new tag, the description from the tags message formatted as markdown, and also add the two files from step 6 to the description.

BIN
docs/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

38
meson.build Normal file
View File

@@ -0,0 +1,38 @@
project(
'helvum',
'rust',
version: '0.3.4',
license: 'GPL-3.0',
meson_version: '>=0.59.0'
)
gnome = import('gnome')
base_id = 'org.pipewire.Helvum'
dependency('glib-2.0', version: '>= 2.66')
dependency('gtk4', version: '>= 4.4.0')
dependency('libpipewire-0.3')
desktop_file_validate = find_program('desktop-file-validate', required: false)
appstream_util = find_program('appstream-util', required: false)
cargo = find_program('cargo', required: true)
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
datadir = prefix / get_option('datadir')
iconsdir = datadir / 'icons'
meson.add_dist_script(
'build-aux/dist-vendor.sh',
meson.project_build_root() / 'meson-dist' / meson.project_name() + '-' + meson.project_version(),
meson.project_source_root()
)
subdir('src')
subdir('data')
gnome.post_install(
gtk_update_icon_cache: true,
update_desktop_database: true,
)

11
meson_options.txt Normal file
View File

@@ -0,0 +1,11 @@
option(
'profile',
type: 'combo',
choices: [
'default',
'development'
],
value: 'default',
description: 'The build profile for Helvum. One of "default" or "development".'
)

View File

@@ -1,36 +0,0 @@
{
"app-id": "org.freedesktop.ryuukyu.Helvum",
"runtime": "org.gnome.Platform",
"runtime-version": "40",
"sdk": "org.gnome.Sdk",
"sdk-extensions": ["org.freedesktop.Sdk.Extension.rust-stable"],
"command": "helvum",
"finish-args" : [
"--socket=fallback-x11",
"--socket=wayland",
"--device=dri",
"--share=ipc",
"--filesystem=xdg-run/pipewire-0"
],
"build-options" : {
"append-path" : "/usr/lib/sdk/rust-stable/bin",
"build-args" : [
"--share=network"
]
},
"modules": [
{
"name": "Helvum",
"buildsystem": "simple",
"build-commands": [
"cargo install --path . --root /app --no-track"
],
"sources": [
{
"type": "dir",
"path": "./"
}
]
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -1,3 +1,22 @@
// application.rs
//
// Copyright 2021 Tom A. Wagner <tom.a.wagner@protonmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// SPDX-License-Identifier: GPL-3.0-only
use std::cell::RefCell;
use gtk::{
@@ -6,12 +25,12 @@ use gtk::{
prelude::*,
subclass::prelude::*,
};
use log::{info, warn};
use log::info;
use pipewire::{channel::Sender, spa::Direction};
use crate::{
view::{self},
GtkMessage, MediaType, PipewireLink, PipewireMessage,
GtkMessage, MediaType, NodeType, PipewireLink, PipewireMessage,
};
static STYLE: &str = include_str!("style.css");
@@ -37,10 +56,10 @@ mod imp {
impl ObjectImpl for Application {}
impl ApplicationImpl for Application {
fn activate(&self, app: &Self::Type) {
let scrollwindow = gtk::ScrolledWindowBuilder::new()
let scrollwindow = gtk::ScrolledWindow::builder()
.child(&self.graphview)
.build();
let window = gtk::ApplicationWindowBuilder::new()
let window = gtk::ApplicationWindow::builder()
.application(app)
.default_width(1280)
.default_height(720)
@@ -82,9 +101,8 @@ impl Application {
gtk_receiver: Receiver<PipewireMessage>,
pw_sender: Sender<GtkMessage>,
) -> Self {
let app: Application =
glib::Object::new(&[("application-id", &"org.freedesktop.ryuukyu.Helvum")])
.expect("Failed to create new Application");
let app: Application = glib::Object::new(&[("application-id", &"org.pipewire.Helvum")])
.expect("Failed to create new Application");
let imp = imp::Application::from_instance(&app);
imp.pw_sender
@@ -108,7 +126,7 @@ impl Application {
@weak app => @default-return Continue(true),
move |msg| {
match msg {
PipewireMessage::NodeAdded{ id, name } => app.add_node(id, name.as_str()),
PipewireMessage::NodeAdded{ id, name, node_type } => app.add_node(id, name.as_str(), node_type),
PipewireMessage::PortAdded{ id, node_id, name, direction, media_type } => app.add_port(id, name.as_str(), node_id, direction, media_type),
PipewireMessage::LinkAdded{ id, node_from, port_from, node_to, port_to, active} => app.add_link(id, node_from, port_from, node_to, port_to, active),
PipewireMessage::LinkStateChanged { id, active } => app.link_state_changed(id, active), // TODO
@@ -125,12 +143,14 @@ impl Application {
}
/// Add a new node to the view.
fn add_node(&self, id: u32, name: &str) {
fn add_node(&self, id: u32, name: &str, node_type: Option<NodeType>) {
info!("Adding node to graph: id {}", id);
imp::Application::from_instance(self)
.graphview
.add_node(id, view::Node::new(name));
imp::Application::from_instance(self).graphview.add_node(
id,
view::Node::new(name),
node_type,
);
}
/// Add a new port to the view.
@@ -149,7 +169,7 @@ impl Application {
let port = view::Port::new(id, name, direction, media_type);
// Create or delete a link if the widget emits the "port-toggled" signal.
if let Err(e) = port.connect_local(
port.connect_local(
"port_toggled",
false,
clone!(@weak self as app => @default-return None, move |args| {
@@ -161,9 +181,7 @@ impl Application {
None
}),
) {
warn!("Failed to connect to \"port-toggled\" signal: {}", e);
}
);
imp.graphview.add_port(node_id, id, port);
}

View File

@@ -1,11 +1,28 @@
// main.rs
//
// Copyright 2021 Tom A. Wagner <tom.a.wagner@protonmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// SPDX-License-Identifier: GPL-3.0-only
mod application;
mod pipewire_connection;
mod view;
use gtk::{
glib::{self, PRIORITY_DEFAULT},
prelude::*,
};
use glib::PRIORITY_DEFAULT;
use gtk::prelude::*;
use pipewire::spa::Direction;
/// Messages sent by the GTK thread to notify the pipewire thread.
@@ -23,6 +40,7 @@ enum PipewireMessage {
NodeAdded {
id: u32,
name: String,
node_type: Option<NodeType>,
},
PortAdded {
id: u32,
@@ -55,6 +73,12 @@ enum PipewireMessage {
},
}
#[derive(Debug, Clone)]
pub enum NodeType {
Input,
Output,
}
#[derive(Debug, Copy, Clone)]
pub enum MediaType {
Audio,
@@ -70,8 +94,20 @@ pub struct PipewireLink {
pub port_to: u32,
}
static GLIB_LOGGER: glib::GlibLogger = glib::GlibLogger::new(
glib::GlibLoggerFormat::Structured,
glib::GlibLoggerDomain::CrateTarget,
);
fn init_glib_logger() {
log::set_logger(&GLIB_LOGGER).expect("Failed to set logger");
// Glib does not have a "Trace" log level, so only print messages "Debug" or higher priority.
log::set_max_level(log::LevelFilter::Debug);
}
fn main() -> Result<(), Box<dyn std::error::Error>> {
env_logger::init();
init_glib_logger();
gtk::init()?;
// Aquire main context so that we can attach the gtk channel later.

31
src/meson.build Normal file
View File

@@ -0,0 +1,31 @@
cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
cargo_options += [ '--target-dir', meson.project_build_root() / 'src' ]
if get_option('profile') == 'default'
cargo_options += [ '--release' ]
rust_target = 'release'
message('Building in release mode')
else
rust_target = 'debug'
message('Building in debug mode')
endif
cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
custom_target(
'cargo-build',
build_by_default: true,
build_always_stale: true,
output: meson.project_name(),
console: true,
install: true,
install_dir: bindir,
command: [
'env',
cargo_env,
cargo, 'build',
cargo_options,
'&&',
'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@',
],
)

View File

@@ -1,3 +1,22 @@
// pipewire_connection.rs
//
// Copyright 2021 Tom A. Wagner <tom.a.wagner@protonmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// SPDX-License-Identifier: GPL-3.0-only
mod state;
use std::{cell::RefCell, collections::HashMap, rc::Rc};
@@ -14,7 +33,7 @@ use pipewire::{
Context, Core, MainLoop,
};
use crate::{GtkMessage, MediaType, PipewireMessage};
use crate::{GtkMessage, MediaType, NodeType, PipewireMessage};
use state::{Item, State};
enum ProxyItem {
@@ -112,6 +131,27 @@ fn handle_node(
}
});
let media_class = |class: &str| {
if class.contains("Sink") || class.contains("Input") {
Some(NodeType::Input)
} else if class.contains("Source") || class.contains("Output") {
Some(NodeType::Output)
} else {
None
}
};
let node_type = props
.get("media.category")
.and_then(|class| {
if class.contains("Duplex") {
None
} else {
props.get("media.class").and_then(media_class)
}
})
.or_else(|| props.get("media.class").and_then(media_class));
state.borrow_mut().insert(
node.id,
Item::Node {
@@ -121,7 +161,11 @@ fn handle_node(
);
sender
.send(PipewireMessage::NodeAdded { id: node.id, name })
.send(PipewireMessage::NodeAdded {
id: node.id,
name,
node_type,
})
.expect("Failed to send message");
}

View File

@@ -1,3 +1,22 @@
// state.rs
//
// Copyright 2021 Tom A. Wagner <tom.a.wagner@protonmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// SPDX-License-Identifier: GPL-3.0-only
use std::collections::HashMap;
use crate::MediaType;

View File

@@ -1,14 +1,23 @@
@define-color audio rgb(50,100,240);
@define-color video rgb(200,200,0);
@define-color midi rgb(200,0,50);
@define-color graphview-link #808080;
.audio {
background: rgb(50,100,240);
background: @audio;
color: black;
}
.video {
background: rgb(200,200,0);
background: @video;
color: black;
}
.midi {
background: rgb(200,0,50);
background: @midi;
color: black;
}
graphview {
background: @text_view_bg;
}

View File

@@ -1,3 +1,22 @@
// graph_view.rs
//
// Copyright 2021 Tom A. Wagner <tom.a.wagner@protonmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// SPDX-License-Identifier: GPL-3.0-only
use super::{Node, Port};
use gtk::{
@@ -8,7 +27,9 @@ use gtk::{
};
use log::{error, warn};
use std::collections::HashMap;
use std::{cmp::Ordering, collections::HashMap};
use crate::NodeType;
mod imp {
use super::*;
@@ -33,6 +54,7 @@ mod imp {
fn class_init(klass: &mut Self::Class) {
// The layout manager determines how child widgets are laid out.
klass.set_layout_manager_type::<gtk::FixedLayout>();
klass.set_css_name("graphview");
}
}
@@ -45,32 +67,31 @@ mod imp {
drag_controller.connect_drag_begin(
clone!(@strong drag_state => move |drag_controller, x, y| {
let mut drag_state = drag_state.borrow_mut();
let widget = drag_controller
.widget()
.expect("drag-begin event has no widget")
.dynamic_cast::<Self::Type>()
.expect("drag-begin event is not on the GraphView");
// pick() should at least return the widget itself.
let target = widget.pick(x, y, gtk::PickFlags::DEFAULT).expect("drag-begin pick() did not return a widget");
*drag_state = if target.ancestor(Port::static_type()).is_some() {
// The user targeted a port, so the dragging should be handled by the Port
// component instead of here.
None
} else if let Some(target) = target.ancestor(Node::static_type()) {
// The user targeted a Node without targeting a specific Port.
// Drag the Node around the screen.
let (x, y) = widget.get_node_position(&target);
Some((target, x, y))
} else {
None
let mut drag_state = drag_state.borrow_mut();
let widget = drag_controller
.widget()
.dynamic_cast::<Self::Type>()
.expect("drag-begin event is not on the GraphView");
// pick() should at least return the widget itself.
let target = widget.pick(x, y, gtk::PickFlags::DEFAULT).expect("drag-begin pick() did not return a widget");
*drag_state = if target.ancestor(Port::static_type()).is_some() {
// The user targeted a port, so the dragging should be handled by the Port
// component instead of here.
None
} else if let Some(target) = target.ancestor(Node::static_type()) {
// The user targeted a Node without targeting a specific Port.
// Drag the Node around the screen.
let (x, y) = widget.get_node_position(&target);
Some((target, x, y))
} else {
None
}
}
}));
));
drag_controller.connect_drag_update(
clone!(@strong drag_state => move |drag_controller, x, y| {
let widget = drag_controller
.widget()
.expect("drag-update event has no widget")
.dynamic_cast::<Self::Type>()
.expect("drag-update event is not on the GraphView");
let drag_state = drag_state.borrow();
@@ -97,37 +118,24 @@ mod imp {
Try to use relative units (em) and colours from the theme as much as possible. */
let alloc = widget.allocation();
let widget_bounds =
graphene::Rect::new(0.0, 0.0, alloc.width() as f32, alloc.height() as f32);
let background_cr = snapshot
.append_cairo(&graphene::Rect::new(
0.0,
0.0,
alloc.width as f32,
alloc.height as f32,
))
.expect("Failed to get cairo context");
// Try to replace the background color with a darker one from the theme.
if let Some(rgba) = widget.style_context().lookup_color("text_view_bg") {
background_cr.set_source_rgb(rgba.red.into(), rgba.green.into(), rgba.blue.into());
if let Err(e) = background_cr.paint() {
warn!("Failed to paint graphview background: {}", e);
};
} // TODO: else log colour not found
let background_cr = snapshot.append_cairo(&widget_bounds);
// Draw a nice grid on the background.
background_cr.set_source_rgb(0.18, 0.18, 0.18);
background_cr.set_line_width(0.2); // TODO: Set to 1px
let mut y = 0.0;
while y < alloc.height.into() {
while y < alloc.height().into() {
background_cr.move_to(0.0, y);
background_cr.line_to(alloc.width.into(), y);
background_cr.line_to(alloc.width().into(), y);
y += 20.0; // TODO: Change to em;
}
let mut x = 0.0;
while x < alloc.width.into() {
while x < alloc.width().into() {
background_cr.move_to(x, 0.0);
background_cr.line_to(x, alloc.height.into());
background_cr.line_to(x, alloc.height().into());
x += 20.0; // TODO: Change to em;
}
if let Err(e) = background_cr.stroke() {
@@ -141,16 +149,27 @@ mod imp {
.for_each(|node| self.instance().snapshot_child(node, snapshot));
// Draw all links
let link_cr = snapshot
.append_cairo(&graphene::Rect::new(
0.0,
0.0,
alloc.width as f32,
alloc.height as f32,
))
.expect("Failed to get cairo context");
let link_cr = snapshot.append_cairo(&graphene::Rect::new(
0.0,
0.0,
alloc.width() as f32,
alloc.height() as f32,
));
link_cr.set_line_width(2.0);
link_cr.set_source_rgb(0.0, 0.0, 0.0);
let rgba = widget
.style_context()
.lookup_color("graphview-link")
.unwrap_or_else(|| gtk::gdk::RGBA::new(0.0, 0.0, 0.0, 0.0));
link_cr.set_source_rgba(
rgba.red().into(),
rgba.green().into(),
rgba.blue().into(),
rgba.alpha().into(),
);
for (link, active) in self.links.borrow().values() {
if let Some((from_x, from_y, to_x, to_y)) = self.get_link_coordinates(link) {
link_cr.move_to(from_x, from_y);
@@ -162,15 +181,24 @@ mod imp {
link_cr.set_dash(&[10.0, 5.0], 0.0);
}
// If the output port is farther right than the input port and they have
// a similar y coordinate, apply a y offset to the control points
// so that the curve sticks out a bit.
let y_control_offset = if from_x > to_x {
f64::max(0.0, 25.0 - (from_y - to_y).abs())
} else {
0.0
};
// Place curve control offset by half the x distance between the two points.
// This makes the curve scale well for varying distances between the two ports,
// especially when the output port is farther right than the input port.
let half_x_dist = f64::abs(from_x - to_x) / 2.0;
link_cr.curve_to(
from_x + half_x_dist,
from_y,
from_y - y_control_offset,
to_x - half_x_dist,
to_y,
to_y - y_control_offset,
to_x,
to_y,
);
@@ -197,34 +225,26 @@ mod imp {
// so we manually calculate the needed offsets here.
let from_port = &nodes.get(&link.node_from)?.get_port(link.port_from)?;
let gtk::Allocation {
x: mut fx,
y: mut fy,
width: fw,
height: fh,
} = from_port.allocation();
let from_node = from_port
.ancestor(Node::static_type())
.expect("Port is not a child of a node");
let gtk::Allocation { x: fnx, y: fny, .. } = from_node.allocation();
fx += fnx + fw;
fy += fny + (fh / 2);
let from_x = from_node.allocation().x()
+ from_port.allocation().x()
+ from_port.allocation().width();
let from_y = from_node.allocation().y()
+ from_port.allocation().y()
+ (from_port.allocation().height() / 2);
let to_port = &nodes.get(&link.node_to)?.get_port(link.port_to)?;
let gtk::Allocation {
x: mut tx,
y: mut ty,
height: th,
..
} = to_port.allocation();
let to_node = to_port
.ancestor(Node::static_type())
.expect("Port is not a child of a node");
let gtk::Allocation { x: tnx, y: tny, .. } = to_node.allocation();
tx += tnx;
ty += tny + (th / 2);
let to_x = to_node.allocation().x() + to_port.allocation().x();
let to_y = to_node.allocation().y()
+ to_port.allocation().y()
+ (to_port.allocation().height() / 2);
Some((fx.into(), fy.into(), tx.into(), ty.into()))
Some((from_x.into(), from_y.into(), to_x.into(), to_y.into()))
}
}
}
@@ -239,14 +259,37 @@ impl GraphView {
glib::Object::new(&[]).expect("Failed to create GraphView")
}
pub fn add_node(&self, id: u32, node: Node) {
pub fn add_node(&self, id: u32, node: Node, node_type: Option<NodeType>) {
let private = imp::GraphView::from_instance(self);
node.set_parent(self);
// Place widgets in colums of 4, growing down, then right.
// TODO: Make a better positioning algorithm.
let x = ((private.nodes.borrow().len() / 4) as f32 * 400.0) + 20.0; // This relies on integer division rounding down.
let y = (private.nodes.borrow().len() as f32 % 4.0 * 100.0) + 20.0;
// Place widgets in colums of 3, growing down
let x = if let Some(node_type) = node_type {
match node_type {
NodeType::Output => 20.0,
NodeType::Input => 820.0,
}
} else {
420.0
};
let y = private
.nodes
.borrow()
.values()
.map(|node| {
// Map nodes to their locations
self.get_node_position(&node.clone().upcast())
})
.filter(|(x2, _)| {
// Only look for other nodes that have a similar x coordinate
(x - x2).abs() < 50.0
})
.max_by(|y1, y2| {
// Get max in column
y1.partial_cmp(y2).unwrap_or(Ordering::Equal)
})
.map_or(20_f32, |(_x, y)| y + 100.0);
self.move_node(&node.clone().upcast(), x, y);
@@ -308,6 +351,7 @@ impl GraphView {
self.queue_draw();
}
/// Get the position of the specified node inside the graphview.
pub(super) fn get_node_position(&self, node: &gtk::Widget) -> (f32, f32) {
let layout_manager = self
.layout_manager()
@@ -317,11 +361,11 @@ impl GraphView {
let node = layout_manager
.layout_child(node)
.expect("Could not get layout child")
.dynamic_cast::<gtk::FixedLayoutChild>()
.expect("Could not cast to FixedLayoutChild");
let transform = node.transform().unwrap_or_default();
transform.to_translate()
node.transform()
.expect("Failed to obtain transform from layout child")
.to_translate()
}
pub(super) fn move_node(&self, node: &gtk::Widget, x: f32, y: f32) {
@@ -338,7 +382,6 @@ impl GraphView {
layout_manager
.layout_child(node)
.expect("Could not get layout child")
.dynamic_cast::<gtk::FixedLayoutChild>()
.expect("Could not cast to FixedLayoutChild")
.set_transform(&transform);

View File

@@ -1,3 +1,22 @@
// mod.rs
//
// Copyright 2021 Tom A. Wagner <tom.a.wagner@protonmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// SPDX-License-Identifier: GPL-3.0-only
//! The view presented to the user.
//!
//! This module contains gtk widgets needed to present the graphical user interface.

View File

@@ -1,3 +1,22 @@
// node.rs
//
// Copyright 2021 Tom A. Wagner <tom.a.wagner@protonmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// SPDX-License-Identifier: GPL-3.0-only
use gtk::{glib, prelude::*, subclass::prelude::*};
use pipewire::spa::Direction;

View File

@@ -1,3 +1,22 @@
// port.rs
//
// Copyright 2021 Tom A. Wagner <tom.a.wagner@protonmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// SPDX-License-Identifier: GPL-3.0-only
use gtk::{
gdk,
glib::{self, clone, subclass::Signal},
@@ -11,14 +30,14 @@ use crate::MediaType;
/// A helper struct for linking a output port to an input port.
/// It carries the output ports id.
#[derive(Clone, Debug, glib::GBoxed)]
#[gboxed(type_name = "HelvumForwardLink")]
#[derive(Clone, Debug, glib::Boxed)]
#[boxed_type(name = "HelvumForwardLink")]
struct ForwardLink(u32);
/// A helper struct for linking an input to an output port.
/// It carries the input ports id.
#[derive(Clone, Debug, glib::GBoxed)]
#[gboxed(type_name = "HelvumReversedLink")]
#[derive(Clone, Debug, glib::Boxed)]
#[boxed_type(name = "HelvumReversedLink")]
struct ReversedLink(u32);
mod imp {
@@ -104,7 +123,7 @@ impl Port {
// FIXME: We should protect against different media types, e.g. it should not be possible to drop a video port on an audio port.
// The port will simply provide its pipewire id to the drag target.
let drag_src = gtk::DragSourceBuilder::new()
let drag_src = gtk::DragSource::builder()
.content(&gdk::ContentProvider::for_value(&match direction {
Direction::Input => ReversedLink(id).to_value(),
Direction::Output => ForwardLink(id).to_value(),
@@ -136,9 +155,7 @@ impl Port {
// Get the callback registered in the widget and call it
drop_target
.widget()
.expect("Drop target has no widget")
.emit_by_name("port-toggled", &[&source_id, &this.id()])
.expect("Failed to send signal");
.emit_by_name::<()>("port-toggled", &[&source_id, &this.id()]);
} else {
warn!("Invalid type dropped on ingoing port");
}
@@ -154,9 +171,7 @@ impl Port {
// Get the callback registered in the widget and call it
drop_target
.widget()
.expect("Drop target has no widget")
.emit_by_name("port-toggled", &[&this.id(), &target_id])
.expect("Failed to send signal");
.emit_by_name::<()>("port-toggled", &[&this.id(), &target_id]);
} else {
warn!("Invalid type dropped on outgoing port");
}