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

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <adwaita.h>
#include <json-glib/json-glib.h>
#include <float.h>
#include <math.h>

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_MPRIS_PREFIX "org.mpris.MediaPlayer2."
#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

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 ())

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_CONFIG (sway_notification_center_widgets_mpris_config_get_type ())
typedef struct _SwayNotificationCenterWidgetsMprisConfig SwayNotificationCenterWidgetsMprisConfig;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET (sway_notification_center_widgets_base_widget_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidgetClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidgetClass))

typedef struct _SwayNotificationCenterWidgetsBaseWidget SwayNotificationCenterWidgetsBaseWidget;
typedef struct _SwayNotificationCenterWidgetsBaseWidgetClass SwayNotificationCenterWidgetsBaseWidgetClass;
typedef struct _SwayNotificationCenterWidgetsBaseWidgetPrivate SwayNotificationCenterWidgetsBaseWidgetPrivate;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS (sway_notification_center_widgets_mpris_mpris_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS, SwayNotificationCenterWidgetsMprisMpris))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS, SwayNotificationCenterWidgetsMprisMprisClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS, SwayNotificationCenterWidgetsMprisMprisClass))

typedef struct _SwayNotificationCenterWidgetsMprisMpris SwayNotificationCenterWidgetsMprisMpris;
typedef struct _SwayNotificationCenterWidgetsMprisMprisClass SwayNotificationCenterWidgetsMprisMprisClass;
typedef struct _SwayNotificationCenterWidgetsMprisMprisPrivate SwayNotificationCenterWidgetsMprisMprisPrivate;

#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;

#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;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_DBUS_INTERFACE (sway_notification_center_widgets_mpris_dbus_interface_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_DBUS_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_DBUS_INTERFACE, SwayNotificationCenterWidgetsMprisDBusInterface))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_DBUS_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_DBUS_INTERFACE))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_DBUS_INTERFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_DBUS_INTERFACE, SwayNotificationCenterWidgetsMprisDBusInterfaceIface))

typedef struct _SwayNotificationCenterWidgetsMprisDBusInterface SwayNotificationCenterWidgetsMprisDBusInterface;
typedef struct _SwayNotificationCenterWidgetsMprisDBusInterfaceIface SwayNotificationCenterWidgetsMprisDBusInterfaceIface;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_DBUS_INTERFACE_PROXY (sway_notification_center_widgets_mpris_dbus_interface_proxy_get_type ())
enum  {
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_0_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_WIDGET_NAME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_NUM_PROPERTIES
};
static GParamSpec* sway_notification_center_widgets_mpris_mpris_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_NUM_PROPERTIES];
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))

#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_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 ())
typedef struct _Block19Data Block19Data;

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

struct _SwayNotificationCenterWidgetsBaseWidget {
	GtkBox parent_instance;
	SwayNotificationCenterWidgetsBaseWidgetPrivate * priv;
};

struct _SwayNotificationCenterWidgetsBaseWidgetClass {
	GtkBoxClass parent_class;
	void (*on_cc_visibility_change) (SwayNotificationCenterWidgetsBaseWidget* self, gboolean value);
	const gchar* (*get_widget_name) (SwayNotificationCenterWidgetsBaseWidget* self);
};

struct _SwayNotificationCenterWidgetsMprisMpris {
	SwayNotificationCenterWidgetsBaseWidget parent_instance;
	SwayNotificationCenterWidgetsMprisMprisPrivate * priv;
};

struct _SwayNotificationCenterWidgetsMprisMprisClass {
	SwayNotificationCenterWidgetsBaseWidgetClass parent_class;
};

struct _SwayNotificationCenterWidgetsMprisDBusInterfaceIface {
	GTypeInterface parent_iface;
	gchar** (*list_names) (SwayNotificationCenterWidgetsMprisDBusInterface* self, gint* result_length1, GError** error);
};

struct _SwayNotificationCenterWidgetsMprisMprisPrivate {
	GHashTable* players;
	SwayNotificationCenterWidgetsMprisDBusInterface* dbus_iface;
	GtkButton* button_prev;
	GtkButton* button_next;
	GtkBox* carousel_box;
	AdwCarousel* carousel;
	AdwCarouselIndicatorDots* carousel_dots;
	SwayNotificationCenterWidgetsMprisConfig mpris_config;
};

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 _Block19Data {
	int _ref_count_;
	SwayNotificationCenterWidgetsMprisMpris* self;
	gchar* name;
};

static gint SwayNotificationCenterWidgetsMprisMpris_private_offset;
static gpointer sway_notification_center_widgets_mpris_mpris_parent_class = NULL;

VALA_EXTERN GType sway_notification_center_widgets_mpris_album_art_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SwayNotificationCenterWidgetsMprisAlbumArtState sway_notification_center_widgets_mpris_album_art_state_parse (const gchar* value);
VALA_EXTERN GType sway_notification_center_widgets_mpris_config_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)
static gchar** _vala_array_dup3 (gchar** self,
                          gssize length);
VALA_EXTERN GType sway_notification_center_widgets_base_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsBaseWidget, g_object_unref)
VALA_EXTERN GType sway_notification_center_widgets_mpris_mpris_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsMprisMpris, g_object_unref)
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_dbus_interface_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint sway_notification_center_widgets_mpris_dbus_interface_register_object (void* object,
                                                                             GDBusConnection* connection,
                                                                             const gchar* path,
                                                                             GError** error);
VALA_EXTERN GType sway_notification_center_widgets_mpris_dbus_interface_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsMprisDBusInterface, g_object_unref)
VALA_EXTERN const gchar* sway_notification_center_widgets_base_widget_get_widget_name (SwayNotificationCenterWidgetsBaseWidget* self);
static void _g_free0_ (gpointer var);
static void _g_object_unref0_ (gpointer var);
VALA_EXTERN SwayNotificationCenterWidgetsMprisMpris* sway_notification_center_widgets_mpris_mpris_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsMprisMpris* sway_notification_center_widgets_mpris_mpris_construct (GType object_type,
                                                                                                 const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsBaseWidget* sway_notification_center_widgets_base_widget_construct (GType object_type,
                                                                                                 const gchar* suffix);
static void __lambda60_ (SwayNotificationCenterWidgetsMprisMpris* self);
static void sway_notification_center_widgets_mpris_mpris_change_carousel_position (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                            gint delta);
static void ___lambda60__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda61_ (SwayNotificationCenterWidgetsMprisMpris* self);
static void ___lambda61__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda62_ (SwayNotificationCenterWidgetsMprisMpris* self,
                  guint index);
static void ___lambda62__adw_carousel_page_changed (AdwCarousel* _sender,
                                             guint index,
                                             gpointer self);
VALA_EXTERN JsonObject* sway_notification_center_widgets_base_widget_get_config (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                     GtkWidget* widget);
VALA_EXTERN gpointer sway_notification_center_widgets_base_widget_get_prop (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                GType t_type,
                                                                GBoxedCopyFunc t_dup_func,
                                                                GDestroyNotify t_destroy_func,
                                                                JsonObject* config,
                                                                const gchar* value_key,
                                                                gboolean* found);
static gint* _int_dup (gint* self);
VALA_EXTERN JsonArray* sway_notification_center_widgets_base_widget_get_prop_array (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                        JsonObject* config,
                                                                        const gchar* value_key);
static gboolean* _bool_dup (gboolean* self);
static void sway_notification_center_widgets_mpris_mpris_setup_mpris (SwayNotificationCenterWidgetsMprisMpris* self,
                                                               GError** error);
VALA_EXTERN gchar** sway_notification_center_widgets_mpris_dbus_interface_list_names (SwayNotificationCenterWidgetsMprisDBusInterface* self,
                                                                          gint* result_length1,
                                                                          GError** error);
static gboolean sway_notification_center_widgets_mpris_mpris_is_blacklisted (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                      const gchar* name);
static gboolean sway_notification_center_widgets_mpris_mpris_check_player_exists (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                           const gchar* name);
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 SwayNotificationCenterWidgetsMprisMprisSource* sway_notification_center_widgets_mpris_mpris_source_get_player (const gchar* bus_name);
static void sway_notification_center_widgets_mpris_mpris_add_player (SwayNotificationCenterWidgetsMprisMpris* self,
                                                              const gchar* name,
                                                              SwayNotificationCenterWidgetsMprisMprisSource* source);
static void __lambda64_ (SwayNotificationCenterWidgetsMprisMpris* self,
                  const gchar* name,
                  const gchar* old_owner,
                  const gchar* new_owner);
static void sway_notification_center_widgets_mpris_mpris_remove_player (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                 const gchar* name);
static void ___lambda64__sway_notification_center_widgets_mpris_dbus_interface_name_owner_changed (SwayNotificationCenterWidgetsMprisDBusInterface* _sender,
                                                                                            const gchar* name,
                                                                                            const gchar* old_owner,
                                                                                            const gchar* new_owner,
                                                                                            gpointer self);
static gboolean sway_notification_center_widgets_mpris_mpris_check_player_metadata_empty (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                                   const gchar* name);
VALA_EXTERN SwayNotificationCenterWidgetsMprisMprisSource* sway_notification_center_widgets_mpris_mpris_player_get_source (SwayNotificationCenterWidgetsMprisMprisPlayer* self);
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 GHashTable* sway_notification_center_widgets_mpris_mpris_media_player_get_metadata (SwayNotificationCenterWidgetsMprisMprisMediaPlayer* self);
static gboolean sway_notification_center_widgets_mpris_mpris_check_carousel_has_player (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                                 SwayNotificationCenterWidgetsMprisMprisPlayer* player);
static void sway_notification_center_widgets_mpris_mpris_add_player_to_carousel (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                          const gchar* name);
static Block19Data* block19_data_ref (Block19Data* _data19_);
static void block19_data_unref (void * _userdata_);
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);
VALA_EXTERN gchar* sway_notification_center_widgets_base_widget_get_css_class_name (SwayNotificationCenterWidgetsBaseWidget* self);
static void ___lambda63_ (Block19Data* _data19_);
static void sway_notification_center_widgets_mpris_mpris_remove_player_from_carousel (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                               const gchar* name);
static void ____lambda63__sway_notification_center_widgets_mpris_mpris_player_content_updated (SwayNotificationCenterWidgetsMprisMprisPlayer* _sender,
                                                                                        gpointer self);
VALA_EXTERN void sway_notification_center_widgets_mpris_mpris_player_before_destroy (SwayNotificationCenterWidgetsMprisMprisPlayer* self);
static void sway_notification_center_widgets_mpris_mpris_finalize (GObject * obj);
static GType sway_notification_center_widgets_mpris_mpris_get_type_once (void);
static void _vala_sway_notification_center_widgets_mpris_mpris_get_property (GObject * object,
                                                                      guint property_id,
                                                                      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);

SwayNotificationCenterWidgetsMprisAlbumArtState
sway_notification_center_widgets_mpris_album_art_state_parse (const gchar* value)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	SwayNotificationCenterWidgetsMprisAlbumArtState result;
	g_return_val_if_fail (value != NULL, 0);
	_tmp0_ = value;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("when-available")))) {
		switch (0) {
			default:
			{
				result = SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_WHEN_AVAILABLE;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("never")))) {
		switch (0) {
			default:
			{
				result = SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_NEVER;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_ALWAYS;
				return result;
			}
		}
	}
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_widgets_mpris_album_art_state_get_type_once (void)
{
	static const GEnumValue values[] = {{SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_ALWAYS, "SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_ALWAYS", "always"}, {SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_WHEN_AVAILABLE, "SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_WHEN_AVAILABLE", "when-available"}, {SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_NEVER, "SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_NEVER", "never"}, {0, NULL, NULL}};
	GType sway_notification_center_widgets_mpris_album_art_state_type_id;
	sway_notification_center_widgets_mpris_album_art_state_type_id = g_enum_register_static ("SwayNotificationCenterWidgetsMprisAlbumArtState", values);
	return sway_notification_center_widgets_mpris_album_art_state_type_id;
}

GType
sway_notification_center_widgets_mpris_album_art_state_get_type (void)
{
	static gsize sway_notification_center_widgets_mpris_album_art_state_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_widgets_mpris_album_art_state_type_id__once)) {
		GType sway_notification_center_widgets_mpris_album_art_state_type_id;
		sway_notification_center_widgets_mpris_album_art_state_type_id = sway_notification_center_widgets_mpris_album_art_state_get_type_once ();
		g_once_init_leave (&sway_notification_center_widgets_mpris_album_art_state_type_id__once, sway_notification_center_widgets_mpris_album_art_state_type_id);
	}
	return sway_notification_center_widgets_mpris_album_art_state_type_id__once;
}

static gchar**
_vala_array_dup3 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

void
sway_notification_center_widgets_mpris_config_copy (const SwayNotificationCenterWidgetsMprisConfig* self,
                                                    SwayNotificationCenterWidgetsMprisConfig* dest)
{
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	(*dest).image_size = (*self).image_size;
	(*dest).show_album_art = (*self).show_album_art;
	(*dest).autohide = (*self).autohide;
	_tmp0_ = (*self).blacklist;
	_tmp0__length1 = (*self).blacklist_length1;
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup3 (_tmp0_, _tmp0__length1) : _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	(*dest).blacklist = (_vala_array_free ((*dest).blacklist, (*dest).blacklist_length1, (GDestroyNotify) g_free), NULL);
	(*dest).blacklist = _tmp1_;
	(*dest).blacklist_length1 = _tmp1__length1;
	(*dest).loop_carousel = (*self).loop_carousel;
}

void
sway_notification_center_widgets_mpris_config_destroy (SwayNotificationCenterWidgetsMprisConfig* self)
{
	(*self).blacklist = (_vala_array_free ((*self).blacklist, (*self).blacklist_length1, (GDestroyNotify) g_free), NULL);
}

SwayNotificationCenterWidgetsMprisConfig*
sway_notification_center_widgets_mpris_config_dup (const SwayNotificationCenterWidgetsMprisConfig* self)
{
	SwayNotificationCenterWidgetsMprisConfig* dup;
	dup = g_new0 (SwayNotificationCenterWidgetsMprisConfig, 1);
	sway_notification_center_widgets_mpris_config_copy (self, dup);
	return dup;
}

void
sway_notification_center_widgets_mpris_config_free (SwayNotificationCenterWidgetsMprisConfig* self)
{
	sway_notification_center_widgets_mpris_config_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_widgets_mpris_config_get_type_once (void)
{
	GType sway_notification_center_widgets_mpris_config_type_id;
	sway_notification_center_widgets_mpris_config_type_id = g_boxed_type_register_static ("SwayNotificationCenterWidgetsMprisConfig", (GBoxedCopyFunc) sway_notification_center_widgets_mpris_config_dup, (GBoxedFreeFunc) sway_notification_center_widgets_mpris_config_free);
	return sway_notification_center_widgets_mpris_config_type_id;
}

GType
sway_notification_center_widgets_mpris_config_get_type (void)
{
	static gsize sway_notification_center_widgets_mpris_config_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_widgets_mpris_config_type_id__once)) {
		GType sway_notification_center_widgets_mpris_config_type_id;
		sway_notification_center_widgets_mpris_config_type_id = sway_notification_center_widgets_mpris_config_get_type_once ();
		g_once_init_leave (&sway_notification_center_widgets_mpris_config_type_id__once, sway_notification_center_widgets_mpris_config_type_id);
	}
	return sway_notification_center_widgets_mpris_config_type_id__once;
}

static inline gpointer
sway_notification_center_widgets_mpris_mpris_get_instance_private (SwayNotificationCenterWidgetsMprisMpris* self)
{
	return G_STRUCT_MEMBER_P (self, SwayNotificationCenterWidgetsMprisMpris_private_offset);
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static void
__lambda60_ (SwayNotificationCenterWidgetsMprisMpris* self)
{
	sway_notification_center_widgets_mpris_mpris_change_carousel_position (self, -1);
}

static void
___lambda60__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda60_ ((SwayNotificationCenterWidgetsMprisMpris*) self);
}

static void
__lambda61_ (SwayNotificationCenterWidgetsMprisMpris* self)
{
	sway_notification_center_widgets_mpris_mpris_change_carousel_position (self, 1);
}

static void
___lambda61__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda61_ ((SwayNotificationCenterWidgetsMprisMpris*) self);
}

static void
__lambda62_ (SwayNotificationCenterWidgetsMprisMpris* self,
             guint index)
{
	AdwCarousel* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	gboolean _tmp5_ = FALSE;
	GtkButton* _tmp7_;
	gboolean _tmp8_ = FALSE;
	AdwCarousel* _tmp9_;
	guint _tmp10_;
	guint _tmp11_;
	GtkButton* _tmp13_;
	_tmp0_ = self->priv->carousel;
	_tmp1_ = adw_carousel_get_n_pages (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ <= ((guint) 1)) {
		GtkButton* _tmp3_;
		GtkButton* _tmp4_;
		_tmp3_ = self->priv->button_prev;
		gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), FALSE);
		_tmp4_ = self->priv->button_next;
		gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), FALSE);
		return;
	}
	if (index > ((guint) 0)) {
		_tmp5_ = TRUE;
	} else {
		SwayNotificationCenterWidgetsMprisConfig _tmp6_;
		_tmp6_ = self->priv->mpris_config;
		_tmp5_ = _tmp6_.loop_carousel;
	}
	_tmp7_ = self->priv->button_prev;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), _tmp5_);
	_tmp9_ = self->priv->carousel;
	_tmp10_ = adw_carousel_get_n_pages (_tmp9_);
	_tmp11_ = _tmp10_;
	if (index < (_tmp11_ - 1)) {
		_tmp8_ = TRUE;
	} else {
		SwayNotificationCenterWidgetsMprisConfig _tmp12_;
		_tmp12_ = self->priv->mpris_config;
		_tmp8_ = _tmp12_.loop_carousel;
	}
	_tmp13_ = self->priv->button_next;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget), _tmp8_);
}

static void
___lambda62__adw_carousel_page_changed (AdwCarousel* _sender,
                                        guint index,
                                        gpointer self)
{
	__lambda62_ ((SwayNotificationCenterWidgetsMprisMpris*) self, index);
}

static gint*
_int_dup (gint* self)
{
	gint* dup;
	dup = g_new0 (gint, 1);
	memcpy (dup, self, sizeof (gint));
	return dup;
}

static gpointer
__int_dup0 (gpointer self)
{
	return self ? _int_dup (self) : NULL;
}

static gboolean*
_bool_dup (gboolean* self)
{
	gboolean* dup;
	dup = g_new0 (gboolean, 1);
	memcpy (dup, self, sizeof (gboolean));
	return dup;
}

static gpointer
__bool_dup0 (gpointer self)
{
	return self ? _bool_dup (self) : NULL;
}

SwayNotificationCenterWidgetsMprisMpris*
sway_notification_center_widgets_mpris_mpris_construct (GType object_type,
                                                        const gchar* suffix)
{
	SwayNotificationCenterWidgetsMprisMpris * self = NULL;
	GtkBox* _tmp0_ = NULL;
	GtkButton* _tmp1_ = NULL;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_ = NULL;
	GtkButton* _tmp4_;
	AdwCarousel* _tmp5_ = NULL;
	AdwCarousel* _tmp6_;
	AdwCarousel* _tmp7_;
	GtkBox* _tmp8_;
	GtkButton* _tmp9_;
	GtkBox* _tmp10_;
	AdwCarousel* _tmp11_;
	GtkBox* _tmp12_;
	GtkButton* _tmp13_;
	GtkBox* _tmp14_;
	AdwCarouselIndicatorDots* _tmp15_;
	AdwCarouselIndicatorDots* _tmp16_;
	AdwCarousel* _tmp17_;
	AdwCarouselIndicatorDots* _tmp18_;
	AdwCarouselIndicatorDots* _tmp19_;
	AdwCarouselIndicatorDots* _tmp20_;
	AdwCarouselIndicatorDots* _tmp21_;
	JsonObject* config = NULL;
	JsonObject* _tmp22_;
	JsonObject* _tmp23_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (suffix != NULL, NULL);
	self = (SwayNotificationCenterWidgetsMprisMpris*) sway_notification_center_widgets_base_widget_construct (object_type, suffix);
	gtk_orientable_set_orientation (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_orientable_get_type (), GtkOrientable), GTK_ORIENTATION_VERTICAL);
	gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START);
	gtk_widget_set_vexpand (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), FALSE);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), TRUE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->carousel_box);
	self->priv->carousel_box = _tmp0_;
	_tmp1_ = (GtkButton*) gtk_button_new_from_icon_name ("go-previous");
	gtk_button_set_has_frame (_tmp1_, FALSE);
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), FALSE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->button_prev);
	self->priv->button_prev = _tmp1_;
	_tmp2_ = self->priv->button_prev;
	g_signal_connect_object (_tmp2_, "clicked", (GCallback) ___lambda60__gtk_button_clicked, self, 0);
	_tmp3_ = (GtkButton*) gtk_button_new_from_icon_name ("go-next");
	gtk_button_set_has_frame (_tmp3_, FALSE);
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), FALSE);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->button_next);
	self->priv->button_next = _tmp3_;
	_tmp4_ = self->priv->button_next;
	g_signal_connect_object (_tmp4_, "clicked", (GCallback) ___lambda61__gtk_button_clicked, self, 0);
	_tmp5_ = (AdwCarousel*) adw_carousel_new ();
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), TRUE);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->carousel);
	self->priv->carousel = _tmp5_;
	_tmp6_ = self->priv->carousel;
	adw_carousel_set_allow_scroll_wheel (_tmp6_, TRUE);
	_tmp7_ = self->priv->carousel;
	g_signal_connect_object (_tmp7_, "page-changed", (GCallback) ___lambda62__adw_carousel_page_changed, self, 0);
	_tmp8_ = self->priv->carousel_box;
	_tmp9_ = self->priv->button_prev;
	gtk_box_append (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
	_tmp10_ = self->priv->carousel_box;
	_tmp11_ = self->priv->carousel;
	gtk_box_append (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget));
	_tmp12_ = self->priv->carousel_box;
	_tmp13_ = self->priv->button_next;
	gtk_box_append (_tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget));
	_tmp14_ = self->priv->carousel_box;
	gtk_box_append (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget));
	_tmp15_ = (AdwCarouselIndicatorDots*) adw_carousel_indicator_dots_new ();
	if (_tmp15_) {
		g_object_set_data ((GObject *) _tmp15_, "vala-creation-function", "SwayNotificationCenter.Widgets.Mpris.Mpris.new");
	}
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->carousel_dots);
	self->priv->carousel_dots = _tmp15_;
	_tmp16_ = self->priv->carousel_dots;
	_tmp17_ = self->priv->carousel;
	adw_carousel_indicator_dots_set_carousel (_tmp16_, _tmp17_);
	_tmp18_ = self->priv->carousel_dots;
	gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER);
	_tmp19_ = self->priv->carousel_dots;
	gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER);
	_tmp20_ = self->priv->carousel_dots;
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget), FALSE);
	_tmp21_ = self->priv->carousel_dots;
	gtk_box_append (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_widget_get_type (), GtkWidget));
	_tmp22_ = sway_notification_center_widgets_base_widget_get_config (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	config = _tmp22_;
	_tmp23_ = config;
	if (_tmp23_ != NULL) {
		gboolean image_size_found = FALSE;
		gint* image_size = NULL;
		JsonObject* _tmp24_;
		gboolean _tmp25_ = FALSE;
		gpointer _tmp26_;
		gint _tmp27_;
		gint* _tmp28_;
		gboolean _tmp29_ = FALSE;
		gboolean show_art_found = FALSE;
		gchar* show_album_art = NULL;
		JsonObject* _tmp32_;
		gboolean _tmp33_ = FALSE;
		gpointer _tmp34_;
		gboolean _tmp35_ = FALSE;
		JsonArray* blacklist = NULL;
		JsonObject* _tmp38_;
		JsonArray* _tmp39_;
		JsonArray* _tmp40_;
		gboolean autohide_found = FALSE;
		gboolean* autohide = NULL;
		JsonObject* _tmp51_;
		gboolean _tmp52_ = FALSE;
		gpointer _tmp53_;
		gboolean _tmp54_;
		gboolean* _tmp55_;
		gboolean loop_carousel_found = FALSE;
		gboolean* loop_carousel = NULL;
		JsonObject* _tmp57_;
		gboolean _tmp58_ = FALSE;
		gpointer _tmp59_;
		gboolean _tmp60_;
		gboolean* _tmp61_;
		_tmp24_ = config;
		_tmp26_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_INT, NULL, NULL, _tmp24_, "image-size", &_tmp25_);
		image_size_found = _tmp25_;
		_tmp27_ = (gint) ((gintptr) _tmp26_);
		_tmp28_ = __int_dup0 (&_tmp27_);
		image_size = _tmp28_;
		if (image_size_found) {
			gint* _tmp30_;
			_tmp30_ = image_size;
			_tmp29_ = _tmp30_ != NULL;
		} else {
			_tmp29_ = FALSE;
		}
		if (_tmp29_) {
			gint* _tmp31_;
			_tmp31_ = image_size;
			self->priv->mpris_config.image_size = *_tmp31_;
		}
		_tmp32_ = config;
		_tmp34_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp32_, "show-album-art", &_tmp33_);
		show_art_found = _tmp33_;
		show_album_art = (gchar*) _tmp34_;
		if (show_art_found) {
			const gchar* _tmp36_;
			_tmp36_ = show_album_art;
			_tmp35_ = _tmp36_ != NULL;
		} else {
			_tmp35_ = FALSE;
		}
		if (_tmp35_) {
			const gchar* _tmp37_;
			_tmp37_ = show_album_art;
			self->priv->mpris_config.show_album_art = sway_notification_center_widgets_mpris_album_art_state_parse (_tmp37_);
		}
		_tmp38_ = config;
		_tmp39_ = sway_notification_center_widgets_base_widget_get_prop_array (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), _tmp38_, "blacklist");
		blacklist = _tmp39_;
		_tmp40_ = blacklist;
		if (_tmp40_ != NULL) {
			JsonArray* _tmp41_;
			gchar** _tmp42_;
			_tmp41_ = blacklist;
			_tmp42_ = g_new0 (gchar*, json_array_get_length (_tmp41_) + 1);
			self->priv->mpris_config.blacklist = (_vala_array_free (self->priv->mpris_config.blacklist, self->priv->mpris_config.blacklist_length1, (GDestroyNotify) g_free), NULL);
			self->priv->mpris_config.blacklist = _tmp42_;
			self->priv->mpris_config.blacklist_length1 = json_array_get_length (_tmp41_);
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp43_ = FALSE;
					_tmp43_ = TRUE;
					while (TRUE) {
						JsonArray* _tmp45_;
						JsonArray* _tmp46_;
						JsonNode* _tmp47_;
						JsonArray* _tmp48_;
						const gchar* _tmp49_;
						gchar* _tmp50_;
						if (!_tmp43_) {
							gint _tmp44_;
							_tmp44_ = i;
							i = _tmp44_ + 1;
						}
						_tmp43_ = FALSE;
						_tmp45_ = blacklist;
						if (!(((guint) i) < json_array_get_length (_tmp45_))) {
							break;
						}
						_tmp46_ = blacklist;
						_tmp47_ = json_array_get_element (_tmp46_, (guint) i);
						if (json_node_get_node_type (_tmp47_) != JSON_NODE_VALUE) {
							g_warning ("mpris.vala:125: Blacklist entries should be strings");
							continue;
						}
						_tmp48_ = blacklist;
						_tmp49_ = json_array_get_string_element (_tmp48_, (guint) i);
						_tmp50_ = g_strdup (_tmp49_);
						_g_free0 (self->priv->mpris_config.blacklist[i]);
						self->priv->mpris_config.blacklist[i] = _tmp50_;
					}
				}
			}
		}
		_tmp51_ = config;
		_tmp53_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_BOOLEAN, NULL, NULL, _tmp51_, "autohide", &_tmp52_);
		autohide_found = _tmp52_;
		_tmp54_ = (gboolean) ((gintptr) _tmp53_);
		_tmp55_ = __bool_dup0 (&_tmp54_);
		autohide = _tmp55_;
		if (autohide_found) {
			gboolean* _tmp56_;
			_tmp56_ = autohide;
			self->priv->mpris_config.autohide = *_tmp56_;
		}
		_tmp57_ = config;
		_tmp59_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_BOOLEAN, NULL, NULL, _tmp57_, "loop-carousel", &_tmp58_);
		loop_carousel_found = _tmp58_;
		_tmp60_ = (gboolean) ((gintptr) _tmp59_);
		_tmp61_ = __bool_dup0 (&_tmp60_);
		loop_carousel = _tmp61_;
		if (loop_carousel_found) {
			gboolean* _tmp62_;
			_tmp62_ = loop_carousel;
			self->priv->mpris_config.loop_carousel = *_tmp62_;
		}
		_g_free0 (loop_carousel);
		_g_free0 (autohide);
		_json_array_unref0 (blacklist);
		_g_free0 (show_album_art);
		_g_free0 (image_size);
	}
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	{
		sway_notification_center_widgets_mpris_mpris_setup_mpris (self, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp63_;
		const gchar* _tmp64_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp63_ = e;
		_tmp64_ = _tmp63_->message;
		g_critical ("mpris.vala:152: MPRIS Widget error: %s", _tmp64_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_json_object_unref0 (config);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	_json_object_unref0 (config);
	return self;
}

SwayNotificationCenterWidgetsMprisMpris*
sway_notification_center_widgets_mpris_mpris_new (const gchar* suffix)
{
	return sway_notification_center_widgets_mpris_mpris_construct (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS, suffix);
}

static void
__lambda64_ (SwayNotificationCenterWidgetsMprisMpris* self,
             const gchar* name,
             const gchar* old_owner,
             const gchar* new_owner)
{
	SwayNotificationCenterWidgetsMprisMprisSource* source = NULL;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp1_;
	g_return_if_fail (name != NULL);
	g_return_if_fail (old_owner != NULL);
	g_return_if_fail (new_owner != NULL);
	if (!g_str_has_prefix (name, SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_MPRIS_PREFIX)) {
		return;
	}
	if (g_strcmp0 (old_owner, "") != 0) {
		sway_notification_center_widgets_mpris_mpris_remove_player (self, name);
		return;
	}
	if (sway_notification_center_widgets_mpris_mpris_is_blacklisted (self, name)) {
		return;
	}
	if (sway_notification_center_widgets_mpris_mpris_check_player_exists (self, name)) {
		return;
	}
	_tmp0_ = sway_notification_center_widgets_mpris_mpris_source_get_player (name);
	source = _tmp0_;
	_tmp1_ = source;
	if (_tmp1_ != NULL) {
		SwayNotificationCenterWidgetsMprisMprisSource* _tmp2_;
		_tmp2_ = source;
		sway_notification_center_widgets_mpris_mpris_add_player (self, name, _tmp2_);
	}
	_g_object_unref0 (source);
}

static void
___lambda64__sway_notification_center_widgets_mpris_dbus_interface_name_owner_changed (SwayNotificationCenterWidgetsMprisDBusInterface* _sender,
                                                                                       const gchar* name,
                                                                                       const gchar* old_owner,
                                                                                       const gchar* new_owner,
                                                                                       gpointer self)
{
	__lambda64_ ((SwayNotificationCenterWidgetsMprisMpris*) self, name, old_owner, new_owner);
}

static void
sway_notification_center_widgets_mpris_mpris_setup_mpris (SwayNotificationCenterWidgetsMprisMpris* self,
                                                          GError** error)
{
	SwayNotificationCenterWidgetsMprisDBusInterface* _tmp0_ = NULL;
	SwayNotificationCenterWidgetsMprisDBusInterface* _tmp1_;
	SwayNotificationCenterWidgetsMprisDBusInterface* _tmp2_;
	gchar** names = NULL;
	SwayNotificationCenterWidgetsMprisDBusInterface* _tmp3_;
	gint _tmp4_ = 0;
	gchar** _tmp5_;
	gint names_length1;
	gint _names_size_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	SwayNotificationCenterWidgetsMprisDBusInterface* _tmp16_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS (self));
	_tmp1_ = (SwayNotificationCenterWidgetsMprisDBusInterface*) g_initable_new (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_DBUS_INTERFACE_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", "org.freedesktop.DBus", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/freedesktop/DBus", "g-interface-name", "org.freedesktop.DBus", NULL);
	_tmp0_ = (SwayNotificationCenterWidgetsMprisDBusInterface*) _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp2_ = _tmp0_;
	_tmp0_ = NULL;
	_g_object_unref0 (self->priv->dbus_iface);
	self->priv->dbus_iface = _tmp2_;
	_tmp3_ = self->priv->dbus_iface;
	_tmp5_ = sway_notification_center_widgets_mpris_dbus_interface_list_names (_tmp3_, &_tmp4_, &_inner_error0_);
	names = _tmp5_;
	names_length1 = _tmp4_;
	_names_size_ = names_length1;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (_tmp0_);
		return;
	}
	_tmp6_ = names;
	_tmp6__length1 = names_length1;
	{
		gchar** name_collection = NULL;
		gint name_collection_length1 = 0;
		gint _name_collection_size_ = 0;
		gint name_it = 0;
		name_collection = _tmp6_;
		name_collection_length1 = _tmp6__length1;
		for (name_it = 0; name_it < name_collection_length1; name_it = name_it + 1) {
			gchar* _tmp7_;
			gchar* name = NULL;
			_tmp7_ = g_strdup (name_collection[name_it]);
			name = _tmp7_;
			{
				const gchar* _tmp8_;
				const gchar* _tmp9_;
				const gchar* _tmp10_;
				SwayNotificationCenterWidgetsMprisMprisSource* source = NULL;
				const gchar* _tmp11_;
				SwayNotificationCenterWidgetsMprisMprisSource* _tmp12_;
				SwayNotificationCenterWidgetsMprisMprisSource* _tmp13_;
				_tmp8_ = name;
				if (!g_str_has_prefix (_tmp8_, SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_MPRIS_PREFIX)) {
					_g_free0 (name);
					continue;
				}
				_tmp9_ = name;
				if (sway_notification_center_widgets_mpris_mpris_is_blacklisted (self, _tmp9_)) {
					_g_free0 (name);
					continue;
				}
				_tmp10_ = name;
				if (sway_notification_center_widgets_mpris_mpris_check_player_exists (self, _tmp10_)) {
					_g_free0 (name);
					names = (_vala_array_free (names, names_length1, (GDestroyNotify) g_free), NULL);
					_g_object_unref0 (_tmp0_);
					return;
				}
				_tmp11_ = name;
				_tmp12_ = sway_notification_center_widgets_mpris_mpris_source_get_player (_tmp11_);
				source = _tmp12_;
				_tmp13_ = source;
				if (_tmp13_ != NULL) {
					const gchar* _tmp14_;
					SwayNotificationCenterWidgetsMprisMprisSource* _tmp15_;
					_tmp14_ = name;
					_tmp15_ = source;
					sway_notification_center_widgets_mpris_mpris_add_player (self, _tmp14_, _tmp15_);
				}
				_g_object_unref0 (source);
				_g_free0 (name);
			}
		}
	}
	_tmp16_ = self->priv->dbus_iface;
	g_signal_connect_object (_tmp16_, "name-owner-changed", (GCallback) ___lambda64__sway_notification_center_widgets_mpris_dbus_interface_name_owner_changed, self, 0);
	names = (_vala_array_free (names, names_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_tmp0_);
}

static gboolean
sway_notification_center_widgets_mpris_mpris_check_player_exists (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                  const gchar* name)
{
	GHashTable* _tmp0_;
	guint _tmp1_ = 0;
	gconstpointer* _tmp2_;
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS (self), FALSE);
	g_return_val_if_fail (name != NULL, FALSE);
	_tmp0_ = self->priv->players;
	_tmp2_ = g_hash_table_get_keys_as_array (_tmp0_, &_tmp1_);
	{
		const gchar** name_check_collection = NULL;
		gint name_check_collection_length1 = 0;
		gint _name_check_collection_size_ = 0;
		gint name_check_it = 0;
		name_check_collection = _tmp2_;
		name_check_collection_length1 = _tmp1_;
		for (name_check_it = 0; name_check_it < name_check_collection_length1; name_check_it = name_check_it + 1) {
			gchar* _tmp3_;
			gchar* name_check = NULL;
			_tmp3_ = g_strdup (name_check_collection[name_check_it]);
			name_check = _tmp3_;
			{
				gboolean _tmp4_ = FALSE;
				const gchar* _tmp5_;
				_tmp5_ = name_check;
				if (g_str_has_prefix (_tmp5_, name)) {
					_tmp4_ = TRUE;
				} else {
					const gchar* _tmp6_;
					_tmp6_ = name_check;
					_tmp4_ = g_str_has_prefix (name, _tmp6_);
				}
				if (_tmp4_) {
					result = TRUE;
					_g_free0 (name_check);
					name_check_collection = (g_free (name_check_collection), NULL);
					return result;
				}
				_g_free0 (name_check);
			}
		}
		name_check_collection = (g_free (name_check_collection), NULL);
	}
	result = FALSE;
	return result;
}

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

static gboolean
sway_notification_center_widgets_mpris_mpris_check_player_metadata_empty (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                          const gchar* name)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* player = NULL;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp2_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp3_;
	GHashTable* metadata = NULL;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp4_;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp5_;
	SwayNotificationCenterWidgetsMprisMprisSource* _tmp6_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp7_;
	SwayNotificationCenterWidgetsMprisMprisMediaPlayer* _tmp8_;
	GHashTable* _tmp9_;
	GHashTable* _tmp10_;
	gboolean _tmp11_ = FALSE;
	GHashTable* _tmp12_;
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS (self), FALSE);
	g_return_val_if_fail (name != NULL, FALSE);
	_tmp0_ = self->priv->players;
	_tmp1_ = g_hash_table_lookup (_tmp0_, name);
	_tmp2_ = _g_object_ref0 ((SwayNotificationCenterWidgetsMprisMprisPlayer*) _tmp1_);
	player = _tmp2_;
	_tmp3_ = player;
	if (_tmp3_ == NULL) {
		result = TRUE;
		_g_object_unref0 (player);
		return result;
	}
	_tmp4_ = player;
	_tmp5_ = sway_notification_center_widgets_mpris_mpris_player_get_source (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = sway_notification_center_widgets_mpris_mpris_source_get_media_player (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = sway_notification_center_widgets_mpris_mpris_media_player_get_metadata (_tmp8_);
	_tmp10_ = _tmp9_;
	metadata = _tmp10_;
	_tmp12_ = metadata;
	if (_tmp12_ == NULL) {
		_tmp11_ = TRUE;
	} else {
		GHashTable* _tmp13_;
		_tmp13_ = metadata;
		_tmp11_ = g_hash_table_size (_tmp13_) == ((guint) 0);
	}
	if (_tmp11_) {
		g_debug ("mpris.vala:215: Metadata is empty");
		result = TRUE;
		_g_hash_table_unref0 (metadata);
		_g_object_unref0 (player);
		return result;
	}
	result = FALSE;
	_g_hash_table_unref0 (metadata);
	_g_object_unref0 (player);
	return result;
}

static gboolean
sway_notification_center_widgets_mpris_mpris_check_carousel_has_player (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                        SwayNotificationCenterWidgetsMprisMprisPlayer* player)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS (self), FALSE);
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_PLAYER (player), FALSE);
	if (player != NULL) {
		GtkWidget* _tmp1_;
		GtkWidget* _tmp2_;
		AdwCarousel* _tmp3_;
		_tmp1_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (player, gtk_widget_get_type (), GtkWidget));
		_tmp2_ = _tmp1_;
		_tmp3_ = self->priv->carousel;
		_tmp0_ = _tmp2_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static void
sway_notification_center_widgets_mpris_mpris_add_player_to_carousel (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                     const gchar* name)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* player = NULL;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp2_;
	gboolean _tmp3_ = FALSE;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp4_;
	AdwCarousel* _tmp6_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp7_;
	AdwCarousel* _tmp8_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp9_;
	AdwCarousel* _tmp10_;
	guint _tmp11_;
	guint _tmp12_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS (self));
	g_return_if_fail (name != NULL);
	_tmp0_ = self->priv->players;
	_tmp1_ = g_hash_table_lookup (_tmp0_, name);
	_tmp2_ = _g_object_ref0 ((SwayNotificationCenterWidgetsMprisMprisPlayer*) _tmp1_);
	player = _tmp2_;
	_tmp4_ = player;
	if (_tmp4_ == NULL) {
		_tmp3_ = TRUE;
	} else {
		SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp5_;
		_tmp5_ = player;
		_tmp3_ = sway_notification_center_widgets_mpris_mpris_check_carousel_has_player (self, _tmp5_);
	}
	if (_tmp3_) {
		_g_object_unref0 (player);
		return;
	}
	_tmp6_ = self->priv->carousel;
	_tmp7_ = player;
	adw_carousel_append (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
	_tmp8_ = self->priv->carousel;
	_tmp9_ = player;
	adw_carousel_reorder (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget), 0);
	_tmp10_ = self->priv->carousel;
	_tmp11_ = adw_carousel_get_n_pages (_tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_ > ((guint) 1)) {
		GtkButton* _tmp13_;
		GtkButton* _tmp14_;
		AdwCarouselIndicatorDots* _tmp15_;
		AdwCarousel* _tmp16_;
		SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp17_;
		_tmp13_ = self->priv->button_prev;
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget));
		_tmp14_ = self->priv->button_next;
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget));
		_tmp15_ = self->priv->carousel_dots;
		gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget), TRUE);
		_tmp16_ = self->priv->carousel;
		_tmp17_ = player;
		adw_carousel_scroll_to (_tmp16_, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget), FALSE);
	}
	_tmp18_ = gtk_widget_get_visible (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp19_ = _tmp18_;
	if (!_tmp19_) {
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	}
	_g_object_unref0 (player);
}

static Block19Data*
block19_data_ref (Block19Data* _data19_)
{
	g_atomic_int_inc (&_data19_->_ref_count_);
	return _data19_;
}

static void
block19_data_unref (void * _userdata_)
{
	Block19Data* _data19_;
	_data19_ = (Block19Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data19_->_ref_count_)) {
		SwayNotificationCenterWidgetsMprisMpris* self;
		self = _data19_->self;
		_g_free0 (_data19_->name);
		_g_object_unref0 (self);
		g_slice_free (Block19Data, _data19_);
	}
}

static void
___lambda63_ (Block19Data* _data19_)
{
	SwayNotificationCenterWidgetsMprisMpris* self;
	self = _data19_->self;
	if (!sway_notification_center_widgets_mpris_mpris_check_player_metadata_empty (self, _data19_->name)) {
		sway_notification_center_widgets_mpris_mpris_add_player_to_carousel (self, _data19_->name);
	} else {
		sway_notification_center_widgets_mpris_mpris_remove_player_from_carousel (self, _data19_->name);
	}
}

static void
____lambda63__sway_notification_center_widgets_mpris_mpris_player_content_updated (SwayNotificationCenterWidgetsMprisMprisPlayer* _sender,
                                                                                   gpointer self)
{
	___lambda63_ (self);
}

static void
sway_notification_center_widgets_mpris_mpris_add_player (SwayNotificationCenterWidgetsMprisMpris* self,
                                                         const gchar* name,
                                                         SwayNotificationCenterWidgetsMprisMprisSource* source)
{
	Block19Data* _data19_;
	gchar* _tmp0_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* player = NULL;
	SwayNotificationCenterWidgetsMprisConfig _tmp1_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp2_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GHashTable* _tmp9_;
	gchar* _tmp10_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp11_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp12_;
	SwayNotificationCenterWidgetsMprisConfig _tmp13_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS (self));
	g_return_if_fail (name != NULL);
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_SOURCE (source));
	_data19_ = g_slice_new0 (Block19Data);
	_data19_->_ref_count_ = 1;
	_data19_->self = g_object_ref (self);
	_tmp0_ = g_strdup (name);
	_g_free0 (_data19_->name);
	_data19_->name = _tmp0_;
	_tmp1_ = self->priv->mpris_config;
	_tmp2_ = sway_notification_center_widgets_mpris_mpris_player_new (source, &_tmp1_);
	if (_tmp2_) {
		g_object_set_data ((GObject *) _tmp2_, "vala-creation-function", "SwayNotificationCenter.Widgets.Mpris.Mpris.add_player");
	}
	g_object_ref_sink (_tmp2_);
	player = _tmp2_;
	_tmp3_ = player;
	_tmp4_ = sway_notification_center_widgets_base_widget_get_css_class_name (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget));
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup_printf ("%s-player", _tmp6_);
	_tmp8_ = _tmp7_;
	gtk_widget_add_css_class (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	_tmp9_ = self->priv->players;
	_tmp10_ = g_strdup (_data19_->name);
	_tmp11_ = player;
	_tmp12_ = _g_object_ref0 (_tmp11_);
	g_hash_table_insert (_tmp9_, _tmp10_, _tmp12_);
	_tmp13_ = self->priv->mpris_config;
	if (_tmp13_.autohide) {
		SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp14_;
		_tmp14_ = player;
		g_signal_connect_data (_tmp14_, "content-updated", (GCallback) ____lambda63__sway_notification_center_widgets_mpris_mpris_player_content_updated, block19_data_ref (_data19_), (GClosureNotify) block19_data_unref, 0);
		if (sway_notification_center_widgets_mpris_mpris_check_player_metadata_empty (self, _data19_->name)) {
			_g_object_unref0 (player);
			block19_data_unref (_data19_);
			_data19_ = NULL;
			return;
		}
	}
	sway_notification_center_widgets_mpris_mpris_add_player_to_carousel (self, _data19_->name);
	_g_object_unref0 (player);
	block19_data_unref (_data19_);
	_data19_ = NULL;
}

static void
sway_notification_center_widgets_mpris_mpris_remove_player_from_carousel (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                          const gchar* name)
{
	SwayNotificationCenterWidgetsMprisMprisPlayer* player = NULL;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp2_;
	gboolean _tmp3_ = FALSE;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp4_;
	AdwCarousel* _tmp6_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp7_;
	guint children_length = 0U;
	AdwCarousel* _tmp8_;
	guint _tmp9_;
	guint _tmp10_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS (self));
	g_return_if_fail (name != NULL);
	_tmp0_ = self->priv->players;
	_tmp1_ = g_hash_table_lookup (_tmp0_, name);
	_tmp2_ = _g_object_ref0 ((SwayNotificationCenterWidgetsMprisMprisPlayer*) _tmp1_);
	player = _tmp2_;
	_tmp4_ = player;
	if (_tmp4_ == NULL) {
		_tmp3_ = TRUE;
	} else {
		SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp5_;
		_tmp5_ = player;
		_tmp3_ = !sway_notification_center_widgets_mpris_mpris_check_carousel_has_player (self, _tmp5_);
	}
	if (_tmp3_) {
		_g_object_unref0 (player);
		return;
	}
	_tmp6_ = self->priv->carousel;
	_tmp7_ = player;
	adw_carousel_remove (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
	_tmp8_ = self->priv->carousel;
	_tmp9_ = adw_carousel_get_n_pages (_tmp8_);
	_tmp10_ = _tmp9_;
	children_length = _tmp10_;
	if (children_length == ((guint) 0)) {
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	}
	if (children_length <= ((guint) 1)) {
		GtkButton* _tmp11_;
		GtkButton* _tmp12_;
		AdwCarouselIndicatorDots* _tmp13_;
		_tmp11_ = self->priv->button_prev;
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget));
		_tmp12_ = self->priv->button_next;
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget));
		_tmp13_ = self->priv->carousel_dots;
		gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget), FALSE);
	}
	_g_object_unref0 (player);
}

static void
sway_notification_center_widgets_mpris_mpris_remove_player (SwayNotificationCenterWidgetsMprisMpris* self,
                                                            const gchar* name)
{
	gchar* key = NULL;
	SwayNotificationCenterWidgetsMprisMprisPlayer* player = NULL;
	gboolean _result_ = FALSE;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	gconstpointer _tmp2_ = NULL;
	gboolean _tmp3_;
	gchar* _tmp4_;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp5_;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp10_;
	GHashTable* _tmp11_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS (self));
	g_return_if_fail (name != NULL);
	_tmp0_ = self->priv->players;
	_tmp3_ = g_hash_table_lookup_extended (_tmp0_, name, &_tmp1_, &_tmp2_);
	_g_free0 (key);
	_tmp4_ = g_strdup ((const gchar*) _tmp1_);
	key = _tmp4_;
	_g_object_unref0 (player);
	_tmp5_ = _g_object_ref0 ((SwayNotificationCenterWidgetsMprisMprisPlayer*) _tmp2_);
	player = _tmp5_;
	_result_ = _tmp3_;
	if (!_result_) {
		_tmp7_ = TRUE;
	} else {
		const gchar* _tmp8_;
		_tmp8_ = key;
		_tmp7_ = _tmp8_ == NULL;
	}
	if (_tmp7_) {
		_tmp6_ = TRUE;
	} else {
		SwayNotificationCenterWidgetsMprisMprisPlayer* _tmp9_;
		_tmp9_ = player;
		_tmp6_ = _tmp9_ == NULL;
	}
	if (_tmp6_) {
		_g_object_unref0 (player);
		_g_free0 (key);
		return;
	}
	sway_notification_center_widgets_mpris_mpris_remove_player_from_carousel (self, name);
	_tmp10_ = player;
	sway_notification_center_widgets_mpris_mpris_player_before_destroy (_tmp10_);
	_tmp11_ = self->priv->players;
	g_hash_table_remove (_tmp11_, name);
	_g_object_unref0 (player);
	_g_free0 (key);
}

static void
sway_notification_center_widgets_mpris_mpris_change_carousel_position (SwayNotificationCenterWidgetsMprisMpris* self,
                                                                       gint delta)
{
	guint children_length = 0U;
	AdwCarousel* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	guint position = 0U;
	SwayNotificationCenterWidgetsMprisConfig _tmp3_;
	AdwCarousel* _tmp10_;
	AdwCarousel* _tmp11_;
	GtkWidget* _tmp12_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS (self));
	_tmp0_ = self->priv->carousel;
	_tmp1_ = adw_carousel_get_n_pages (_tmp0_);
	_tmp2_ = _tmp1_;
	children_length = _tmp2_;
	if (children_length == ((guint) 0)) {
		return;
	}
	_tmp3_ = self->priv->mpris_config;
	if (_tmp3_.loop_carousel) {
		AdwCarousel* _tmp4_;
		gdouble _tmp5_;
		gdouble _tmp6_;
		_tmp4_ = self->priv->carousel;
		_tmp5_ = adw_carousel_get_position (_tmp4_);
		_tmp6_ = _tmp5_;
		position = (((guint) _tmp6_) + delta) % children_length;
	} else {
		AdwCarousel* _tmp7_;
		gdouble _tmp8_;
		gdouble _tmp9_;
		_tmp7_ = self->priv->carousel;
		_tmp8_ = adw_carousel_get_position (_tmp7_);
		_tmp9_ = _tmp8_;
		position = CLAMP (((guint) _tmp9_) + delta, (guint) 0, children_length - 1);
	}
	_tmp10_ = self->priv->carousel;
	_tmp11_ = self->priv->carousel;
	_tmp12_ = adw_carousel_get_nth_page (_tmp11_, position);
	adw_carousel_scroll_to (_tmp10_, _tmp12_, TRUE);
}

static gboolean
sway_notification_center_widgets_mpris_mpris_is_blacklisted (SwayNotificationCenterWidgetsMprisMpris* self,
                                                             const gchar* name)
{
	SwayNotificationCenterWidgetsMprisConfig _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS (self), FALSE);
	g_return_val_if_fail (name != NULL, FALSE);
	_tmp0_ = self->priv->mpris_config;
	_tmp1_ = _tmp0_.blacklist;
	_tmp1__length1 = _tmp0_.blacklist_length1;
	{
		gchar** blacklistedPattern_collection = NULL;
		gint blacklistedPattern_collection_length1 = 0;
		gint _blacklistedPattern_collection_size_ = 0;
		gint blacklistedPattern_it = 0;
		blacklistedPattern_collection = _tmp1_;
		blacklistedPattern_collection_length1 = _tmp1__length1;
		for (blacklistedPattern_it = 0; blacklistedPattern_it < blacklistedPattern_collection_length1; blacklistedPattern_it = blacklistedPattern_it + 1) {
			gchar* _tmp2_;
			gchar* blacklistedPattern = NULL;
			_tmp2_ = g_strdup (blacklistedPattern_collection[blacklistedPattern_it]);
			blacklistedPattern = _tmp2_;
			{
				gboolean _tmp3_ = FALSE;
				const gchar* _tmp4_;
				const gchar* _tmp8_;
				_tmp4_ = blacklistedPattern;
				if (_tmp4_ == NULL) {
					_tmp3_ = TRUE;
				} else {
					const gchar* _tmp5_;
					gint _tmp6_;
					gint _tmp7_;
					_tmp5_ = blacklistedPattern;
					_tmp6_ = strlen (_tmp5_);
					_tmp7_ = _tmp6_;
					_tmp3_ = _tmp7_ == 0;
				}
				if (_tmp3_) {
					_g_free0 (blacklistedPattern);
					continue;
				}
				_tmp8_ = blacklistedPattern;
				if (g_regex_match_simple (_tmp8_, name, G_REGEX_DEFAULT, 0)) {
					g_message ("mpris.vala:322: \"%s\" is blacklisted", name);
					result = TRUE;
					_g_free0 (blacklistedPattern);
					return result;
				}
				_g_free0 (blacklistedPattern);
			}
		}
	}
	result = FALSE;
	return result;
}

static const gchar*
sway_notification_center_widgets_mpris_mpris_real_get_widget_name (SwayNotificationCenterWidgetsBaseWidget* base)
{
	const gchar* result;
	SwayNotificationCenterWidgetsMprisMpris* self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS, SwayNotificationCenterWidgetsMprisMpris);
	result = "mpris";
	return result;
}

static void
sway_notification_center_widgets_mpris_mpris_class_init (SwayNotificationCenterWidgetsMprisMprisClass * klass,
                                                         gpointer klass_data)
{
	sway_notification_center_widgets_mpris_mpris_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SwayNotificationCenterWidgetsMprisMpris_private_offset);
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_CLASS (klass)->get_widget_name = (const gchar* (*) (SwayNotificationCenterWidgetsBaseWidget*)) sway_notification_center_widgets_mpris_mpris_real_get_widget_name;
	G_OBJECT_CLASS (klass)->get_property = _vala_sway_notification_center_widgets_mpris_mpris_get_property;
	G_OBJECT_CLASS (klass)->finalize = sway_notification_center_widgets_mpris_mpris_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_WIDGET_NAME_PROPERTY, sway_notification_center_widgets_mpris_mpris_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_WIDGET_NAME_PROPERTY] = g_param_spec_string ("widget-name", "widget-name", "widget-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
sway_notification_center_widgets_mpris_mpris_instance_init (SwayNotificationCenterWidgetsMprisMpris * self,
                                                            gpointer klass)
{
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	SwayNotificationCenterWidgetsMprisConfig _tmp3_ = {0};
	self->priv = sway_notification_center_widgets_mpris_mpris_get_instance_private (self);
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_object_unref0_);
	self->priv->players = _tmp2_;
	memset (&_tmp3_, 0, sizeof (SwayNotificationCenterWidgetsMprisConfig));
	_tmp3_.image_size = -1;
	_tmp3_.show_album_art = SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_ALBUM_ART_STATE_ALWAYS;
	_tmp3_.autohide = FALSE;
	_tmp3_.loop_carousel = FALSE;
	self->priv->mpris_config = _tmp3_;
}

static void
sway_notification_center_widgets_mpris_mpris_finalize (GObject * obj)
{
	SwayNotificationCenterWidgetsMprisMpris * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS, SwayNotificationCenterWidgetsMprisMpris);
	_g_hash_table_unref0 (self->priv->players);
	_g_object_unref0 (self->priv->dbus_iface);
	_g_object_unref0 (self->priv->button_prev);
	_g_object_unref0 (self->priv->button_next);
	_g_object_unref0 (self->priv->carousel_box);
	_g_object_unref0 (self->priv->carousel);
	_g_object_unref0 (self->priv->carousel_dots);
	sway_notification_center_widgets_mpris_config_destroy (&self->priv->mpris_config);
	G_OBJECT_CLASS (sway_notification_center_widgets_mpris_mpris_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_widgets_mpris_mpris_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SwayNotificationCenterWidgetsMprisMprisClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sway_notification_center_widgets_mpris_mpris_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SwayNotificationCenterWidgetsMprisMpris), 0, (GInstanceInitFunc) sway_notification_center_widgets_mpris_mpris_instance_init, NULL };
	GType sway_notification_center_widgets_mpris_mpris_type_id;
	sway_notification_center_widgets_mpris_mpris_type_id = g_type_register_static (SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, "SwayNotificationCenterWidgetsMprisMpris", &g_define_type_info, 0);
	SwayNotificationCenterWidgetsMprisMpris_private_offset = g_type_add_instance_private (sway_notification_center_widgets_mpris_mpris_type_id, sizeof (SwayNotificationCenterWidgetsMprisMprisPrivate));
	return sway_notification_center_widgets_mpris_mpris_type_id;
}

GType
sway_notification_center_widgets_mpris_mpris_get_type (void)
{
	static gsize sway_notification_center_widgets_mpris_mpris_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_widgets_mpris_mpris_type_id__once)) {
		GType sway_notification_center_widgets_mpris_mpris_type_id;
		sway_notification_center_widgets_mpris_mpris_type_id = sway_notification_center_widgets_mpris_mpris_get_type_once ();
		g_once_init_leave (&sway_notification_center_widgets_mpris_mpris_type_id__once, sway_notification_center_widgets_mpris_mpris_type_id);
	}
	return sway_notification_center_widgets_mpris_mpris_type_id__once;
}

static void
_vala_sway_notification_center_widgets_mpris_mpris_get_property (GObject * object,
                                                                 guint property_id,
                                                                 GValue * value,
                                                                 GParamSpec * pspec)
{
	SwayNotificationCenterWidgetsMprisMpris * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS, SwayNotificationCenterWidgetsMprisMpris);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_WIDGET_NAME_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_base_widget_get_widget_name (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget)));
		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);
}

