/* mpris_player.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from mpris_player.vala, do not modify */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gdesktopappinfo.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <graphene-gobject.h>

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_UNSELECTED_OPACITY 0.5
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_ICON_REPEAT "media-playlist-repeat-symbolic"
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_ICON_REPEAT_SONG "media-playlist-repeat-song-symbolic"
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_ICON_PLAY "media-playback-start-symbolic"
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_ICON_PAUSE "media-playback-pause-symbolic"
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_UNDERLAY (underlay_get_type ())
#define UNDERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDERLAY, Underlay))
#define UNDERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDERLAY, UnderlayClass))
#define IS_UNDERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDERLAY))
#define IS_UNDERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDERLAY))
#define UNDERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDERLAY, UnderlayClass))

typedef struct _Underlay Underlay;
typedef struct _UnderlayClass UnderlayClass;
typedef struct _UnderlayPrivate UnderlayPrivate;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER (sway_notification_center_widgets_mpris_mpris_player_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER, SwayNotificationCenterWidgetsMprisMprisPlayer))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER, SwayNotificationCenterWidgetsMprisMprisPlayerClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER, SwayNotificationCenterWidgetsMprisMprisPlayerClass))

typedef struct _SwayNotificationCenterWidgetsMprisMprisPlayer SwayNotificationCenterWidgetsMprisMprisPlayer;
typedef struct _SwayNotificationCenterWidgetsMprisMprisPlayerClass SwayNotificationCenterWidgetsMprisMprisPlayerClass;
typedef struct _SwayNotificationCenterWidgetsMprisMprisPlayerPrivate SwayNotificationCenterWidgetsMprisMprisPlayerPrivate;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_SOURCE (sway_notification_center_widgets_mpris_mpris_source_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_SOURCE, SwayNotificationCenterWidgetsMprisMprisSource))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_SOURCE, SwayNotificationCenterWidgetsMprisMprisSourceClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_SOURCE))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_SOURCE))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_SOURCE, SwayNotificationCenterWidgetsMprisMprisSourceClass))

typedef struct _SwayNotificationCenterWidgetsMprisMprisSource SwayNotificationCenterWidgetsMprisMprisSource;
typedef struct _SwayNotificationCenterWidgetsMprisMprisSourceClass SwayNotificationCenterWidgetsMprisMprisSourceClass;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_CONFIG (sway_notification_center_widgets_mpris_config_get_type ())
typedef struct _SwayNotificationCenterWidgetsMprisConfig SwayNotificationCenterWidgetsMprisConfig;
typedef enum  {
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_ALWAYS,
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_WHEN_AVAILABLE,
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_NEVER
} SwayNotificationCenterWidgetsMprisAlbumArtState;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_ALBUM_ART_STATE (sway_notification_center_widgets_mpris_album_art_state_get_type ())
enum  {
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_0_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_SOURCE_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_NUM_PROPERTIES
};
static GParamSpec* sway_notification_center_widgets_mpris_mpris_player_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block20Data Block20Data;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_MEDIA_PLAYER (sway_notification_center_widgets_mpris_mpris_media_player_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_MEDIA_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_MEDIA_PLAYER, SwayNotificationCenterWidgetsMprisMprisMediaPlayer))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_MEDIA_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_MEDIA_PLAYER))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_MEDIA_PLAYER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_MEDIA_PLAYER, SwayNotificationCenterWidgetsMprisMprisMediaPlayerIface))

typedef struct _SwayNotificationCenterWidgetsMprisMprisMediaPlayer SwayNotificationCenterWidgetsMprisMprisMediaPlayer;
typedef struct _SwayNotificationCenterWidgetsMprisMprisMediaPlayerIface SwayNotificationCenterWidgetsMprisMprisMediaPlayerIface;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PROPS (sway_notification_center_widgets_mpris_mpris_props_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PROPS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PROPS, SwayNotificationCenterWidgetsMprisMprisProps))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PROPS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PROPS))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PROPS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PROPS, SwayNotificationCenterWidgetsMprisMprisPropsIface))

typedef struct _SwayNotificationCenterWidgetsMprisMprisProps SwayNotificationCenterWidgetsMprisMprisProps;
typedef struct _SwayNotificationCenterWidgetsMprisMprisPropsIface SwayNotificationCenterWidgetsMprisMprisPropsIface;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PROPS_PROXY (sway_notification_center_widgets_mpris_mpris_props_proxy_get_type ())

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_MEDIA_PLAYER_PROXY (sway_notification_center_widgets_mpris_mpris_media_player_proxy_get_type ())
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_variant_iter_free0(var) ((var == NULL) ? NULL : (var = (g_variant_iter_free (var), NULL)))
#define _g_uri_unref0(var) ((var == NULL) ? NULL : (var = (g_uri_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData;
enum  {
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_CONTENT_UPDATED_SIGNAL,
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_NUM_SIGNALS
};
static guint sway_notification_center_widgets_mpris_mpris_player_signals[SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_NUM_SIGNALS] = {0};

struct _Underlay {
	GtkWidget parent_instance;
	UnderlayPrivate * priv;
	GtkWidget* _child;
	GtkWidget* _underlay_child;
};

struct _UnderlayClass {
	GtkWidgetClass parent_class;
};

struct _SwayNotificationCenterWidgetsMprisMprisPlayer {
	Underlay parent_instance;
	SwayNotificationCenterWidgetsMprisMprisPlayerPrivate * priv;
	GtkLabel* title;
};

struct _SwayNotificationCenterWidgetsMprisMprisPlayerClass {
	UnderlayClass parent_class;
};

struct _SwayNotificationCenterWidgetsMprisConfig {
	gint image_size G_GNUC_DEPRECATED ;
	SwayNotificationCenterWidgetsMprisAlbumArtState show_album_art;
	gboolean autohide;
	gchar** blacklist;
	gint blacklist_length1;
	gboolean loop_carousel;
};

struct _SwayNotificationCenterWidgetsMprisMprisPlayerPrivate {
	GtkLabel* sub_title;
	GtkImage* album_art;
	GtkPicture* background_picture;
	GtkButton* button_shuffle;
	GtkButton* button_prev;
	GtkButton* button_play_pause;
	GtkButton* button_next;
	GtkButton* button_repeat;
	SwayNotificationCenterWidgetsMprisMprisSource* _source;
	GCancellable* album_art_cancellable;
	gchar* prev_art_data;
	GDesktopAppInfo* desktop_entry;
	SwayNotificationCenterWidgetsMprisConfig mpris_config;
};

struct _Block20Data {
	int _ref_count_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* self;
	SwayNotificationCenterWidgetsMprisMprisSource* source;
};

struct _SwayNotificationCenterWidgetsMprisMprisPropsIface {
	GTypeInterface parent_iface;
	gchar* (*get_desktop_entry) (SwayNotificationCenterWidgetsMprisMprisProps* self);
	gchar* (*get_identity) (SwayNotificationCenterWidgetsMprisMprisProps* self);
};

struct _SwayNotificationCenterWidgetsMprisMprisMediaPlayerIface {
	GTypeInterface parent_iface;
	void (*next) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*next_finish) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncResult* _res_, GError** error);
	void (*previous) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*previous_finish) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncResult* _res_, GError** error);
	void (*pause) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*pause_finish) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncResult* _res_, GError** error);
	void (*play_pause) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*play_pause_finish) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncResult* _res_, GError** error);
	void (*stop) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*stop_finish) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncResult* _res_, GError** error);
	void (*play) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*play_finish) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, GAsyncResult* _res_, GError** error);
	gchar* (*get_playback_status) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
	GHashTable* (*get_metadata) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
	gboolean (*get_can_go_next) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
	gboolean (*get_can_go_previous) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
	gboolean (*get_can_play) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
	gboolean (*get_can_pause) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
	gboolean (*get_can_control) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
	gboolean (*get_can_seek) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
	gboolean (*get_shuffle) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
	void (*set_shuffle) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, gboolean value);
	gchar* (*get_loop_status) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
	void (*set_loop_status) (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self, const gchar* value);
};

struct _SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SwayNotificationCenterWidgetsMprisMprisPlayer* self;
	GHashTable* metadata;
	gchar* art_data;
	gconstpointer _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	GCancellable* _tmp8_;
	GCancellable* _tmp9_;
	GdkTexture* album_art_texture;
	GUri* uri;
	const gchar* _tmp10_;
	GUri* _tmp11_;
	GUri* _tmp12_;
	const gchar* _tmp13_;
	GUri* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gint comma_index;
	const gchar* _tmp17_;
	GError* _tmp18_;
	gchar* meta_data;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	const gchar* _tmp21_;
	GError* _tmp22_;
	gchar* data_part;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	guchar* data;
	const gchar* _tmp25_;
	gsize _tmp26_;
	guchar* _tmp27_;
	gint data_length1;
	gint _data_size_;
	GdkPixbufLoader* loader;
	gchar* uri_hints[2];
	const gchar* _tmp28_;
	gchar** _tmp29_;
	gchar** _tmp30_;
	const gchar* mime_type;
	const gchar* _tmp31_;
	gboolean _tmp32_;
	const gchar* _tmp33_;
	gint _tmp34_;
	gint _tmp35_;
	GHashTable* _tmp36_;
	const gchar* _tmp37_;
	GdkPixbufLoader* _tmp38_;
	const gchar* _tmp39_;
	GdkPixbufLoader* _tmp40_;
	GdkPixbufLoader* _tmp41_;
	GdkPixbufLoader* _tmp42_;
	GdkPixbufLoader* _tmp43_;
	guchar* _tmp44_;
	gint _tmp44__length1;
	GdkPixbufLoader* _tmp45_;
	GdkPixbuf* pixbuf;
	GdkPixbufLoader* _tmp46_;
	GdkPixbuf* _tmp47_;
	GdkPixbuf* _tmp48_;
	GdkPixbuf* _tmp49_;
	GdkTexture* _tmp50_;
	GFile* file;
	const gchar* _tmp51_;
	GFile* _tmp52_;
	GInputStream* stream;
	GFile* _tmp53_;
	GCancellable* _tmp54_;
	GFileInputStream* _tmp55_;
	GdkPixbuf* _vala1_pixbuf;
	GInputStream* _tmp56_;
	GCancellable* _tmp57_;
	GdkPixbuf* _tmp58_;
	GdkPixbuf* _tmp59_;
	GdkTexture* _tmp60_;
	GError* e;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp61_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp62_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp63_;
	gchar* _tmp64_;
	gchar* _tmp65_;
	gchar* _tmp66_;
	GError* _tmp67_;
	const gchar* _tmp68_;
	GdkTexture* _tmp69_;
	gint icon_size;
	SwayNotificationCenterWidgetsMprisConfig _tmp70_;
	gint _tmp71_;
	GdkTexture* _tmp72_;
	gint _tmp73_;
	gint _tmp74_;
	GdkTexture* _tmp75_;
	gint _tmp76_;
	gint _tmp77_;
	GdkTexture* _tmp78_;
	gint _tmp79_;
	gint _tmp80_;
	GdkTexture* _tmp81_;
	gint _tmp82_;
	gint _tmp83_;
	GtkSnapshot* snapshot;
	GtkSnapshot* _tmp84_;
	GdkTexture* _tmp85_;
	GtkSnapshot* _tmp86_;
	graphene_size_t size;
	graphene_size_t _tmp87_;
	GtkImage* _tmp88_;
	GtkSnapshot* _tmp89_;
	GtkSnapshot* _tmp90_;
	graphene_size_t _tmp91_;
	GdkPaintable* _tmp92_;
	GdkPaintable* _tmp93_;
	GtkImage* _tmp94_;
	SwayNotificationCenterWidgetsMprisConfig _tmp95_;
	GtkPicture* _tmp96_;
	GdkTexture* _tmp97_;
	GtkImage* _tmp98_;
	SwayNotificationCenterWidgetsMprisConfig _tmp99_;
	GIcon* icon;
	GDesktopAppInfo* _tmp100_;
	GDesktopAppInfo* _tmp101_;
	GIcon* _tmp102_;
	GIcon* _tmp103_;
	GtkIconTheme* icon_theme;
	GdkDisplay* _tmp104_;
	GtkIconTheme* _tmp105_;
	GIcon* _tmp106_;
	GtkIconPaintable* icon_info;
	GtkIconTheme* _tmp107_;
	GIcon* _tmp108_;
	GtkIconPaintable* _tmp109_;
	GtkIconPaintable* _tmp110_;
	GtkImage* _tmp111_;
	GIcon* _tmp112_;
	GtkPicture* _tmp113_;
	GtkIconPaintable* _tmp114_;
	gchar* icon_name;
	gchar* _tmp115_;
	GtkImage* _tmp116_;
	const gchar* _tmp117_;
	GtkIconPaintable* _vala1_icon_info;
	GtkIconTheme* _tmp118_;
	const gchar* _tmp119_;
	GtkIconPaintable* _tmp120_;
	GtkPicture* _tmp121_;
	GtkIconPaintable* _tmp122_;
	GError* _inner_error0_;
};

static gint SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset;
static gpointer sway_notification_center_widgets_mpris_mpris_player_parent_class = NULL;
VALA_EXTERN GHashTable* sway_notification_center_pixbuf_mime_types;

VALA_EXTERN GType underlay_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Underlay, g_object_unref)
VALA_EXTERN GType sway_notification_center_widgets_mpris_mpris_player_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsMprisMprisPlayer, g_object_unref)
VALA_EXTERN GType sway_notification_center_widgets_mpris_mpris_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsMprisMprisSource, g_object_unref)
VALA_EXTERN GType sway_notification_center_widgets_mpris_config_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType sway_notification_center_widgets_mpris_album_art_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SwayNotificationCenterWidgetsMprisConfig* sway_notification_center_widgets_mpris_config_dup (const SwayNotificationCenterWidgetsMprisConfig* self);
VALA_EXTERN void sway_notification_center_widgets_mpris_config_free (SwayNotificationCenterWidgetsMprisConfig* self);
VALA_EXTERN void sway_notification_center_widgets_mpris_config_copy (const SwayNotificationCenterWidgetsMprisConfig* self,
                                                         SwayNotificationCenterWidgetsMprisConfig* dest);
VALA_EXTERN void sway_notification_center_widgets_mpris_config_destroy (SwayNotificationCenterWidgetsMprisConfig* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (SwayNotificationCenterWidgetsMprisConfig, sway_notification_center_widgets_mpris_config_destroy)
VALA_EXTERN SwayNotificationCenterWidgetsMprisMprisPlayer* sway_notification_center_widgets_mpris_mpris_player_new (SwayNotificationCenterWidgetsMprisMprisSource* source,
                                                                                                        SwayNotificationCenterWidgetsMprisConfig* mpris_config);
VALA_EXTERN SwayNotificationCenterWidgetsMprisMprisPlayer* sway_notification_center_widgets_mpris_mpris_player_construct (GType object_type,
                                                                                                              SwayNotificationCenterWidgetsMprisMprisSource* source,
                                                                                                              SwayNotificationCenterWidgetsMprisConfig* mpris_config);
static Block20Data* block20_data_ref (Block20Data* _data20_);
static void block20_data_unref (void * _userdata_);
static void sway_notification_center_widgets_mpris_mpris_player_properties_changed (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                             const gchar* iface,
                                                                             GHashTable* changed,
                                                                             gchar** invalid,
                                                                             gint invalid_length1);
static void _sway_notification_center_widgets_mpris_mpris_player_properties_changed_sway_notification_center_widgets_mpris_mpris_source_properties_changed (SwayNotificationCenterWidgetsMprisMprisSource* _sender,
                                                                                                                                                     const gchar* iface,
                                                                                                                                                     GHashTable* changed,
                                                                                                                                                     gchar** invalid,
                                                                                                                                                     gint invalid_length1,
                                                                                                                                                     gpointer self);
static void sway_notification_center_widgets_mpris_mpris_player_update_content (SwayNotificationCenterWidgetsMprisMprisPlayer* self);
static void __lambda52_ (Block20Data* _data20_);
VALA_EXTERN GType sway_notification_center_widgets_mpris_mpris_props_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsMprisMprisProps, g_object_unref)
VALA_EXTERN GType sway_notification_center_widgets_mpris_mpris_props_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint sway_notification_center_widgets_mpris_mpris_props_register_object (void* object,
                                                                          GDBusConnection* connection,
                                                                          const gchar* path,
                                                                          GError** error);
VALA_EXTERN GType sway_notification_center_widgets_mpris_mpris_media_player_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint sway_notification_center_widgets_mpris_mpris_media_player_register_object (void* object,
                                                                                 GDBusConnection* connection,
                                                                                 const gchar* path,
                                                                                 GError** error);
VALA_EXTERN GType sway_notification_center_widgets_mpris_mpris_media_player_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SwayNotificationCenterWidgetsMprisMprisMediaPlayer* sway_notification_center_widgets_mpris_mpris_source_get_media_player (SwayNotificationCenterWidgetsMprisMprisSource* self);
VALA_EXTERN gboolean sway_notification_center_widgets_mpris_mpris_media_player_get_shuffle (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
VALA_EXTERN void sway_notification_center_widgets_mpris_mpris_media_player_set_shuffle (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self,
                                                                            gboolean value);
static void ___lambda52__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda53_ (Block20Data* _data20_);
VALA_EXTERN gchar* sway_notification_center_widgets_mpris_mpris_media_player_get_loop_status (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
VALA_EXTERN void sway_notification_center_widgets_mpris_mpris_media_player_set_loop_status (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self,
                                                                                const gchar* value);
static void ___lambda53__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda54_ (Block20Data* _data20_);
VALA_EXTERN void sway_notification_center_widgets_mpris_mpris_media_player_previous (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self,
                                                                         GAsyncReadyCallback _callback_,
                                                                         gpointer _user_data_);
VALA_EXTERN void sway_notification_center_widgets_mpris_mpris_media_player_previous_finish (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self,
                                                                                GAsyncResult* _res_,
                                                                                GError** error);
static void __lambda55_ (Block20Data* _data20_);
static void sway_notification_center_widgets_mpris_mpris_player_update_buttons (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                         GHashTable* metadata);
VALA_EXTERN GHashTable* sway_notification_center_widgets_mpris_mpris_media_player_get_metadata (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
static void ___lambda55__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ___lambda54__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda56_ (Block20Data* _data20_);
VALA_EXTERN void sway_notification_center_widgets_mpris_mpris_media_player_next (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_);
VALA_EXTERN void sway_notification_center_widgets_mpris_mpris_media_player_next_finish (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self,
                                                                            GAsyncResult* _res_,
                                                                            GError** error);
static void __lambda57_ (Block20Data* _data20_);
static void ___lambda57__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ___lambda56__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda58_ (Block20Data* _data20_);
VALA_EXTERN void sway_notification_center_widgets_mpris_mpris_media_player_play_pause (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self,
                                                                           GAsyncReadyCallback _callback_,
                                                                           gpointer _user_data_);
VALA_EXTERN void sway_notification_center_widgets_mpris_mpris_media_player_play_pause_finish (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self,
                                                                                  GAsyncResult* _res_,
                                                                                  GError** error);
static void __lambda59_ (Block20Data* _data20_);
static void ___lambda59__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ___lambda58__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
VALA_EXTERN void sway_notification_center_widgets_mpris_mpris_player_before_destroy (SwayNotificationCenterWidgetsMprisMprisPlayer* self);
VALA_EXTERN SwayNotificationCenterWidgetsMprisMprisSource* sway_notification_center_widgets_mpris_mpris_player_get_source (SwayNotificationCenterWidgetsMprisMprisPlayer* self);
static void sway_notification_center_widgets_mpris_mpris_player_update_desktop_entry (SwayNotificationCenterWidgetsMprisMprisPlayer* self);
static void sway_notification_center_widgets_mpris_mpris_player_update_button_play_pause (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                                   GHashTable* metadata);
static void sway_notification_center_widgets_mpris_mpris_player_update_button_shuffle (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                                GHashTable* metadata);
static void sway_notification_center_widgets_mpris_mpris_player_update_button_repeat (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                               GHashTable* metadata);
static void sway_notification_center_widgets_mpris_mpris_player_update_button_prev (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                             GHashTable* metadata);
static void sway_notification_center_widgets_mpris_mpris_player_update_button_forward (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                                GHashTable* metadata);
static void sway_notification_center_widgets_mpris_mpris_player_update_album_art (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                           GHashTable* metadata,
                                                                           GAsyncReadyCallback _callback_,
                                                                           gpointer _user_data_);
static void sway_notification_center_widgets_mpris_mpris_player_update_album_art_finish (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                                  GAsyncResult* _res_);
static void sway_notification_center_widgets_mpris_mpris_player_update_title (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                       GHashTable* metadata);
static void sway_notification_center_widgets_mpris_mpris_player_update_sub_title (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                           GHashTable* metadata);
VALA_EXTERN GVariant* sway_notification_center_widgets_mpris_mpris_source_get_mpris_prop (SwayNotificationCenterWidgetsMprisMprisSource* self,
                                                                              const gchar* property_name);
static void sway_notification_center_widgets_mpris_mpris_player_update_album_art_data_free (gpointer _data);
static gboolean sway_notification_center_widgets_mpris_mpris_player_update_album_art_co (SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData* _data_);
static void sway_notification_center_widgets_mpris_mpris_player_update_album_art_ready (GObject* source_object,
                                                                                 GAsyncResult* _res_,
                                                                                 gpointer _user_data_);
VALA_EXTERN gchar* sway_notification_center_widgets_mpris_mpris_props_get_identity (SwayNotificationCenterWidgetsMprisMprisProps* self);
VALA_EXTERN void sway_notification_center_functions_scale_texture (GdkTexture* texture,
                                                       gint buffer_width,
                                                       gint buffer_height,
                                                       gint img_scale,
                                                       GtkSnapshot* snapshot);
VALA_EXTERN gboolean sway_notification_center_widgets_mpris_mpris_media_player_get_can_control (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
VALA_EXTERN GVariant* sway_notification_center_widgets_mpris_mpris_source_get_mpris_player_prop (SwayNotificationCenterWidgetsMprisMprisSource* self,
                                                                                     const gchar* property_name);
VALA_EXTERN gboolean sway_notification_center_widgets_mpris_mpris_media_player_get_can_go_previous (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
VALA_EXTERN gchar* sway_notification_center_widgets_mpris_mpris_media_player_get_playback_status (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
VALA_EXTERN gboolean sway_notification_center_widgets_mpris_mpris_media_player_get_can_pause (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
VALA_EXTERN gboolean sway_notification_center_widgets_mpris_mpris_media_player_get_can_play (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
VALA_EXTERN gboolean sway_notification_center_widgets_mpris_mpris_media_player_get_can_go_next (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
static void sway_notification_center_widgets_mpris_mpris_player_set_source (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                     SwayNotificationCenterWidgetsMprisMprisSource* value);
static void sway_notification_center_widgets_mpris_mpris_player_finalize (GObject * obj);
static GType sway_notification_center_widgets_mpris_mpris_player_get_type_once (void);
static void _vala_sway_notification_center_widgets_mpris_mpris_player_get_property (GObject * object,
                                                                             guint property_id,
                                                                             GValue * value,
                                                                             GParamSpec * pspec);
static void _vala_sway_notification_center_widgets_mpris_mpris_player_set_property (GObject * object,
                                                                             guint property_id,
                                                                             const GValue * value,
                                                                             GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static inline gpointer
sway_notification_center_widgets_mpris_mpris_player_get_instance_private (SwayNotificationCenterWidgetsMprisMprisPlayer* self)
{
	return G_STRUCT_MEMBER_P (self, SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static Block20Data*
block20_data_ref (Block20Data* _data20_)
{
	g_atomic_int_inc (&_data20_->_ref_count_);
	return _data20_;
}

static void
block20_data_unref (void * _userdata_)
{
	Block20Data* _data20_;
	_data20_ = (Block20Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data20_->_ref_count_)) {
		SwayNotificationCenterWidgetsMprisMprisPlayer* self;
		self = _data20_->self;
		_g_object_unref0 (_data20_->source);
		_g_object_unref0 (self);
		g_slice_free (Block20Data, _data20_);
	}
}

static void
_sway_notification_center_widgets_mpris_mpris_player_properties_changed_sway_notification_center_widgets_mpris_mpris_source_properties_changed (SwayNotificationCenterWidgetsMprisMprisSource* _sender,
                                                                                                                                                const gchar* iface,
                                                                                                                                                GHashTable* changed,
                                                                                                                                                gchar** invalid,
                                                                                                                                                gint invalid_length1,
                                                                                                                                                gpointer self)
{
	sway_notification_center_widgets_mpris_mpris_player_properties_changed ((SwayNotificationCenterWidgetsMprisMprisPlayer*) self, iface, changed, invalid, invalid_length1);
}

static void
__lambda52_ (Block20Data* _data20_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* self;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp1_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp2_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	GtkButton* _tmp6_;
	self = _data20_->self;
	_tmp0_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
	_tmp1_ = _tmp0_;
	_tmp2_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
	_tmp3_ = _tmp2_;
	_tmp4_ = sway_notification_center_widgets_mpris_mpris_media_player_get_shuffle (_tmp3_);
	_tmp5_ = _tmp4_;
	sway_notification_center_widgets_mpris_mpris_media_player_set_shuffle (_tmp1_, !_tmp5_);
	_tmp6_ = self->priv->button_shuffle;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), FALSE);
}

static void
___lambda52__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda52_ (self);
}

static void
__lambda53_ (Block20Data* _data20_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* self;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GQuark _tmp6_ = 0U;
	static GQuark _tmp5_label0 = 0;
	static GQuark _tmp5_label1 = 0;
	static GQuark _tmp5_label2 = 0;
	GtkButton* _tmp13_;
	self = _data20_->self;
	_tmp0_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
	_tmp1_ = _tmp0_;
	_tmp2_ = sway_notification_center_widgets_mpris_mpris_media_player_get_loop_status (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp6_ = (NULL == _tmp4_) ? 0 : g_quark_from_string (_tmp4_);
	g_free (_tmp4_);
	if (_tmp6_ == ((0 != _tmp5_label0) ? _tmp5_label0 : (_tmp5_label0 = g_quark_from_static_string ("None")))) {
		switch (0) {
			default:
			{
				SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp7_;
				SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp8_;
				_tmp7_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
				_tmp8_ = _tmp7_;
				sway_notification_center_widgets_mpris_mpris_media_player_set_loop_status (_tmp8_, "Playlist");
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label1) ? _tmp5_label1 : (_tmp5_label1 = g_quark_from_static_string ("Playlist")))) {
		switch (0) {
			default:
			{
				SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp9_;
				SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp10_;
				_tmp9_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
				_tmp10_ = _tmp9_;
				sway_notification_center_widgets_mpris_mpris_media_player_set_loop_status (_tmp10_, "Track");
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label2) ? _tmp5_label2 : (_tmp5_label2 = g_quark_from_static_string ("Track")))) {
		switch (0) {
			default:
			{
				SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp11_;
				SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp12_;
				_tmp11_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
				_tmp12_ = _tmp11_;
				sway_notification_center_widgets_mpris_mpris_media_player_set_loop_status (_tmp12_, "None");
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				return;
			}
		}
	}
	_tmp13_ = self->priv->button_repeat;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget), FALSE);
}

static void
___lambda53__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda53_ (self);
}

static void
__lambda55_ (Block20Data* _data20_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* self;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
	self = _data20_->self;
	_tmp0_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
	_tmp1_ = _tmp0_;
	_tmp2_ = sway_notification_center_widgets_mpris_mpris_media_player_get_metadata (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	sway_notification_center_widgets_mpris_mpris_player_update_buttons (self, _tmp4_);
	_g_hash_table_unref0 (_tmp4_);
}

static void
___lambda55__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda55_ (self);
	block20_data_unref (self);
}

static void
__lambda54_ (Block20Data* _data20_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* self;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp1_;
	self = _data20_->self;
	_tmp0_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
	_tmp1_ = _tmp0_;
	sway_notification_center_widgets_mpris_mpris_media_player_previous (_tmp1_, ___lambda55__gasync_ready_callback, block20_data_ref (_data20_));
}

static void
___lambda54__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda54_ (self);
}

static void
__lambda57_ (Block20Data* _data20_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* self;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
	self = _data20_->self;
	_tmp0_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
	_tmp1_ = _tmp0_;
	_tmp2_ = sway_notification_center_widgets_mpris_mpris_media_player_get_metadata (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	sway_notification_center_widgets_mpris_mpris_player_update_buttons (self, _tmp4_);
	_g_hash_table_unref0 (_tmp4_);
}

static void
___lambda57__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda57_ (self);
	block20_data_unref (self);
}

static void
__lambda56_ (Block20Data* _data20_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* self;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp1_;
	self = _data20_->self;
	_tmp0_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
	_tmp1_ = _tmp0_;
	sway_notification_center_widgets_mpris_mpris_media_player_next (_tmp1_, ___lambda57__gasync_ready_callback, block20_data_ref (_data20_));
}

static void
___lambda56__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda56_ (self);
}

static void
__lambda59_ (Block20Data* _data20_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* self;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
	self = _data20_->self;
	_tmp0_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
	_tmp1_ = _tmp0_;
	_tmp2_ = sway_notification_center_widgets_mpris_mpris_media_player_get_metadata (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	sway_notification_center_widgets_mpris_mpris_player_update_buttons (self, _tmp4_);
	_g_hash_table_unref0 (_tmp4_);
}

static void
___lambda59__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda59_ (self);
	block20_data_unref (self);
}

static void
__lambda58_ (Block20Data* _data20_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* self;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp1_;
	self = _data20_->self;
	_tmp0_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data20_->source);
	_tmp1_ = _tmp0_;
	sway_notification_center_widgets_mpris_mpris_media_player_play_pause (_tmp1_, ___lambda59__gasync_ready_callback, block20_data_ref (_data20_));
}

static void
___lambda58__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda58_ (self);
}

SwayNotificationCenterWidgetsMprisMprisPlayer*
sway_notification_center_widgets_mpris_mpris_player_construct (GType object_type,
                                                               SwayNotificationCenterWidgetsMprisMprisSource* source,
                                                               SwayNotificationCenterWidgetsMprisConfig* mpris_config)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer * self = NULL;
	Block20Data* _data20_;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp0_;
	SwayNotificationCenterWidgetsMprisConfig _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	GtkButton* _tmp6_;
	GtkImage* _tmp7_;
	SwayNotificationCenterWidgetsMprisConfig _tmp8_;
	GtkImage* _tmp9_;
	SwayNotificationCenterWidgetsMprisConfig _tmp10_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_SOURCE (source), NULL);
	g_return_val_if_fail (mpris_config != NULL, NULL);
	_data20_ = g_slice_new0 (Block20Data);
	_data20_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (source);
	_g_object_unref0 (_data20_->source);
	_data20_->source = _tmp0_;
	self = (SwayNotificationCenterWidgetsMprisMprisPlayer*) g_object_new (object_type, "source", _data20_->source, NULL);
	_data20_->self = g_object_ref (self);
	_tmp1_ = *mpris_config;
	self->priv->mpris_config = _tmp1_;
	g_signal_connect_object (_data20_->source, "properties-changed", (GCallback) _sway_notification_center_widgets_mpris_mpris_player_properties_changed_sway_notification_center_widgets_mpris_mpris_source_properties_changed, self, 0);
	sway_notification_center_widgets_mpris_mpris_player_update_content (self);
	_tmp2_ = self->priv->button_shuffle;
	g_signal_connect_data (_tmp2_, "clicked", (GCallback) ___lambda52__gtk_button_clicked, block20_data_ref (_data20_), (GClosureNotify) block20_data_unref, 0);
	_tmp3_ = self->priv->button_repeat;
	g_signal_connect_data (_tmp3_, "clicked", (GCallback) ___lambda53__gtk_button_clicked, block20_data_ref (_data20_), (GClosureNotify) block20_data_unref, 0);
	_tmp4_ = self->priv->button_prev;
	g_signal_connect_data (_tmp4_, "clicked", (GCallback) ___lambda54__gtk_button_clicked, block20_data_ref (_data20_), (GClosureNotify) block20_data_unref, 0);
	_tmp5_ = self->priv->button_next;
	g_signal_connect_data (_tmp5_, "clicked", (GCallback) ___lambda56__gtk_button_clicked, block20_data_ref (_data20_), (GClosureNotify) block20_data_unref, 0);
	_tmp6_ = self->priv->button_play_pause;
	g_signal_connect_data (_tmp6_, "clicked", (GCallback) ___lambda58__gtk_button_clicked, block20_data_ref (_data20_), (GClosureNotify) block20_data_unref, 0);
	_tmp7_ = self->priv->album_art;
	_tmp8_ = *mpris_config;
	gtk_image_set_pixel_size (_tmp7_, _tmp8_.image_size);
	_tmp9_ = self->priv->album_art;
	_tmp10_ = *mpris_config;
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget), _tmp10_.show_album_art == SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_ALWAYS);
	block20_data_unref (_data20_);
	_data20_ = NULL;
	return self;
}

SwayNotificationCenterWidgetsMprisMprisPlayer*
sway_notification_center_widgets_mpris_mpris_player_new (SwayNotificationCenterWidgetsMprisMprisSource* source,
                                                         SwayNotificationCenterWidgetsMprisConfig* mpris_config)
{
	return sway_notification_center_widgets_mpris_mpris_player_construct (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER, source, mpris_config);
}

void
sway_notification_center_widgets_mpris_mpris_player_before_destroy (SwayNotificationCenterWidgetsMprisMprisPlayer* self)
{
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp0_;
	guint _tmp1_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	_tmp0_ = self->priv->_source;
	g_signal_parse_name ("properties-changed", SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_SOURCE, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _sway_notification_center_widgets_mpris_mpris_player_properties_changed_sway_notification_center_widgets_mpris_mpris_source_properties_changed, self);
}

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

static void
sway_notification_center_widgets_mpris_mpris_player_properties_changed (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                        const gchar* iface,
                                                                        GHashTable* changed,
                                                                        gchar** invalid,
                                                                        gint invalid_length1)
{
	GHashTable* metadata = NULL;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp1_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
	GList* _tmp5_;
	guint _tmp17_ = 0;
	gconstpointer* _tmp18_;
	const gchar** _tmp19_;
	gint _tmp19__length1;
	gchar* _tmp20_;
	gchar* _tmp21_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	g_return_if_fail (iface != NULL);
	g_return_if_fail (changed != NULL);
	_tmp0_ = self->priv->_source;
	_tmp1_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = sway_notification_center_widgets_mpris_mpris_media_player_get_metadata (_tmp2_);
	_tmp4_ = _tmp3_;
	metadata = _tmp4_;
	_tmp5_ = g_hash_table_get_keys (changed);
	{
		GList* key_collection = NULL;
		GList* key_it = NULL;
		key_collection = _tmp5_;
		for (key_it = key_collection; key_it != NULL; key_it = key_it->next) {
			gchar* _tmp6_;
			gchar* key = NULL;
			_tmp6_ = g_strdup ((const gchar*) key_it->data);
			key = _tmp6_;
			{
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				GQuark _tmp10_ = 0U;
				static GQuark _tmp9_label0 = 0;
				static GQuark _tmp9_label1 = 0;
				static GQuark _tmp9_label2 = 0;
				static GQuark _tmp9_label3 = 0;
				static GQuark _tmp9_label4 = 0;
				static GQuark _tmp9_label5 = 0;
				static GQuark _tmp9_label6 = 0;
				static GQuark _tmp9_label7 = 0;
				static GQuark _tmp9_label8 = 0;
				static GQuark _tmp9_label9 = 0;
				_tmp7_ = key;
				_tmp8_ = _tmp7_;
				_tmp10_ = (NULL == _tmp8_) ? 0 : g_quark_from_string (_tmp8_);
				if (_tmp10_ == ((0 != _tmp9_label0) ? _tmp9_label0 : (_tmp9_label0 = g_quark_from_static_string ("DesktopEntry")))) {
					switch (0) {
						default:
						{
							sway_notification_center_widgets_mpris_mpris_player_update_desktop_entry (self);
							break;
						}
					}
				} else if (((_tmp10_ == ((0 != _tmp9_label1) ? _tmp9_label1 : (_tmp9_label1 = g_quark_from_static_string ("PlaybackStatus")))) || (_tmp10_ == ((0 != _tmp9_label2) ? _tmp9_label2 : (_tmp9_label2 = g_quark_from_static_string ("CanPause"))))) || (_tmp10_ == ((0 != _tmp9_label3) ? _tmp9_label3 : (_tmp9_label3 = g_quark_from_static_string ("CanPlay"))))) {
					switch (0) {
						default:
						{
							GHashTable* _tmp11_;
							_tmp11_ = metadata;
							sway_notification_center_widgets_mpris_mpris_player_update_button_play_pause (self, _tmp11_);
							break;
						}
					}
				} else if (_tmp10_ == ((0 != _tmp9_label4) ? _tmp9_label4 : (_tmp9_label4 = g_quark_from_static_string ("Metadata")))) {
					switch (0) {
						default:
						{
							sway_notification_center_widgets_mpris_mpris_player_update_content (self);
							break;
						}
					}
				} else if (_tmp10_ == ((0 != _tmp9_label5) ? _tmp9_label5 : (_tmp9_label5 = g_quark_from_static_string ("Shuffle")))) {
					switch (0) {
						default:
						{
							GHashTable* _tmp12_;
							_tmp12_ = metadata;
							sway_notification_center_widgets_mpris_mpris_player_update_button_shuffle (self, _tmp12_);
							break;
						}
					}
				} else if (_tmp10_ == ((0 != _tmp9_label6) ? _tmp9_label6 : (_tmp9_label6 = g_quark_from_static_string ("LoopStatus")))) {
					switch (0) {
						default:
						{
							GHashTable* _tmp13_;
							_tmp13_ = metadata;
							sway_notification_center_widgets_mpris_mpris_player_update_button_repeat (self, _tmp13_);
							break;
						}
					}
				} else if (_tmp10_ == ((0 != _tmp9_label7) ? _tmp9_label7 : (_tmp9_label7 = g_quark_from_static_string ("CanGoPrevious")))) {
					switch (0) {
						default:
						{
							GHashTable* _tmp14_;
							_tmp14_ = metadata;
							sway_notification_center_widgets_mpris_mpris_player_update_button_prev (self, _tmp14_);
							break;
						}
					}
				} else if (_tmp10_ == ((0 != _tmp9_label8) ? _tmp9_label8 : (_tmp9_label8 = g_quark_from_static_string ("CanGoNext")))) {
					switch (0) {
						default:
						{
							GHashTable* _tmp15_;
							_tmp15_ = metadata;
							sway_notification_center_widgets_mpris_mpris_player_update_button_forward (self, _tmp15_);
							break;
						}
					}
				} else if (_tmp10_ == ((0 != _tmp9_label9) ? _tmp9_label9 : (_tmp9_label9 = g_quark_from_static_string ("CanControl")))) {
					switch (0) {
						default:
						{
							GHashTable* _tmp16_;
							_tmp16_ = metadata;
							sway_notification_center_widgets_mpris_mpris_player_update_buttons (self, _tmp16_);
							break;
						}
					}
				}
				_g_free0 (key);
			}
		}
		(key_collection == NULL) ? NULL : (key_collection = (g_list_free (key_collection), NULL));
	}
	_tmp18_ = g_hash_table_get_keys_as_array (changed, &_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp19__length1 = _tmp17_;
	_tmp20_ = _vala_g_strjoinv (", ", _tmp19_, (gint) _tmp17_);
	_tmp21_ = _tmp20_;
	g_debug ("mpris_player.vala:139: Changed: %s", _tmp21_);
	_g_free0 (_tmp21_);
	_tmp19_ = (g_free (_tmp19_), NULL);
	_g_hash_table_unref0 (metadata);
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_content (SwayNotificationCenterWidgetsMprisMprisPlayer* self)
{
	GHashTable* metadata = NULL;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp1_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	_tmp0_ = self->priv->_source;
	_tmp1_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = sway_notification_center_widgets_mpris_mpris_media_player_get_metadata (_tmp2_);
	_tmp4_ = _tmp3_;
	metadata = _tmp4_;
	sway_notification_center_widgets_mpris_mpris_player_update_desktop_entry (self);
	sway_notification_center_widgets_mpris_mpris_player_update_album_art (self, metadata, NULL, NULL);
	sway_notification_center_widgets_mpris_mpris_player_update_title (self, metadata);
	sway_notification_center_widgets_mpris_mpris_player_update_sub_title (self, metadata);
	sway_notification_center_widgets_mpris_mpris_player_update_buttons (self, metadata);
	g_signal_emit (self, sway_notification_center_widgets_mpris_mpris_player_signals[SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_CONTENT_UPDATED_SIGNAL], 0);
	_g_hash_table_unref0 (metadata);
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_buttons (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                    GHashTable* metadata)
{
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	g_return_if_fail (metadata != NULL);
	sway_notification_center_widgets_mpris_mpris_player_update_button_shuffle (self, metadata);
	sway_notification_center_widgets_mpris_mpris_player_update_button_prev (self, metadata);
	sway_notification_center_widgets_mpris_mpris_player_update_button_play_pause (self, metadata);
	sway_notification_center_widgets_mpris_mpris_player_update_button_forward (self, metadata);
	sway_notification_center_widgets_mpris_mpris_player_update_button_repeat (self, metadata);
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_desktop_entry (SwayNotificationCenterWidgetsMprisMprisPlayer* self)
{
	GVariant* entry_name = NULL;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp0_;
	GVariant* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	GVariant* _tmp4_;
	gchar* name = NULL;
	GVariant* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	const gchar* _tmp12_;
	GDesktopAppInfo* _tmp13_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	_tmp0_ = self->priv->_source;
	_tmp1_ = sway_notification_center_widgets_mpris_mpris_source_get_mpris_prop (_tmp0_, "DesktopEntry");
	entry_name = _tmp1_;
	_tmp4_ = entry_name;
	if (_tmp4_ == NULL) {
		_tmp3_ = TRUE;
	} else {
		GVariant* _tmp5_;
		const GVariantType* _tmp6_;
		_tmp5_ = entry_name;
		_tmp6_ = G_VARIANT_TYPE_STRING;
		_tmp3_ = !g_variant_is_of_type (_tmp5_, _tmp6_);
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		GVariant* _tmp7_;
		const gchar* _tmp8_;
		_tmp7_ = entry_name;
		_tmp8_ = g_variant_get_string (_tmp7_, NULL);
		_tmp2_ = g_strcmp0 (_tmp8_, "") == 0;
	}
	if (_tmp2_) {
		_g_object_unref0 (self->priv->desktop_entry);
		self->priv->desktop_entry = NULL;
		_g_variant_unref0 (entry_name);
		return;
	}
	_tmp9_ = entry_name;
	_tmp10_ = g_variant_get_string (_tmp9_, NULL);
	_tmp11_ = g_strdup_printf ("%s.desktop", _tmp10_);
	name = _tmp11_;
	_tmp12_ = name;
	_tmp13_ = g_desktop_app_info_new (_tmp12_);
	if (_tmp13_) {
		g_object_set_data ((GObject *) _tmp13_, "vala-creation-function", "SwayNotificationCenter.Widgets.Mpris.MprisPlayer.update_desktop_entry");
	}
	_g_object_unref0 (self->priv->desktop_entry);
	self->priv->desktop_entry = _tmp13_;
	_g_free0 (name);
	_g_variant_unref0 (entry_name);
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_title (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                  GHashTable* metadata)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	g_return_if_fail (metadata != NULL);
	if (g_hash_table_contains (metadata, "xesam:title")) {
		gconstpointer _tmp1_;
		const gchar* _tmp2_;
		_tmp1_ = g_hash_table_lookup (metadata, "xesam:title");
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp1_, NULL);
		_tmp0_ = g_strcmp0 (_tmp2_, "") != 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gchar* str = NULL;
		gconstpointer _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		GtkLabel* _tmp6_;
		const gchar* _tmp7_;
		_tmp3_ = g_hash_table_lookup (metadata, "xesam:title");
		_tmp4_ = g_variant_get_string ((GVariant*) _tmp3_, NULL);
		_tmp5_ = g_strdup (_tmp4_);
		str = _tmp5_;
		_tmp6_ = self->title;
		_tmp7_ = str;
		gtk_label_set_text (_tmp6_, _tmp7_);
		_g_free0 (str);
	} else {
		gchar* name = NULL;
		GDesktopAppInfo* _tmp8_;
		const gchar* _tmp16_;
		GtkLabel* _tmp18_;
		const gchar* _tmp19_;
		name = NULL;
		_tmp8_ = self->priv->desktop_entry;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, G_TYPE_DESKTOP_APP_INFO)) {
			GDesktopAppInfo* _tmp9_;
			const gchar* _tmp10_;
			gchar* _tmp11_;
			const gchar* _tmp12_;
			_tmp9_ = self->priv->desktop_entry;
			_tmp10_ = g_app_info_get_display_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, g_app_info_get_type (), GAppInfo));
			_tmp11_ = g_strdup (_tmp10_);
			_g_free0 (name);
			name = _tmp11_;
			_tmp12_ = name;
			if (g_strcmp0 (_tmp12_, "") == 0) {
				GDesktopAppInfo* _tmp13_;
				const gchar* _tmp14_;
				gchar* _tmp15_;
				_tmp13_ = self->priv->desktop_entry;
				_tmp14_ = g_app_info_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, g_app_info_get_type (), GAppInfo));
				_tmp15_ = g_strdup (_tmp14_);
				_g_free0 (name);
				name = _tmp15_;
			}
		}
		_tmp16_ = name;
		if (_tmp16_ == NULL) {
			gchar* _tmp17_;
			_tmp17_ = g_strdup ("Media Player");
			_g_free0 (name);
			name = _tmp17_;
		}
		_tmp18_ = self->title;
		_tmp19_ = name;
		gtk_label_set_text (_tmp18_, _tmp19_);
		_g_free0 (name);
	}
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_sub_title (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                      GHashTable* metadata)
{
	gchar* album = NULL;
	gboolean _tmp0_ = FALSE;
	gchar* artist = NULL;
	static const gchar* TYPES[2] = {"xesam:artist", "xesam:albumArtist"};
	gchar* _result_ = NULL;
	gchar* _tmp25_;
	const gchar* _tmp26_;
	GtkLabel* _tmp41_;
	const gchar* _tmp42_;
	GtkLabel* _tmp43_;
	const gchar* _tmp44_;
	gint _tmp45_;
	gint _tmp46_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	g_return_if_fail (metadata != NULL);
	album = NULL;
	if (g_hash_table_contains (metadata, "xesam:album")) {
		gconstpointer _tmp1_;
		const gchar* _tmp2_;
		_tmp1_ = g_hash_table_lookup (metadata, "xesam:album");
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp1_, NULL);
		_tmp0_ = g_strcmp0 (_tmp2_, "") != 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gconstpointer _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp3_ = g_hash_table_lookup (metadata, "xesam:album");
		_tmp4_ = g_variant_get_string ((GVariant*) _tmp3_, NULL);
		_tmp5_ = g_strdup (_tmp4_);
		_g_free0 (album);
		album = _tmp5_;
	}
	artist = NULL;
	{
		const gchar** type_collection = NULL;
		gint type_collection_length1 = 0;
		gint _type_collection_size_ = 0;
		gint type_it = 0;
		type_collection = TYPES;
		type_collection_length1 = G_N_ELEMENTS (TYPES);
		for (type_it = 0; type_it < type_collection_length1; type_it = type_it + 1) {
			const gchar* type = NULL;
			type = type_collection[type_it];
			{
				gboolean _tmp6_ = FALSE;
				const gchar* _tmp7_;
				gboolean _tmp11_ = FALSE;
				const gchar* _tmp12_;
				_tmp7_ = artist;
				if (_tmp7_ != NULL) {
					const gchar* _tmp8_;
					gint _tmp9_;
					gint _tmp10_;
					_tmp8_ = artist;
					_tmp9_ = strlen (_tmp8_);
					_tmp10_ = _tmp9_;
					_tmp6_ = _tmp10_ > 0;
				} else {
					_tmp6_ = FALSE;
				}
				if (_tmp6_) {
					break;
				}
				_tmp12_ = type;
				if (g_hash_table_contains (metadata, _tmp12_)) {
					const gchar* _tmp13_;
					gconstpointer _tmp14_;
					const gchar* _tmp15_;
					_tmp13_ = type;
					_tmp14_ = g_hash_table_lookup (metadata, _tmp13_);
					_tmp15_ = g_variant_get_type_string ((GVariant*) _tmp14_);
					_tmp11_ = g_strcmp0 (_tmp15_, "as") == 0;
				} else {
					_tmp11_ = FALSE;
				}
				if (_tmp11_) {
					GVariantIter* iter = NULL;
					const gchar* _tmp16_;
					gconstpointer _tmp17_;
					GVariantIter* _tmp18_;
					GVariant* value = NULL;
					_tmp16_ = type;
					_tmp17_ = g_hash_table_lookup (metadata, _tmp16_);
					_tmp18_ = g_variant_iter_new ((GVariant*) _tmp17_);
					iter = _tmp18_;
					value = NULL;
					while (TRUE) {
						GVariantIter* _tmp19_;
						GVariant* _tmp20_;
						GVariant* _tmp21_;
						GVariant* _tmp22_;
						const gchar* _tmp23_;
						gchar* _tmp24_;
						_tmp19_ = iter;
						_tmp20_ = g_variant_iter_next_value (_tmp19_);
						_g_variant_unref0 (value);
						value = _tmp20_;
						_tmp21_ = value;
						if (!(_tmp21_ != NULL)) {
							break;
						}
						_tmp22_ = value;
						_tmp23_ = g_variant_get_string (_tmp22_, NULL);
						_tmp24_ = g_strdup (_tmp23_);
						_g_free0 (artist);
						artist = _tmp24_;
						break;
					}
					_g_variant_unref0 (value);
					_g_variant_iter_free0 (iter);
				}
			}
		}
	}
	_tmp25_ = g_strdup ("");
	_result_ = _tmp25_;
	_tmp26_ = album;
	if (_tmp26_ != NULL) {
		gboolean _tmp27_ = FALSE;
		const gchar* _tmp28_;
		_tmp28_ = artist;
		if (_tmp28_ != NULL) {
			const gchar* _tmp29_;
			gint _tmp30_;
			gint _tmp31_;
			_tmp29_ = artist;
			_tmp30_ = strlen (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp27_ = _tmp31_ > 0;
		} else {
			_tmp27_ = FALSE;
		}
		if (_tmp27_) {
			const gchar* _tmp32_;
			gchar* _tmp33_;
			const gchar* _tmp34_;
			gchar* _tmp35_;
			gchar** _tmp36_;
			gchar** _tmp37_;
			gint _tmp37__length1;
			gchar* _tmp38_;
			_tmp32_ = artist;
			_tmp33_ = g_strdup (_tmp32_);
			_tmp34_ = album;
			_tmp35_ = g_strdup (_tmp34_);
			_tmp36_ = g_new0 (gchar*, 2 + 1);
			_tmp36_[0] = _tmp33_;
			_tmp36_[1] = _tmp35_;
			_tmp37_ = _tmp36_;
			_tmp37__length1 = 2;
			_tmp38_ = _vala_g_strjoinv (" - ", _tmp37_, (gint) 2);
			_g_free0 (_result_);
			_result_ = _tmp38_;
			_tmp37_ = (_vala_array_free (_tmp37_, _tmp37__length1, (GDestroyNotify) g_free), NULL);
		} else {
			const gchar* _tmp39_;
			gchar* _tmp40_;
			_tmp39_ = album;
			_tmp40_ = g_strdup (_tmp39_);
			_g_free0 (_result_);
			_result_ = _tmp40_;
		}
	}
	_tmp41_ = self->priv->sub_title;
	_tmp42_ = _result_;
	gtk_label_set_text (_tmp41_, _tmp42_);
	_tmp43_ = self->priv->sub_title;
	_tmp44_ = _result_;
	_tmp45_ = strlen (_tmp44_);
	_tmp46_ = _tmp45_;
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, gtk_widget_get_type (), GtkWidget), _tmp46_ > 0);
	_g_free0 (_result_);
	_g_free0 (artist);
	_g_free0 (album);
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_album_art_data_free (gpointer _data)
{
	SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData* _data_;
	_data_ = _data;
	_g_hash_table_unref0 (_data_->metadata);
	_g_object_unref0 (_data_->self);
	g_slice_free (SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData, _data_);
}

static gpointer
_g_hash_table_ref0 (gpointer self)
{
	return self ? g_hash_table_ref (self) : NULL;
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_album_art (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                      GHashTable* metadata,
                                                                      GAsyncReadyCallback _callback_,
                                                                      gpointer _user_data_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData* _data_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp0_;
	GHashTable* _tmp1_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	g_return_if_fail (metadata != NULL);
	_data_ = g_slice_new0 (SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, sway_notification_center_widgets_mpris_mpris_player_update_album_art_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_hash_table_ref0 (metadata);
	_g_hash_table_unref0 (_data_->metadata);
	_data_->metadata = _tmp1_;
	sway_notification_center_widgets_mpris_mpris_player_update_album_art_co (_data_);
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_album_art_finish (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                             GAsyncResult* _res_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gint
string_index_of_char (const gchar* self,
                      gunichar c,
                      gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = g_utf8_strchr (((gchar*) self) + start_index, (gssize) -1, c);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_album_art_ready (GObject* source_object,
                                                                            GAsyncResult* _res_,
                                                                            gpointer _user_data_)
{
	SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	sway_notification_center_widgets_mpris_mpris_player_update_album_art_co (_data_);
}

static gboolean
sway_notification_center_widgets_mpris_mpris_player_update_album_art_co (SwayNotificationCenterWidgetsMprisMprisPlayerUpdateAlbumArtData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (g_hash_table_contains (_data_->metadata, "mpris:artUrl")) {
		_data_->_tmp0_ = g_hash_table_lookup (_data_->metadata, "mpris:artUrl");
		_data_->_tmp1_ = g_variant_get_string ((GVariant*) _data_->_tmp0_, NULL);
		_data_->_tmp2_ = g_strdup (_data_->_tmp1_);
		_data_->art_data = _data_->_tmp2_;
		_data_->_tmp3_ = _data_->art_data;
		_data_->_tmp4_ = _data_->self->priv->prev_art_data;
		if (g_strcmp0 (_data_->_tmp3_, _data_->_tmp4_) == 0) {
			_g_free0 (_data_->art_data);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp5_ = _data_->art_data;
		_data_->_tmp6_ = g_strdup (_data_->_tmp5_);
		_g_free0 (_data_->self->priv->prev_art_data);
		_data_->self->priv->prev_art_data = _data_->_tmp6_;
		_data_->_tmp7_ = _data_->art_data;
		g_debug ("mpris_player.vala:261: MPRIS album art: \"%s\"", _data_->_tmp7_);
		_data_->_tmp8_ = _data_->self->priv->album_art_cancellable;
		g_cancellable_cancel (_data_->_tmp8_);
		_data_->_tmp9_ = _data_->self->priv->album_art_cancellable;
		g_cancellable_reset (_data_->_tmp9_);
		_data_->album_art_texture = NULL;
		{
			_data_->_tmp10_ = _data_->art_data;
			_data_->_tmp11_ = g_uri_parse (_data_->_tmp10_, G_URI_FLAGS_NONE, &_data_->_inner_error0_);
			_data_->uri = _data_->_tmp11_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_data_->_tmp12_ = _data_->uri;
			_data_->_tmp13_ = g_uri_get_scheme (_data_->_tmp12_);
			if (g_strcmp0 (_data_->_tmp13_, "data") == 0) {
				_data_->_tmp14_ = _data_->uri;
				_data_->_tmp15_ = g_uri_get_path (_data_->_tmp14_);
				_data_->_tmp16_ = g_strdup (_data_->_tmp15_);
				_g_free0 (_data_->art_data);
				_data_->art_data = _data_->_tmp16_;
				_data_->_tmp17_ = _data_->art_data;
				_data_->comma_index = string_index_of_char (_data_->_tmp17_, (gunichar) ',', 0);
				if (_data_->comma_index < 0) {
					_data_->_tmp18_ = g_error_new_literal (G_URI_ERROR, G_URI_ERROR_FAILED, "Could not parse \"data\" uri");
					_data_->_inner_error0_ = _data_->_tmp18_;
					_g_uri_unref0 (_data_->uri);
					goto __catch0_g_error;
				}
				_data_->_tmp19_ = _data_->art_data;
				_data_->_tmp20_ = string_substring (_data_->_tmp19_, (glong) 0, (glong) _data_->comma_index);
				_data_->meta_data = _data_->_tmp20_;
				_data_->_tmp21_ = _data_->meta_data;
				if (!string_contains (_data_->_tmp21_, ";base64")) {
					_data_->_tmp22_ = g_error_new_literal (G_URI_ERROR, G_URI_ERROR_FAILED, "\"data\" uri doesn't contain base64 data");
					_data_->_inner_error0_ = _data_->_tmp22_;
					_g_free0 (_data_->meta_data);
					_g_uri_unref0 (_data_->uri);
					goto __catch0_g_error;
				}
				_data_->_tmp23_ = _data_->art_data;
				_data_->_tmp24_ = string_substring (_data_->_tmp23_, (glong) (_data_->comma_index + 1), (glong) -1);
				_data_->data_part = _data_->_tmp24_;
				_data_->_tmp25_ = _data_->data_part;
				_data_->_tmp26_ = 0;
				_data_->_tmp27_ = g_base64_decode (_data_->_tmp25_, &_data_->_tmp26_);
				_data_->data = _data_->_tmp27_;
				_data_->data_length1 = _data_->_tmp26_;
				_data_->_data_size_ = _data_->data_length1;
				_data_->_tmp28_ = _data_->meta_data;
				_data_->_tmp30_ = _data_->_tmp29_ = g_strsplit (_data_->_tmp28_, ";", 0);
				memcpy (_data_->uri_hints, _data_->_tmp30_, 2 * sizeof (gchar*));
				_data_->_tmp31_ = _data_->uri_hints[0];
				_data_->mime_type = _data_->_tmp31_;
				_data_->_tmp33_ = _data_->mime_type;
				_data_->_tmp34_ = strlen (_data_->_tmp33_);
				_data_->_tmp35_ = _data_->_tmp34_;
				if (_data_->_tmp35_ > 0) {
					_data_->_tmp36_ = sway_notification_center_pixbuf_mime_types;
					_data_->_tmp37_ = _data_->mime_type;
					_data_->_tmp32_ = g_hash_table_contains (_data_->_tmp36_, _data_->_tmp37_);
				} else {
					_data_->_tmp32_ = FALSE;
				}
				if (_data_->_tmp32_) {
					_data_->_tmp39_ = _data_->mime_type;
					_data_->_tmp40_ = gdk_pixbuf_loader_new_with_mime_type (_data_->_tmp39_, &_data_->_inner_error0_);
					if (_data_->_tmp40_) {
						g_object_set_data ((GObject *) _data_->_tmp40_, "vala-creation-function", "SwayNotificationCenter.Widgets.Mpris.MprisPlayer.update_album_art");
					}
					_data_->_tmp38_ = _data_->_tmp40_;
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						_vala_array_destroy (_data_->uri_hints, 2, (GDestroyNotify) g_free);
						_g_object_unref0 (_data_->loader);
						_data_->data = (g_free (_data_->data), NULL);
						_g_free0 (_data_->data_part);
						_g_free0 (_data_->meta_data);
						_g_uri_unref0 (_data_->uri);
						goto __catch0_g_error;
					}
					_data_->_tmp41_ = _data_->_tmp38_;
					_data_->_tmp38_ = NULL;
					_g_object_unref0 (_data_->loader);
					_data_->loader = _data_->_tmp41_;
					_g_object_unref0 (_data_->_tmp38_);
				} else {
					_data_->_tmp42_ = gdk_pixbuf_loader_new ();
					if (_data_->_tmp42_) {
						g_object_set_data ((GObject *) _data_->_tmp42_, "vala-creation-function", "SwayNotificationCenter.Widgets.Mpris.MprisPlayer.update_album_art");
					}
					_g_object_unref0 (_data_->loader);
					_data_->loader = _data_->_tmp42_;
				}
				_data_->_tmp43_ = _data_->loader;
				_data_->_tmp44_ = _data_->data;
				_data_->_tmp44__length1 = _data_->data_length1;
				gdk_pixbuf_loader_write (_data_->_tmp43_, _data_->_tmp44_, (gsize) _data_->_tmp44__length1, &_data_->_inner_error0_);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_vala_array_destroy (_data_->uri_hints, 2, (GDestroyNotify) g_free);
					_g_object_unref0 (_data_->loader);
					_data_->data = (g_free (_data_->data), NULL);
					_g_free0 (_data_->data_part);
					_g_free0 (_data_->meta_data);
					_g_uri_unref0 (_data_->uri);
					goto __catch0_g_error;
				}
				_data_->_tmp45_ = _data_->loader;
				gdk_pixbuf_loader_close (_data_->_tmp45_, &_data_->_inner_error0_);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_vala_array_destroy (_data_->uri_hints, 2, (GDestroyNotify) g_free);
					_g_object_unref0 (_data_->loader);
					_data_->data = (g_free (_data_->data), NULL);
					_g_free0 (_data_->data_part);
					_g_free0 (_data_->meta_data);
					_g_uri_unref0 (_data_->uri);
					goto __catch0_g_error;
				}
				_data_->_tmp46_ = _data_->loader;
				_data_->_tmp47_ = gdk_pixbuf_loader_get_pixbuf (_data_->_tmp46_);
				_data_->pixbuf = _data_->_tmp47_;
				_data_->_tmp48_ = _data_->pixbuf;
				if (_data_->_tmp48_ != NULL) {
					_data_->_tmp49_ = _data_->pixbuf;
					_data_->_tmp50_ = gdk_texture_new_for_pixbuf (_data_->_tmp49_);
					_g_object_unref0 (_data_->album_art_texture);
					_data_->album_art_texture = _data_->_tmp50_;
				}
				_vala_array_destroy (_data_->uri_hints, 2, (GDestroyNotify) g_free);
				_g_object_unref0 (_data_->loader);
				_data_->data = (g_free (_data_->data), NULL);
				_g_free0 (_data_->data_part);
				_g_free0 (_data_->meta_data);
			} else {
				_data_->_tmp51_ = _data_->art_data;
				_data_->_tmp52_ = g_file_new_for_uri (_data_->_tmp51_);
				_data_->file = _data_->_tmp52_;
				_data_->_tmp53_ = _data_->file;
				_data_->_tmp54_ = _data_->self->priv->album_art_cancellable;
				_data_->_state_ = 1;
				g_file_read_async (_data_->_tmp53_, G_PRIORITY_DEFAULT, _data_->_tmp54_, sway_notification_center_widgets_mpris_mpris_player_update_album_art_ready, _data_);
				return FALSE;
				_state_1:
				_data_->_tmp55_ = g_file_read_finish (_data_->_tmp53_, _data_->_res_, &_data_->_inner_error0_);
				_data_->stream = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp55_, g_input_stream_get_type (), GInputStream);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_g_object_unref0 (_data_->file);
					_g_uri_unref0 (_data_->uri);
					goto __catch0_g_error;
				}
				_data_->_tmp56_ = _data_->stream;
				_data_->_tmp57_ = _data_->self->priv->album_art_cancellable;
				_data_->_state_ = 2;
				gdk_pixbuf_new_from_stream_async (_data_->_tmp56_, _data_->_tmp57_, sway_notification_center_widgets_mpris_mpris_player_update_album_art_ready, _data_);
				return FALSE;
				_state_2:
				_data_->_tmp58_ = (GdkPixbuf*) gdk_pixbuf_new_from_stream_finish (_data_->_res_, &_data_->_inner_error0_);
				if (_data_->_tmp58_) {
					g_object_set_data ((GObject *) _data_->_tmp58_, "vala-creation-function", "SwayNotificationCenter.Widgets.Mpris.MprisPlayer.update_album_art");
				}
				_data_->_vala1_pixbuf = _data_->_tmp58_;
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_g_object_unref0 (_data_->stream);
					_g_object_unref0 (_data_->file);
					_g_uri_unref0 (_data_->uri);
					goto __catch0_g_error;
				}
				_data_->_tmp59_ = _data_->_vala1_pixbuf;
				_data_->_tmp60_ = gdk_texture_new_for_pixbuf (_data_->_tmp59_);
				_g_object_unref0 (_data_->album_art_texture);
				_data_->album_art_texture = _data_->_tmp60_;
				_g_object_unref0 (_data_->_vala1_pixbuf);
				_g_object_unref0 (_data_->stream);
				_g_object_unref0 (_data_->file);
			}
			_g_uri_unref0 (_data_->uri);
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp61_ = _data_->self->priv->_source;
			_data_->_tmp62_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_data_->_tmp61_);
			_data_->_tmp63_ = _data_->_tmp62_;
			_data_->_tmp64_ = sway_notification_center_widgets_mpris_mpris_props_get_identity (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp63_, SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PROPS, SwayNotificationCenterWidgetsMprisMprisProps));
			_data_->_tmp65_ = _data_->_tmp64_;
			_data_->_tmp66_ = _data_->_tmp65_;
			_data_->_tmp67_ = _data_->e;
			_data_->_tmp68_ = _data_->_tmp67_->message;
			g_critical ("mpris_player.vala:312: MPRIS (%s) album art error: %s. Using fallback." \
"..", _data_->_tmp66_, _data_->_tmp68_);
			_g_free0 (_data_->_tmp66_);
			_g_error_free0 (_data_->e);
		}
		__finally0:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->album_art_texture);
			_g_free0 (_data_->art_data);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp69_ = _data_->album_art_texture;
		if (_data_->_tmp69_ != NULL) {
			_data_->_tmp70_ = _data_->self->priv->mpris_config;
			_data_->icon_size = _data_->_tmp70_.image_size;
			if (_data_->icon_size < 0) {
				_data_->_tmp72_ = _data_->album_art_texture;
				_data_->_tmp73_ = gdk_texture_get_width (_data_->_tmp72_);
				_data_->_tmp74_ = _data_->_tmp73_;
				_data_->_tmp75_ = _data_->album_art_texture;
				_data_->_tmp76_ = gdk_texture_get_height (_data_->_tmp75_);
				_data_->_tmp77_ = _data_->_tmp76_;
				if (_data_->_tmp74_ > _data_->_tmp77_) {
					_data_->_tmp78_ = _data_->album_art_texture;
					_data_->_tmp79_ = gdk_texture_get_height (_data_->_tmp78_);
					_data_->_tmp80_ = _data_->_tmp79_;
					_data_->_tmp71_ = _data_->_tmp80_;
				} else {
					_data_->_tmp81_ = _data_->album_art_texture;
					_data_->_tmp82_ = gdk_texture_get_width (_data_->_tmp81_);
					_data_->_tmp83_ = _data_->_tmp82_;
					_data_->_tmp71_ = _data_->_tmp83_;
				}
				_data_->icon_size = _data_->_tmp71_;
			}
			_data_->_tmp84_ = gtk_snapshot_new ();
			if (_data_->_tmp84_) {
				g_object_set_data ((GObject *) _data_->_tmp84_, "vala-creation-function", "SwayNotificationCenter.Widgets.Mpris.MprisPlayer.update_album_art");
			}
			_data_->snapshot = _data_->_tmp84_;
			_data_->_tmp85_ = _data_->album_art_texture;
			_data_->_tmp86_ = _data_->snapshot;
			sway_notification_center_functions_scale_texture (_data_->_tmp85_, _data_->icon_size, _data_->icon_size, gtk_widget_get_scale_factor (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, gtk_widget_get_type (), GtkWidget)), _data_->_tmp86_);
			memset (&_data_->_tmp87_, 0, sizeof (graphene_size_t));
			memset (&_data_->_tmp87_, 0, sizeof (graphene_size_t));
			_data_->size = *graphene_size_init (&_data_->_tmp87_, (gfloat) _data_->icon_size, (gfloat) _data_->icon_size);
			_data_->_tmp88_ = _data_->self->priv->album_art;
			_data_->_tmp89_ = _data_->snapshot;
			_data_->_tmp90_ = _g_object_ref0 (_data_->_tmp89_);
			_data_->_tmp91_ = _data_->size;
			_data_->_tmp92_ = gtk_snapshot_free_to_paintable (_data_->_tmp90_, &_data_->_tmp91_);
			_data_->_tmp93_ = _data_->_tmp92_;
			gtk_image_set_from_paintable (_data_->_tmp88_, _data_->_tmp93_);
			_g_object_unref0 (_data_->_tmp93_);
			_data_->_tmp94_ = _data_->self->priv->album_art;
			_data_->_tmp95_ = _data_->self->priv->mpris_config;
			gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp94_, gtk_widget_get_type (), GtkWidget), _data_->_tmp95_.show_album_art != SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_NEVER);
			_data_->_tmp96_ = _data_->self->priv->background_picture;
			_data_->_tmp97_ = _data_->album_art_texture;
			gtk_picture_set_paintable (_data_->_tmp96_, G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp97_, gdk_paintable_get_type (), GdkPaintable));
			gtk_widget_queue_draw (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, gtk_widget_get_type (), GtkWidget));
			_g_object_unref0 (_data_->snapshot);
			_g_object_unref0 (_data_->album_art_texture);
			_g_free0 (_data_->art_data);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_object_unref0 (_data_->album_art_texture);
		_g_free0 (_data_->art_data);
	}
	_data_->_tmp98_ = _data_->self->priv->album_art;
	_data_->_tmp99_ = _data_->self->priv->mpris_config;
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp98_, gtk_widget_get_type (), GtkWidget), _data_->_tmp99_.show_album_art == SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_ALWAYS);
	_data_->icon = NULL;
	_data_->_tmp100_ = _data_->self->priv->desktop_entry;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp100_, G_TYPE_DESKTOP_APP_INFO)) {
		_data_->_tmp101_ = _data_->self->priv->desktop_entry;
		_data_->_tmp102_ = g_app_info_get_icon (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp101_, g_app_info_get_type (), GAppInfo));
		_data_->_tmp103_ = _g_object_ref0 (_data_->_tmp102_);
		_g_object_unref0 (_data_->icon);
		_data_->icon = _data_->_tmp103_;
	}
	_data_->_tmp104_ = gtk_widget_get_display (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, gtk_widget_get_type (), GtkWidget));
	_data_->_tmp105_ = gtk_icon_theme_get_for_display (_data_->_tmp104_);
	_data_->icon_theme = _data_->_tmp105_;
	_data_->_tmp106_ = _data_->icon;
	if (_data_->_tmp106_ != NULL) {
		_data_->_tmp107_ = _data_->icon_theme;
		_data_->_tmp108_ = _data_->icon;
		_data_->_tmp109_ = gtk_icon_theme_lookup_by_gicon (_data_->_tmp107_, _data_->_tmp108_, 128, gtk_widget_get_scale_factor (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, gtk_widget_get_type (), GtkWidget)), GTK_TEXT_DIR_NONE, 0);
		_data_->icon_info = _data_->_tmp109_;
		_data_->_tmp110_ = _data_->icon_info;
		if (_data_->_tmp110_ != NULL) {
			_data_->_tmp111_ = _data_->self->priv->album_art;
			_data_->_tmp112_ = _data_->icon;
			gtk_image_set_from_gicon (_data_->_tmp111_, _data_->_tmp112_);
			_data_->_tmp113_ = _data_->self->priv->background_picture;
			_data_->_tmp114_ = _data_->icon_info;
			gtk_picture_set_paintable (_data_->_tmp113_, G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp114_, gdk_paintable_get_type (), GdkPaintable));
			g_debug ("mpris_player.vala:353: MPRIS album art: using .desktop icon");
			_g_object_unref0 (_data_->icon_info);
			_g_object_unref0 (_data_->icon);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_object_unref0 (_data_->icon_info);
	}
	_data_->_tmp115_ = g_strdup ("audio-x-generic-symbolic");
	_data_->icon_name = _data_->_tmp115_;
	_data_->_tmp116_ = _data_->self->priv->album_art;
	_data_->_tmp117_ = _data_->icon_name;
	gtk_image_set_from_icon_name (_data_->_tmp116_, _data_->_tmp117_);
	_data_->_tmp118_ = _data_->icon_theme;
	_data_->_tmp119_ = _data_->icon_name;
	_data_->_tmp120_ = gtk_icon_theme_lookup_icon (_data_->_tmp118_, _data_->_tmp119_, NULL, 128, gtk_widget_get_scale_factor (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, gtk_widget_get_type (), GtkWidget)), GTK_TEXT_DIR_NONE, 0);
	_data_->_vala1_icon_info = _data_->_tmp120_;
	_data_->_tmp121_ = _data_->self->priv->background_picture;
	_data_->_tmp122_ = _data_->_vala1_icon_info;
	gtk_picture_set_paintable (_data_->_tmp121_, G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp122_, gdk_paintable_get_type (), GdkPaintable));
	g_debug ("mpris_player.vala:366: MPRIS album art: using default icon");
	_g_object_unref0 (_data_->_vala1_icon_info);
	_g_free0 (_data_->icon_name);
	_g_object_unref0 (_data_->icon);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_button_shuffle (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                           GHashTable* metadata)
{
	GtkButton* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp1_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp2_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	g_return_if_fail (metadata != NULL);
	_tmp0_ = self->priv->button_shuffle;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_widget_get_type ())) {
		return;
	}
	_tmp1_ = self->priv->_source;
	_tmp2_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = sway_notification_center_widgets_mpris_mpris_media_player_get_can_control (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		GVariant* shuffle = NULL;
		SwayNotificationCenterWidgetsMprisMprisSource* _tmp6_;
		GVariant* _tmp7_;
		gboolean _tmp8_ = FALSE;
		GVariant* _tmp9_;
		_tmp6_ = self->priv->_source;
		_tmp7_ = sway_notification_center_widgets_mpris_mpris_source_get_mpris_player_prop (_tmp6_, "Shuffle");
		shuffle = _tmp7_;
		_tmp9_ = shuffle;
		if (_tmp9_ == NULL) {
			_tmp8_ = TRUE;
		} else {
			GVariant* _tmp10_;
			const GVariantType* _tmp11_;
			_tmp10_ = shuffle;
			_tmp11_ = G_VARIANT_TYPE_BOOLEAN;
			_tmp8_ = !g_variant_is_of_type (_tmp10_, _tmp11_);
		}
		if (_tmp8_) {
			GtkButton* _tmp12_;
			GtkButton* _tmp13_;
			GtkWidget* _tmp14_;
			GtkButton* _tmp15_;
			_tmp12_ = self->priv->button_shuffle;
			gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget), FALSE);
			_tmp13_ = self->priv->button_shuffle;
			_tmp14_ = gtk_button_get_child (_tmp13_);
			gtk_widget_set_opacity (_tmp14_, (gdouble) 1);
			_tmp15_ = self->priv->button_shuffle;
			gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget));
		} else {
			GtkButton* _tmp16_;
			gdouble _tmp17_ = 0.0;
			SwayNotificationCenterWidgetsMprisMprisSource* _tmp18_;
			SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp19_;
			SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp20_;
			gboolean _tmp21_;
			gboolean _tmp22_;
			GtkButton* _tmp23_;
			GtkWidget* _tmp24_;
			GtkButton* _tmp25_;
			_tmp16_ = self->priv->button_shuffle;
			gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget), TRUE);
			_tmp18_ = self->priv->_source;
			_tmp19_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = sway_notification_center_widgets_mpris_mpris_media_player_get_shuffle (_tmp20_);
			_tmp22_ = _tmp21_;
			if (_tmp22_) {
				_tmp17_ = (gdouble) 1;
			} else {
				_tmp17_ = SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_UNSELECTED_OPACITY;
			}
			_tmp23_ = self->priv->button_shuffle;
			_tmp24_ = gtk_button_get_child (_tmp23_);
			gtk_widget_set_opacity (_tmp24_, _tmp17_);
			_tmp25_ = self->priv->button_shuffle;
			gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_widget_get_type (), GtkWidget));
		}
		_g_variant_unref0 (shuffle);
	} else {
		GtkButton* _tmp26_;
		_tmp26_ = self->priv->button_shuffle;
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_widget_get_type (), GtkWidget));
	}
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_button_prev (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                        GHashTable* metadata)
{
	GtkButton* _tmp0_;
	gboolean _tmp1_ = FALSE;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp2_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp3_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	GtkButton* _tmp12_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	g_return_if_fail (metadata != NULL);
	_tmp0_ = self->priv->button_prev;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_widget_get_type ())) {
		return;
	}
	_tmp2_ = self->priv->_source;
	_tmp3_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = sway_notification_center_widgets_mpris_mpris_media_player_get_can_go_previous (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		SwayNotificationCenterWidgetsMprisMprisSource* _tmp7_;
		SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp8_;
		SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp9_;
		gboolean _tmp10_;
		gboolean _tmp11_;
		_tmp7_ = self->priv->_source;
		_tmp8_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = sway_notification_center_widgets_mpris_mpris_media_player_get_can_control (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp1_ = _tmp11_;
	} else {
		_tmp1_ = FALSE;
	}
	_tmp12_ = self->priv->button_prev;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget), _tmp1_);
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_button_play_pause (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                              GHashTable* metadata)
{
	GtkButton* _tmp0_;
	gchar* icon_name = NULL;
	gboolean check = FALSE;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp1_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp2_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GQuark _tmp8_ = 0U;
	static GQuark _tmp7_label0 = 0;
	GtkButton* _tmp21_;
	const gchar* _tmp22_;
	gboolean _tmp23_ = FALSE;
	GtkButton* _tmp29_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	g_return_if_fail (metadata != NULL);
	_tmp0_ = self->priv->button_play_pause;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_widget_get_type ())) {
		return;
	}
	_tmp1_ = self->priv->_source;
	_tmp2_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = sway_notification_center_widgets_mpris_mpris_media_player_get_playback_status (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp8_ = (NULL == _tmp6_) ? 0 : g_quark_from_string (_tmp6_);
	g_free (_tmp6_);
	if (_tmp8_ == ((0 != _tmp7_label0) ? _tmp7_label0 : (_tmp7_label0 = g_quark_from_static_string ("Playing")))) {
		switch (0) {
			default:
			{
				gchar* _tmp9_;
				SwayNotificationCenterWidgetsMprisMprisSource* _tmp10_;
				SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp11_;
				SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp12_;
				gboolean _tmp13_;
				gboolean _tmp14_;
				_tmp9_ = g_strdup (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_ICON_PAUSE);
				_g_free0 (icon_name);
				icon_name = _tmp9_;
				_tmp10_ = self->priv->_source;
				_tmp11_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp10_);
				_tmp12_ = _tmp11_;
				_tmp13_ = sway_notification_center_widgets_mpris_mpris_media_player_get_can_pause (_tmp12_);
				_tmp14_ = _tmp13_;
				check = _tmp14_;
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				gchar* _tmp15_;
				SwayNotificationCenterWidgetsMprisMprisSource* _tmp16_;
				SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp17_;
				SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp18_;
				gboolean _tmp19_;
				gboolean _tmp20_;
				_tmp15_ = g_strdup (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_ICON_PLAY);
				_g_free0 (icon_name);
				icon_name = _tmp15_;
				_tmp16_ = self->priv->_source;
				_tmp17_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp16_);
				_tmp18_ = _tmp17_;
				_tmp19_ = sway_notification_center_widgets_mpris_mpris_media_player_get_can_play (_tmp18_);
				_tmp20_ = _tmp19_;
				check = _tmp20_;
				break;
			}
		}
	}
	_tmp21_ = self->priv->button_play_pause;
	_tmp22_ = icon_name;
	gtk_button_set_icon_name (_tmp21_, _tmp22_);
	if (check) {
		SwayNotificationCenterWidgetsMprisMprisSource* _tmp24_;
		SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp25_;
		SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp26_;
		gboolean _tmp27_;
		gboolean _tmp28_;
		_tmp24_ = self->priv->_source;
		_tmp25_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = sway_notification_center_widgets_mpris_mpris_media_player_get_can_control (_tmp26_);
		_tmp28_ = _tmp27_;
		_tmp23_ = _tmp28_;
	} else {
		_tmp23_ = FALSE;
	}
	_tmp29_ = self->priv->button_play_pause;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_widget_get_type (), GtkWidget), _tmp23_);
	_g_free0 (icon_name);
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_button_forward (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                           GHashTable* metadata)
{
	GtkButton* _tmp0_;
	gboolean _tmp1_ = FALSE;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp2_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp3_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	GtkButton* _tmp12_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	g_return_if_fail (metadata != NULL);
	_tmp0_ = self->priv->button_next;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_widget_get_type ())) {
		return;
	}
	_tmp2_ = self->priv->_source;
	_tmp3_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = sway_notification_center_widgets_mpris_mpris_media_player_get_can_go_next (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		SwayNotificationCenterWidgetsMprisMprisSource* _tmp7_;
		SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp8_;
		SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp9_;
		gboolean _tmp10_;
		gboolean _tmp11_;
		_tmp7_ = self->priv->_source;
		_tmp8_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = sway_notification_center_widgets_mpris_mpris_media_player_get_can_control (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp1_ = _tmp11_;
	} else {
		_tmp1_ = FALSE;
	}
	_tmp12_ = self->priv->button_next;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget), _tmp1_);
}

static void
sway_notification_center_widgets_mpris_mpris_player_update_button_repeat (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                          GHashTable* metadata)
{
	GtkButton* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp1_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp2_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	g_return_if_fail (metadata != NULL);
	_tmp0_ = self->priv->button_repeat;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_widget_get_type ())) {
		return;
	}
	_tmp1_ = self->priv->_source;
	_tmp2_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = sway_notification_center_widgets_mpris_mpris_media_player_get_can_control (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		GVariant* repeat = NULL;
		SwayNotificationCenterWidgetsMprisMprisSource* _tmp6_;
		GVariant* _tmp7_;
		gboolean _tmp8_ = FALSE;
		GVariant* _tmp9_;
		_tmp6_ = self->priv->_source;
		_tmp7_ = sway_notification_center_widgets_mpris_mpris_source_get_mpris_player_prop (_tmp6_, "LoopStatus");
		repeat = _tmp7_;
		_tmp9_ = repeat;
		if (_tmp9_ == NULL) {
			_tmp8_ = TRUE;
		} else {
			GVariant* _tmp10_;
			const GVariantType* _tmp11_;
			_tmp10_ = repeat;
			_tmp11_ = G_VARIANT_TYPE_STRING;
			_tmp8_ = !g_variant_is_of_type (_tmp10_, _tmp11_);
		}
		if (_tmp8_) {
			GtkButton* _tmp12_;
			GtkButton* _tmp13_;
			_tmp12_ = self->priv->button_repeat;
			gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget), FALSE);
			_tmp13_ = self->priv->button_repeat;
			gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget));
		} else {
			gchar* icon_name = NULL;
			gdouble opacity = 0.0;
			gboolean remove_flat_css_class = FALSE;
			GVariant* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			GQuark _tmp18_ = 0U;
			static GQuark _tmp17_label0 = 0;
			static GQuark _tmp17_label1 = 0;
			GtkButton* _tmp24_;
			GtkWidget* _tmp25_;
			GtkButton* _tmp26_;
			GtkButton* _tmp27_;
			const gchar* _tmp28_;
			GtkButton* _tmp29_;
			opacity = 1.0;
			remove_flat_css_class = TRUE;
			_tmp14_ = repeat;
			_tmp15_ = g_variant_get_string (_tmp14_, NULL);
			_tmp16_ = _tmp15_;
			_tmp18_ = (NULL == _tmp16_) ? 0 : g_quark_from_string (_tmp16_);
			if (_tmp18_ == ((0 != _tmp17_label0) ? _tmp17_label0 : (_tmp17_label0 = g_quark_from_static_string ("Playlist")))) {
				switch (0) {
					default:
					{
						gchar* _tmp19_;
						_tmp19_ = g_strdup (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_ICON_REPEAT);
						_g_free0 (icon_name);
						icon_name = _tmp19_;
						break;
					}
				}
			} else if (_tmp18_ == ((0 != _tmp17_label1) ? _tmp17_label1 : (_tmp17_label1 = g_quark_from_static_string ("Track")))) {
				switch (0) {
					default:
					{
						gchar* _tmp20_;
						_tmp20_ = g_strdup (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_ICON_REPEAT_SONG);
						_g_free0 (icon_name);
						icon_name = _tmp20_;
						break;
					}
				}
			} else {
				switch (0) {
					default:
					{
						gchar* _tmp21_;
						_tmp21_ = g_strdup (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_ICON_REPEAT);
						_g_free0 (icon_name);
						icon_name = _tmp21_;
						opacity = SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_UNSELECTED_OPACITY;
						remove_flat_css_class = FALSE;
						break;
					}
				}
			}
			if (remove_flat_css_class) {
				GtkButton* _tmp22_;
				_tmp22_ = self->priv->button_repeat;
				gtk_widget_remove_css_class (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget), "flat");
			} else {
				GtkButton* _tmp23_;
				_tmp23_ = self->priv->button_repeat;
				gtk_widget_add_css_class (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_widget_get_type (), GtkWidget), "flat");
			}
			_tmp24_ = self->priv->button_repeat;
			_tmp25_ = gtk_button_get_child (_tmp24_);
			gtk_widget_set_opacity (_tmp25_, opacity);
			_tmp26_ = self->priv->button_repeat;
			gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_widget_get_type (), GtkWidget), TRUE);
			_tmp27_ = self->priv->button_repeat;
			_tmp28_ = icon_name;
			gtk_button_set_icon_name (_tmp27_, _tmp28_);
			_tmp29_ = self->priv->button_repeat;
			gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_widget_get_type (), GtkWidget));
			_g_free0 (icon_name);
		}
		_g_variant_unref0 (repeat);
	} else {
		GtkButton* _tmp30_;
		_tmp30_ = self->priv->button_repeat;
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_widget_get_type (), GtkWidget));
	}
}

SwayNotificationCenterWidgetsMprisMprisSource*
sway_notification_center_widgets_mpris_mpris_player_get_source (SwayNotificationCenterWidgetsMprisMprisPlayer* self)
{
	SwayNotificationCenterWidgetsMprisMprisSource* result;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self), NULL);
	_tmp0_ = self->priv->_source;
	result = _tmp0_;
	return result;
}

static void
sway_notification_center_widgets_mpris_mpris_player_set_source (SwayNotificationCenterWidgetsMprisMprisPlayer* self,
                                                                SwayNotificationCenterWidgetsMprisMprisSource* value)
{
	SwayNotificationCenterWidgetsMprisMprisSource* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (self));
	old_value = sway_notification_center_widgets_mpris_mpris_player_get_source (self);
	if (old_value != value) {
		SwayNotificationCenterWidgetsMprisMprisSource* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_source);
		self->priv->_source = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_mpris_mpris_player_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_SOURCE_PROPERTY]);
	}
}

static void
sway_notification_center_widgets_mpris_mpris_player_class_init (SwayNotificationCenterWidgetsMprisMprisPlayerClass * klass,
                                                                gpointer klass_data)
{
	sway_notification_center_widgets_mpris_mpris_player_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_sway_notification_center_widgets_mpris_mpris_player_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_sway_notification_center_widgets_mpris_mpris_player_set_property;
	G_OBJECT_CLASS (klass)->finalize = sway_notification_center_widgets_mpris_mpris_player_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_SOURCE_PROPERTY, sway_notification_center_widgets_mpris_mpris_player_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_SOURCE_PROPERTY] = g_param_spec_object ("source", "source", "source", SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_SOURCE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/erikreider/swaync/ui/mpris_player.ui");
	sway_notification_center_widgets_mpris_mpris_player_signals[SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_CONTENT_UPDATED_SIGNAL] = g_signal_new ("content-updated", SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "title", FALSE, G_STRUCT_OFFSET (SwayNotificationCenterWidgetsMprisMprisPlayer, title));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sub_title", FALSE, SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset + G_STRUCT_OFFSET (SwayNotificationCenterWidgetsMprisMprisPlayerPrivate, sub_title));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "album_art", FALSE, SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset + G_STRUCT_OFFSET (SwayNotificationCenterWidgetsMprisMprisPlayerPrivate, album_art));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "background_picture", FALSE, SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset + G_STRUCT_OFFSET (SwayNotificationCenterWidgetsMprisMprisPlayerPrivate, background_picture));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_shuffle", FALSE, SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset + G_STRUCT_OFFSET (SwayNotificationCenterWidgetsMprisMprisPlayerPrivate, button_shuffle));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_prev", FALSE, SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset + G_STRUCT_OFFSET (SwayNotificationCenterWidgetsMprisMprisPlayerPrivate, button_prev));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_play_pause", FALSE, SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset + G_STRUCT_OFFSET (SwayNotificationCenterWidgetsMprisMprisPlayerPrivate, button_play_pause));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_next", FALSE, SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset + G_STRUCT_OFFSET (SwayNotificationCenterWidgetsMprisMprisPlayerPrivate, button_next));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_repeat", FALSE, SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset + G_STRUCT_OFFSET (SwayNotificationCenterWidgetsMprisMprisPlayerPrivate, button_repeat));
}

static void
sway_notification_center_widgets_mpris_mpris_player_instance_init (SwayNotificationCenterWidgetsMprisMprisPlayer * self,
                                                                   gpointer klass)
{
	GCancellable* _tmp0_;
	self->priv = sway_notification_center_widgets_mpris_mpris_player_get_instance_private (self);
	_tmp0_ = g_cancellable_new ();
	if (_tmp0_) {
		g_object_set_data ((GObject *) _tmp0_, "vala-creation-function", "");
	}
	self->priv->album_art_cancellable = _tmp0_;
	self->priv->desktop_entry = NULL;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
sway_notification_center_widgets_mpris_mpris_player_finalize (GObject * obj)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER, SwayNotificationCenterWidgetsMprisMprisPlayer);
	_g_object_unref0 (self->priv->_source);
	_g_object_unref0 (self->priv->album_art_cancellable);
	_g_free0 (self->priv->prev_art_data);
	_g_object_unref0 (self->priv->desktop_entry);
	G_OBJECT_CLASS (sway_notification_center_widgets_mpris_mpris_player_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_widgets_mpris_mpris_player_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SwayNotificationCenterWidgetsMprisMprisPlayerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sway_notification_center_widgets_mpris_mpris_player_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SwayNotificationCenterWidgetsMprisMprisPlayer), 0, (GInstanceInitFunc) sway_notification_center_widgets_mpris_mpris_player_instance_init, NULL };
	GType sway_notification_center_widgets_mpris_mpris_player_type_id;
	sway_notification_center_widgets_mpris_mpris_player_type_id = g_type_register_static (TYPE_UNDERLAY, "SwayNotificationCenterWidgetsMprisMprisPlayer", &g_define_type_info, 0);
	SwayNotificationCenterWidgetsMprisMprisPlayer_private_offset = g_type_add_instance_private (sway_notification_center_widgets_mpris_mpris_player_type_id, sizeof (SwayNotificationCenterWidgetsMprisMprisPlayerPrivate));
	return sway_notification_center_widgets_mpris_mpris_player_type_id;
}

GType
sway_notification_center_widgets_mpris_mpris_player_get_type (void)
{
	static gsize sway_notification_center_widgets_mpris_mpris_player_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_widgets_mpris_mpris_player_type_id__once)) {
		GType sway_notification_center_widgets_mpris_mpris_player_type_id;
		sway_notification_center_widgets_mpris_mpris_player_type_id = sway_notification_center_widgets_mpris_mpris_player_get_type_once ();
		g_once_init_leave (&sway_notification_center_widgets_mpris_mpris_player_type_id__once, sway_notification_center_widgets_mpris_mpris_player_type_id);
	}
	return sway_notification_center_widgets_mpris_mpris_player_type_id__once;
}

static void
_vala_sway_notification_center_widgets_mpris_mpris_player_get_property (GObject * object,
                                                                        guint property_id,
                                                                        GValue * value,
                                                                        GParamSpec * pspec)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER, SwayNotificationCenterWidgetsMprisMprisPlayer);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_SOURCE_PROPERTY:
		g_value_set_object (value, sway_notification_center_widgets_mpris_mpris_player_get_source (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_sway_notification_center_widgets_mpris_mpris_player_set_property (GObject * object,
                                                                        guint property_id,
                                                                        const GValue * value,
                                                                        GParamSpec * pspec)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS_PLAYER, SwayNotificationCenterWidgetsMprisMprisPlayer);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_PLAYER_SOURCE_PROPERTY:
		sway_notification_center_widgets_mpris_mpris_player_set_source (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

