diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-27 20:13:13 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-27 20:13:13 +0900 |
| commit | ea29e6bad114306b78820cb674863a9bf3041fa5 (patch) | |
| tree | da87b09d5b3b57d6744db90b697124c5d4569e8d /internal/pipewire/client.go | |
| parent | 672cf9abcac6f25abfdd2541cae6455c6da38fc3 (diff) | |
internal/pipewire: re-format for readability
This package was the first somewhat large piece of code that was
primarily written using the built-in display of my laptop. The
experience had been deeply unpleasant due to the awkward 3:2 aspect
ratio not working well with my setup, which almost always involved
having the implementation and tests side-by-side. This experience is
what provoked me to re-instate the 80-column limit that I had long
resented and rejected. This package however predates the formal
re-instating of this limit, and was never updated.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/client.go')
| -rw-r--r-- | internal/pipewire/client.go | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/internal/pipewire/client.go b/internal/pipewire/client.go index 96beeba3..e67cc22e 100644 --- a/internal/pipewire/client.go +++ b/internal/pipewire/client.go @@ -36,13 +36,16 @@ const ( ) // The ClientInfo event provides client information updates. -// This is emitted when binding to a client or when the client info is updated later. +// +// This is emitted when binding to a client or when the client info is updated +// later. type ClientInfo struct { // The global id of the client. ID Int `json:"id"` // The changes emitted by this event. ChangeMask Long `json:"change_mask"` - // Properties of this object, valid when change_mask has PW_CLIENT_CHANGE_MASK_PROPS. + // Properties of this object, valid when change_mask has + // PW_CLIENT_CHANGE_MASK_PROPS. Properties *SPADict `json:"props"` } @@ -87,8 +90,11 @@ func (c *ClientUpdateProperties) MarshalBinary() ([]byte, error) { return Marsha // UnmarshalBinary satisfies [encoding.BinaryUnmarshaler] via [Unmarshal]. func (c *ClientUpdateProperties) UnmarshalBinary(data []byte) error { return Unmarshal(data, c) } -// clientUpdateProperties queues a [ClientUpdateProperties] message for the PipeWire server. -// This method should not be called directly, the New function queues this message. +// clientUpdateProperties queues a [ClientUpdateProperties] message for the +// PipeWire server. +// +// This method should not be called directly, the New function queues this +// message. func (ctx *Context) clientUpdateProperties(props SPADict) error { return ctx.writeMessage( PW_ID_CLIENT, @@ -98,7 +104,8 @@ func (ctx *Context) clientUpdateProperties(props SPADict) error { // Client holds state of [PW_TYPE_INTERFACE_Client]. type Client struct { - // Additional information from the server, populated or updated during [Context.Roundtrip]. + // Additional information from the server, populated or updated during + // [Context.Roundtrip]. Info *ClientInfo `json:"info"` // Populated by [CoreBoundProps] events targeting [Client]. |
