/* play-panel.c generated by valac 0.56.19, the Vala compiler
 * generated from play-panel.vala, do not modify */

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

#define G4_SEARCH_MODE_ALBUM ((guint) 1)
#define G4_SEARCH_MODE_ARTIST ((guint) 2)
#define G4_SEARCH_MODE_TITLE ((guint) 3)
#define G4_ACTION_APP "app."
#define G4_ACTION_PREV "prev"
#define G4_ACTION_NEXT "next"
#define G4_ACTION_PLAY_PAUSE "play-pause"
#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 G4_TYPE_SIZE_WATCHER (g4_size_watcher_get_type ())
#define G4_SIZE_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_SIZE_WATCHER, G4SizeWatcher))
#define G4_IS_SIZE_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_SIZE_WATCHER))
#define G4_SIZE_WATCHER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G4_TYPE_SIZE_WATCHER, G4SizeWatcherIface))

typedef struct _G4SizeWatcher G4SizeWatcher;
typedef struct _G4SizeWatcherIface G4SizeWatcherIface;

#define G4_TYPE_PLAY_PANEL (g4_play_panel_get_type ())
#define G4_PLAY_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_PLAY_PANEL, G4PlayPanel))
#define G4_PLAY_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_PLAY_PANEL, G4PlayPanelClass))
#define G4_IS_PLAY_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_PLAY_PANEL))
#define G4_IS_PLAY_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_PLAY_PANEL))
#define G4_PLAY_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_PLAY_PANEL, G4PlayPanelClass))

typedef struct _G4PlayPanel G4PlayPanel;
typedef struct _G4PlayPanelClass G4PlayPanelClass;
typedef struct _G4PlayPanelPrivate G4PlayPanelPrivate;

#define G4_TYPE_STABLE_LABEL (g4_stable_label_get_type ())
#define G4_STABLE_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_STABLE_LABEL, G4StableLabel))
#define G4_STABLE_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_STABLE_LABEL, G4StableLabelClass))
#define G4_IS_STABLE_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_STABLE_LABEL))
#define G4_IS_STABLE_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_STABLE_LABEL))
#define G4_STABLE_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_STABLE_LABEL, G4StableLabelClass))

typedef struct _G4StableLabel G4StableLabel;
typedef struct _G4StableLabelClass G4StableLabelClass;

#define G4_TYPE_PLAY_BAR (g4_play_bar_get_type ())
#define G4_PLAY_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_PLAY_BAR, G4PlayBar))
#define G4_PLAY_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_PLAY_BAR, G4PlayBarClass))
#define G4_IS_PLAY_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_PLAY_BAR))
#define G4_IS_PLAY_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_PLAY_BAR))
#define G4_PLAY_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_PLAY_BAR, G4PlayBarClass))

typedef struct _G4PlayBar G4PlayBar;
typedef struct _G4PlayBarClass G4PlayBarClass;

#define G4_TYPE_APPLICATION (g4_application_get_type ())
#define G4_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_APPLICATION, G4Application))
#define G4_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_APPLICATION, G4ApplicationClass))
#define G4_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_APPLICATION))
#define G4_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_APPLICATION))
#define G4_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_APPLICATION, G4ApplicationClass))

typedef struct _G4Application G4Application;
typedef struct _G4ApplicationClass G4ApplicationClass;

#define G4_TYPE_BASE_PAINTABLE (g4_base_paintable_get_type ())
#define G4_BASE_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_BASE_PAINTABLE, G4BasePaintable))
#define G4_BASE_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_BASE_PAINTABLE, G4BasePaintableClass))
#define G4_IS_BASE_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_BASE_PAINTABLE))
#define G4_IS_BASE_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_BASE_PAINTABLE))
#define G4_BASE_PAINTABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_BASE_PAINTABLE, G4BasePaintableClass))

typedef struct _G4BasePaintable G4BasePaintable;
typedef struct _G4BasePaintableClass G4BasePaintableClass;

#define G4_TYPE_CROSS_FADE_PAINTABLE (g4_cross_fade_paintable_get_type ())
#define G4_CROSS_FADE_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_CROSS_FADE_PAINTABLE, G4CrossFadePaintable))
#define G4_CROSS_FADE_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_CROSS_FADE_PAINTABLE, G4CrossFadePaintableClass))
#define G4_IS_CROSS_FADE_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_CROSS_FADE_PAINTABLE))
#define G4_IS_CROSS_FADE_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_CROSS_FADE_PAINTABLE))
#define G4_CROSS_FADE_PAINTABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_CROSS_FADE_PAINTABLE, G4CrossFadePaintableClass))

typedef struct _G4CrossFadePaintable G4CrossFadePaintable;
typedef struct _G4CrossFadePaintableClass G4CrossFadePaintableClass;

#define G4_TYPE_MATRIX_PAINTABLE (g4_matrix_paintable_get_type ())
#define G4_MATRIX_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MATRIX_PAINTABLE, G4MatrixPaintable))
#define G4_MATRIX_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MATRIX_PAINTABLE, G4MatrixPaintableClass))
#define G4_IS_MATRIX_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MATRIX_PAINTABLE))
#define G4_IS_MATRIX_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MATRIX_PAINTABLE))
#define G4_MATRIX_PAINTABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MATRIX_PAINTABLE, G4MatrixPaintableClass))

typedef struct _G4MatrixPaintable G4MatrixPaintable;
typedef struct _G4MatrixPaintableClass G4MatrixPaintableClass;

#define G4_TYPE_ROUND_PAINTABLE (g4_round_paintable_get_type ())
#define G4_ROUND_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_ROUND_PAINTABLE, G4RoundPaintable))
#define G4_ROUND_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_ROUND_PAINTABLE, G4RoundPaintableClass))
#define G4_IS_ROUND_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_ROUND_PAINTABLE))
#define G4_IS_ROUND_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_ROUND_PAINTABLE))
#define G4_ROUND_PAINTABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_ROUND_PAINTABLE, G4RoundPaintableClass))

typedef struct _G4RoundPaintable G4RoundPaintable;
typedef struct _G4RoundPaintableClass G4RoundPaintableClass;
enum  {
	G4_PLAY_PANEL_0_PROPERTY,
	G4_PLAY_PANEL_ROTATE_COVER_PROPERTY,
	G4_PLAY_PANEL_SHOW_PEAK_PROPERTY,
	G4_PLAY_PANEL_NUM_PROPERTIES
};
static GParamSpec* g4_play_panel_properties[G4_PLAY_PANEL_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define G4_TYPE_WINDOW (g4_window_get_type ())
#define G4_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_WINDOW, G4Window))
#define G4_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_WINDOW, G4WindowClass))
#define G4_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_WINDOW))
#define G4_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_WINDOW))
#define G4_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_WINDOW, G4WindowClass))

typedef struct _G4Window G4Window;
typedef struct _G4WindowClass G4WindowClass;

#define G4_TYPE_LEAFLET (g4_leaflet_get_type ())
#define G4_LEAFLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_LEAFLET, G4Leaflet))
#define G4_LEAFLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_LEAFLET, G4LeafletClass))
#define G4_IS_LEAFLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_LEAFLET))
#define G4_IS_LEAFLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_LEAFLET))
#define G4_LEAFLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_LEAFLET, G4LeafletClass))

typedef struct _G4Leaflet G4Leaflet;
typedef struct _G4LeafletClass G4LeafletClass;
typedef struct _Block31Data Block31Data;
typedef void (*G4Pressed) (GtkWidget* widget, gdouble x, gdouble y, gpointer user_data);

#define G4_TYPE_MUSIC (g4_music_get_type ())
#define G4_MUSIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC, G4Music))
#define G4_MUSIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC, G4MusicClass))
#define G4_IS_MUSIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC))
#define G4_IS_MUSIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC))
#define G4_MUSIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC, G4MusicClass))

typedef struct _G4Music G4Music;
typedef struct _G4MusicClass G4MusicClass;

#define G4_TYPE_GST_PLAYER (g4_gst_player_get_type ())
#define G4_GST_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_GST_PLAYER, G4GstPlayer))
#define G4_GST_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_GST_PLAYER, G4GstPlayerClass))
#define G4_IS_GST_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_GST_PLAYER))
#define G4_IS_GST_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_GST_PLAYER))
#define G4_GST_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_GST_PLAYER, G4GstPlayerClass))

typedef struct _G4GstPlayer G4GstPlayer;
typedef struct _G4GstPlayerClass G4GstPlayerClass;
typedef struct _Block32Data Block32Data;

#define G4_TYPE_ALBUM (g4_album_get_type ())
#define G4_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_ALBUM, G4Album))
#define G4_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_ALBUM, G4AlbumClass))
#define G4_IS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_ALBUM))
#define G4_IS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_ALBUM))
#define G4_ALBUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_ALBUM, G4AlbumClass))

typedef struct _G4Album G4Album;
typedef struct _G4AlbumClass G4AlbumClass;

#define G4_TYPE_PLAYLIST (g4_playlist_get_type ())
#define G4_PLAYLIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_PLAYLIST, G4Playlist))
#define G4_PLAYLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_PLAYLIST, G4PlaylistClass))
#define G4_IS_PLAYLIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_PLAYLIST))
#define G4_IS_PLAYLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_PLAYLIST))
#define G4_PLAYLIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_PLAYLIST, G4PlaylistClass))

typedef struct _G4Playlist G4Playlist;
typedef struct _G4PlaylistClass G4PlaylistClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _G4MusicPrivate G4MusicPrivate;

#define G4_TYPE_MUSIC_LOADER (g4_music_loader_get_type ())
#define G4_MUSIC_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_LOADER, G4MusicLoader))
#define G4_MUSIC_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_LOADER, G4MusicLoaderClass))
#define G4_IS_MUSIC_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_LOADER))
#define G4_IS_MUSIC_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_LOADER))
#define G4_MUSIC_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_LOADER, G4MusicLoaderClass))

typedef struct _G4MusicLoader G4MusicLoader;
typedef struct _G4MusicLoaderClass G4MusicLoaderClass;

#define G4_TYPE_MUSIC_LIBRARY (g4_music_library_get_type ())
#define G4_MUSIC_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_LIBRARY, G4MusicLibrary))
#define G4_MUSIC_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_LIBRARY, G4MusicLibraryClass))
#define G4_IS_MUSIC_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_LIBRARY))
#define G4_IS_MUSIC_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_LIBRARY))
#define G4_MUSIC_LIBRARY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_LIBRARY, G4MusicLibraryClass))

typedef struct _G4MusicLibrary G4MusicLibrary;
typedef struct _G4MusicLibraryClass G4MusicLibraryClass;
typedef void (*G4FolderPicked) (GFile* dir, gpointer user_data);

#define G4_TYPE_THUMBNAILER (g4_thumbnailer_get_type ())
#define G4_THUMBNAILER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_THUMBNAILER, G4Thumbnailer))
#define G4_THUMBNAILER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_THUMBNAILER, G4ThumbnailerClass))
#define G4_IS_THUMBNAILER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_THUMBNAILER))
#define G4_IS_THUMBNAILER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_THUMBNAILER))
#define G4_THUMBNAILER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_THUMBNAILER, G4ThumbnailerClass))

typedef struct _G4Thumbnailer G4Thumbnailer;
typedef struct _G4ThumbnailerClass G4ThumbnailerClass;
typedef struct _G4PlayPanelOnMusicCoverParsedData G4PlayPanelOnMusicCoverParsedData;
enum  {
	G4_PLAY_PANEL_COVER_CHANGED_SIGNAL,
	G4_PLAY_PANEL_NUM_SIGNALS
};
static guint g4_play_panel_signals[G4_PLAY_PANEL_NUM_SIGNALS] = {0};

struct _G4SizeWatcherIface {
	GTypeInterface parent_iface;
	void (*first_allocated) (G4SizeWatcher* self);
	void (*size_to_change) (G4SizeWatcher* self, gint width, gint height);
};

struct _G4PlayPanel {
	GtkBox parent_instance;
	G4PlayPanelPrivate * priv;
};

struct _G4PlayPanelClass {
	GtkBoxClass parent_class;
};

struct _G4PlayPanelPrivate {
	GtkMenuButton* action_btn;
	GtkButton* back_btn;
	GtkLabel* index_label;
	GtkBox* music_box;
	GtkImage* music_cover;
	G4StableLabel* music_album;
	G4StableLabel* music_artist;
	G4StableLabel* music_title;
	GtkLabel* initial_label;
	G4PlayBar* _play_bar;
	G4Application* _app;
	gdouble _degrees_per_second;
	G4CrossFadePaintable* _crossfade_paintable;
	G4MatrixPaintable* _matrix_paintable;
	G4RoundPaintable* _round_paintable;
	gboolean _rotate_cover;
	gboolean _show_peak;
	gboolean _size_allocated;
	AdwAnimation* _scale_animation;
	guint _tick_handler;
	gint64 _tick_last_time;
};

struct _Block31Data {
	int _ref_count_;
	G4PlayPanel* self;
	G4Window* win;
};

struct _Block32Data {
	int _ref_count_;
	G4PlayPanel* self;
	graphene_point_t point;
	GtkDragSource* source;
};

struct _G4Music {
	GObject parent_instance;
	G4MusicPrivate * priv;
	gchar* album;
	gchar* artist;
	gchar* title;
	gchar* album_artist;
	guint32 date;
	gchar* genre;
	gint track;
	gint disc;
	gboolean has_cover;
	gint64 modified_time;
	gchar* uri;
	gchar* cover_uri;
	gchar* _album_key;
	gchar* _artist_key;
	gchar* _title_key;
	gint _order;
};

struct _G4MusicClass {
	GObjectClass parent_class;
	gchar* (*get_abbreviation) (G4Music* self);
};

struct _G4PlayPanelOnMusicCoverParsedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	G4PlayPanel* self;
	G4Music* music;
	GdkPixbuf* pixbuf;
	gchar* uri;
	GdkPaintable* _tmp0_;
	GdkTexture* _tmp1_;
	G4Application* _tmp2_;
	G4Thumbnailer* _tmp3_;
	G4Thumbnailer* _tmp4_;
	GdkPaintable* _tmp5_;
	GdkPaintable* paintable;
	GdkPaintable* _tmp6_;
};

static gint G4PlayPanel_private_offset;
static gpointer g4_play_panel_parent_class = NULL;
static G4SizeWatcherIface * g4_play_panel_g4_size_watcher_parent_iface = NULL;

VALA_EXTERN GType g4_size_watcher_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType g4_play_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4PlayPanel, g_object_unref)
VALA_EXTERN GType g4_stable_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4StableLabel, g_object_unref)
VALA_EXTERN GType g4_play_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4PlayBar, g_object_unref)
VALA_EXTERN GType g4_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Application, g_object_unref)
VALA_EXTERN GType g4_base_paintable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4BasePaintable, g_object_unref)
VALA_EXTERN GType g4_cross_fade_paintable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4CrossFadePaintable, g_object_unref)
VALA_EXTERN GType g4_matrix_paintable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MatrixPaintable, g_object_unref)
VALA_EXTERN GType g4_round_paintable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4RoundPaintable, g_object_unref)
VALA_EXTERN G4PlayBar* g4_play_bar_new (void);
VALA_EXTERN G4PlayBar* g4_play_bar_construct (GType object_type);
VALA_EXTERN G4CrossFadePaintable* g4_cross_fade_paintable_new (GdkPaintable* paintable);
VALA_EXTERN G4CrossFadePaintable* g4_cross_fade_paintable_construct (GType object_type,
                                                         GdkPaintable* paintable);
VALA_EXTERN G4MatrixPaintable* g4_matrix_paintable_new (GdkPaintable* paintable);
VALA_EXTERN G4MatrixPaintable* g4_matrix_paintable_construct (GType object_type,
                                                  GdkPaintable* paintable);
VALA_EXTERN G4RoundPaintable* g4_round_paintable_new (GdkPaintable* paintable,
                                          gdouble ratio);
VALA_EXTERN G4RoundPaintable* g4_round_paintable_construct (GType object_type,
                                                GdkPaintable* paintable,
                                                gdouble ratio);
VALA_EXTERN GType g4_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Window, g_object_unref)
VALA_EXTERN GType g4_leaflet_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Leaflet, g_object_unref)
VALA_EXTERN G4PlayPanel* g4_play_panel_new (G4Application* app,
                                G4Window* win,
                                G4Leaflet* leaflet);
VALA_EXTERN G4PlayPanel* g4_play_panel_construct (GType object_type,
                                      G4Application* app,
                                      G4Window* win,
                                      G4Leaflet* leaflet);
static Block31Data* block31_data_ref (Block31Data* _data31_);
static void block31_data_unref (void * _userdata_);
static void g4_play_panel_on_position_seeked (G4PlayPanel* self,
                                       gdouble pos);
static void _g4_play_panel_on_position_seeked_g4_play_bar_position_seeked (G4PlayBar* _sender,
                                                                    gdouble position,
                                                                    gpointer self);
static void __lambda60_ (G4PlayPanel* self);
static GMenu* g4_play_panel_create_music_action_menu (G4PlayPanel* self);
static void ___lambda60__gtk_menu_button_create_popup_func (GtkMenuButton* menu_button,
                                                     gpointer self);
VALA_EXTERN void g4_leaflet_pop (G4Leaflet* self);
static void _g4_leaflet_pop_gtk_button_clicked (GtkButton* _sender,
                                         gpointer self);
VALA_EXTERN void g4_base_paintable_set_paintable (G4BasePaintable* self,
                                      GdkPaintable* value);
static void _gtk_widget_queue_draw_g4_base_paintable_queue_draw (G4BasePaintable* _sender,
                                                          gpointer self);
static void g4_play_panel_create_drag_source (G4PlayPanel* self);
VALA_EXTERN GtkGestureClick* g4_make_widget_clickable (GtkWidget* label);
static void __lambda65_ (Block31Data* _data31_);
VALA_EXTERN void g4_window_open_playing_page (G4Window* self);
static void ___lambda65__gtk_gesture_click_released (GtkGestureClick* _sender,
                                              gint n_press,
                                              gdouble x,
                                              gdouble y,
                                              gpointer self);
static gboolean g4_play_panel_on_music_folder_clicked (G4PlayPanel* self,
                                                const gchar* uri);
static gboolean _g4_play_panel_on_music_folder_clicked_gtk_label_activate_link (GtkLabel* _sender,
                                                                         const gchar* uri,
                                                                         gpointer self);
static void __lambda125_ (Block31Data* _data31_);
VALA_EXTERN void g4_window_start_search (G4Window* self,
                             const gchar* text,
                             guint mode);
VALA_EXTERN const gchar* g4_stable_label_get_label (G4StableLabel* self);
static void ___lambda125__gtk_gesture_click_released (GtkGestureClick* _sender,
                                               gint n_press,
                                               gdouble x,
                                               gdouble y,
                                               gpointer self);
static void __lambda126_ (Block31Data* _data31_);
static void ___lambda126__gtk_gesture_click_released (GtkGestureClick* _sender,
                                               gint n_press,
                                               gdouble x,
                                               gdouble y,
                                               gpointer self);
static void __lambda127_ (Block31Data* _data31_);
static void ___lambda127__gtk_gesture_click_released (GtkGestureClick* _sender,
                                               gint n_press,
                                               gdouble x,
                                               gdouble y,
                                               gpointer self);
VALA_EXTERN GtkGestureClick* g4_make_right_clickable (GtkWidget* widget,
                                          G4Pressed pressed,
                                          gpointer pressed_target);
static void g4_play_panel_show_popover_menu (G4PlayPanel* self,
                                      GtkWidget* widget,
                                      gdouble x,
                                      gdouble y);
static void _g4_play_panel_show_popover_menu_g4_pressed (GtkWidget* widget,
                                                  gdouble x,
                                                  gdouble y,
                                                  gpointer self);
static void g4_play_panel_on_index_changed (G4PlayPanel* self,
                                     gint index,
                                     guint size);
static void _g4_play_panel_on_index_changed_g4_application_index_changed (G4Application* _sender,
                                                                   gint index,
                                                                   guint size,
                                                                   gpointer self);
VALA_EXTERN GType g4_music_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Music, g_object_unref)
static void g4_play_panel_on_music_changed (G4PlayPanel* self,
                                     G4Music* music);
static void _g4_play_panel_on_music_changed_g4_application_music_changed (G4Application* _sender,
                                                                   G4Music* music,
                                                                   gpointer self);
static void g4_play_panel_on_music_cover_parsed (G4PlayPanel* self,
                                          G4Music* music,
                                          GdkPixbuf* pixbuf,
                                          const gchar* uri,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static void g4_play_panel_on_music_cover_parsed_finish (G4PlayPanel* self,
                                                 GAsyncResult* _res_);
static void _g4_play_panel_on_music_cover_parsed_g4_application_music_cover_parsed (G4Application* _sender,
                                                                             G4Music* music,
                                                                             GdkPixbuf* cover,
                                                                             const gchar* cover_uri,
                                                                             gpointer self);
VALA_EXTERN GType g4_gst_player_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4GstPlayer, g_object_unref)
VALA_EXTERN G4GstPlayer* g4_application_get_player (G4Application* self);
static void g4_play_panel_on_player_state_changed (G4PlayPanel* self,
                                            GstState state);
static void _g4_play_panel_on_player_state_changed_g4_gst_player_state_changed (G4GstPlayer* _sender,
                                                                         GstState state,
                                                                         gpointer self);
VALA_EXTERN GSettings* g4_application_get_settings (G4Application* self);
static void g4_play_panel_real_first_allocated (G4SizeWatcher* base);
VALA_EXTERN G4Music* g4_application_get_current_music (G4Application* self);
static void g4_play_panel_real_size_to_change (G4SizeWatcher* base,
                                        gint width,
                                        gint height);
VALA_EXTERN void g4_play_bar_on_size_changed (G4PlayBar* self,
                                  gint bar_width,
                                  gint bar_spacing);
static Block32Data* block32_data_ref (Block32Data* _data32_);
static void block32_data_unref (void * _userdata_);
static void __lambda61_ (Block32Data* _data32_,
                  GdkDrag* drag);
VALA_EXTERN GdkPaintable* g4_create_widget_paintable (GtkWidget* widget,
                                          graphene_point_t* point,
                                          const gchar* title,
                                          gint max_size);
static void ___lambda61__gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                              GdkDrag* drag,
                                              gpointer self);
static GdkContentProvider* __lambda62_ (Block32Data* _data32_,
                                 gdouble x,
                                 gdouble y);
VALA_EXTERN gboolean g4_round_paintable_contains (G4RoundPaintable* self,
                                      graphene_point_t* point);
VALA_EXTERN GType g4_album_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Album, g_object_unref)
VALA_EXTERN GType g4_playlist_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Playlist, g_object_unref)
VALA_EXTERN G4Playlist* g4_to_playlist (G4Music** musics,
                            gint musics_length1,
                            const gchar* title);
VALA_EXTERN GdkContentProvider* g4_create_content_provider (G4Playlist* playlist);
static GdkContentProvider* ___lambda62__gtk_drag_source_prepare (GtkDragSource* _sender,
                                                          gdouble x,
                                                          gdouble y,
                                                          gpointer self);
VALA_EXTERN G4Music* g4_music_new_empty (void);
VALA_EXTERN G4Music* g4_music_construct_empty (GType object_type);
VALA_EXTERN GMenu* g4_create_menu_for_music (G4Music* music,
                                 gboolean has_cover);
VALA_EXTERN GstSample* g4_application_get_current_cover (G4Application* self);
VALA_EXTERN void g4_stable_label_set_label (G4StableLabel* self,
                                const gchar* value);
VALA_EXTERN GtkFilterListModel* g4_application_get_current_list (G4Application* self);
VALA_EXTERN gboolean g4_application_get_loading (G4Application* self);
VALA_EXTERN GType g4_music_loader_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicLoader, g_object_unref)
VALA_EXTERN G4MusicLoader* g4_application_get_loader (G4Application* self);
VALA_EXTERN GType g4_music_library_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicLibrary, g_object_unref)
VALA_EXTERN G4MusicLibrary* g4_music_loader_get_library (G4MusicLoader* self);
VALA_EXTERN gboolean g4_music_library_get_empty (G4MusicLibrary* self);
static void g4_play_panel_update_initial_label (G4PlayPanel* self,
                                         const gchar* uri);
VALA_EXTERN const gchar* g4_application_get_music_folder (G4Application* self);
static void g4_play_panel_update_cover_paintables (G4PlayPanel* self,
                                            G4Music* music,
                                            GdkPaintable* paintable);
VALA_EXTERN GtkIconPaintable* g4_application_get_icon (G4Application* self);
VALA_EXTERN G4Window* g4_window_get_default (void);
VALA_EXTERN gchar* g4_music_get_artist_and_title (G4Music* self);
VALA_EXTERN const gchar* g4_application_get_name (G4Application* self);
VALA_EXTERN void g4_pick_music_folder (G4Application* app,
                           GtkWindow* parent,
                           G4FolderPicked picked,
                           gpointer picked_target);
static void __lambda124_ (G4PlayPanel* self,
                   GFile* dir);
static void ___lambda124__g4_folder_picked (GFile* dir,
                                     gpointer self);
static void g4_play_panel_on_music_cover_parsed_data_free (gpointer _data);
static gboolean g4_play_panel_on_music_cover_parsed_co (G4PlayPanelOnMusicCoverParsedData* _data_);
VALA_EXTERN GType g4_thumbnailer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Thumbnailer, g_object_unref)
VALA_EXTERN G4Thumbnailer* g4_application_get_thumbnailer (G4Application* self);
VALA_EXTERN GdkPaintable* g4_thumbnailer_create_music_text_paintable (G4Thumbnailer* self,
                                                          G4Music* music);
static void ___lambda128_ (G4PlayPanel* self,
                    gdouble value);
VALA_EXTERN void g4_matrix_paintable_set_scale (G4MatrixPaintable* self,
                                    gdouble value);
static void ____lambda128__adw_animation_target_func (gdouble value,
                                               gpointer self);
VALA_EXTERN gdouble g4_matrix_paintable_get_scale (G4MatrixPaintable* self);
static gboolean g4_play_panel_on_tick_callback (G4PlayPanel* self,
                                         GtkWidget* widget,
                                         GdkFrameClock* clock);
static gboolean _g4_play_panel_on_tick_callback_gtk_tick_callback (GtkWidget* widget,
                                                            GdkFrameClock* frame_clock,
                                                            gpointer self);
VALA_EXTERN void g4_matrix_paintable_set_rotation (G4MatrixPaintable* self,
                                       gdouble value);
VALA_EXTERN gdouble g4_matrix_paintable_get_rotation (G4MatrixPaintable* self);
VALA_EXTERN gdouble g4_gst_player_get_peak (G4GstPlayer* self);
VALA_EXTERN void g4_play_bar_set_peak (G4PlayBar* self,
                           gdouble value);
VALA_EXTERN GtkPopoverMenu* g4_create_popover_menu (GMenu* menu,
                                        gdouble x,
                                        gdouble y);
VALA_EXTERN void g4_round_paintable_set_ratio (G4RoundPaintable* self,
                                   gdouble value);
VALA_EXTERN gchar* g4_get_display_name (const gchar* uri);
VALA_EXTERN gboolean g4_play_panel_get_rotate_cover (G4PlayPanel* self);
VALA_EXTERN void g4_play_panel_set_rotate_cover (G4PlayPanel* self,
                                     gboolean value);
VALA_EXTERN gdouble g4_play_bar_get_position (G4PlayBar* self);
VALA_EXTERN GstState g4_gst_player_get_state (G4GstPlayer* self);
VALA_EXTERN gboolean g4_play_panel_get_show_peak (G4PlayPanel* self);
VALA_EXTERN void g4_play_panel_set_show_peak (G4PlayPanel* self,
                                  gboolean value);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
VALA_EXTERN void g4_size_watcher_first_allocated (G4SizeWatcher* self);
VALA_EXTERN void g4_size_watcher_size_to_change (G4SizeWatcher* self,
                                     gint width,
                                     gint height);
static void g4_play_panel_finalize (GObject * obj);
static GType g4_play_panel_get_type_once (void);
static void _vala_g4_play_panel_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec);
static void _vala_g4_play_panel_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 inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
g4_play_panel_get_instance_private (G4PlayPanel* self)
{
	return G_STRUCT_MEMBER_P (self, G4PlayPanel_private_offset);
}

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

static Block31Data*
block31_data_ref (Block31Data* _data31_)
{
	g_atomic_int_inc (&_data31_->_ref_count_);
	return _data31_;
}

static void
block31_data_unref (void * _userdata_)
{
	Block31Data* _data31_;
	_data31_ = (Block31Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data31_->_ref_count_)) {
		G4PlayPanel* self;
		self = _data31_->self;
		_g_object_unref0 (_data31_->win);
		_g_object_unref0 (self);
		g_slice_free (Block31Data, _data31_);
	}
}

static void
_g4_play_panel_on_position_seeked_g4_play_bar_position_seeked (G4PlayBar* _sender,
                                                               gdouble position,
                                                               gpointer self)
{
	g4_play_panel_on_position_seeked ((G4PlayPanel*) self, position);
}

static void
__lambda60_ (G4PlayPanel* self)
{
	GtkMenuButton* _tmp0_;
	GMenu* _tmp1_;
	GMenu* _tmp2_;
	_tmp0_ = self->priv->action_btn;
	_tmp1_ = g4_play_panel_create_music_action_menu (self);
	_tmp2_ = _tmp1_;
	gtk_menu_button_set_menu_model (_tmp0_, (GMenuModel*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
___lambda60__gtk_menu_button_create_popup_func (GtkMenuButton* menu_button,
                                                gpointer self)
{
	__lambda60_ ((G4PlayPanel*) self);
}

static void
_g4_leaflet_pop_gtk_button_clicked (GtkButton* _sender,
                                    gpointer self)
{
	g4_leaflet_pop ((G4Leaflet*) self);
}

static void
_gtk_widget_queue_draw_g4_base_paintable_queue_draw (G4BasePaintable* _sender,
                                                     gpointer self)
{
	gtk_widget_queue_draw ((GtkWidget*) self);
}

static void
__lambda65_ (Block31Data* _data31_)
{
	G4PlayPanel* self;
	self = _data31_->self;
	g4_window_open_playing_page (_data31_->win);
}

static void
___lambda65__gtk_gesture_click_released (GtkGestureClick* _sender,
                                         gint n_press,
                                         gdouble x,
                                         gdouble y,
                                         gpointer self)
{
	__lambda65_ (self);
}

static gboolean
_g4_play_panel_on_music_folder_clicked_gtk_label_activate_link (GtkLabel* _sender,
                                                                const gchar* uri,
                                                                gpointer self)
{
	gboolean result;
	result = g4_play_panel_on_music_folder_clicked ((G4PlayPanel*) self, uri);
	return result;
}

static void
__lambda125_ (Block31Data* _data31_)
{
	G4PlayPanel* self;
	G4StableLabel* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	self = _data31_->self;
	_tmp0_ = self->priv->music_album;
	_tmp1_ = g4_stable_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	g4_window_start_search (_data31_->win, _tmp2_, G4_SEARCH_MODE_ALBUM);
}

static void
___lambda125__gtk_gesture_click_released (GtkGestureClick* _sender,
                                          gint n_press,
                                          gdouble x,
                                          gdouble y,
                                          gpointer self)
{
	__lambda125_ (self);
}

static void
__lambda126_ (Block31Data* _data31_)
{
	G4PlayPanel* self;
	G4StableLabel* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	self = _data31_->self;
	_tmp0_ = self->priv->music_artist;
	_tmp1_ = g4_stable_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	g4_window_start_search (_data31_->win, _tmp2_, G4_SEARCH_MODE_ARTIST);
}

static void
___lambda126__gtk_gesture_click_released (GtkGestureClick* _sender,
                                          gint n_press,
                                          gdouble x,
                                          gdouble y,
                                          gpointer self)
{
	__lambda126_ (self);
}

static void
__lambda127_ (Block31Data* _data31_)
{
	G4PlayPanel* self;
	G4StableLabel* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	self = _data31_->self;
	_tmp0_ = self->priv->music_title;
	_tmp1_ = g4_stable_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	g4_window_start_search (_data31_->win, _tmp2_, G4_SEARCH_MODE_TITLE);
}

static void
___lambda127__gtk_gesture_click_released (GtkGestureClick* _sender,
                                          gint n_press,
                                          gdouble x,
                                          gdouble y,
                                          gpointer self)
{
	__lambda127_ (self);
}

static void
_g4_play_panel_show_popover_menu_g4_pressed (GtkWidget* widget,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self)
{
	g4_play_panel_show_popover_menu ((G4PlayPanel*) self, widget, x, y);
}

static void
_g4_play_panel_on_index_changed_g4_application_index_changed (G4Application* _sender,
                                                              gint index,
                                                              guint size,
                                                              gpointer self)
{
	g4_play_panel_on_index_changed ((G4PlayPanel*) self, index, size);
}

static void
_g4_play_panel_on_music_changed_g4_application_music_changed (G4Application* _sender,
                                                              G4Music* music,
                                                              gpointer self)
{
	g4_play_panel_on_music_changed ((G4PlayPanel*) self, music);
}

static void
_g4_play_panel_on_music_cover_parsed_g4_application_music_cover_parsed (G4Application* _sender,
                                                                        G4Music* music,
                                                                        GdkPixbuf* cover,
                                                                        const gchar* cover_uri,
                                                                        gpointer self)
{
	g4_play_panel_on_music_cover_parsed ((G4PlayPanel*) self, music, cover, cover_uri, NULL, NULL);
}

static void
_g4_play_panel_on_player_state_changed_g4_gst_player_state_changed (G4GstPlayer* _sender,
                                                                    GstState state,
                                                                    gpointer self)
{
	g4_play_panel_on_player_state_changed ((G4PlayPanel*) self, state);
}

G4PlayPanel*
g4_play_panel_construct (GType object_type,
                         G4Application* app,
                         G4Window* win,
                         G4Leaflet* leaflet)
{
	G4PlayPanel * self = NULL;
	Block31Data* _data31_;
	G4Window* _tmp0_;
	G4Application* _tmp1_;
	G4PlayBar* _tmp2_;
	G4PlayBar* _tmp3_;
	GtkBox* _tmp4_;
	G4PlayBar* _tmp5_;
	GtkButton* _tmp6_;
	GtkMenuButton* _tmp7_;
	GtkButton* _tmp8_;
	G4MatrixPaintable* _tmp9_;
	G4RoundPaintable* _tmp10_;
	G4CrossFadePaintable* _tmp11_;
	G4MatrixPaintable* _tmp12_;
	G4CrossFadePaintable* _tmp13_;
	GtkImage* _tmp14_;
	GtkImage* _tmp15_;
	G4CrossFadePaintable* _tmp16_;
	GtkLabel* _tmp17_;
	GtkLabel* _tmp18_;
	GtkGestureClick* _tmp19_;
	GtkGestureClick* _tmp20_;
	GtkLabel* _tmp21_;
	G4StableLabel* _tmp22_;
	G4StableLabel* _tmp23_;
	G4StableLabel* _tmp24_;
	G4StableLabel* _tmp25_;
	GtkGestureClick* _tmp26_;
	GtkGestureClick* _tmp27_;
	G4StableLabel* _tmp28_;
	GtkGestureClick* _tmp29_;
	GtkGestureClick* _tmp30_;
	G4StableLabel* _tmp31_;
	GtkGestureClick* _tmp32_;
	GtkGestureClick* _tmp33_;
	GtkBox* _tmp34_;
	GtkGestureClick* _tmp35_;
	GtkGestureClick* _tmp36_;
	G4GstPlayer* _tmp37_;
	G4GstPlayer* _tmp38_;
	GSettings* settings = NULL;
	GSettings* _tmp39_;
	GSettings* _tmp40_;
	GSettings* _tmp41_;
	g_return_val_if_fail (app != NULL, NULL);
	g_return_val_if_fail (win != NULL, NULL);
	g_return_val_if_fail (leaflet != NULL, NULL);
	_data31_ = g_slice_new0 (Block31Data);
	_data31_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (win);
	_g_object_unref0 (_data31_->win);
	_data31_->win = _tmp0_;
	self = (G4PlayPanel*) g_object_new (object_type, NULL);
	_data31_->self = g_object_ref (self);
	_tmp1_ = _g_object_ref0 (app);
	_g_object_unref0 (self->priv->_app);
	self->priv->_app = _tmp1_;
	_tmp2_ = self->priv->_play_bar;
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_FILL);
	_tmp3_ = self->priv->_play_bar;
	g_signal_connect_object (_tmp3_, "position-seeked", (GCallback) _g4_play_panel_on_position_seeked_g4_play_bar_position_seeked, self, 0);
	_tmp4_ = self->priv->music_box;
	_tmp5_ = self->priv->_play_bar;
	gtk_box_append (_tmp4_, (GtkWidget*) _tmp5_);
	_tmp6_ = self->priv->back_btn;
	g_object_bind_property_with_closures ((GObject*) leaflet, "folded", (GObject*) _tmp6_, "visible", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp7_ = self->priv->action_btn;
	gtk_menu_button_set_create_popup_func (_tmp7_, ___lambda60__gtk_menu_button_create_popup_func, g_object_ref (self), g_object_unref);
	_tmp8_ = self->priv->back_btn;
	g_signal_connect_object (_tmp8_, "clicked", (GCallback) _g4_leaflet_pop_gtk_button_clicked, leaflet, 0);
	_tmp9_ = self->priv->_matrix_paintable;
	_tmp10_ = self->priv->_round_paintable;
	g4_base_paintable_set_paintable ((G4BasePaintable*) _tmp9_, (GdkPaintable*) _tmp10_);
	_tmp11_ = self->priv->_crossfade_paintable;
	_tmp12_ = self->priv->_matrix_paintable;
	g4_base_paintable_set_paintable ((G4BasePaintable*) _tmp11_, (GdkPaintable*) _tmp12_);
	_tmp13_ = self->priv->_crossfade_paintable;
	_tmp14_ = self->priv->music_cover;
	g_signal_connect_object ((G4BasePaintable*) _tmp13_, "queue-draw", (GCallback) _gtk_widget_queue_draw_g4_base_paintable_queue_draw, (GtkWidget*) _tmp14_, 0);
	_tmp15_ = self->priv->music_cover;
	_tmp16_ = self->priv->_crossfade_paintable;
	g_object_set (_tmp15_, "paintable", (GdkPaintable*) _tmp16_, NULL);
	g4_play_panel_create_drag_source (self);
	_tmp17_ = self->priv->index_label;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp17_, _ ("Playing"));
	_tmp18_ = self->priv->index_label;
	_tmp19_ = g4_make_widget_clickable ((GtkWidget*) _tmp18_);
	_tmp20_ = _tmp19_;
	g_signal_connect_data (_tmp20_, "released", (GCallback) ___lambda65__gtk_gesture_click_released, block31_data_ref (_data31_), (GClosureNotify) block31_data_unref, 0);
	_g_object_unref0 (_tmp20_);
	_tmp21_ = self->priv->initial_label;
	g_signal_connect_object (_tmp21_, "activate-link", (GCallback) _g4_play_panel_on_music_folder_clicked_gtk_label_activate_link, self, 0);
	_tmp22_ = self->priv->music_album;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp22_, _ ("Search Album"));
	_tmp23_ = self->priv->music_artist;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp23_, _ ("Search Artist"));
	_tmp24_ = self->priv->music_title;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp24_, _ ("Search Title"));
	_tmp25_ = self->priv->music_album;
	_tmp26_ = g4_make_widget_clickable ((GtkWidget*) _tmp25_);
	_tmp27_ = _tmp26_;
	g_signal_connect_data (_tmp27_, "released", (GCallback) ___lambda125__gtk_gesture_click_released, block31_data_ref (_data31_), (GClosureNotify) block31_data_unref, 0);
	_g_object_unref0 (_tmp27_);
	_tmp28_ = self->priv->music_artist;
	_tmp29_ = g4_make_widget_clickable ((GtkWidget*) _tmp28_);
	_tmp30_ = _tmp29_;
	g_signal_connect_data (_tmp30_, "released", (GCallback) ___lambda126__gtk_gesture_click_released, block31_data_ref (_data31_), (GClosureNotify) block31_data_unref, 0);
	_g_object_unref0 (_tmp30_);
	_tmp31_ = self->priv->music_title;
	_tmp32_ = g4_make_widget_clickable ((GtkWidget*) _tmp31_);
	_tmp33_ = _tmp32_;
	g_signal_connect_data (_tmp33_, "released", (GCallback) ___lambda127__gtk_gesture_click_released, block31_data_ref (_data31_), (GClosureNotify) block31_data_unref, 0);
	_g_object_unref0 (_tmp33_);
	_tmp34_ = self->priv->music_box;
	_tmp35_ = g4_make_right_clickable ((GtkWidget*) _tmp34_, _g4_play_panel_show_popover_menu_g4_pressed, self);
	_tmp36_ = _tmp35_;
	_g_object_unref0 (_tmp36_);
	g_signal_connect_object (app, "index-changed", (GCallback) _g4_play_panel_on_index_changed_g4_application_index_changed, self, 0);
	g_signal_connect_object (app, "music-changed", (GCallback) _g4_play_panel_on_music_changed_g4_application_music_changed, self, 0);
	g_signal_connect_object (app, "music-cover-parsed", (GCallback) _g4_play_panel_on_music_cover_parsed_g4_application_music_cover_parsed, self, 0);
	_tmp37_ = g4_application_get_player (app);
	_tmp38_ = _tmp37_;
	g_signal_connect_object (_tmp38_, "state-changed", (GCallback) _g4_play_panel_on_player_state_changed_g4_gst_player_state_changed, self, 0);
	_tmp39_ = g4_application_get_settings (app);
	_tmp40_ = _tmp39_;
	_tmp41_ = _g_object_ref0 (_tmp40_);
	settings = _tmp41_;
	g_settings_bind (settings, "rotate-cover", (GObject*) self, "rotate-cover", G_SETTINGS_BIND_DEFAULT);
	g_settings_bind (settings, "show-peak", (GObject*) self, "show-peak", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (settings);
	block31_data_unref (_data31_);
	_data31_ = NULL;
	return self;
}

G4PlayPanel*
g4_play_panel_new (G4Application* app,
                   G4Window* win,
                   G4Leaflet* leaflet)
{
	return g4_play_panel_construct (G4_TYPE_PLAY_PANEL, app, win, leaflet);
}

static void
g4_play_panel_real_first_allocated (G4SizeWatcher* base)
{
	G4PlayPanel * self;
	G4Application* _tmp0_;
	G4Music* _tmp1_;
	G4Music* _tmp2_;
	self = (G4PlayPanel*) base;
	self->priv->_size_allocated = TRUE;
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_application_get_current_music (_tmp0_);
	_tmp2_ = _tmp1_;
	g4_play_panel_on_music_changed (self, _tmp2_);
}

static void
g4_play_panel_real_size_to_change (G4SizeWatcher* base,
                                   gint width,
                                   gint height)
{
	G4PlayPanel * self;
	gint max_size = 0;
	GtkImage* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint margin_horz = 0;
	gint margin_cover = 0;
	GtkImage* _tmp3_;
	GtkImage* _tmp4_;
	gint margin_bar = 0;
	gint spacing = 0;
	G4PlayBar* _tmp5_;
	G4PlayBar* _tmp6_;
	G4PlayBar* _tmp7_;
	G4PlayBar* _tmp8_;
	G4PlayBar* _tmp9_;
	self = (G4PlayPanel*) base;
	_tmp0_ = self->priv->music_cover;
	_tmp1_ = gtk_image_get_pixel_size (_tmp0_);
	_tmp2_ = _tmp1_;
	max_size = MAX ((width * 3) / 4, _tmp2_);
	margin_horz = (width - max_size) / 2;
	margin_cover = MAX (margin_horz, 32);
	_tmp3_ = self->priv->music_cover;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp3_, margin_cover);
	_tmp4_ = self->priv->music_cover;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp4_, margin_cover);
	margin_bar = MAX (margin_horz / 2, 16);
	spacing = CLAMP (height - 540, 8, 16);
	_tmp5_ = self->priv->_play_bar;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp5_, margin_bar);
	_tmp6_ = self->priv->_play_bar;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp6_, margin_bar);
	_tmp7_ = self->priv->_play_bar;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp7_, spacing);
	_tmp8_ = self->priv->_play_bar;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp8_, spacing * 2);
	_tmp9_ = self->priv->_play_bar;
	g4_play_bar_on_size_changed (_tmp9_, width - (margin_bar * 2), spacing);
}

static Block32Data*
block32_data_ref (Block32Data* _data32_)
{
	g_atomic_int_inc (&_data32_->_ref_count_);
	return _data32_;
}

static void
block32_data_unref (void * _userdata_)
{
	Block32Data* _data32_;
	_data32_ = (Block32Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data32_->_ref_count_)) {
		G4PlayPanel* self;
		self = _data32_->self;
		_g_object_unref0 (_data32_->source);
		_g_object_unref0 (self);
		g_slice_free (Block32Data, _data32_);
	}
}

static void
__lambda61_ (Block32Data* _data32_,
             GdkDrag* drag)
{
	G4PlayPanel* self;
	GtkImage* _tmp0_;
	GdkPaintable* _tmp1_;
	GdkPaintable* _tmp2_;
	graphene_point_t _tmp3_;
	graphene_point_t _tmp4_;
	self = _data32_->self;
	g_return_if_fail (drag != NULL);
	_tmp0_ = self->priv->music_cover;
	_tmp1_ = g4_create_widget_paintable ((GtkWidget*) _tmp0_, &_data32_->point, NULL, 64);
	_tmp2_ = _tmp1_;
	_tmp3_ = _data32_->point;
	_tmp4_ = _data32_->point;
	gtk_drag_source_set_icon (_data32_->source, _tmp2_, (gint) _tmp3_.x, (gint) _tmp4_.y);
	_g_object_unref0 (_tmp2_);
}

static void
___lambda61__gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                         GdkDrag* drag,
                                         gpointer self)
{
	__lambda61_ (self, drag);
}

static GdkContentProvider*
__lambda62_ (Block32Data* _data32_,
             gdouble x,
             gdouble y)
{
	G4PlayPanel* self;
	graphene_point_t pt = {0};
	gint width = 0;
	GtkImage* _tmp0_;
	gint height = 0;
	GtkImage* _tmp1_;
	G4Music* music = NULL;
	G4Application* _tmp2_;
	G4Music* _tmp3_;
	G4Music* _tmp4_;
	G4Music* _tmp5_;
	gboolean _tmp6_ = FALSE;
	G4Music* _tmp7_;
	GdkContentProvider* result;
	self = _data32_->self;
	memset (&pt, 0, sizeof (graphene_point_t));
	graphene_point_init (&pt, (gfloat) x, (gfloat) y);
	_tmp0_ = self->priv->music_cover;
	width = gtk_widget_get_width ((GtkWidget*) _tmp0_);
	_tmp1_ = self->priv->music_cover;
	height = gtk_widget_get_height ((GtkWidget*) _tmp1_);
	if (width > height) {
		pt.x = pt.x - ((width - height) * 0.5f);
	} else {
		if (height > width) {
			pt.y = pt.y - ((height - width) * 0.5f);
		}
	}
	_tmp2_ = self->priv->_app;
	_tmp3_ = g4_application_get_current_music (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	music = _tmp5_;
	_tmp7_ = music;
	if (_tmp7_ != NULL) {
		G4RoundPaintable* _tmp8_;
		graphene_point_t _tmp9_;
		_tmp8_ = self->priv->_round_paintable;
		_tmp9_ = pt;
		_tmp6_ = g4_round_paintable_contains (_tmp8_, &_tmp9_);
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		G4Playlist* playlist = NULL;
		G4Music* _tmp10_;
		G4Music* _tmp11_;
		G4Music** _tmp12_;
		G4Music** _tmp13_;
		gint _tmp13__length1;
		G4Playlist* _tmp14_;
		G4Playlist* _tmp15_;
		G4Playlist* _tmp16_;
		GdkContentProvider* _tmp17_;
		graphene_point_init (&_data32_->point, (gfloat) x, (gfloat) y);
		_tmp10_ = music;
		_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, G4_TYPE_MUSIC, G4Music));
		_tmp12_ = g_new0 (G4Music*, 1 + 1);
		_tmp12_[0] = _tmp11_;
		_tmp13_ = _tmp12_;
		_tmp13__length1 = 1;
		_tmp14_ = g4_to_playlist (_tmp13_, (gint) 1, NULL);
		_tmp15_ = _tmp14_;
		_tmp13_ = (_vala_array_free (_tmp13_, _tmp13__length1, (GDestroyNotify) g_object_unref), NULL);
		playlist = _tmp15_;
		_tmp16_ = playlist;
		_tmp17_ = g4_create_content_provider (_tmp16_);
		result = _tmp17_;
		_g_object_unref0 (playlist);
		_g_object_unref0 (music);
		return result;
	}
	result = NULL;
	_g_object_unref0 (music);
	return result;
}

static GdkContentProvider*
___lambda62__gtk_drag_source_prepare (GtkDragSource* _sender,
                                      gdouble x,
                                      gdouble y,
                                      gpointer self)
{
	GdkContentProvider* result;
	result = __lambda62_ (self, x, y);
	return result;
}

static void
g4_play_panel_create_drag_source (G4PlayPanel* self)
{
	Block32Data* _data32_;
	GtkDragSource* _tmp0_;
	GtkImage* _tmp1_;
	GtkEventController* _tmp2_;
	g_return_if_fail (self != NULL);
	_data32_ = g_slice_new0 (Block32Data);
	_data32_->_ref_count_ = 1;
	_data32_->self = g_object_ref (self);
	memset (&_data32_->point, 0, sizeof (graphene_point_t));
	_tmp0_ = gtk_drag_source_new ();
	_data32_->source = _tmp0_;
	gtk_drag_source_set_actions (_data32_->source, GDK_ACTION_LINK);
	g_signal_connect_data (_data32_->source, "drag-begin", (GCallback) ___lambda61__gtk_drag_source_drag_begin, block32_data_ref (_data32_), (GClosureNotify) block32_data_unref, 0);
	g_signal_connect_data (_data32_->source, "prepare", (GCallback) ___lambda62__gtk_drag_source_prepare, block32_data_ref (_data32_), (GClosureNotify) block32_data_unref, 0);
	_tmp1_ = self->priv->music_cover;
	_tmp2_ = _g_object_ref0 ((GtkEventController*) _data32_->source);
	gtk_widget_add_controller ((GtkWidget*) _tmp1_, _tmp2_);
	block32_data_unref (_data32_);
	_data32_ = NULL;
}

static GMenu*
g4_play_panel_create_music_action_menu (G4PlayPanel* self)
{
	G4Music* _tmp0_ = NULL;
	G4Application* _tmp1_;
	G4Music* _tmp2_;
	G4Music* _tmp3_;
	G4Music* _tmp4_;
	G4Music* music = NULL;
	G4Music* _tmp6_;
	G4Application* _tmp7_;
	GstSample* _tmp8_;
	GstSample* _tmp9_;
	GMenu* _tmp10_;
	GMenu* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_app;
	_tmp2_ = g4_application_get_current_music (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_tmp0_ = _tmp4_;
	if (_tmp0_ == NULL) {
		G4Music* _tmp5_;
		_tmp5_ = g4_music_new_empty ();
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp5_;
	}
	_tmp6_ = _tmp0_;
	_tmp0_ = NULL;
	music = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, G4_TYPE_MUSIC, G4Music);
	_tmp7_ = self->priv->_app;
	_tmp8_ = g4_application_get_current_cover (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = g4_create_menu_for_music (music, _tmp9_ != NULL);
	result = _tmp10_;
	_g_object_unref0 (music);
	_g_object_unref0 (_tmp0_);
	return result;
}

static void
g4_play_panel_on_index_changed (G4PlayPanel* self,
                                gint index,
                                guint size)
{
	GtkRoot* _tmp0_;
	GtkRoot* _tmp1_;
	GtkRoot* _tmp2_;
	GtkRoot* _tmp3_;
	gchar* _tmp4_ = NULL;
	GtkLabel* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp1_ = _tmp0_;
	gtk_widget_action_set_enabled ((GtkWidget*) _tmp1_, G4_ACTION_APP G4_ACTION_PREV, index > 0);
	_tmp2_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp3_ = _tmp2_;
	gtk_widget_action_set_enabled ((GtkWidget*) _tmp3_, G4_ACTION_APP G4_ACTION_NEXT, index < (((gint) size) - 1));
	if (size > ((guint) 0)) {
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp5_ = g_strdup_printf ("%i", index + 1);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strdup_printf ("%u", size);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strconcat (_tmp6_, "/", _tmp8_, NULL);
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp9_;
		_g_free0 (_tmp8_);
		_g_free0 (_tmp6_);
	} else {
		gchar* _tmp10_;
		_tmp10_ = g_strdup ("");
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp10_;
	}
	_tmp11_ = self->priv->index_label;
	gtk_label_set_label (_tmp11_, _tmp4_);
	_g_free0 (_tmp4_);
}

static void
g4_play_panel_on_music_changed (G4PlayPanel* self,
                                G4Music* music)
{
	G4Music* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp3_ = NULL;
	G4StableLabel* _tmp4_;
	G4Music* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	const gchar* _tmp8_ = NULL;
	G4StableLabel* _tmp9_;
	G4Music* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	const gchar* _tmp13_ = NULL;
	G4StableLabel* _tmp14_;
	gboolean _tmp15_ = FALSE;
	G4Application* _tmp16_;
	G4Music* _tmp17_;
	G4Music* _tmp18_;
	gboolean empty = FALSE;
	GtkLabel* _tmp22_;
	gboolean enabled = FALSE;
	GtkMenuButton* _tmp41_;
	GtkRoot* _tmp42_;
	GtkRoot* _tmp43_;
	G4Window* _tmp44_ = NULL;
	G4Window* _tmp45_;
	g_return_if_fail (self != NULL);
	if (!self->priv->_size_allocated) {
		return;
	}
	_tmp0_ = music;
	_tmp1_ = NULL;
	if (_tmp0_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G4_TYPE_MUSIC, G4Music)->album;
		_tmp1_ = _tmp2_;
	}
	_tmp3_ = _tmp1_;
	if (_tmp3_ == NULL) {
		_tmp3_ = "";
	}
	_tmp4_ = self->priv->music_album;
	g4_stable_label_set_label (_tmp4_, (const gchar*) _tmp3_);
	_tmp5_ = music;
	_tmp6_ = NULL;
	if (_tmp5_ != NULL) {
		const gchar* _tmp7_;
		_tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, G4_TYPE_MUSIC, G4Music)->artist;
		_tmp6_ = _tmp7_;
	}
	_tmp8_ = _tmp6_;
	if (_tmp8_ == NULL) {
		_tmp8_ = "";
	}
	_tmp9_ = self->priv->music_artist;
	g4_stable_label_set_label (_tmp9_, (const gchar*) _tmp8_);
	_tmp10_ = music;
	_tmp11_ = NULL;
	if (_tmp10_ != NULL) {
		const gchar* _tmp12_;
		_tmp12_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, G4_TYPE_MUSIC, G4Music)->title;
		_tmp11_ = _tmp12_;
	}
	_tmp13_ = _tmp11_;
	if (_tmp13_ == NULL) {
		_tmp13_ = "";
	}
	_tmp14_ = self->priv->music_title;
	g4_stable_label_set_label (_tmp14_, (const gchar*) _tmp13_);
	_tmp16_ = self->priv->_app;
	_tmp17_ = g4_application_get_current_music (_tmp16_);
	_tmp18_ = _tmp17_;
	if (_tmp18_ == NULL) {
		G4Application* _tmp19_;
		GtkFilterListModel* _tmp20_;
		GtkFilterListModel* _tmp21_;
		_tmp19_ = self->priv->_app;
		_tmp20_ = g4_application_get_current_list (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp15_ = g_list_model_get_n_items ((GListModel*) _tmp21_) == ((guint) 0);
	} else {
		_tmp15_ = FALSE;
	}
	empty = _tmp15_;
	_tmp22_ = self->priv->initial_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp22_, empty);
	if (empty) {
		gboolean _tmp23_ = FALSE;
		G4Application* _tmp24_;
		gboolean _tmp25_;
		gboolean _tmp26_;
		_tmp24_ = self->priv->_app;
		_tmp25_ = g4_application_get_loading (_tmp24_);
		_tmp26_ = _tmp25_;
		if (_tmp26_) {
			_tmp23_ = TRUE;
		} else {
			G4Application* _tmp27_;
			G4MusicLoader* _tmp28_;
			G4MusicLoader* _tmp29_;
			G4MusicLibrary* _tmp30_;
			G4MusicLibrary* _tmp31_;
			gboolean _tmp32_;
			gboolean _tmp33_;
			_tmp27_ = self->priv->_app;
			_tmp28_ = g4_application_get_loader (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = g4_music_loader_get_library (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = g4_music_library_get_empty (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp23_ = !_tmp33_;
		}
		if (_tmp23_) {
			GtkLabel* _tmp34_;
			_tmp34_ = self->priv->initial_label;
			gtk_label_set_label (_tmp34_, "");
		} else {
			G4Application* _tmp35_;
			const gchar* _tmp36_;
			const gchar* _tmp37_;
			_tmp35_ = self->priv->_app;
			_tmp36_ = g4_application_get_music_folder (_tmp35_);
			_tmp37_ = _tmp36_;
			g4_play_panel_update_initial_label (self, _tmp37_);
		}
	}
	enabled = music != NULL;
	if (!enabled) {
		G4Application* _tmp38_;
		GtkIconPaintable* _tmp39_;
		GtkIconPaintable* _tmp40_;
		_tmp38_ = self->priv->_app;
		_tmp39_ = g4_application_get_icon (_tmp38_);
		_tmp40_ = _tmp39_;
		g4_play_panel_update_cover_paintables (self, music, (GdkPaintable*) _tmp40_);
	}
	_tmp41_ = self->priv->action_btn;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp41_, enabled);
	_tmp42_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp43_ = _tmp42_;
	gtk_widget_action_set_enabled ((GtkWidget*) _tmp43_, G4_ACTION_APP G4_ACTION_PLAY_PAUSE, enabled);
	_tmp45_ = g4_window_get_default ();
	_tmp44_ = _tmp45_;
	if (_tmp44_ != NULL) {
		G4Music* _tmp46_ = NULL;
		gchar* _tmp47_ = NULL;
		const gchar* _tmp49_ = NULL;
		_tmp46_ = music;
		_tmp47_ = NULL;
		if (_tmp46_ != NULL) {
			gchar* _tmp48_;
			_tmp48_ = g4_music_get_artist_and_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, G4_TYPE_MUSIC, G4Music));
			_g_free0 (_tmp47_);
			_tmp47_ = _tmp48_;
		}
		_tmp49_ = _tmp47_;
		if (_tmp49_ == NULL) {
			G4Application* _tmp50_;
			const gchar* _tmp51_;
			const gchar* _tmp52_;
			_tmp50_ = self->priv->_app;
			_tmp51_ = g4_application_get_name (_tmp50_);
			_tmp52_ = _tmp51_;
			_tmp49_ = _tmp52_;
		}
		gtk_window_set_title ((GtkWindow*) G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, G4_TYPE_WINDOW, G4Window), (const gchar*) _tmp49_);
		_g_free0 (_tmp47_);
	}
	_g_object_unref0 (_tmp44_);
}

static void
__lambda124_ (G4PlayPanel* self,
              GFile* dir)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (dir != NULL);
	_tmp0_ = g_file_get_uri (dir);
	_tmp1_ = _tmp0_;
	g4_play_panel_update_initial_label (self, _tmp1_);
	_g_free0 (_tmp1_);
}

static void
___lambda124__g4_folder_picked (GFile* dir,
                                gpointer self)
{
	__lambda124_ ((G4PlayPanel*) self, dir);
}

static gboolean
g4_play_panel_on_music_folder_clicked (G4PlayPanel* self,
                                       const gchar* uri)
{
	G4Application* _tmp0_;
	GtkRoot* _tmp1_;
	GtkRoot* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (uri != NULL, FALSE);
	_tmp0_ = self->priv->_app;
	_tmp1_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp2_ = _tmp1_;
	g4_pick_music_folder (_tmp0_, (GtkWindow*) (G4_IS_WINDOW (_tmp2_) ? ((G4Window*) _tmp2_) : NULL), ___lambda124__g4_folder_picked, self);
	result = TRUE;
	return result;
}

static void
g4_play_panel_on_music_cover_parsed_data_free (gpointer _data)
{
	G4PlayPanelOnMusicCoverParsedData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->music);
	_g_object_unref0 (_data_->pixbuf);
	_g_free0 (_data_->uri);
	_g_object_unref0 (_data_->self);
	g_slice_free (G4PlayPanelOnMusicCoverParsedData, _data_);
}

static void
g4_play_panel_on_music_cover_parsed (G4PlayPanel* self,
                                     G4Music* music,
                                     GdkPixbuf* pixbuf,
                                     const gchar* uri,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	G4PlayPanelOnMusicCoverParsedData* _data_;
	G4PlayPanel* _tmp0_;
	G4Music* _tmp1_;
	GdkPixbuf* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (music != NULL);
	_data_ = g_slice_new0 (G4PlayPanelOnMusicCoverParsedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, g4_play_panel_on_music_cover_parsed_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (music);
	_g_object_unref0 (_data_->music);
	_data_->music = _tmp1_;
	_tmp2_ = _g_object_ref0 (pixbuf);
	_g_object_unref0 (_data_->pixbuf);
	_data_->pixbuf = _tmp2_;
	_tmp3_ = g_strdup (uri);
	_g_free0 (_data_->uri);
	_data_->uri = _tmp3_;
	g4_play_panel_on_music_cover_parsed_co (_data_);
}

static void
g4_play_panel_on_music_cover_parsed_finish (G4PlayPanel* self,
                                            GAsyncResult* _res_)
{
	G4PlayPanelOnMusicCoverParsedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
g4_play_panel_on_music_cover_parsed_co (G4PlayPanelOnMusicCoverParsedData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->pixbuf != NULL) {
		_data_->_tmp1_ = gdk_texture_new_for_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (_data_->pixbuf, gdk_pixbuf_get_type (), GdkPixbuf));
		_g_object_unref0 (_data_->_tmp0_);
		_data_->_tmp0_ = (GdkPaintable*) _data_->_tmp1_;
	} else {
		_data_->_tmp2_ = _data_->self->priv->_app;
		_data_->_tmp3_ = g4_application_get_thumbnailer (_data_->_tmp2_);
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_tmp5_ = g4_thumbnailer_create_music_text_paintable (_data_->_tmp4_, _data_->music);
		_g_object_unref0 (_data_->_tmp0_);
		_data_->_tmp0_ = _data_->_tmp5_;
	}
	_data_->_tmp6_ = _data_->_tmp0_;
	_data_->_tmp0_ = NULL;
	_data_->paintable = _data_->_tmp6_;
	g4_play_panel_update_cover_paintables (_data_->self, _data_->music, _data_->paintable);
	_g_object_unref0 (_data_->paintable);
	_g_object_unref0 (_data_->_tmp0_);
	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
___lambda128_ (G4PlayPanel* self,
               gdouble value)
{
	G4MatrixPaintable* _tmp0_;
	_tmp0_ = self->priv->_matrix_paintable;
	g4_matrix_paintable_set_scale (_tmp0_, value);
}

static void
____lambda128__adw_animation_target_func (gdouble value,
                                          gpointer self)
{
	___lambda128_ ((G4PlayPanel*) self, value);
}

static gboolean
_g4_play_panel_on_tick_callback_gtk_tick_callback (GtkWidget* widget,
                                                   GdkFrameClock* frame_clock,
                                                   gpointer self)
{
	gboolean result;
	result = g4_play_panel_on_tick_callback ((G4PlayPanel*) self, widget, frame_clock);
	return result;
}

static void
g4_play_panel_on_player_state_changed (G4PlayPanel* self,
                                       GstState state)
{
	gboolean playing = FALSE;
	gboolean _tmp14_ = FALSE;
	gboolean need_tick = FALSE;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	g_return_if_fail (self != NULL);
	playing = state == GST_STATE_PLAYING;
	if (state >= GST_STATE_PAUSED) {
		AdwCallbackAnimationTarget* target = NULL;
		AdwCallbackAnimationTarget* _tmp0_;
		AdwAnimation* _tmp1_ = NULL;
		AdwAnimation* _tmp2_;
		gdouble _tmp3_ = 0.0;
		gboolean _tmp4_ = FALSE;
		GtkImage* _tmp5_;
		G4MatrixPaintable* _tmp6_;
		gdouble _tmp7_;
		gdouble _tmp8_;
		AdwCallbackAnimationTarget* _tmp9_;
		AdwAnimationTarget* _tmp10_;
		AdwTimedAnimation* _tmp11_;
		AdwAnimation* _tmp12_ = NULL;
		AdwAnimation* _tmp13_;
		_tmp0_ = (AdwCallbackAnimationTarget*) adw_callback_animation_target_new (____lambda128__adw_animation_target_func, g_object_ref (self), g_object_unref);
		target = _tmp0_;
		_tmp2_ = self->priv->_scale_animation;
		_tmp1_ = _tmp2_;
		if (_tmp1_ != NULL) {
			adw_animation_pause (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, adw_animation_get_type (), AdwAnimation));
		}
		if (self->priv->_rotate_cover) {
			_tmp4_ = TRUE;
		} else {
			_tmp4_ = playing;
		}
		if (_tmp4_) {
			_tmp3_ = (gdouble) 1;
		} else {
			_tmp3_ = 0.85;
		}
		_tmp5_ = self->priv->music_cover;
		_tmp6_ = self->priv->_matrix_paintable;
		_tmp7_ = g4_matrix_paintable_get_scale (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = target;
		_tmp10_ = _g_object_ref0 ((AdwAnimationTarget*) _tmp9_);
		_tmp11_ = (AdwTimedAnimation*) adw_timed_animation_new ((GtkWidget*) _tmp5_, _tmp8_, _tmp3_, (guint) 500, _tmp10_);
		_g_object_unref0 (self->priv->_scale_animation);
		self->priv->_scale_animation = (AdwAnimation*) _tmp11_;
		_tmp13_ = self->priv->_scale_animation;
		_tmp12_ = _tmp13_;
		if (_tmp12_ != NULL) {
			adw_animation_play (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, adw_animation_get_type (), AdwAnimation));
		}
		_g_object_unref0 (target);
	}
	if (self->priv->_rotate_cover) {
		_tmp14_ = TRUE;
	} else {
		_tmp14_ = self->priv->_show_peak;
	}
	need_tick = _tmp14_;
	if (need_tick) {
		_tmp16_ = playing;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		_tmp15_ = self->priv->_tick_handler == ((guint) 0);
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		self->priv->_tick_last_time = g_get_monotonic_time ();
		self->priv->_tick_handler = gtk_widget_add_tick_callback ((GtkWidget*) self, _g4_play_panel_on_tick_callback_gtk_tick_callback, g_object_ref (self), g_object_unref);
	} else {
		gboolean _tmp17_ = FALSE;
		gboolean _tmp18_ = FALSE;
		if (!need_tick) {
			_tmp18_ = TRUE;
		} else {
			_tmp18_ = !playing;
		}
		if (_tmp18_) {
			_tmp17_ = self->priv->_tick_handler != ((guint) 0);
		} else {
			_tmp17_ = FALSE;
		}
		if (_tmp17_) {
			gtk_widget_remove_tick_callback ((GtkWidget*) self, self->priv->_tick_handler);
			self->priv->_tick_handler = (guint) 0;
		}
	}
}

static void
g4_play_panel_on_position_seeked (G4PlayPanel* self,
                                  gdouble pos)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_rotate_cover) {
		G4MatrixPaintable* _tmp0_;
		_tmp0_ = self->priv->_matrix_paintable;
		g4_matrix_paintable_set_rotation (_tmp0_, pos * self->priv->_degrees_per_second);
	}
}

static gboolean
g4_play_panel_on_tick_callback (G4PlayPanel* self,
                                GtkWidget* widget,
                                GdkFrameClock* clock)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (clock != NULL, FALSE);
	if (self->priv->_rotate_cover) {
		gint64 now = 0LL;
		gdouble elapsed = 0.0;
		gdouble angle = 0.0;
		G4MatrixPaintable* _tmp0_;
		G4MatrixPaintable* _tmp1_;
		gdouble _tmp2_;
		gdouble _tmp3_;
		now = g_get_monotonic_time ();
		elapsed = (now - self->priv->_tick_last_time) / 1e6;
		angle = elapsed * self->priv->_degrees_per_second;
		_tmp0_ = self->priv->_matrix_paintable;
		_tmp1_ = self->priv->_matrix_paintable;
		_tmp2_ = g4_matrix_paintable_get_rotation (_tmp1_);
		_tmp3_ = _tmp2_;
		g4_matrix_paintable_set_rotation (_tmp1_, _tmp3_ + angle);
		self->priv->_tick_last_time = now;
	}
	if (self->priv->_show_peak) {
		gdouble peak = 0.0;
		G4Application* _tmp4_;
		G4GstPlayer* _tmp5_;
		G4GstPlayer* _tmp6_;
		gdouble _tmp7_;
		gdouble _tmp8_;
		G4PlayBar* _tmp9_;
		_tmp4_ = self->priv->_app;
		_tmp5_ = g4_application_get_player (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = g4_gst_player_get_peak (_tmp6_);
		_tmp8_ = _tmp7_;
		peak = _tmp8_;
		_tmp9_ = self->priv->_play_bar;
		g4_play_bar_set_peak (_tmp9_, peak);
	}
	result = TRUE;
	return result;
}

static void
g4_play_panel_show_popover_menu (G4PlayPanel* self,
                                 GtkWidget* widget,
                                 gdouble x,
                                 gdouble y)
{
	G4Application* _tmp0_;
	G4Music* _tmp1_;
	G4Music* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_application_get_current_music (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		GMenu* menu = NULL;
		GMenu* _tmp3_;
		GtkPopoverMenu* popover = NULL;
		GMenu* _tmp4_;
		GtkPopoverMenu* _tmp5_;
		GtkPopoverMenu* _tmp6_;
		GtkPopoverMenu* _tmp7_;
		_tmp3_ = g4_play_panel_create_music_action_menu (self);
		menu = _tmp3_;
		_tmp4_ = menu;
		_tmp5_ = g4_create_popover_menu (_tmp4_, x, y);
		popover = _tmp5_;
		_tmp6_ = popover;
		gtk_widget_set_parent ((GtkWidget*) _tmp6_, widget);
		_tmp7_ = popover;
		gtk_popover_popup ((GtkPopover*) _tmp7_);
		_g_object_unref0 (popover);
		_g_object_unref0 (menu);
	}
}

static void
g4_play_panel_update_cover_paintables (G4PlayPanel* self,
                                       G4Music* music,
                                       GdkPaintable* paintable)
{
	G4RoundPaintable* _tmp0_;
	gdouble _tmp1_ = 0.0;
	G4RoundPaintable* _tmp2_;
	G4RoundPaintable* _tmp3_;
	GtkImage* _tmp4_;
	G4RoundPaintable* _tmp5_;
	G4MatrixPaintable* _tmp6_;
	G4MatrixPaintable* _tmp7_;
	GtkImage* _tmp8_;
	G4CrossFadePaintable* _tmp9_;
	G4MatrixPaintable* _tmp10_;
	G4CrossFadePaintable* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g4_round_paintable_new (paintable, 0.1);
	_g_object_unref0 (self->priv->_round_paintable);
	self->priv->_round_paintable = _tmp0_;
	if (self->priv->_rotate_cover) {
		_tmp1_ = 0.5;
	} else {
		_tmp1_ = 0.05;
	}
	_tmp2_ = self->priv->_round_paintable;
	g4_round_paintable_set_ratio (_tmp2_, _tmp1_);
	_tmp3_ = self->priv->_round_paintable;
	_tmp4_ = self->priv->music_cover;
	g_signal_connect_object ((G4BasePaintable*) _tmp3_, "queue-draw", (GCallback) _gtk_widget_queue_draw_g4_base_paintable_queue_draw, (GtkWidget*) _tmp4_, 0);
	_tmp5_ = self->priv->_round_paintable;
	_tmp6_ = g4_matrix_paintable_new ((GdkPaintable*) _tmp5_);
	_g_object_unref0 (self->priv->_matrix_paintable);
	self->priv->_matrix_paintable = _tmp6_;
	_tmp7_ = self->priv->_matrix_paintable;
	_tmp8_ = self->priv->music_cover;
	g_signal_connect_object ((G4BasePaintable*) _tmp7_, "queue-draw", (GCallback) _gtk_widget_queue_draw_g4_base_paintable_queue_draw, (GtkWidget*) _tmp8_, 0);
	_tmp9_ = self->priv->_crossfade_paintable;
	_tmp10_ = self->priv->_matrix_paintable;
	g4_base_paintable_set_paintable ((G4BasePaintable*) _tmp9_, (GdkPaintable*) _tmp10_);
	_tmp11_ = self->priv->_crossfade_paintable;
	g_signal_emit (self, g4_play_panel_signals[G4_PLAY_PANEL_COVER_CHANGED_SIGNAL], 0, music, _tmp11_);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

static void
g4_play_panel_update_initial_label (G4PlayPanel* self,
                                    const gchar* uri)
{
	gchar* dir_name = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* link = NULL;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	GtkLabel* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (uri != NULL);
	_tmp0_ = g4_get_display_name (uri);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_uri_escape_string (_tmp1_, NULL, TRUE);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	dir_name = _tmp3_;
	_tmp4_ = string_to_string (dir_name);
	_tmp5_ = g_strconcat ("<a href=\"change_dir\">", _tmp4_, "</a>", NULL);
	link = _tmp5_;
	_tmp6_ = self->priv->initial_label;
	_tmp7_ = g_strconcat (_ ("Drag and drop music files here,\nor change music location: "), link, NULL);
	_tmp8_ = _tmp7_;
	gtk_label_set_markup (_tmp6_, _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (link);
	_g_free0 (dir_name);
}

gboolean
g4_play_panel_get_rotate_cover (G4PlayPanel* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_rotate_cover;
	return result;
}

void
g4_play_panel_set_rotate_cover (G4PlayPanel* self,
                                gboolean value)
{
	gdouble _tmp0_ = 0.0;
	G4RoundPaintable* _tmp1_;
	gdouble _tmp2_ = 0.0;
	G4MatrixPaintable* _tmp6_;
	G4Application* _tmp7_;
	G4GstPlayer* _tmp8_;
	G4GstPlayer* _tmp9_;
	GstState _tmp10_;
	GstState _tmp11_;
	g_return_if_fail (self != NULL);
	self->priv->_rotate_cover = value;
	if (value) {
		_tmp0_ = 0.5;
	} else {
		_tmp0_ = 0.05;
	}
	_tmp1_ = self->priv->_round_paintable;
	g4_round_paintable_set_ratio (_tmp1_, _tmp0_);
	if (value) {
		G4PlayBar* _tmp3_;
		gdouble _tmp4_;
		gdouble _tmp5_;
		_tmp3_ = self->priv->_play_bar;
		_tmp4_ = g4_play_bar_get_position (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp2_ = _tmp5_ * self->priv->_degrees_per_second;
	} else {
		_tmp2_ = (gdouble) 0;
	}
	_tmp6_ = self->priv->_matrix_paintable;
	g4_matrix_paintable_set_rotation (_tmp6_, _tmp2_);
	_tmp7_ = self->priv->_app;
	_tmp8_ = g4_application_get_player (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = g4_gst_player_get_state (_tmp9_);
	_tmp11_ = _tmp10_;
	g4_play_panel_on_player_state_changed (self, _tmp11_);
	g_object_notify_by_pspec ((GObject *) self, g4_play_panel_properties[G4_PLAY_PANEL_ROTATE_COVER_PROPERTY]);
}

gboolean
g4_play_panel_get_show_peak (G4PlayPanel* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_peak;
	return result;
}

void
g4_play_panel_set_show_peak (G4PlayPanel* self,
                             gboolean value)
{
	G4Application* _tmp0_;
	G4GstPlayer* _tmp1_;
	G4GstPlayer* _tmp2_;
	GstState _tmp3_;
	GstState _tmp4_;
	g_return_if_fail (self != NULL);
	self->priv->_show_peak = value;
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_application_get_player (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g4_gst_player_get_state (_tmp2_);
	_tmp4_ = _tmp3_;
	g4_play_panel_on_player_state_changed (self, _tmp4_);
	g_object_notify_by_pspec ((GObject *) self, g4_play_panel_properties[G4_PLAY_PANEL_SHOW_PEAK_PROPERTY]);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
}

static void
g4_play_panel_class_init (G4PlayPanelClass * klass,
                          gpointer klass_data)
{
	g4_play_panel_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &G4PlayPanel_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_g4_play_panel_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_g4_play_panel_set_property;
	G_OBJECT_CLASS (klass)->finalize = g4_play_panel_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_PLAY_PANEL_ROTATE_COVER_PROPERTY, g4_play_panel_properties[G4_PLAY_PANEL_ROTATE_COVER_PROPERTY] = g_param_spec_boolean ("rotate-cover", "rotate-cover", "rotate-cover", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_PLAY_PANEL_SHOW_PEAK_PROPERTY, g4_play_panel_properties[G4_PLAY_PANEL_SHOW_PEAK_PROPERTY] = g_param_spec_boolean ("show-peak", "show-peak", "show-peak", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/neithern/g4music/gtk/play-panel.ui");
	g4_play_panel_signals[G4_PLAY_PANEL_COVER_CHANGED_SIGNAL] = g_signal_new ("cover-changed", G4_TYPE_PLAY_PANEL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, G4_TYPE_MUSIC, G4_TYPE_CROSS_FADE_PAINTABLE);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "action_btn", FALSE, G4PlayPanel_private_offset + G_STRUCT_OFFSET (G4PlayPanelPrivate, action_btn));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "back_btn", FALSE, G4PlayPanel_private_offset + G_STRUCT_OFFSET (G4PlayPanelPrivate, back_btn));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "index_label", FALSE, G4PlayPanel_private_offset + G_STRUCT_OFFSET (G4PlayPanelPrivate, index_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "music_box", FALSE, G4PlayPanel_private_offset + G_STRUCT_OFFSET (G4PlayPanelPrivate, music_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "music_cover", FALSE, G4PlayPanel_private_offset + G_STRUCT_OFFSET (G4PlayPanelPrivate, music_cover));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "music_album", FALSE, G4PlayPanel_private_offset + G_STRUCT_OFFSET (G4PlayPanelPrivate, music_album));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "music_artist", FALSE, G4PlayPanel_private_offset + G_STRUCT_OFFSET (G4PlayPanelPrivate, music_artist));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "music_title", FALSE, G4PlayPanel_private_offset + G_STRUCT_OFFSET (G4PlayPanelPrivate, music_title));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "initial_label", FALSE, G4PlayPanel_private_offset + G_STRUCT_OFFSET (G4PlayPanelPrivate, initial_label));
}

static void
g4_play_panel_g4_size_watcher_interface_init (G4SizeWatcherIface * iface,
                                              gpointer iface_data)
{
	g4_play_panel_g4_size_watcher_parent_iface = g_type_interface_peek_parent (iface);
	iface->first_allocated = (void (*) (G4SizeWatcher*)) g4_play_panel_real_first_allocated;
	iface->size_to_change = (void (*) (G4SizeWatcher*, gint, gint)) g4_play_panel_real_size_to_change;
}

static void
g4_play_panel_instance_init (G4PlayPanel * self,
                             gpointer klass)
{
	G4PlayBar* _tmp0_;
	G4CrossFadePaintable* _tmp1_;
	G4MatrixPaintable* _tmp2_;
	G4RoundPaintable* _tmp3_;
	self->priv = g4_play_panel_get_instance_private (self);
	_tmp0_ = g4_play_bar_new ();
	g_object_ref_sink (_tmp0_);
	self->priv->_play_bar = _tmp0_;
	self->priv->_degrees_per_second = (gdouble) (360 / 20);
	_tmp1_ = g4_cross_fade_paintable_new (NULL);
	self->priv->_crossfade_paintable = _tmp1_;
	_tmp2_ = g4_matrix_paintable_new (NULL);
	self->priv->_matrix_paintable = _tmp2_;
	_tmp3_ = g4_round_paintable_new (NULL, 0.1);
	self->priv->_round_paintable = _tmp3_;
	self->priv->_rotate_cover = TRUE;
	self->priv->_show_peak = TRUE;
	self->priv->_size_allocated = FALSE;
	self->priv->_scale_animation = NULL;
	self->priv->_tick_handler = (guint) 0;
	self->priv->_tick_last_time = (gint64) 0;
	g_type_ensure (G4_TYPE_STABLE_LABEL);
	g_type_ensure (G4_TYPE_STABLE_LABEL);
	g_type_ensure (G4_TYPE_STABLE_LABEL);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
g4_play_panel_finalize (GObject * obj)
{
	G4PlayPanel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, G4_TYPE_PLAY_PANEL, G4PlayPanel);
	_g_object_unref0 (self->priv->_play_bar);
	_g_object_unref0 (self->priv->_app);
	_g_object_unref0 (self->priv->_crossfade_paintable);
	_g_object_unref0 (self->priv->_matrix_paintable);
	_g_object_unref0 (self->priv->_round_paintable);
	_g_object_unref0 (self->priv->_scale_animation);
	G_OBJECT_CLASS (g4_play_panel_parent_class)->finalize (obj);
}

static GType
g4_play_panel_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (G4PlayPanelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) g4_play_panel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (G4PlayPanel), 0, (GInstanceInitFunc) g4_play_panel_instance_init, NULL };
	static const GInterfaceInfo g4_size_watcher_info = { (GInterfaceInitFunc) g4_play_panel_g4_size_watcher_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType g4_play_panel_type_id;
	g4_play_panel_type_id = g_type_register_static (gtk_box_get_type (), "G4PlayPanel", &g_define_type_info, 0);
	g_type_add_interface_static (g4_play_panel_type_id, G4_TYPE_SIZE_WATCHER, &g4_size_watcher_info);
	G4PlayPanel_private_offset = g_type_add_instance_private (g4_play_panel_type_id, sizeof (G4PlayPanelPrivate));
	return g4_play_panel_type_id;
}

GType
g4_play_panel_get_type (void)
{
	static volatile gsize g4_play_panel_type_id__once = 0;
	if (g_once_init_enter (&g4_play_panel_type_id__once)) {
		GType g4_play_panel_type_id;
		g4_play_panel_type_id = g4_play_panel_get_type_once ();
		g_once_init_leave (&g4_play_panel_type_id__once, g4_play_panel_type_id);
	}
	return g4_play_panel_type_id__once;
}

static void
_vala_g4_play_panel_get_property (GObject * object,
                                  guint property_id,
                                  GValue * value,
                                  GParamSpec * pspec)
{
	G4PlayPanel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, G4_TYPE_PLAY_PANEL, G4PlayPanel);
	switch (property_id) {
		case G4_PLAY_PANEL_ROTATE_COVER_PROPERTY:
		g_value_set_boolean (value, g4_play_panel_get_rotate_cover (self));
		break;
		case G4_PLAY_PANEL_SHOW_PEAK_PROPERTY:
		g_value_set_boolean (value, g4_play_panel_get_show_peak (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_g4_play_panel_set_property (GObject * object,
                                  guint property_id,
                                  const GValue * value,
                                  GParamSpec * pspec)
{
	G4PlayPanel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, G4_TYPE_PLAY_PANEL, G4PlayPanel);
	switch (property_id) {
		case G4_PLAY_PANEL_ROTATE_COVER_PROPERTY:
		g4_play_panel_set_rotate_cover (self, g_value_get_boolean (value));
		break;
		case G4_PLAY_PANEL_SHOW_PEAK_PROPERTY:
		g4_play_panel_set_show_peak (self, g_value_get_boolean (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 inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

