Top | ![]() |
![]() |
![]() |
![]() |
PlayerctlPlayer * | playerctl_player_new () |
PlayerctlPlayer * | playerctl_player_on () |
PlayerctlPlayer * | playerctl_player_play_pause () |
PlayerctlPlayer * | playerctl_player_play () |
PlayerctlPlayer * | playerctl_player_stop () |
PlayerctlPlayer * | playerctl_player_seek () |
PlayerctlPlayer * | playerctl_player_pause () |
PlayerctlPlayer * | playerctl_player_next () |
PlayerctlPlayer * | playerctl_player_previous () |
gchar * | playerctl_player_print_metadata_prop () |
gchar * | playerctl_player_get_artist () |
gchar * | playerctl_player_get_title () |
gchar * | playerctl_player_get_album () |
void | playerctl_player_set_position () |
GVariant * | metadata | Read |
gchar * | player-name | Read / Write / Construct Only |
gint64 | position | Read |
gchar * | status | Read |
gdouble | volume | Read / Write |
PlayerctlPlayer * playerctl_player_new (const gchar *name
,GError **err
);
Allocates a new PlayerctlPlayer and tries to connect to the bus name "org.mpris.MediaPlayer2.[name]"
name |
The name to use to find the bus name of the player. |
[allow-none] |
err |
The location of a GError or NULL |
A new PlayerctlPlayer connected to the bus name or NULL if an error occurred.
[transfer full]
PlayerctlPlayer * playerctl_player_on (PlayerctlPlayer *self
,const gchar *event
,GClosure *callback
,GError **err
);
A convenience function for bindings to subscribe to an event with a callback
PlayerctlPlayer * playerctl_player_play_pause (PlayerctlPlayer *self
,GError **err
);
Command the player to play if it is paused or pause if it is playing
PlayerctlPlayer * playerctl_player_play (PlayerctlPlayer *self
,GError **err
);
Command the player to play
PlayerctlPlayer * playerctl_player_stop (PlayerctlPlayer *self
,GError **err
);
Command the player to stop
PlayerctlPlayer * playerctl_player_seek (PlayerctlPlayer *self
,gint64 offset
,GError **err
);
Command the player to seek
PlayerctlPlayer * playerctl_player_pause (PlayerctlPlayer *self
,GError **err
);
Command the player to pause
PlayerctlPlayer * playerctl_player_next (PlayerctlPlayer *self
,GError **err
);
Command the player to go to the next track
PlayerctlPlayer * playerctl_player_previous (PlayerctlPlayer *self
,GError **err
);
Command the player to go to the previous track
gchar * playerctl_player_print_metadata_prop (PlayerctlPlayer *self
,const gchar *property
,GError **err
);
Gets the artist from the metadata of the current track, or empty string if no track is playing.
gchar * playerctl_player_get_artist (PlayerctlPlayer *self
,GError **err
);
Gets the artist from the metadata of the current track, or the empty string if no track is playing.
gchar * playerctl_player_get_title (PlayerctlPlayer *self
,GError **err
);
Gets the title from the metadata of the current track, or empty string if no track is playing.
gchar * playerctl_player_get_album (PlayerctlPlayer *self
,GError **err
);
Gets the album from the metadata of the current track, or empty string if no track is playing.
void playerctl_player_set_position (PlayerctlPlayer *self
,gint64 position
,GError **err
);
Sets the position of the current track to the given position in microseconds.
“metadata”
property “metadata” GVariant *
The metadata of the currently playing track.
Flags: Read
Allowed values: GVariant<v>
Default value: NULL
“player-name”
property “player-name” gchar *
The name of the player mpris player.
Flags: Read / Write / Construct Only
Default value: NULL
“position”
property “position” gint64
The position in the current track of the player.
Flags: Read
Allowed values: >= 0
Default value: 0
“status”
property “status” gchar *
The play status of the player.
Flags: Read
Default value: NULL
“exit”
signalvoid user_function (PlayerctlPlayer *playerctlplayer, gpointer user_data)
Flags: Run First
“metadata”
signalvoid user_function (PlayerctlPlayer *playerctlplayer, GVariant *arg1, gpointer user_data)
Flags: Run First
“pause”
signalvoid user_function (PlayerctlPlayer *playerctlplayer, gpointer user_data)
Flags: Run First
“play”
signalvoid user_function (PlayerctlPlayer *playerctlplayer, gpointer user_data)
Flags: Run First
“stop”
signalvoid user_function (PlayerctlPlayer *playerctlplayer, gpointer user_data)
Flags: Run First