mirror of
https://github.com/zoriya/astal.git
synced 2025-12-06 06:06:10 +00:00
Merge branch 'fix/wireplumber-11'
This commit is contained in:
@@ -39,7 +39,7 @@ function Wifi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function AudioSlider() {
|
function AudioSlider() {
|
||||||
const speaker = Wp.get_default_wp()?.audio.defaultSpeaker!
|
const speaker = Wp.get_default()?.audio.defaultSpeaker!
|
||||||
|
|
||||||
return <box className="AudioSlider" css="min-width: 140px">
|
return <box className="AudioSlider" css="min-width: 140px">
|
||||||
<icon icon={bind(speaker, "volumeIcon")} />
|
<icon icon={bind(speaker, "volumeIcon")} />
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ local function Wifi()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function AudioSlider()
|
local function AudioSlider()
|
||||||
local speaker = Wp.get_default_wp().audio.default_speaker
|
local speaker = Wp.get_default().audio.default_speaker
|
||||||
|
|
||||||
return Widget.Box({
|
return Widget.Box({
|
||||||
class_name = "AudioSlider",
|
class_name = "AudioSlider",
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define ASTAL_AUTH_MAJOR_VERSION @MAJOR_VERSION@
|
||||||
|
#define ASTAL_AUTH_MINOR_VERSION @MINOR_VERSION@
|
||||||
|
#define ASTAL_AUTH_MICRO_VERSION @MICRO_VERSION@
|
||||||
|
#define ASTAL_AUTH_VERSION "@VERSION@"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define ASTAL_AUTH_TYPE_PAM (astal_auth_pam_get_type())
|
#define ASTAL_AUTH_TYPE_PAM (astal_auth_pam_get_type())
|
||||||
@@ -1,4 +1,17 @@
|
|||||||
astal_auth_inc = include_directories('.')
|
|
||||||
astal_auth_headers = files('astal-auth.h')
|
|
||||||
|
|
||||||
install_headers('astal-auth.h')
|
config = configure_file(
|
||||||
|
input: 'astal-auth.h.in',
|
||||||
|
output: 'astal-auth.h',
|
||||||
|
configuration: {
|
||||||
|
'VERSION': meson.project_version(),
|
||||||
|
'MAJOR_VERSION': version_split[0],
|
||||||
|
'MINOR_VERSION': version_split[1],
|
||||||
|
'MICRO_VERSION': version_split[2],
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
astal_auth_inc = include_directories('.')
|
||||||
|
astal_auth_headers = config
|
||||||
|
|
||||||
|
install_headers(astal_auth_headers)
|
||||||
|
|||||||
@@ -3,6 +3,13 @@
|
|||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define ASTAL_RIVER_MAJOR_VERSION @MAJOR_VERSION@
|
||||||
|
#define ASTAL_RIVER_MINOR_VERSION @MINOR_VERSION@
|
||||||
|
#define ASTAL_RIVER_MICRO_VERSION @MICRO_VERSION@
|
||||||
|
#define ASTAL_RIVER_VERSION "@VERSION@"
|
||||||
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define ASTAL_RIVER_TYPE_OUTPUT (astal_river_output_get_type())
|
#define ASTAL_RIVER_TYPE_OUTPUT (astal_river_output_get_type())
|
||||||
@@ -1,6 +1,17 @@
|
|||||||
astal_river_inc = include_directories('.')
|
|
||||||
astal_river_headers = files(
|
config = configure_file(
|
||||||
'astal-river.h',
|
input: 'astal-river.h.in',
|
||||||
|
output: 'astal-river.h',
|
||||||
|
configuration: {
|
||||||
|
'VERSION': meson.project_version(),
|
||||||
|
'MAJOR_VERSION': version_split[0],
|
||||||
|
'MINOR_VERSION': version_split[1],
|
||||||
|
'MICRO_VERSION': version_split[2],
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
install_headers('astal-river.h')
|
|
||||||
|
astal_river_inc = include_directories('.')
|
||||||
|
astal_river_headers = config
|
||||||
|
|
||||||
|
install_headers(astal_river_headers)
|
||||||
|
|||||||
4
lib/wireplumber/include/astal-wp.h
vendored
4
lib/wireplumber/include/astal-wp.h
vendored
@@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
#include "astal/wireplumber/audio.h"
|
|
||||||
#include "astal/wireplumber/endpoint.h"
|
|
||||||
#include "astal/wireplumber/wp.h"
|
|
||||||
14
lib/wireplumber/include/astal-wp.h.in
Normal file
14
lib/wireplumber/include/astal-wp.h.in
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
#ifndef WP_H
|
||||||
|
#define WP_H
|
||||||
|
|
||||||
|
#include "astal/wireplumber/audio.h"
|
||||||
|
#include "astal/wireplumber/endpoint.h"
|
||||||
|
#include "astal/wireplumber/wp.h"
|
||||||
|
|
||||||
|
#define ASTAL_WP_MAJOR_VERSION @MAJOR_VERSION@
|
||||||
|
#define ASTAL_WP_MINOR_VERSION @MINOR_VERSION@
|
||||||
|
#define ASTAL_WP_MICRO_VERSION @MICRO_VERSION@
|
||||||
|
#define ASTAL_WP_VERSION "@VERSION@"
|
||||||
|
|
||||||
|
#endif // WP_H
|
||||||
@@ -22,7 +22,7 @@ typedef enum {
|
|||||||
G_DECLARE_FINAL_TYPE(AstalWpWp, astal_wp_wp, ASTAL_WP, WP, GObject)
|
G_DECLARE_FINAL_TYPE(AstalWpWp, astal_wp_wp, ASTAL_WP, WP, GObject)
|
||||||
|
|
||||||
AstalWpWp* astal_wp_wp_get_default();
|
AstalWpWp* astal_wp_wp_get_default();
|
||||||
AstalWpWp* astal_wp_get_default_wp();
|
AstalWpWp* astal_wp_get_default();
|
||||||
|
|
||||||
AstalWpAudio* astal_wp_wp_get_audio(AstalWpWp* self);
|
AstalWpAudio* astal_wp_wp_get_audio(AstalWpWp* self);
|
||||||
AstalWpVideo* astal_wp_wp_get_video(AstalWpWp* self);
|
AstalWpVideo* astal_wp_wp_get_video(AstalWpWp* self);
|
||||||
|
|||||||
@@ -1,8 +1,18 @@
|
|||||||
astal_wireplumber_inc = include_directories('.', 'astal/wireplumber', 'private')
|
|
||||||
astal_wireplumber_headers = files(
|
config = configure_file(
|
||||||
'astal-wp.h',
|
input: 'astal-wp.h.in',
|
||||||
|
output: 'astal-wp.h',
|
||||||
|
configuration: {
|
||||||
|
'VERSION': meson.project_version(),
|
||||||
|
'MAJOR_VERSION': version_split[0],
|
||||||
|
'MINOR_VERSION': version_split[1],
|
||||||
|
'MICRO_VERSION': version_split[2],
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
astal_wireplumber_inc = include_directories('.', 'astal/wireplumber', 'private')
|
||||||
|
astal_wireplumber_headers = config
|
||||||
|
|
||||||
install_headers(astal_wireplumber_headers)
|
install_headers(astal_wireplumber_headers)
|
||||||
|
|
||||||
subdir('astal/wireplumber')
|
subdir('astal/wireplumber')
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ static void astal_wp_endpoint_set_property(GObject *object, guint property_id, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void astal_wp_endpoint_update_properties(AstalWpEndpoint *self) {
|
static void astal_wp_endpoint_update_properties(AstalWpEndpoint *self) {
|
||||||
|
|
||||||
AstalWpEndpointPrivate *priv = astal_wp_endpoint_get_instance_private(self);
|
AstalWpEndpointPrivate *priv = astal_wp_endpoint_get_instance_private(self);
|
||||||
if (priv->node == NULL) return;
|
if (priv->node == NULL) return;
|
||||||
self->id = wp_proxy_get_bound_id(WP_PROXY(priv->node));
|
self->id = wp_proxy_get_bound_id(WP_PROXY(priv->node));
|
||||||
@@ -379,9 +380,11 @@ static void astal_wp_endpoint_update_properties(AstalWpEndpoint *self) {
|
|||||||
case ASTAL_WP_MEDIA_CLASS_AUDIO_MICROPHONE:
|
case ASTAL_WP_MEDIA_CLASS_AUDIO_MICROPHONE:
|
||||||
const gchar *dev =
|
const gchar *dev =
|
||||||
wp_pipewire_object_get_property(WP_PIPEWIRE_OBJECT(priv->node), "device.id");
|
wp_pipewire_object_get_property(WP_PIPEWIRE_OBJECT(priv->node), "device.id");
|
||||||
guint device_id = g_ascii_strtoull(dev, NULL, 10);
|
if (dev != NULL) {
|
||||||
AstalWpDevice *device = astal_wp_wp_get_device(priv->wp, device_id);
|
guint device_id = g_ascii_strtoull(dev, NULL, 10);
|
||||||
icon = astal_wp_device_get_icon(device);
|
AstalWpDevice *device = astal_wp_wp_get_device(priv->wp, device_id);
|
||||||
|
icon = astal_wp_device_get_icon(device);
|
||||||
|
}
|
||||||
if (icon == NULL) {
|
if (icon == NULL) {
|
||||||
icon = self->type == ASTAL_WP_MEDIA_CLASS_AUDIO_SPEAKER
|
icon = self->type == ASTAL_WP_MEDIA_CLASS_AUDIO_SPEAKER
|
||||||
? "audio-card-symbolic"
|
? "audio-card-symbolic"
|
||||||
|
|||||||
@@ -352,13 +352,13 @@ AstalWpWp *astal_wp_wp_get_default() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* astal_wp_get_default_wp
|
* astal_wp_get_default
|
||||||
*
|
*
|
||||||
* gets the default wireplumber object.
|
* gets the default wireplumber object.
|
||||||
*
|
*
|
||||||
* Returns: (nullable) (transfer none): gets the default wireplumber object.
|
* Returns: (nullable) (transfer none): gets the default wireplumber object.
|
||||||
*/
|
*/
|
||||||
AstalWpWp *astal_wp_get_default_wp() { return astal_wp_wp_get_default(); }
|
AstalWpWp *astal_wp_get_default() { return astal_wp_wp_get_default(); }
|
||||||
|
|
||||||
static void astal_wp_wp_dispose(GObject *object) {
|
static void astal_wp_wp_dispose(GObject *object) {
|
||||||
AstalWpWp *self = ASTAL_WP_WP(object);
|
AstalWpWp *self = ASTAL_WP_WP(object);
|
||||||
|
|||||||
Reference in New Issue
Block a user