PhoshMediaPlayer

PhoshMediaPlayer — A simple MPRIS media player widget

Functions

Properties

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkGrid
                    ╰── PhoshMediaPlayer

Implemented Interfaces

PhoshMediaPlayer implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Description

The PhoshMediaPlayer widget interfaces with org.mpris.MediaPlayer2 based players allowing to skip through music and raising the player.

Whenever a player is found on the bus the “attached” property is set to TRUE. This can e.g. be used with g_object_bind_property() to toggle the widget's visibility.

Example

1
2
3
<object class="PhoshMediaPlayer" id="media_player">
  <property name="visible" bind-source="media_player" bind-property="attached" bind-flags="sync-create"/>
</object>

Functions

phosh_media_player_new ()

GtkWidget *
phosh_media_player_new (void);

Types and Values

PHOSH_TYPE_MEDIA_PLAYER

#define PHOSH_TYPE_MEDIA_PLAYER (phosh_media_player_get_type ())

PhoshMediaPlayer

typedef struct _PhoshMediaPlayer PhoshMediaPlayer;

Property Details

The “attached” property

  “attached”                 gboolean

Whether a player is attached.

Flags: Read

Default value: FALSE


The “playable” property

  “playable”                 gboolean

Whether the player has a playable track. This is mostly useful to ignore states where the player does not know about any track and so no sensible information can be shown.

Flags: Read

Default value: FALSE

Signal Details

The “player-raised” signal

void
user_function (PhoshMediaPlayer *phoshmediaplayer,
               gpointer          user_data)

The player was raised to the user

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Run Last