Use message passing
The internals of Amberol are not really idiomatic: we should be using message passing instead of signals.
In order to achieve that, we need to restructure the code. A lot.
-
Move player
field to theApplication
object -
Add API to Window
to update the UI -
Split gst_player
signal connections frommpris_player
signal connections
Then we can implement message passing:
-
Add Action
enumeration to theapplication
module -
Define actions - Playback: skip-previous, skip-next, play-pause
- Raise
- UpdatePlaybackPosition
-
Create a channel when creating the Application
instance -
Pass glib::Sender
toAudioPlayer::init
-
Use send!()
to sendAction
values to the application