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

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

#define G4_THUMBNAILER_ICON_SIZE 48
#define G4_BUTTON_ADDTO "add"
#define G4_BUTTON_INSERT "insert"
#define G4_BUTTON_QUEUE "queue"
#define G4_BUTTON_REMOVE "remove"
#define G4_ACTION_WIN "win."
#define G4_ACTION_BUTTON "button"
#define G4_ACTION_APP "app."
#define G4_ACTION_PLAY_AT_NEXT "play-at-next"
#define G4_ACTION_ADD_TO_QUEUE "add-to-queue"
#define G4_ACTION_REMOVE "remove"
#define G4_ACTION_TRASH_FILE "trash-file"
#define G4_THUMBNAILER_GRID_SIZE 160
#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  {
	G4_RESULT_CANCEL = -1,
	G4_RESULT_FAILED = 0,
	G4_RESULT_OK = 1
} G4Result;

#define G4_TYPE_RESULT (g4_result_get_type ())

#define G4_TYPE_MUSIC_LIST (g4_music_list_get_type ())
#define G4_MUSIC_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_LIST, G4MusicList))
#define G4_MUSIC_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_LIST, G4MusicListClass))
#define G4_IS_MUSIC_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_LIST))
#define G4_IS_MUSIC_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_LIST))
#define G4_MUSIC_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_LIST, G4MusicListClass))

typedef struct _G4MusicList G4MusicList;
typedef struct _G4MusicListClass G4MusicListClass;
typedef struct _G4MusicListPrivate G4MusicListPrivate;

#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_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_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;
enum  {
	G4_MUSIC_LIST_0_PROPERTY,
	G4_MUSIC_LIST_COMPACT_LIST_PROPERTY,
	G4_MUSIC_LIST_CURRENT_NODE_PROPERTY,
	G4_MUSIC_LIST_DATA_STORE_PROPERTY,
	G4_MUSIC_LIST_DROPPING_ITEM_PROPERTY,
	G4_MUSIC_LIST_FILTER_MODEL_PROPERTY,
	G4_MUSIC_LIST_GRID_MODE_PROPERTY,
	G4_MUSIC_LIST_ITEM_TYPE_PROPERTY,
	G4_MUSIC_LIST_MODIFIED_PROPERTY,
	G4_MUSIC_LIST_MULTI_SELECTION_PROPERTY,
	G4_MUSIC_LIST_MUSIC_NODE_PROPERTY,
	G4_MUSIC_LIST_PLAYABLE_PROPERTY,
	G4_MUSIC_LIST_SINGLE_CLICK_ACTIVATE_PROPERTY,
	G4_MUSIC_LIST_VISIBLE_COUNT_PROPERTY,
	G4_MUSIC_LIST_NUM_PROPERTIES
};
static GParamSpec* g4_music_list_properties[G4_MUSIC_LIST_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))

#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;
typedef struct _G4MusicPrivate G4MusicPrivate;
typedef struct _G4AlbumPrivate G4AlbumPrivate;
typedef struct _G4PlaylistPrivate G4PlaylistPrivate;
typedef struct _G4MusicListSaveIfModifiedData G4MusicListSaveIfModifiedData;
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))

#define G4_TYPE_MUSIC_WIDGET (g4_music_widget_get_type ())
#define G4_MUSIC_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_WIDGET, G4MusicWidget))
#define G4_MUSIC_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_WIDGET, G4MusicWidgetClass))
#define G4_IS_MUSIC_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_WIDGET))
#define G4_IS_MUSIC_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_WIDGET))
#define G4_MUSIC_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_WIDGET, G4MusicWidgetClass))

typedef struct _G4MusicWidget G4MusicWidget;
typedef struct _G4MusicWidgetClass G4MusicWidgetClass;

#define G4_TYPE_ARTIST (g4_artist_get_type ())
#define G4_ARTIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_ARTIST, G4Artist))
#define G4_ARTIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_ARTIST, G4ArtistClass))
#define G4_IS_ARTIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_ARTIST))
#define G4_IS_ARTIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_ARTIST))
#define G4_ARTIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_ARTIST, G4ArtistClass))

typedef struct _G4Artist G4Artist;
typedef struct _G4ArtistClass G4ArtistClass;
#define _gtk_bitset_unref0(var) ((var == NULL) ? NULL : (var = (gtk_bitset_unref (var), NULL)))

#define G4_TYPE_MUSIC_CELL (g4_music_cell_get_type ())
#define G4_MUSIC_CELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_CELL, G4MusicCell))
#define G4_MUSIC_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_CELL, G4MusicCellClass))
#define G4_IS_MUSIC_CELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_CELL))
#define G4_IS_MUSIC_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_CELL))
#define G4_MUSIC_CELL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_CELL, G4MusicCellClass))

typedef struct _G4MusicCell G4MusicCell;
typedef struct _G4MusicCellClass G4MusicCellClass;

#define G4_TYPE_MUSIC_ENTRY (g4_music_entry_get_type ())
#define G4_MUSIC_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_ENTRY, G4MusicEntry))
#define G4_MUSIC_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_ENTRY, G4MusicEntryClass))
#define G4_IS_MUSIC_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_ENTRY))
#define G4_IS_MUSIC_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_ENTRY))
#define G4_MUSIC_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_ENTRY, G4MusicEntryClass))

typedef struct _G4MusicEntry G4MusicEntry;
typedef struct _G4MusicEntryClass G4MusicEntryClass;
typedef void (*G4Pressed) (GtkWidget* widget, gdouble x, gdouble y, gpointer user_data);
typedef struct _Block20Data Block20Data;

#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_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;
typedef struct _G4MusicWidgetPrivate G4MusicWidgetPrivate;

#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;
typedef struct _Block21Data Block21Data;
typedef void (*G4VoidFunc) (gpointer user_data);
typedef struct _Block22Data Block22Data;
typedef struct _Block23Data Block23Data;
typedef struct _Block24Data Block24Data;
enum  {
	G4_MUSIC_LIST_ITEM_ACTIVATED_SIGNAL,
	G4_MUSIC_LIST_ITEM_BINDED_SIGNAL,
	G4_MUSIC_LIST_ITEM_CREATED_SIGNAL,
	G4_MUSIC_LIST_ITEM_UNBINDED_SIGNAL,
	G4_MUSIC_LIST_NUM_SIGNALS
};
static guint g4_music_list_signals[G4_MUSIC_LIST_NUM_SIGNALS] = {0};

#define G4_TYPE_MAIN_MUSIC_LIST (g4_main_music_list_get_type ())
#define G4_MAIN_MUSIC_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MAIN_MUSIC_LIST, G4MainMusicList))
#define G4_MAIN_MUSIC_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MAIN_MUSIC_LIST, G4MainMusicListClass))
#define G4_IS_MAIN_MUSIC_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MAIN_MUSIC_LIST))
#define G4_IS_MAIN_MUSIC_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MAIN_MUSIC_LIST))
#define G4_MAIN_MUSIC_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MAIN_MUSIC_LIST, G4MainMusicListClass))

typedef struct _G4MainMusicList G4MainMusicList;
typedef struct _G4MainMusicListClass G4MainMusicListClass;
typedef struct _G4MainMusicListPrivate G4MainMusicListPrivate;
enum  {
	G4_MAIN_MUSIC_LIST_0_PROPERTY,
	G4_MAIN_MUSIC_LIST_NUM_PROPERTIES
};
static GParamSpec* g4_main_music_list_properties[G4_MAIN_MUSIC_LIST_NUM_PROPERTIES];
typedef struct _G4MainMusicListSaveIfModifiedData G4MainMusicListSaveIfModifiedData;
typedef struct _Block25Data Block25Data;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

#define G4_TYPE_COUNTED_RECT (g4_counted_rect_get_type ())
typedef struct _G4CountedRect G4CountedRect;
typedef struct _Block26Data Block26Data;
#define _g4_counted_rect_free0(var) ((var == NULL) ? NULL : (var = (g4_counted_rect_free (var), NULL)))

struct _G4MusicList {
	GtkBox parent_instance;
	G4MusicListPrivate * priv;
	G4Application* _app;
	gboolean _modified;
	gboolean _has_add_to_queque;
	gboolean _prompt_to_save;
};

struct _G4MusicListClass {
	GtkBoxClass parent_class;
	void (*save_if_modified) (G4MusicList* self, gboolean prompt, GAsyncReadyCallback _callback_, gpointer _user_data_);
	G4Result (*save_if_modified_finish) (G4MusicList* self, GAsyncResult* _res_);
};

struct _G4MusicListPrivate {
	GHashTable* _binding_items;
	gboolean _compact_list;
	G4Music* _current_node;
	GListStore* _data_store;
	gboolean _editable;
	GtkFilterListModel* _filter_model;
	gboolean _grid_mode;
	GtkGridView* _grid_view;
	gint _image_size;
	GType _item_type;
	G4Music* _music_node;
	GtkScrolledWindow* _scroll_view;
	gboolean _selectable;
	gboolean _single_click_activate;
	GtkMultiSelection* _selection;
	G4Thumbnailer* _thmbnailer;
	guint _columns;
	graphene_size_t _cell_size;
	graphene_size_t _item_size;
	gint _scrolling_item;
	GPtrArray* _action_buttons;
	GtkWidget* _header_bar_hided;
	GtkRevealer* _header_revealer;
	GtkLabel* _header_title;
	gboolean _multi_selection;
	AdwAnimation* _scroll_animation;
	GtkLabel* _empty_label;
	gint _dropping_item;
	guint _activate_handle;
	guint _remove_selection_handle;
};

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 _G4Album {
	G4Music parent_instance;
	G4AlbumPrivate * priv;
	GHashTable* _musics;
};

struct _G4AlbumClass {
	G4MusicClass parent_class;
	void (*get_sorted_musics) (G4Album* self, GPtrArray* musics);
	void (*sort) (G4Album* self, GPtrArray* arr);
};

struct _G4Playlist {
	G4Album parent_instance;
	G4PlaylistPrivate * priv;
	GPtrArray* items;
	gchar* list_uri;
};

struct _G4PlaylistClass {
	G4AlbumClass parent_class;
};

struct _G4MusicListSaveIfModifiedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	G4MusicList* self;
	gboolean prompt;
	G4Result result;
	gboolean _tmp0_;
	G4Music* _tmp1_;
	G4Playlist* playlist;
	G4Playlist* _tmp2_;
	gboolean _tmp3_;
	GtkRoot* _tmp4_;
	GtkRoot* _tmp5_;
	gboolean ret;
	G4Application* _tmp6_;
	G4Playlist* _tmp7_;
	G4Result _tmp8_;
	G4Result _tmp9_;
};

struct _Block20Data {
	int _ref_count_;
	G4MusicList* self;
	GtkListItem* item;
	G4MusicWidget* child;
	G4Music* music;
};

struct _G4MusicWidget {
	GtkBox parent_instance;
	G4MusicWidgetPrivate * priv;
	GtkImage* _image;
	G4StableLabel* _title;
	G4StableLabel* _subtitle;
	G4RoundPaintable* _paintable;
	GtkImage* _playing;
	gulong first_draw_handler;
	G4Music* music;
};

struct _G4MusicWidgetClass {
	GtkBoxClass parent_class;
};

struct _Block21Data {
	int _ref_count_;
	G4MusicList* self;
	gint index;
};

struct _Block22Data {
	int _ref_count_;
	graphene_point_t point;
	GtkDragSource* source;
	GtkWidget* widget;
	GtkListItem* item;
};

struct _Block23Data {
	int _ref_count_;
	G4MusicList* self;
	GtkBitset* bits;
};

struct _Block24Data {
	int _ref_count_;
	G4MusicList* self;
	gboolean enable;
};

struct _G4MainMusicList {
	G4MusicList parent_instance;
	G4MainMusicListPrivate * priv;
};

struct _G4MainMusicListClass {
	G4MusicListClass parent_class;
};

struct _G4MainMusicListSaveIfModifiedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	G4MainMusicList* self;
	gboolean prompt;
	G4Result result;
	gboolean ret;
	G4Application* _tmp0_;
	G4Result _tmp1_;
};

struct _Block25Data {
	int _ref_count_;
	GPtrArray* files;
};

struct _G4CountedRect {
	gint count;
	gint index;
	graphene_rect_t rect;
};

struct _Block26Data {
	int _ref_count_;
	G4CountedRect best_rect;
};

static gint G4MusicList_private_offset;
static gpointer g4_music_list_parent_class = NULL;
static gpointer g4_main_music_list_parent_class = NULL;

VALA_EXTERN GType g4_result_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType g4_music_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicList, 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_music_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Music, g_object_unref)
VALA_EXTERN GType g4_thumbnailer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Thumbnailer, g_object_unref)
VALA_EXTERN void g4_music_list_save_if_modified (G4MusicList* self,
                                     gboolean prompt,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_);
VALA_EXTERN G4Result g4_music_list_save_if_modified_finish (G4MusicList* self,
                                                GAsyncResult* _res_);
static void _g_object_unref0_ (gpointer var);
VALA_EXTERN G4MusicList* g4_music_list_new (G4Application* app,
                                GType item_type,
                                G4Music* node,
                                gboolean editable,
                                gboolean selectable);
VALA_EXTERN G4MusicList* g4_music_list_construct (GType object_type,
                                      G4Application* app,
                                      GType item_type,
                                      G4Music* node,
                                      gboolean editable,
                                      gboolean selectable);
VALA_EXTERN G4Thumbnailer* g4_application_get_thumbnailer (G4Application* self);
static void __lambda68_ (G4MusicList* self,
                  guint position);
static void ___lambda68__gtk_grid_view_activate (GtkGridView* _sender,
                                          guint position,
                                          gpointer self);
static void g4_music_list_on_selection_changed (G4MusicList* self,
                                         guint position,
                                         guint n_items);
static void _g4_music_list_on_selection_changed_gtk_selection_model_selection_changed (GtkSelectionModel* _sender,
                                                                                guint position,
                                                                                guint n_items,
                                                                                gpointer self);
VALA_EXTERN void g4_music_list_create_factory (G4MusicList* self);
static void g4_music_list_update_grid_view (G4MusicList* self);
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)
static void g4_music_list_create_drop_target (G4MusicList* self,
                                       GtkWidget* widget);
VALA_EXTERN void g4_music_list_activate_item (G4MusicList* self,
                                  gint item);
VALA_EXTERN void g4_music_list_button_command (G4MusicList* self,
                                   const gchar* name);
static G4Playlist* g4_music_list_create_playlist_for_selection (G4MusicList* self);
VALA_EXTERN void g4_application_show_add_playlist_dialog (G4Application* self,
                                              G4Playlist* playlist,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
VALA_EXTERN void g4_application_show_add_playlist_dialog_finish (G4Application* self,
                                                     GAsyncResult* _res_);
static void ___lambda84_ (G4MusicList* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda84__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
VALA_EXTERN gint g4_application_insert_after_current (G4Application* self,
                                          G4Playlist* playlist);
VALA_EXTERN gboolean g4_application_insert_to_queue (G4Application* self,
                                         G4Playlist* playlist,
                                         guint position,
                                         gboolean play_now);
VALA_EXTERN gboolean g4_music_list_get_modified (G4MusicList* self);
VALA_EXTERN gint g4_remove_items_from_store (GListStore* store,
                                 GPtrArray* arr,
                                 gint* first_pos);
VALA_EXTERN void g4_music_list_set_modified (G4MusicList* self,
                                 gboolean value);
static void g4_music_list_on_create_item (G4MusicList* self,
                                   GObject* obj);
static void _g4_music_list_on_create_item_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                       GObject* object,
                                                                       gpointer self);
static void g4_music_list_on_bind_item (G4MusicList* self,
                                 GObject* obj);
static void _g4_music_list_on_bind_item_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                    GObject* object,
                                                                    gpointer self);
static void g4_music_list_on_unbind_item (G4MusicList* self,
                                   GObject* obj);
static void _g4_music_list_on_unbind_item_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                        GObject* object,
                                                                        gpointer self);
VALA_EXTERN G4Playlist* g4_music_list_get_as_playlist (G4MusicList* self);
VALA_EXTERN G4Playlist* g4_playlist_new (const gchar* name,
                             const gchar* uri);
VALA_EXTERN G4Playlist* g4_playlist_construct (GType object_type,
                                   const gchar* name,
                                   const gchar* uri);
static void g4_music_list_real_save_if_modified_data_free (gpointer _data);
static void g4_music_list_real_save_if_modified (G4MusicList* self,
                                          gboolean prompt,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static gboolean g4_music_list_real_save_if_modified_co (G4MusicListSaveIfModifiedData* _data_);
VALA_EXTERN void g4_show_alert_dialog (const gchar* text,
                           GtkWindow* parent,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN gboolean g4_show_alert_dialog_finish (GAsyncResult* _res_);
static void g4_music_list_save_if_modified_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_);
VALA_EXTERN void g4_application_add_playlist_to_file_async (G4Application* self,
                                                G4Playlist* playlist,
                                                gboolean append,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN gboolean g4_application_add_playlist_to_file_finish (G4Application* self,
                                                     GAsyncResult* _res_);
VALA_EXTERN guint g4_music_list_update_store (G4MusicList* self);
VALA_EXTERN void g4_music_list_scroll_to_item (G4MusicList* self,
                                   gint index,
                                   gboolean smoothly);
VALA_EXTERN guint g4_get_grid_view_item_size (GtkGridView* grid_view,
                                  graphene_size_t* inner_size,
                                  graphene_size_t* outer_size);
static void _gtk_adjustment_set_value_adw_animation_target_func (gdouble value,
                                                          gpointer self);
VALA_EXTERN void g4_music_list_scroll_to_directly (G4MusicList* self,
                                       guint index);
static void g4_music_list_real_snapshot (GtkWidget* base,
                                  GtkSnapshot* snapshot);
static gboolean* _bool_dup (gboolean* self);
VALA_EXTERN void g4_draw_outset_shadow (GtkSnapshot* snapshot,
                            graphene_rect_t* rect,
                            gfloat radius);
VALA_EXTERN void g4_music_list_set_empty_text (G4MusicList* self,
                                   const gchar* text);
VALA_EXTERN gint g4_music_list_set_to_current_item (G4MusicList* self,
                                        gboolean scroll);
VALA_EXTERN gint g4_find_item_in_model (GListModel* model,
                            GObject* obj,
                            gint start_pos);
VALA_EXTERN void g4_music_list_update_item_cover (G4MusicList* self,
                                      G4Music* music,
                                      GdkPaintable* paintable);
VALA_EXTERN GType g4_music_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicWidget, g_object_unref)
VALA_EXTERN void g4_music_widget_set_paintable (G4MusicWidget* self,
                                    GdkPaintable* value);
VALA_EXTERN void g4_album_overwrite_to (G4Album* self,
                            GListStore* store);
VALA_EXTERN GType g4_artist_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Artist, g_object_unref)
VALA_EXTERN void g4_artist_overwrite_store (G4Artist* self,
                                GListStore* store);
static GMenu* g4_music_list_on_create_music_menu (G4MusicList* self,
                                           G4Music* node);
VALA_EXTERN GMenuItem* g4_create_menu_item_for_button (const gchar* button_name,
                                           const gchar* label,
                                           const gchar* action);
VALA_EXTERN GMenu* g4_create_menu_for_album (G4Album* album);
VALA_EXTERN GMenu* g4_create_menu_for_artist (G4Artist* artist);
VALA_EXTERN GMenu* g4_create_menu_for_music (G4Music* music,
                                 gboolean has_cover);
VALA_EXTERN GdkPaintable* g4_thumbnailer_find (G4Thumbnailer* self,
                                   G4Music* music,
                                   gint size);
VALA_EXTERN G4Music* g4_application_get_current_music (G4Application* self);
VALA_EXTERN GMenuItem* g4_create_menu_item_for_uri (const gchar* uri,
                                        const gchar* label,
                                        const gchar* action);
VALA_EXTERN G4MusicCell* g4_music_cell_new (void);
VALA_EXTERN G4MusicCell* g4_music_cell_construct (GType object_type);
VALA_EXTERN GType g4_music_cell_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicCell, g_object_unref)
VALA_EXTERN G4MusicEntry* g4_music_entry_new (gboolean compact);
VALA_EXTERN G4MusicEntry* g4_music_entry_construct (GType object_type,
                                        gboolean compact);
VALA_EXTERN GType g4_music_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicEntry, g_object_unref)
static void g4_music_list_create_drag_source (GtkWidget* widget,
                                       GtkListItem* item);
VALA_EXTERN GtkImage* g4_music_widget_get_image (G4MusicWidget* self);
static GMenu* _g4_music_list_on_create_music_menu_g4_music_widget_create_music_menu (G4MusicWidget* _sender,
                                                                              G4Music* node,
                                                                              gpointer self);
VALA_EXTERN GtkGestureClick* g4_make_right_clickable (GtkWidget* widget,
                                          G4Pressed pressed,
                                          gpointer pressed_target);
VALA_EXTERN void g4_music_widget_show_popover_menu (G4MusicWidget* self,
                                        GtkWidget* widget,
                                        gdouble x,
                                        gdouble y);
static void _g4_music_widget_show_popover_menu_g4_pressed (GtkWidget* widget,
                                                    gdouble x,
                                                    gdouble y,
                                                    gpointer self);
VALA_EXTERN GtkGestureLongPress* g4_make_long_pressable (GtkWidget* widget,
                                             G4Pressed pressed,
                                             gpointer pressed_target);
static void ___lambda94_ (G4MusicList* self,
                   GtkWidget* widget,
                   gdouble x,
                   gdouble y);
VALA_EXTERN void g4_music_list_set_multi_selection (G4MusicList* self,
                                        gboolean value);
static void ____lambda94__g4_pressed (GtkWidget* widget,
                               gdouble x,
                               gdouble y,
                               gpointer self);
static Block20Data* block20_data_ref (Block20Data* _data20_);
static void block20_data_unref (void * _userdata_);
VALA_EXTERN GtkImage* g4_music_widget_get_playing (G4MusicWidget* self);
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_round_paintable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4RoundPaintable, g_object_unref)
VALA_EXTERN G4RoundPaintable* g4_music_widget_get_cover (G4MusicWidget* self);
static void ___lambda95_ (Block20Data* _data20_);
VALA_EXTERN void g4_music_widget_disconnect_first_draw (G4MusicWidget* self);
VALA_EXTERN void g4_thumbnailer_load_async (G4Thumbnailer* self,
                                G4Music* music,
                                gint size,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN GdkPaintable* g4_thumbnailer_load_finish (G4Thumbnailer* self,
                                          GAsyncResult* _res_);
static void __lambda96_ (Block20Data* _data20_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda96__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void ____lambda95__g4_base_paintable_first_draw (G4BasePaintable* _sender,
                                                 gpointer self);
VALA_EXTERN GType g4_stable_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4StableLabel, g_object_unref)
static void g4_music_list_on_drag_begin (G4MusicList* self,
                                  GtkDragSource* source,
                                  GdkDrag* drag,
                                  GtkWidget* widget,
                                  graphene_point_t* point);
VALA_EXTERN GdkPaintable* g4_create_widget_paintable (GtkWidget* widget,
                                          graphene_point_t* point,
                                          const gchar* title,
                                          gint max_size);
static GdkContentProvider* g4_music_list_on_drag_prepare (G4MusicList* self,
                                                   G4Music* music);
VALA_EXTERN GdkContentProvider* g4_create_content_provider (G4Playlist* playlist);
static gboolean g4_music_list_on_drop_done (G4MusicList* self,
                                     GValue* value,
                                     gdouble x,
                                     gdouble y);
VALA_EXTERN guint g4_music_list_get_visible_count (G4MusicList* self);
VALA_EXTERN gboolean g4_merge_items_to_store (GListStore* store,
                                  GPtrArray* arr,
                                  guint* position);
VALA_EXTERN GFile** g4_get_dropped_files (GValue* value,
                              gint* result_length1);
VALA_EXTERN void g4_application_open_files_async (G4Application* self,
                                      GFile** files,
                                      gint files_length1,
                                      guint position,
                                      gboolean play_now,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
VALA_EXTERN gboolean g4_application_open_files_finish (G4Application* self,
                                           GAsyncResult* _res_);
static void ____lambda101_ (G4MusicList* self,
                     GObject* obj,
                     GAsyncResult* res);
static void _____lambda101__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
VALA_EXTERN void g4_music_list_set_dropping_item (G4MusicList* self,
                                      gint value);
static GdkDragAction g4_music_list_on_drop_motion (G4MusicList* self,
                                            gdouble x,
                                            gdouble y);
static Block21Data* block21_data_ref (Block21Data* _data21_);
static void block21_data_unref (void * _userdata_);
VALA_EXTERN guint g4_run_timeout_once (guint interval,
                           G4VoidFunc func,
                           gpointer func_target,
                           GDestroyNotify func_target_destroy_notify);
static void ___lambda98_ (Block21Data* _data21_);
static void ____lambda98__g4_void_func (gpointer self);
static G4MusicWidget* g4_music_list_get_binding_widget (G4MusicList* self,
                                                 G4Music* music);
static Block22Data* block22_data_ref (Block22Data* _data22_);
static void block22_data_unref (void * _userdata_);
static void __lambda90_ (Block22Data* _data22_,
                  GdkDrag* drag);
VALA_EXTERN GtkWidget* g4_find_ancestry_with_type (GtkWidget* widget,
                                       GType type);
static void ___lambda90__gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                              GdkDrag* drag,
                                              gpointer self);
static GdkContentProvider* __lambda91_ (Block22Data* _data22_,
                                 gdouble x,
                                 gdouble y);
static GdkContentProvider* ___lambda91__gtk_drag_source_prepare (GtkDragSource* _sender,
                                                          gdouble x,
                                                          gdouble y,
                                                          gpointer self);
static gboolean __lambda97_ (G4MusicList* self,
                      GdkDrop* drop);
static gboolean ___lambda97__gtk_drop_target_accept (GtkDropTarget* _sender,
                                              GdkDrop* drop,
                                              gpointer self);
static GdkDragAction _g4_music_list_on_drop_motion_gtk_drop_target_motion (GtkDropTarget* _sender,
                                                                    gdouble x,
                                                                    gdouble y,
                                                                    gpointer self);
static void __lambda99_ (G4MusicList* self);
static void __lambda100_ (G4MusicList* self);
static void ___lambda100__g4_void_func (gpointer self);
static void ___lambda99__gtk_drop_target_leave (GtkDropTarget* _sender,
                                         gpointer self);
static gboolean _g4_music_list_on_drop_done_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                           GValue* value,
                                                           gdouble x,
                                                           gdouble y,
                                                           gpointer self);
VALA_EXTERN G4Playlist* g4_to_playlist (G4Music** musics,
                            gint musics_length1,
                            const gchar* title);
static Block23Data* block23_data_ref (Block23Data* _data23_);
static void block23_data_unref (void * _userdata_);
static void __lambda89_ (Block23Data* _data23_);
static void ___lambda89__g4_void_func (gpointer self);
static void g4_music_list_setup_selection_header_bar (G4MusicList* self,
                                               GtkBox* header);
static void __lambda69_ (G4MusicList* self);
static void ___lambda73_ (G4MusicList* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda73__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda69__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda74_ (G4MusicList* self);
static void ___lambda74__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda75_ (G4MusicList* self);
static void ___lambda75__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void ___lambda85_ (G4MusicList* self);
static void ____lambda85__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda86_ (G4MusicList* self);
static void ___lambda86__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void ___lambda87_ (G4MusicList* self);
static void ____lambda87__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void _gtk_box_append_gfunc (gconstpointer data,
                            gpointer self);
static Block24Data* block24_data_ref (Block24Data* _data24_);
static void block24_data_unref (void * _userdata_);
static void __lambda88_ (Block24Data* _data24_,
                  G4Music* music,
                  GtkListItem* item);
static void ___lambda88__gh_func (gconstpointer key,
                           gconstpointer value,
                           gpointer self);
VALA_EXTERN gboolean g4_music_list_get_compact_list (G4MusicList* self);
VALA_EXTERN void g4_music_list_set_compact_list (G4MusicList* self,
                                     gboolean value);
VALA_EXTERN void g4_music_list_set_current_node (G4MusicList* self,
                                     G4Music* value);
VALA_EXTERN GListStore* g4_music_list_get_data_store (G4MusicList* self);
VALA_EXTERN void g4_music_list_set_data_store (G4MusicList* self,
                                   GListStore* value);
VALA_EXTERN gint g4_music_list_get_dropping_item (G4MusicList* self);
VALA_EXTERN GtkFilterListModel* g4_music_list_get_filter_model (G4MusicList* self);
VALA_EXTERN gboolean g4_music_list_get_grid_mode (G4MusicList* self);
VALA_EXTERN void g4_music_list_set_grid_mode (G4MusicList* self,
                                  gboolean value);
VALA_EXTERN GType g4_music_list_get_item_type (G4MusicList* self);
VALA_EXTERN gboolean g4_music_list_get_multi_selection (G4MusicList* self);
VALA_EXTERN G4Music* g4_music_list_get_music_node (G4MusicList* self);
VALA_EXTERN gboolean g4_music_list_get_playable (G4MusicList* self);
VALA_EXTERN gboolean g4_music_list_get_single_click_activate (G4MusicList* self);
VALA_EXTERN void g4_music_list_set_single_click_activate (G4MusicList* self,
                                              gboolean value);
static void g_cclosure_user_marshal_VOID__UINT_OBJECT (GClosure * closure,
                                                GValue * return_value,
                                                guint n_param_values,
                                                const GValue * param_values,
                                                gpointer invocation_hint,
                                                gpointer marshal_data);
static void g4_music_list_finalize (GObject * obj);
static GType g4_music_list_get_type_once (void);
static void _vala_g4_music_list_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec);
static void _vala_g4_music_list_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec);
VALA_EXTERN GType g4_main_music_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MainMusicList, g_object_unref)
VALA_EXTERN G4MainMusicList* g4_main_music_list_new (G4Application* app);
VALA_EXTERN G4MainMusicList* g4_main_music_list_construct (GType object_type,
                                               G4Application* app);
static void g4_main_music_list_real_save_if_modified_data_free (gpointer _data);
static void g4_main_music_list_real_save_if_modified (G4MusicList* base,
                                               gboolean prompt,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
static gboolean g4_main_music_list_real_save_if_modified_co (G4MainMusicListSaveIfModifiedData* _data_);
VALA_EXTERN void g4_application_save_queue_to_file (G4Application* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
VALA_EXTERN gboolean g4_application_save_queue_to_file_finish (G4Application* self,
                                                   GAsyncResult* _res_);
static void g4_main_music_list_save_if_modified_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_);
static GType g4_main_music_list_get_type_once (void);
static Block25Data* block25_data_ref (Block25Data* _data25_);
static void block25_data_unref (void * _userdata_);
VALA_EXTERN guint g4_playlist_get_length (G4Playlist* self);
static void __lambda64_ (Block25Data* _data25_,
                  G4Music* music);
static void ___lambda64__gfunc (gconstpointer data,
                         gpointer self);
static GType* _g_type_dup (GType* self);
VALA_EXTERN GType g4_counted_rect_get_type (void) G_GNUC_CONST ;
VALA_EXTERN G4CountedRect* g4_counted_rect_dup (const G4CountedRect* self);
VALA_EXTERN void g4_counted_rect_free (G4CountedRect* self);
VALA_EXTERN void g4_counted_rect_init (G4CountedRect *self,
                           gint c,
                           gint i,
                           graphene_rect_t* rc);
static Block26Data* block26_data_ref (Block26Data* _data26_);
static void block26_data_unref (void * _userdata_);
static void _vala_graphene_rect_t_free (graphene_rect_t* self);
static void __vala_graphene_rect_t_free0_ (gpointer var);
static void _g4_counted_rect_free0_ (gpointer var);
static graphene_rect_t* _vala_graphene_rect_t_copy (graphene_rect_t* self);
static void __lambda82_ (Block26Data* _data26_,
                  gint w,
                  G4CountedRect* rect);
static void ___lambda82__gh_func (gconstpointer key,
                           gconstpointer value,
                           gpointer self);
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 GType
g4_result_get_type_once (void)
{
	static const GEnumValue values[] = {{G4_RESULT_CANCEL, "G4_RESULT_CANCEL", "cancel"}, {G4_RESULT_FAILED, "G4_RESULT_FAILED", "failed"}, {G4_RESULT_OK, "G4_RESULT_OK", "ok"}, {0, NULL, NULL}};
	GType g4_result_type_id;
	g4_result_type_id = g_enum_register_static ("G4Result", values);
	return g4_result_type_id;
}

GType
g4_result_get_type (void)
{
	static volatile gsize g4_result_type_id__once = 0;
	if (g_once_init_enter (&g4_result_type_id__once)) {
		GType g4_result_type_id;
		g4_result_type_id = g4_result_get_type_once ();
		g_once_init_leave (&g4_result_type_id__once, g4_result_type_id);
	}
	return g4_result_type_id__once;
}

static inline gpointer
g4_music_list_get_instance_private (G4MusicList* self)
{
	return G_STRUCT_MEMBER_P (self, G4MusicList_private_offset);
}

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

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

static void
__lambda68_ (G4MusicList* self,
             guint position)
{
	GtkFilterListModel* _tmp0_;
	GObject* _tmp1_;
	GObject* _tmp2_;
	_tmp0_ = self->priv->_filter_model;
	_tmp1_ = g_list_model_get_item ((GListModel*) _tmp0_, position);
	_tmp2_ = _tmp1_;
	g_signal_emit (self, g4_music_list_signals[G4_MUSIC_LIST_ITEM_ACTIVATED_SIGNAL], 0, position, _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
___lambda68__gtk_grid_view_activate (GtkGridView* _sender,
                                     guint position,
                                     gpointer self)
{
	__lambda68_ ((G4MusicList*) self, position);
}

static void
_g4_music_list_on_selection_changed_gtk_selection_model_selection_changed (GtkSelectionModel* _sender,
                                                                           guint position,
                                                                           guint n_items,
                                                                           gpointer self)
{
	g4_music_list_on_selection_changed ((G4MusicList*) self, position, n_items);
}

G4MusicList*
g4_music_list_construct (GType object_type,
                         G4Application* app,
                         GType item_type,
                         G4Music* node,
                         gboolean editable,
                         gboolean selectable)
{
	G4MusicList * self = NULL;
	G4Application* _tmp0_;
	GtkFilterListModel* _tmp1_;
	GListStore* _tmp2_;
	G4Music* _tmp3_;
	G4Thumbnailer* _tmp4_;
	G4Thumbnailer* _tmp5_;
	G4Thumbnailer* _tmp6_;
	GtkGridView* _tmp7_;
	GtkGridView* _tmp8_;
	GtkGridView* _tmp9_;
	GtkGridView* _tmp10_;
	GtkFilterListModel* _tmp11_;
	GListModel* _tmp12_;
	GtkMultiSelection* _tmp13_;
	GtkMultiSelection* _tmp14_;
	GtkGridView* _tmp15_;
	GtkGridView* _tmp16_;
	GtkMultiSelection* _tmp17_;
	GtkScrolledWindow* _tmp18_;
	GtkGridView* _tmp19_;
	GtkScrolledWindow* _tmp20_;
	GtkScrolledWindow* _tmp21_;
	GtkScrolledWindow* _tmp22_;
	GtkScrolledWindow* _tmp23_;
	GtkScrolledWindow* _tmp24_;
	gboolean _tmp25_ = FALSE;
	g_return_val_if_fail (app != NULL, NULL);
	self = (G4MusicList*) g_object_new (object_type, NULL);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	_tmp0_ = _g_object_ref0 (app);
	_g_object_unref0 (self->_app);
	self->_app = _tmp0_;
	self->priv->_editable = editable;
	_tmp1_ = self->priv->_filter_model;
	_tmp2_ = self->priv->_data_store;
	gtk_filter_list_model_set_model (_tmp1_, (GListModel*) _tmp2_);
	self->priv->_item_type = item_type;
	_tmp3_ = _g_object_ref0 (node);
	_g_object_unref0 (self->priv->_music_node);
	self->priv->_music_node = _tmp3_;
	self->priv->_selectable = selectable;
	_tmp4_ = g4_application_get_thumbnailer (app);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (_tmp5_);
	_g_object_unref0 (self->priv->_thmbnailer);
	self->priv->_thmbnailer = _tmp6_;
	_tmp7_ = self->priv->_grid_view;
	gtk_grid_view_set_max_columns (_tmp7_, (guint) 5);
	_tmp8_ = self->priv->_grid_view;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp8_, 6);
	_tmp9_ = self->priv->_grid_view;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp9_, 6);
	_tmp10_ = self->priv->_grid_view;
	_tmp11_ = self->priv->_filter_model;
	_tmp12_ = _g_object_ref0 ((GListModel*) _tmp11_);
	_tmp13_ = gtk_multi_selection_new (_tmp12_);
	_g_object_unref0 (self->priv->_selection);
	self->priv->_selection = _tmp13_;
	_tmp14_ = self->priv->_selection;
	gtk_grid_view_set_model (_tmp10_, (GtkSelectionModel*) _tmp14_);
	_tmp15_ = self->priv->_grid_view;
	g_signal_connect_object (_tmp15_, "activate", (GCallback) ___lambda68__gtk_grid_view_activate, self, 0);
	_tmp16_ = self->priv->_grid_view;
	gtk_widget_add_css_class ((GtkWidget*) _tmp16_, "navigation-sidebar");
	_tmp17_ = self->priv->_selection;
	g_signal_connect_object ((GtkSelectionModel*) _tmp17_, "selection-changed", (GCallback) _g4_music_list_on_selection_changed_gtk_selection_model_selection_changed, self, 0);
	g4_music_list_create_factory (self);
	g4_music_list_update_grid_view (self);
	_tmp18_ = self->priv->_scroll_view;
	_tmp19_ = self->priv->_grid_view;
	gtk_scrolled_window_set_child (_tmp18_, (GtkWidget*) _tmp19_);
	_tmp20_ = self->priv->_scroll_view;
	g_object_set (_tmp20_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	_tmp21_ = self->priv->_scroll_view;
	g_object_set (_tmp21_, "vscrollbar-policy", GTK_POLICY_AUTOMATIC, NULL);
	_tmp22_ = self->priv->_scroll_view;
	gtk_scrolled_window_set_propagate_natural_height (_tmp22_, TRUE);
	_tmp23_ = self->priv->_scroll_view;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp23_, TRUE);
	_tmp24_ = self->priv->_scroll_view;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp24_);
	if (editable) {
		_tmp25_ = TRUE;
	} else {
		_tmp25_ = item_type == G4_TYPE_PLAYLIST;
	}
	if (_tmp25_) {
		GtkGridView* _tmp26_;
		_tmp26_ = self->priv->_grid_view;
		g4_music_list_create_drop_target (self, (GtkWidget*) _tmp26_);
	}
	return self;
}

G4MusicList*
g4_music_list_new (G4Application* app,
                   GType item_type,
                   G4Music* node,
                   gboolean editable,
                   gboolean selectable)
{
	return g4_music_list_construct (G4_TYPE_MUSIC_LIST, app, item_type, node, editable, selectable);
}

void
g4_music_list_activate_item (G4MusicList* self,
                             gint item)
{
	GtkGridView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_grid_view;
	g_signal_emit_by_name (_tmp0_, "activate", (guint) item);
}

static void
___lambda84_ (G4MusicList* self,
              GObject* obj,
              GAsyncResult* res)
{
	G4Application* _tmp0_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->_app;
	g4_application_show_add_playlist_dialog_finish (_tmp0_, res);
}

static void
____lambda84__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda84_ ((G4MusicList*) self, source_object, res);
	g_object_unref (self);
}

void
g4_music_list_button_command (G4MusicList* self,
                              const gchar* name)
{
	G4Playlist* playlist = NULL;
	G4Playlist* _tmp0_;
	const gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	_tmp0_ = g4_music_list_create_playlist_for_selection (self);
	playlist = _tmp0_;
	_tmp1_ = name;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string (G4_BUTTON_ADDTO)))) {
		switch (0) {
			default:
			{
				G4Application* _tmp4_;
				G4Playlist* _tmp5_;
				_tmp4_ = self->_app;
				_tmp5_ = playlist;
				g4_application_show_add_playlist_dialog (_tmp4_, _tmp5_, ____lambda84__gasync_ready_callback, g_object_ref (self));
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string (G4_BUTTON_INSERT)))) {
		switch (0) {
			default:
			{
				G4Application* _tmp6_;
				G4Playlist* _tmp7_;
				_tmp6_ = self->_app;
				_tmp7_ = playlist;
				g4_application_insert_after_current (_tmp6_, _tmp7_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string (G4_BUTTON_QUEUE)))) {
		switch (0) {
			default:
			{
				G4Application* _tmp8_;
				G4Playlist* _tmp9_;
				_tmp8_ = self->_app;
				_tmp9_ = playlist;
				g4_application_insert_to_queue (_tmp8_, _tmp9_, (guint) -1, FALSE);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string (G4_BUTTON_REMOVE)))) {
		switch (0) {
			default:
			{
				gboolean _tmp10_;
				gboolean _tmp11_;
				GListStore* _tmp12_;
				G4Playlist* _tmp13_;
				GPtrArray* _tmp14_;
				_tmp10_ = g4_music_list_get_modified (self);
				_tmp11_ = _tmp10_;
				_tmp12_ = self->priv->_data_store;
				_tmp13_ = playlist;
				_tmp14_ = _tmp13_->items;
				g4_music_list_set_modified (self, _tmp11_ | (g4_remove_items_from_store (_tmp12_, _tmp14_, NULL) != 0));
				g4_music_list_on_selection_changed (self, (guint) 0, (guint) 0);
				break;
			}
		}
	}
	_g_object_unref0 (playlist);
}

static void
_g4_music_list_on_create_item_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                  GObject* object,
                                                                  gpointer self)
{
	g4_music_list_on_create_item ((G4MusicList*) self, object);
}

static void
_g4_music_list_on_bind_item_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                               GObject* object,
                                                               gpointer self)
{
	g4_music_list_on_bind_item ((G4MusicList*) self, object);
}

static void
_g4_music_list_on_unbind_item_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                   GObject* object,
                                                                   gpointer self)
{
	g4_music_list_on_unbind_item ((G4MusicList*) self, object);
}

void
g4_music_list_create_factory (G4MusicList* self)
{
	GtkSignalListItemFactory* factory = NULL;
	GtkSignalListItemFactory* _tmp0_;
	GtkGridView* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	factory = _tmp0_;
	g_signal_connect_object (factory, "setup", (GCallback) _g4_music_list_on_create_item_gtk_signal_list_item_factory_setup, self, 0);
	g_signal_connect_object (factory, "bind", (GCallback) _g4_music_list_on_bind_item_gtk_signal_list_item_factory_bind, self, 0);
	g_signal_connect_object (factory, "unbind", (GCallback) _g4_music_list_on_unbind_item_gtk_signal_list_item_factory_unbind, self, 0);
	_tmp1_ = self->priv->_grid_view;
	gtk_grid_view_set_factory (_tmp1_, (GtkListItemFactory*) factory);
	_g_object_unref0 (factory);
}

static gpointer
_g_ptr_array_ref0 (gpointer self)
{
	return self ? g_ptr_array_ref (self) : NULL;
}

G4Playlist*
g4_music_list_get_as_playlist (G4MusicList* self)
{
	G4Playlist* pls = NULL;
	G4Music* _tmp0_;
	G4Playlist* _tmp1_;
	G4Playlist* _tmp2_ = NULL;
	G4Playlist* _tmp3_;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp6_ = NULL;
	G4Playlist* _tmp7_ = NULL;
	G4Playlist* _tmp8_;
	const gchar* _tmp9_ = NULL;
	const gchar* _tmp11_ = NULL;
	G4Playlist* playlist = NULL;
	G4Playlist* _tmp12_;
	GPtrArray* items = NULL;
	G4Playlist* _tmp13_;
	GPtrArray* _tmp14_;
	GPtrArray* _tmp15_;
	guint count = 0U;
	GtkFilterListModel* _tmp16_;
	G4Playlist* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_music_node;
	_tmp1_ = _g_object_ref0 (G4_IS_PLAYLIST (_tmp0_) ? ((G4Playlist*) _tmp0_) : NULL);
	pls = _tmp1_;
	_tmp3_ = pls;
	_tmp2_ = _tmp3_;
	_tmp4_ = NULL;
	if (_tmp2_ != NULL) {
		const gchar* _tmp5_;
		_tmp5_ = ((G4Music*) G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, G4_TYPE_PLAYLIST, G4Playlist))->title;
		_tmp4_ = _tmp5_;
	}
	_tmp6_ = _tmp4_;
	if (_tmp6_ == NULL) {
		_tmp6_ = "";
	}
	_tmp8_ = pls;
	_tmp7_ = _tmp8_;
	_tmp9_ = NULL;
	if (_tmp7_ != NULL) {
		const gchar* _tmp10_;
		_tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, G4_TYPE_PLAYLIST, G4Playlist)->list_uri;
		_tmp9_ = _tmp10_;
	}
	_tmp11_ = _tmp9_;
	if (_tmp11_ == NULL) {
		_tmp11_ = "";
	}
	_tmp12_ = g4_playlist_new ((const gchar*) _tmp6_, (const gchar*) _tmp11_);
	playlist = _tmp12_;
	_tmp13_ = playlist;
	_tmp14_ = _tmp13_->items;
	_tmp15_ = _g_ptr_array_ref0 (_tmp14_);
	items = _tmp15_;
	_tmp16_ = self->priv->_filter_model;
	count = g_list_model_get_n_items ((GListModel*) _tmp16_);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp17_ = FALSE;
			_tmp17_ = TRUE;
			while (TRUE) {
				G4Music* music = NULL;
				GtkFilterListModel* _tmp19_;
				GObject* _tmp20_;
				GPtrArray* _tmp21_;
				G4Music* _tmp22_;
				G4Music* _tmp23_;
				if (!_tmp17_) {
					gint _tmp18_;
					_tmp18_ = i;
					i = _tmp18_ + 1;
				}
				_tmp17_ = FALSE;
				if (!(((guint) i) < count)) {
					break;
				}
				_tmp19_ = self->priv->_filter_model;
				_tmp20_ = g_list_model_get_item ((GListModel*) _tmp19_, (guint) i);
				music = G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, G4_TYPE_MUSIC, G4Music);
				_tmp21_ = items;
				_tmp22_ = music;
				_tmp23_ = _g_object_ref0 (_tmp22_);
				g_ptr_array_add (_tmp21_, _tmp23_);
				_g_object_unref0 (music);
			}
		}
	}
	result = playlist;
	_g_ptr_array_unref0 (items);
	_g_object_unref0 (pls);
	return result;
}

static void
g4_music_list_real_save_if_modified_data_free (gpointer _data)
{
	G4MusicListSaveIfModifiedData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (G4MusicListSaveIfModifiedData, _data_);
}

static void
g4_music_list_real_save_if_modified (G4MusicList* self,
                                     gboolean prompt,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	G4MusicListSaveIfModifiedData* _data_;
	G4MusicList* _tmp0_;
	_data_ = g_slice_new0 (G4MusicListSaveIfModifiedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, g4_music_list_real_save_if_modified_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->prompt = prompt;
	g4_music_list_real_save_if_modified_co (_data_);
}

static G4Result
g4_music_list_real_save_if_modified_finish (G4MusicList* self,
                                            GAsyncResult* _res_)
{
	G4Result result;
	G4MusicListSaveIfModifiedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
g4_music_list_save_if_modified_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_)
{
	G4MusicListSaveIfModifiedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	g4_music_list_real_save_if_modified_co (_data_);
}

static gboolean
g4_music_list_real_save_if_modified_co (G4MusicListSaveIfModifiedData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->self->_modified) {
		_data_->_tmp1_ = _data_->self->priv->_music_node;
		_data_->_tmp0_ = G4_IS_PLAYLIST (_data_->_tmp1_);
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		_data_->_tmp2_ = g4_music_list_get_as_playlist (_data_->self);
		_data_->playlist = _data_->_tmp2_;
		if (!_data_->prompt) {
			_data_->_tmp3_ = TRUE;
		} else {
			_data_->_tmp4_ = gtk_widget_get_root ((GtkWidget*) _data_->self);
			_data_->_tmp5_ = _data_->_tmp4_;
			_data_->_state_ = 1;
			g4_show_alert_dialog (_ ("Playlist is modified, save it?"), G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp5_, gtk_window_get_type ()) ? ((GtkWindow*) _data_->_tmp5_) : NULL, g4_music_list_save_if_modified_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp3_ = g4_show_alert_dialog_finish (_data_->_res_);
		}
		_data_->ret = _data_->_tmp3_;
		if (_data_->ret) {
			_data_->_tmp6_ = _data_->self->_app;
			_data_->_tmp7_ = _data_->playlist;
			_data_->_state_ = 2;
			g4_application_add_playlist_to_file_async (_data_->_tmp6_, _data_->_tmp7_, FALSE, g4_music_list_save_if_modified_ready, _data_);
			return FALSE;
			_state_2:
			_data_->ret = g4_application_add_playlist_to_file_finish (_data_->_tmp6_, _data_->_res_);
			if (_data_->ret) {
				g4_music_list_set_modified (_data_->self, FALSE);
			}
			if (_data_->ret) {
				_data_->_tmp8_ = G4_RESULT_OK;
			} else {
				_data_->_tmp8_ = G4_RESULT_FAILED;
			}
			_data_->result = _data_->_tmp8_;
			_g_object_unref0 (_data_->playlist);
			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;
		}
		g4_music_list_update_store (_data_->self);
		g4_music_list_set_modified (_data_->self, FALSE);
		_g_object_unref0 (_data_->playlist);
	}
	if (_data_->self->_modified) {
		_data_->_tmp9_ = G4_RESULT_CANCEL;
	} else {
		_data_->_tmp9_ = G4_RESULT_OK;
	}
	_data_->result = _data_->_tmp9_;
	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;
}

void
g4_music_list_save_if_modified (G4MusicList* self,
                                gboolean prompt,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_)
{
	G4MusicListClass* _klass_;
	_klass_ = G4_MUSIC_LIST_GET_CLASS (self);
	if (_klass_->save_if_modified) {
		_klass_->save_if_modified (self, prompt, _callback_, _user_data_);
	}
}

G4Result
g4_music_list_save_if_modified_finish (G4MusicList* self,
                                       GAsyncResult* _res_)
{
	G4MusicListClass* _klass_;
	_klass_ = G4_MUSIC_LIST_GET_CLASS (self);
	if (_klass_->save_if_modified_finish) {
		return _klass_->save_if_modified_finish (self, _res_);
	}
	return 0;
}

static void
_gtk_adjustment_set_value_adw_animation_target_func (gdouble value,
                                                     gpointer self)
{
	gtk_adjustment_set_value ((GtkAdjustment*) self, value);
}

void
g4_music_list_scroll_to_item (G4MusicList* self,
                              gint index,
                              gboolean smoothly)
{
	GtkAdjustment* adj = NULL;
	GtkScrolledWindow* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	gint list_height = 0;
	GtkGridView* _tmp4_;
	gboolean scroll_done = FALSE;
	GtkGridView* _tmp5_;
	guint _tmp6_;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_scroll_view;
	_tmp1_ = gtk_scrolled_window_get_vadjustment (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	adj = _tmp3_;
	_tmp4_ = self->priv->_grid_view;
	list_height = gtk_widget_get_height ((GtkWidget*) _tmp4_);
	scroll_done = FALSE;
	_tmp5_ = self->priv->_grid_view;
	_tmp6_ = g4_get_grid_view_item_size (_tmp5_, &self->priv->_item_size, &self->priv->_cell_size);
	self->priv->_columns = _tmp6_;
	if (smoothly) {
		_tmp9_ = self->priv->_columns > ((guint) 0);
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		graphene_size_t _tmp10_;
		_tmp10_ = self->priv->_cell_size;
		_tmp8_ = _tmp10_.height > ((gfloat) 0);
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		GtkAdjustment* _tmp11_;
		gdouble _tmp12_;
		gdouble _tmp13_;
		GtkAdjustment* _tmp14_;
		gdouble _tmp15_;
		gdouble _tmp16_;
		_tmp11_ = adj;
		_tmp12_ = gtk_adjustment_get_upper (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = adj;
		_tmp15_ = gtk_adjustment_get_lower (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp7_ = (_tmp13_ - _tmp16_) > ((gdouble) list_height);
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		gdouble from = 0.0;
		GtkAdjustment* _tmp17_;
		gdouble _tmp18_;
		gdouble _tmp19_;
		guint row = 0U;
		gdouble max_to = 0.0;
		graphene_size_t _tmp20_;
		gdouble min_to = 0.0;
		graphene_size_t _tmp21_;
		gdouble _tmp22_ = 0.0;
		gdouble scroll_to = 0.0;
		_tmp17_ = adj;
		_tmp18_ = gtk_adjustment_get_value (_tmp17_);
		_tmp19_ = _tmp18_;
		from = _tmp19_;
		row = index / self->priv->_columns;
		_tmp20_ = self->priv->_cell_size;
		max_to = MAX ((gdouble) (((row + 1) * _tmp20_.height) - list_height), (gdouble) 0);
		_tmp21_ = self->priv->_cell_size;
		min_to = MAX ((gdouble) (row * _tmp21_.height), (gdouble) 0);
		if (from < max_to) {
			_tmp22_ = max_to;
		} else {
			gdouble _tmp23_ = 0.0;
			if (from > min_to) {
				_tmp23_ = min_to;
			} else {
				_tmp23_ = from;
			}
			_tmp22_ = _tmp23_;
		}
		scroll_to = _tmp22_;
		if (fabs (scroll_to - from) < ((gdouble) list_height)) {
			AdwCallbackAnimationTarget* target = NULL;
			GtkAdjustment* _tmp24_;
			AdwCallbackAnimationTarget* _tmp25_;
			AdwAnimation* _tmp26_ = NULL;
			AdwAnimation* _tmp27_;
			GtkScrolledWindow* _tmp28_;
			GtkAdjustment* _tmp29_;
			gdouble _tmp30_;
			gdouble _tmp31_;
			AdwCallbackAnimationTarget* _tmp32_;
			AdwAnimationTarget* _tmp33_;
			AdwTimedAnimation* _tmp34_;
			AdwAnimation* _tmp35_ = NULL;
			AdwAnimation* _tmp36_;
			_tmp24_ = adj;
			_tmp25_ = (AdwCallbackAnimationTarget*) adw_callback_animation_target_new (_gtk_adjustment_set_value_adw_animation_target_func, g_object_ref (_tmp24_), g_object_unref);
			target = _tmp25_;
			_tmp27_ = self->priv->_scroll_animation;
			_tmp26_ = _tmp27_;
			if (_tmp26_ != NULL) {
				adw_animation_pause (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, adw_animation_get_type (), AdwAnimation));
			}
			_tmp28_ = self->priv->_scroll_view;
			_tmp29_ = adj;
			_tmp30_ = gtk_adjustment_get_value (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = target;
			_tmp33_ = _g_object_ref0 ((AdwAnimationTarget*) _tmp32_);
			_tmp34_ = (AdwTimedAnimation*) adw_timed_animation_new ((GtkWidget*) _tmp28_, _tmp31_, scroll_to, (guint) 500, _tmp33_);
			_g_object_unref0 (self->priv->_scroll_animation);
			self->priv->_scroll_animation = (AdwAnimation*) _tmp34_;
			_tmp36_ = self->priv->_scroll_animation;
			_tmp35_ = _tmp36_;
			if (_tmp35_ != NULL) {
				adw_animation_play (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, adw_animation_get_type (), AdwAnimation));
			}
			scroll_done = TRUE;
			_g_object_unref0 (target);
		}
	}
	if (!scroll_done) {
		g4_music_list_scroll_to_directly (self, (guint) index);
	}
	self->priv->_scrolling_item = index;
	_g_object_unref0 (adj);
}

void
g4_music_list_scroll_to_directly (G4MusicList* self,
                                  guint index)
{
	GtkGridView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_grid_view;
	gtk_grid_view_scroll_to (_tmp0_, index, GTK_LIST_SCROLL_NONE, 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;
}

static void
g4_music_list_real_snapshot (GtkWidget* base,
                             GtkSnapshot* snapshot)
{
	G4MusicList * self;
	GtkRevealer* _tmp0_ = NULL;
	GtkRevealer* _tmp1_;
	gboolean* _tmp2_ = NULL;
	gboolean* _tmp6_ = NULL;
	gboolean* _tmp7_;
	graphene_rect_t rc_grid = {0};
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	self = (G4MusicList*) base;
	g_return_if_fail (snapshot != NULL);
	_tmp1_ = self->priv->_header_revealer;
	_tmp0_ = _tmp1_;
	_tmp2_ = NULL;
	if (_tmp0_ != NULL) {
		gboolean _tmp3_;
		gboolean _tmp4_;
		gboolean* _tmp5_;
		_tmp3_ = gtk_revealer_get_reveal_child (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_revealer_get_type (), GtkRevealer));
		_tmp4_ = _tmp3_;
		_tmp5_ = __bool_dup0 (&_tmp4_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp5_;
	}
	_tmp7_ = __bool_dup0 (_tmp2_);
	_tmp6_ = _tmp7_;
	if (_tmp6_ == NULL) {
		gboolean _tmp8_;
		gboolean* _tmp9_;
		_tmp8_ = FALSE;
		_tmp9_ = __bool_dup0 (&_tmp8_);
		_g_free0 (_tmp6_);
		_tmp6_ = _tmp9_;
	}
	if ((gboolean) (*_tmp6_)) {
		GtkRevealer* child = NULL;
		GtkRevealer* _tmp10_;
		GtkRevealer* _tmp11_;
		graphene_rect_t rect = {0};
		GtkRevealer* _tmp12_;
		graphene_rect_t _tmp13_ = {0};
		graphene_rect_t _tmp14_;
		_tmp10_ = self->priv->_header_revealer;
		_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_revealer_get_type (), GtkRevealer));
		child = _tmp11_;
		memset (&rect, 0, sizeof (graphene_rect_t));
		_tmp12_ = child;
		gtk_widget_compute_bounds ((GtkWidget*) _tmp12_, (GtkWidget*) self, &_tmp13_);
		rect = _tmp13_;
		_tmp14_ = rect;
		g4_draw_outset_shadow (snapshot, &_tmp14_, (gfloat) 5);
		_g_object_unref0 (child);
	}
	memset (&rc_grid, 0, sizeof (graphene_rect_t));
	if (self->priv->_editable) {
		_tmp17_ = self->priv->_columns > ((guint) 0);
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		_tmp16_ = self->priv->_dropping_item >= 0;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		GtkGridView* _tmp18_;
		graphene_rect_t _tmp19_ = {0};
		gboolean _tmp20_;
		_tmp18_ = self->priv->_grid_view;
		_tmp20_ = gtk_widget_compute_bounds ((GtkWidget*) _tmp18_, (GtkWidget*) self, &_tmp19_);
		rc_grid = _tmp19_;
		_tmp15_ = _tmp20_;
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		guint row = 0U;
		guint col = 0U;
		graphene_rect_t rc_cell = {0};
		graphene_size_t _tmp21_;
		graphene_size_t _tmp22_;
		graphene_size_t _tmp23_;
		graphene_size_t _tmp24_;
		graphene_rect_t _tmp25_;
		graphene_point_t _tmp26_;
		graphene_rect_t _tmp27_;
		graphene_point_t _tmp28_;
		GtkScrolledWindow* _tmp29_;
		GtkAdjustment* _tmp30_;
		GtkAdjustment* _tmp31_;
		gdouble _tmp32_;
		gdouble _tmp33_;
		graphene_size_t _tmp34_;
		graphene_size_t _tmp35_;
		GdkRGBA color = {0};
		AdwStyleManager* _tmp36_;
		AdwAccentColor _tmp37_;
		AdwAccentColor _tmp38_;
		GdkRGBA _tmp39_ = {0};
		GdkRGBA _tmp40_;
		graphene_rect_t _tmp41_;
		row = self->priv->_dropping_item / self->priv->_columns;
		col = self->priv->_dropping_item - (self->priv->_columns * row);
		memset (&rc_cell, 0, sizeof (graphene_rect_t));
		_tmp21_ = self->priv->_cell_size;
		_tmp22_ = self->priv->_cell_size;
		_tmp23_ = self->priv->_cell_size;
		_tmp24_ = self->priv->_cell_size;
		graphene_rect_init (&rc_cell, _tmp21_.width * col, _tmp22_.height * row, _tmp23_.width, _tmp24_.height);
		_tmp25_ = rc_grid;
		_tmp26_ = _tmp25_.origin;
		_tmp27_ = rc_grid;
		_tmp28_ = _tmp27_.origin;
		graphene_rect_offset (&rc_cell, _tmp26_.x, _tmp28_.y);
		_tmp29_ = self->priv->_scroll_view;
		_tmp30_ = gtk_scrolled_window_get_vadjustment (_tmp29_);
		_tmp31_ = _tmp30_;
		_tmp32_ = gtk_adjustment_get_value (_tmp31_);
		_tmp33_ = _tmp32_;
		_tmp34_ = self->priv->_cell_size;
		_tmp35_ = self->priv->_item_size;
		rc_cell.origin.y = rc_cell.origin.y - (((gfloat) _tmp33_) - (_tmp34_.height - _tmp35_.height));
		rc_cell.size.height = (gfloat) 1;
		_tmp36_ = adw_style_manager_get_default ();
		_tmp37_ = adw_style_manager_get_accent_color (_tmp36_);
		_tmp38_ = _tmp37_;
		adw_accent_color_to_rgba (_tmp38_, &_tmp39_);
		color = _tmp39_;
		_tmp40_ = color;
		_tmp41_ = rc_cell;
		gtk_snapshot_append_color (snapshot, &_tmp40_, &_tmp41_);
	}
	GTK_WIDGET_CLASS (g4_music_list_parent_class)->snapshot ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_box_get_type (), GtkBox), snapshot);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp2_);
}

void
g4_music_list_set_empty_text (G4MusicList* self,
                              const gchar* text)
{
	gboolean _tmp0_ = FALSE;
	GListStore* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_data_store;
	if (g_list_model_get_n_items ((GListModel*) _tmp1_) > ((guint) 0)) {
		GtkLabel* _tmp2_;
		_tmp2_ = self->priv->_empty_label;
		_tmp0_ = _tmp2_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkLabel* _tmp3_;
		_tmp3_ = self->priv->_empty_label;
		gtk_box_remove ((GtkBox*) self, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_label_get_type (), GtkLabel));
		_g_object_unref0 (self->priv->_empty_label);
		self->priv->_empty_label = NULL;
	} else {
		gboolean _tmp4_ = FALSE;
		GListStore* _tmp5_;
		_tmp5_ = self->priv->_data_store;
		if (g_list_model_get_n_items ((GListModel*) _tmp5_) == ((guint) 0)) {
			GtkLabel* _tmp6_;
			_tmp6_ = self->priv->_empty_label;
			_tmp4_ = _tmp6_ == NULL;
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			GtkLabel* _tmp7_;
			GtkLabel* _tmp8_;
			GtkLabel* _tmp9_;
			_tmp7_ = (GtkLabel*) gtk_label_new (text);
			g_object_ref_sink (_tmp7_);
			_g_object_unref0 (self->priv->_empty_label);
			self->priv->_empty_label = _tmp7_;
			_tmp8_ = self->priv->_empty_label;
			gtk_widget_set_margin_top ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_label_get_type (), GtkLabel), 8);
			_tmp9_ = self->priv->_empty_label;
			gtk_box_prepend ((GtkBox*) self, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_label_get_type (), GtkLabel));
		}
	}
}

gint
g4_music_list_set_to_current_item (G4MusicList* self,
                                   gboolean scroll)
{
	gint item = 0;
	GtkFilterListModel* _tmp0_;
	G4Music* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = self->priv->_filter_model;
	_tmp1_ = self->priv->_current_node;
	item = g4_find_item_in_model ((GListModel*) _tmp0_, (GObject*) _tmp1_, 0);
	if (item != -1) {
		_tmp2_ = scroll;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		g4_music_list_scroll_to_item (self, item, TRUE);
	}
	result = item;
	return result;
}

void
g4_music_list_update_item_cover (G4MusicList* self,
                                 G4Music* music,
                                 GdkPaintable* paintable)
{
	GtkListItem* item = NULL;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_;
	GtkListItem* _tmp2_;
	GtkListItem* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (music != NULL);
	g_return_if_fail (paintable != NULL);
	_tmp0_ = self->priv->_binding_items;
	_tmp1_ = g_hash_table_lookup (_tmp0_, music);
	_tmp2_ = _g_object_ref0 ((GtkListItem*) _tmp1_);
	item = _tmp2_;
	_tmp3_ = item;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gtk_list_item_get_type ())) {
		GtkListItem* _tmp4_;
		GtkListItem* _tmp5_;
		G4MusicWidget* widget = NULL;
		GtkListItem* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		G4MusicWidget* _tmp9_;
		G4MusicWidget* _tmp10_;
		_tmp4_ = item;
		g_signal_emit (self, g4_music_list_signals[G4_MUSIC_LIST_ITEM_UNBINDED_SIGNAL], 0, _tmp4_);
		_tmp5_ = item;
		g_signal_emit (self, g4_music_list_signals[G4_MUSIC_LIST_ITEM_BINDED_SIGNAL], 0, _tmp5_);
		_tmp6_ = item;
		_tmp7_ = gtk_list_item_get_child (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = _g_object_ref0 (G4_IS_MUSIC_WIDGET (_tmp8_) ? ((G4MusicWidget*) _tmp8_) : NULL);
		widget = _tmp9_;
		_tmp10_ = widget;
		if (_tmp10_ != NULL) {
			G4MusicWidget* _tmp11_;
			_tmp11_ = widget;
			g4_music_widget_set_paintable (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget), paintable);
		}
		_g_object_unref0 (widget);
	}
	_g_object_unref0 (item);
}

guint
g4_music_list_update_store (G4MusicList* self)
{
	G4Music* _tmp0_;
	GListStore* _tmp9_;
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->_music_node;
	if (G4_IS_PLAYLIST (_tmp0_)) {
		G4Music* _tmp1_;
		GListStore* _tmp2_;
		_tmp1_ = self->priv->_music_node;
		_tmp2_ = self->priv->_data_store;
		g4_album_overwrite_to ((G4Album*) G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_PLAYLIST, G4Playlist), _tmp2_);
	} else {
		G4Music* _tmp3_;
		_tmp3_ = self->priv->_music_node;
		if (G4_IS_ALBUM (_tmp3_)) {
			G4Music* _tmp4_;
			GListStore* _tmp5_;
			_tmp4_ = self->priv->_music_node;
			_tmp5_ = self->priv->_data_store;
			g4_album_overwrite_to (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, G4_TYPE_ALBUM, G4Album), _tmp5_);
		} else {
			G4Music* _tmp6_;
			_tmp6_ = self->priv->_music_node;
			if (G4_IS_ARTIST (_tmp6_)) {
				G4Music* _tmp7_;
				GListStore* _tmp8_;
				_tmp7_ = self->priv->_music_node;
				_tmp8_ = self->priv->_data_store;
				g4_artist_overwrite_store (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, G4_TYPE_ARTIST, G4Artist), _tmp8_);
			}
		}
	}
	_tmp9_ = self->priv->_data_store;
	result = g_list_model_get_n_items ((GListModel*) _tmp9_);
	return result;
}

static GMenu*
g4_music_list_on_create_music_menu (G4MusicList* self,
                                    G4Music* node)
{
	gint position = 0;
	gboolean _tmp0_ = FALSE;
	GtkMultiSelection* _tmp3_;
	GtkBitset* _tmp4_;
	GtkBitset* _tmp5_;
	gboolean _tmp6_;
	GMenu* result;
	g_return_val_if_fail (self != NULL, NULL);
	position = -1;
	if (self->priv->_multi_selection) {
		GtkFilterListModel* _tmp1_;
		_tmp1_ = self->priv->_filter_model;
		position = g4_find_item_in_model ((GListModel*) _tmp1_, (GObject*) node, 0);
		_tmp0_ = position != -1;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkMultiSelection* _tmp2_;
		_tmp2_ = self->priv->_selection;
		gtk_selection_model_select_item ((GtkSelectionModel*) _tmp2_, (guint) position, FALSE);
	}
	_tmp3_ = self->priv->_selection;
	_tmp4_ = gtk_selection_model_get_selection ((GtkSelectionModel*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gtk_bitset_get_size (_tmp5_) > ((guint64) 1);
	_gtk_bitset_unref0 (_tmp5_);
	if (_tmp6_) {
		gchar* action = NULL;
		gchar* _tmp7_;
		GMenu* menu = NULL;
		GMenu* _tmp8_;
		GMenu* _tmp9_;
		const gchar* _tmp10_;
		GMenuItem* _tmp11_;
		GMenuItem* _tmp12_;
		GMenu* _tmp17_;
		const gchar* _tmp18_;
		GMenuItem* _tmp19_;
		GMenuItem* _tmp20_;
		GMenu* _tmp21_;
		const gchar* _tmp22_;
		GMenuItem* _tmp23_;
		GMenuItem* _tmp24_;
		_tmp7_ = g_strdup (G4_ACTION_WIN G4_ACTION_BUTTON);
		action = _tmp7_;
		_tmp8_ = g_menu_new ();
		menu = _tmp8_;
		_tmp9_ = menu;
		_tmp10_ = action;
		_tmp11_ = g4_create_menu_item_for_button (G4_BUTTON_INSERT, _ ("Play at _Next"), _tmp10_);
		_tmp12_ = _tmp11_;
		g_menu_append_item (_tmp9_, _tmp12_);
		_g_object_unref0 (_tmp12_);
		if (self->_has_add_to_queque) {
			GMenu* _tmp13_;
			const gchar* _tmp14_;
			GMenuItem* _tmp15_;
			GMenuItem* _tmp16_;
			_tmp13_ = menu;
			_tmp14_ = action;
			_tmp15_ = g4_create_menu_item_for_button (G4_BUTTON_QUEUE, _ ("Add to _Queue"), _tmp14_);
			_tmp16_ = _tmp15_;
			g_menu_append_item (_tmp13_, _tmp16_);
			_g_object_unref0 (_tmp16_);
		}
		_tmp17_ = menu;
		_tmp18_ = action;
		_tmp19_ = g4_create_menu_item_for_button (G4_BUTTON_ADDTO, _ ("Add to _Playlist…"), _tmp18_);
		_tmp20_ = _tmp19_;
		g_menu_append_item (_tmp17_, _tmp20_);
		_g_object_unref0 (_tmp20_);
		_tmp21_ = menu;
		_tmp22_ = action;
		_tmp23_ = g4_create_menu_item_for_button (G4_BUTTON_REMOVE, _ ("_Remove"), _tmp22_);
		_tmp24_ = _tmp23_;
		g_menu_append_item (_tmp21_, _tmp24_);
		_g_object_unref0 (_tmp24_);
		result = menu;
		_g_free0 (action);
		return result;
	} else {
		if (G4_IS_ALBUM (node)) {
			GMenu* _tmp25_;
			_tmp25_ = g4_create_menu_for_album (G_TYPE_CHECK_INSTANCE_CAST (node, G4_TYPE_ALBUM, G4Album));
			result = _tmp25_;
			return result;
		} else {
			if (G4_IS_ARTIST (node)) {
				GMenu* _tmp26_;
				_tmp26_ = g4_create_menu_for_artist (G_TYPE_CHECK_INSTANCE_CAST (node, G4_TYPE_ARTIST, G4Artist));
				result = _tmp26_;
				return result;
			} else {
				if (G4_IS_MUSIC (node)) {
					G4Music* music = NULL;
					G4Music* _tmp27_;
					const gchar* uri = NULL;
					G4Music* _tmp28_;
					const gchar* _tmp29_;
					GMenu* menu = NULL;
					G4Music* _tmp30_;
					G4Application* _tmp31_;
					G4Thumbnailer* _tmp32_;
					G4Thumbnailer* _tmp33_;
					G4Music* _tmp34_;
					GdkPaintable* _tmp35_;
					GdkPaintable* _tmp36_;
					GMenu* _tmp37_;
					GMenu* _tmp38_;
					G4Music* _tmp39_;
					G4Application* _tmp40_;
					G4Music* _tmp41_;
					G4Music* _tmp42_;
					_tmp27_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (node, G4_TYPE_MUSIC, G4Music));
					music = _tmp27_;
					_tmp28_ = music;
					_tmp29_ = _tmp28_->uri;
					uri = _tmp29_;
					_tmp30_ = music;
					_tmp31_ = self->_app;
					_tmp32_ = g4_application_get_thumbnailer (_tmp31_);
					_tmp33_ = _tmp32_;
					_tmp34_ = music;
					_tmp35_ = g4_thumbnailer_find (_tmp33_, _tmp34_, G4_THUMBNAILER_ICON_SIZE);
					_tmp36_ = _tmp35_;
					_tmp37_ = g4_create_menu_for_music (_tmp30_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp36_, gdk_texture_get_type ()));
					_tmp38_ = _tmp37_;
					_g_object_unref0 (_tmp36_);
					menu = _tmp38_;
					_tmp39_ = music;
					_tmp40_ = self->_app;
					_tmp41_ = g4_application_get_current_music (_tmp40_);
					_tmp42_ = _tmp41_;
					if (_tmp39_ != _tmp42_) {
						GMenu* _tmp43_;
						const gchar* _tmp44_;
						GMenuItem* _tmp45_;
						GMenuItem* _tmp46_;
						_tmp43_ = menu;
						_tmp44_ = uri;
						_tmp45_ = g4_create_menu_item_for_uri (_tmp44_, _ ("Play at _Next"), G4_ACTION_APP G4_ACTION_PLAY_AT_NEXT);
						_tmp46_ = _tmp45_;
						g_menu_insert_item (_tmp43_, 0, _tmp46_);
						_g_object_unref0 (_tmp46_);
						if (self->_has_add_to_queque) {
							GMenu* _tmp47_;
							const gchar* _tmp48_;
							GMenuItem* _tmp49_;
							GMenuItem* _tmp50_;
							_tmp47_ = menu;
							_tmp48_ = uri;
							_tmp49_ = g4_create_menu_item_for_uri (_tmp48_, _ ("Add to _Queue"), G4_ACTION_APP G4_ACTION_ADD_TO_QUEUE);
							_tmp50_ = _tmp49_;
							g_menu_insert_item (_tmp47_, 1, _tmp50_);
							_g_object_unref0 (_tmp50_);
						}
					}
					if (self->priv->_editable) {
						GMenu* section = NULL;
						GMenu* _tmp51_;
						GMenu* _tmp52_;
						const gchar* _tmp53_;
						GMenuItem* _tmp54_;
						GMenuItem* _tmp55_;
						GMenu* _tmp56_;
						const gchar* _tmp57_;
						GMenuItem* _tmp58_;
						GMenuItem* _tmp59_;
						GMenu* _tmp60_;
						GMenu* _tmp61_;
						_tmp51_ = g_menu_new ();
						section = _tmp51_;
						_tmp52_ = section;
						_tmp53_ = uri;
						_tmp54_ = g4_create_menu_item_for_uri (_tmp53_, _ ("_Remove"), G4_ACTION_WIN G4_ACTION_REMOVE);
						_tmp55_ = _tmp54_;
						g_menu_append_item (_tmp52_, _tmp55_);
						_g_object_unref0 (_tmp55_);
						_tmp56_ = section;
						_tmp57_ = uri;
						_tmp58_ = g4_create_menu_item_for_uri (_tmp57_, _ ("_Move to Trash"), G4_ACTION_APP G4_ACTION_TRASH_FILE);
						_tmp59_ = _tmp58_;
						g_menu_append_item (_tmp56_, _tmp59_);
						_g_object_unref0 (_tmp59_);
						_tmp60_ = menu;
						_tmp61_ = section;
						g_menu_append_section (_tmp60_, NULL, (GMenuModel*) _tmp61_);
						_g_object_unref0 (section);
					}
					result = menu;
					_g_object_unref0 (music);
					return result;
				}
			}
		}
	}
	result = NULL;
	return result;
}

static GMenu*
_g4_music_list_on_create_music_menu_g4_music_widget_create_music_menu (G4MusicWidget* _sender,
                                                                       G4Music* node,
                                                                       gpointer self)
{
	GMenu* result;
	result = g4_music_list_on_create_music_menu ((G4MusicList*) self, node);
	return result;
}

static void
_g4_music_widget_show_popover_menu_g4_pressed (GtkWidget* widget,
                                               gdouble x,
                                               gdouble y,
                                               gpointer self)
{
	g4_music_widget_show_popover_menu ((G4MusicWidget*) self, widget, x, y);
}

static void
___lambda94_ (G4MusicList* self,
              GtkWidget* widget,
              gdouble x,
              gdouble y)
{
	g_return_if_fail (widget != NULL);
	g4_music_list_set_multi_selection (self, TRUE);
}

static void
____lambda94__g4_pressed (GtkWidget* widget,
                          gdouble x,
                          gdouble y,
                          gpointer self)
{
	___lambda94_ ((G4MusicList*) self, widget, x, y);
}

static void
g4_music_list_on_create_item (G4MusicList* self,
                              GObject* obj)
{
	G4MusicWidget* _tmp0_ = NULL;
	G4MusicWidget* child = NULL;
	G4MusicWidget* _tmp3_;
	GtkListItem* item = NULL;
	GtkListItem* _tmp4_;
	GtkListItem* _tmp5_;
	G4MusicWidget* _tmp6_;
	gboolean _tmp7_ = FALSE;
	GtkListItem* _tmp8_;
	GtkListItem* _tmp9_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	if (self->priv->_grid_mode) {
		G4MusicCell* _tmp1_;
		_tmp1_ = g4_music_cell_new ();
		g_object_ref_sink (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget));
		_g_object_unref0 (_tmp0_);
		_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget);
	} else {
		G4MusicEntry* _tmp2_;
		_tmp2_ = g4_music_entry_new (self->priv->_compact_list);
		g_object_ref_sink (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget));
		_g_object_unref0 (_tmp0_);
		_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget);
	}
	_tmp3_ = _tmp0_;
	_tmp0_ = NULL;
	child = _tmp3_;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_list_item_get_type (), GtkListItem));
	item = _tmp4_;
	_tmp5_ = item;
	_tmp6_ = child;
	gtk_list_item_set_child (_tmp5_, (GtkWidget*) _tmp6_);
	if (self->priv->_multi_selection) {
		_tmp7_ = TRUE;
	} else {
		_tmp7_ = !self->priv->_single_click_activate;
	}
	_tmp8_ = item;
	gtk_list_item_set_selectable (_tmp8_, _tmp7_);
	_tmp9_ = item;
	g_signal_emit (self, g4_music_list_signals[G4_MUSIC_LIST_ITEM_CREATED_SIGNAL], 0, _tmp9_);
	if (self->priv->_selectable) {
		G4MusicWidget* _tmp10_;
		GtkImage* _tmp11_;
		GtkImage* _tmp12_;
		GtkListItem* _tmp13_;
		G4MusicWidget* _tmp14_;
		G4MusicWidget* _tmp15_;
		G4MusicWidget* _tmp16_;
		GtkGestureClick* _tmp17_;
		GtkGestureClick* _tmp18_;
		G4MusicWidget* _tmp19_;
		GtkGestureLongPress* _tmp20_;
		GtkGestureLongPress* _tmp21_;
		_tmp10_ = child;
		_tmp11_ = g4_music_widget_get_image (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = item;
		g4_music_list_create_drag_source ((GtkWidget*) _tmp12_, _tmp13_);
		_tmp14_ = child;
		g_signal_connect_object (_tmp14_, "create-music-menu", (GCallback) _g4_music_list_on_create_music_menu_g4_music_widget_create_music_menu, self, 0);
		_tmp15_ = child;
		_tmp16_ = child;
		_tmp17_ = g4_make_right_clickable ((GtkWidget*) _tmp15_, _g4_music_widget_show_popover_menu_g4_pressed, _tmp16_);
		_tmp18_ = _tmp17_;
		_g_object_unref0 (_tmp18_);
		_tmp19_ = child;
		_tmp20_ = g4_make_long_pressable ((GtkWidget*) _tmp19_, ____lambda94__g4_pressed, self);
		_tmp21_ = _tmp20_;
		_g_object_unref0 (_tmp21_);
	}
	_g_object_unref0 (item);
	_g_object_unref0 (child);
	_g_object_unref0 (_tmp0_);
}

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

static void
block20_data_unref (void * _userdata_)
{
	Block20Data* _data20_;
	_data20_ = (Block20Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data20_->_ref_count_)) {
		G4MusicList* self;
		self = _data20_->self;
		_g_object_unref0 (_data20_->music);
		_g_object_unref0 (_data20_->child);
		_g_object_unref0 (_data20_->item);
		_g_object_unref0 (self);
		g_slice_free (Block20Data, _data20_);
	}
}

static void
__lambda96_ (Block20Data* _data20_,
             GObject* obj,
             GAsyncResult* res)
{
	G4MusicList* self;
	GdkPaintable* paintable2 = NULL;
	G4Thumbnailer* _tmp0_;
	GdkPaintable* _tmp1_;
	G4Music* _tmp2_;
	GtkListItem* _tmp3_;
	GObject* _tmp4_;
	GObject* _tmp5_;
	self = _data20_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_thmbnailer;
	_tmp1_ = g4_thumbnailer_load_finish (_tmp0_, res);
	paintable2 = _tmp1_;
	_tmp2_ = _data20_->music;
	_tmp3_ = _data20_->item;
	_tmp4_ = gtk_list_item_get_item (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp2_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, G4_TYPE_MUSIC, G4Music)) {
		G4MusicWidget* _tmp6_;
		GdkPaintable* _tmp7_;
		_tmp6_ = _data20_->child;
		_tmp7_ = paintable2;
		g4_music_widget_set_paintable (_tmp6_, _tmp7_);
	}
	_g_object_unref0 (paintable2);
}

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

static void
___lambda95_ (Block20Data* _data20_)
{
	G4MusicList* self;
	G4MusicWidget* _tmp0_;
	G4Thumbnailer* _tmp1_;
	G4Music* _tmp2_;
	self = _data20_->self;
	_tmp0_ = _data20_->child;
	g4_music_widget_disconnect_first_draw (_tmp0_);
	_tmp1_ = self->priv->_thmbnailer;
	_tmp2_ = _data20_->music;
	g4_thumbnailer_load_async (_tmp1_, _tmp2_, self->priv->_image_size, ___lambda96__gasync_ready_callback, block20_data_ref (_data20_));
	if (self->priv->_scrolling_item != -1) {
		g4_music_list_scroll_to_directly (self, (guint) self->priv->_scrolling_item);
		self->priv->_scrolling_item = -1;
	}
}

static void
____lambda95__g4_base_paintable_first_draw (G4BasePaintable* _sender,
                                            gpointer self)
{
	___lambda95_ (self);
}

static void
g4_music_list_on_bind_item (G4MusicList* self,
                            GObject* obj)
{
	Block20Data* _data20_;
	GtkListItem* _tmp0_;
	GtkListItem* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	G4MusicWidget* _tmp4_;
	GtkListItem* _tmp5_;
	GObject* _tmp6_;
	GObject* _tmp7_;
	G4Music* _tmp8_;
	G4MusicWidget* _tmp9_;
	GtkImage* _tmp10_;
	GtkImage* _tmp11_;
	G4Music* _tmp12_;
	G4Music* _tmp13_;
	GtkListItem* _tmp14_;
	GHashTable* _tmp15_;
	G4Music* _tmp16_;
	G4Music* _tmp17_;
	GtkListItem* _tmp18_;
	GtkListItem* _tmp19_;
	GdkPaintable* paintable = NULL;
	G4Thumbnailer* _tmp20_;
	G4Music* _tmp21_;
	GdkPaintable* _tmp22_;
	GdkPaintable* _tmp23_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	_data20_ = g_slice_new0 (Block20Data);
	_data20_->_ref_count_ = 1;
	_data20_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_list_item_get_type (), GtkListItem));
	_data20_->item = _tmp0_;
	_tmp1_ = _data20_->item;
	_tmp2_ = gtk_list_item_get_child (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget));
	_data20_->child = _tmp4_;
	_tmp5_ = _data20_->item;
	_tmp6_ = gtk_list_item_get_item (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, G4_TYPE_MUSIC, G4Music));
	_data20_->music = _tmp8_;
	_tmp9_ = _data20_->child;
	_tmp10_ = g4_music_widget_get_playing (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = _data20_->music;
	_tmp13_ = self->priv->_current_node;
	gtk_widget_set_visible ((GtkWidget*) _tmp11_, _tmp12_ == _tmp13_);
	_tmp14_ = _data20_->item;
	g_signal_emit (self, g4_music_list_signals[G4_MUSIC_LIST_ITEM_BINDED_SIGNAL], 0, _tmp14_);
	_tmp15_ = self->priv->_binding_items;
	_tmp16_ = _data20_->music;
	_tmp17_ = _g_object_ref0 (_tmp16_);
	_tmp18_ = _data20_->item;
	_tmp19_ = _g_object_ref0 (_tmp18_);
	g_hash_table_insert (_tmp15_, _tmp17_, _tmp19_);
	_tmp20_ = self->priv->_thmbnailer;
	_tmp21_ = _data20_->music;
	_tmp22_ = g4_thumbnailer_find (_tmp20_, _tmp21_, self->priv->_image_size);
	paintable = _tmp22_;
	_tmp23_ = paintable;
	if (_tmp23_ != NULL) {
		G4MusicWidget* _tmp24_;
		GdkPaintable* _tmp25_;
		_tmp24_ = _data20_->child;
		_tmp25_ = paintable;
		g4_music_widget_set_paintable (_tmp24_, _tmp25_);
	} else {
		G4MusicWidget* _tmp26_;
		G4MusicWidget* _tmp27_;
		G4RoundPaintable* _tmp28_;
		G4RoundPaintable* _tmp29_;
		gulong _tmp30_;
		_tmp26_ = _data20_->child;
		_tmp27_ = _data20_->child;
		_tmp28_ = g4_music_widget_get_cover (_tmp27_);
		_tmp29_ = _tmp28_;
		_tmp30_ = g_signal_connect_data ((G4BasePaintable*) _tmp29_, "first-draw", (GCallback) ____lambda95__g4_base_paintable_first_draw, block20_data_ref (_data20_), (GClosureNotify) block20_data_unref, 0);
		_tmp26_->first_draw_handler = _tmp30_;
	}
	_g_object_unref0 (paintable);
	block20_data_unref (_data20_);
	_data20_ = NULL;
}

static void
g4_music_list_on_unbind_item (G4MusicList* self,
                              GObject* obj)
{
	GtkListItem* item = NULL;
	GtkListItem* _tmp0_;
	G4MusicWidget* child = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	G4MusicWidget* _tmp3_;
	GHashTable* _tmp4_;
	GObject* _tmp5_;
	GObject* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_list_item_get_type (), GtkListItem));
	item = _tmp0_;
	_tmp1_ = gtk_list_item_get_child (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget));
	child = _tmp3_;
	g4_music_widget_set_paintable (child, NULL);
	g4_music_widget_disconnect_first_draw (child);
	g_signal_emit (self, g4_music_list_signals[G4_MUSIC_LIST_ITEM_UNBINDED_SIGNAL], 0, item);
	_tmp4_ = self->priv->_binding_items;
	_tmp5_ = gtk_list_item_get_item (item);
	_tmp6_ = _tmp5_;
	g_hash_table_remove (_tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, G4_TYPE_MUSIC, G4Music));
	_g_object_unref0 (child);
	_g_object_unref0 (item);
}

static void
g4_music_list_on_drag_begin (G4MusicList* self,
                             GtkDragSource* source,
                             GdkDrag* drag,
                             GtkWidget* widget,
                             graphene_point_t* point)
{
	guint64 size = 0ULL;
	GtkMultiSelection* _tmp0_;
	GtkBitset* _tmp1_;
	GtkBitset* _tmp2_;
	guint64 _tmp3_;
	gchar* _tmp4_ = NULL;
	gchar* title = NULL;
	gchar* _tmp7_;
	GdkPaintable* _tmp8_;
	GdkPaintable* _tmp9_;
	graphene_point_t _tmp10_;
	graphene_point_t _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (source != NULL);
	g_return_if_fail (drag != NULL);
	g_return_if_fail (widget != NULL);
	g_return_if_fail (point != NULL);
	_tmp0_ = self->priv->_selection;
	_tmp1_ = gtk_selection_model_get_selection ((GtkSelectionModel*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_bitset_get_size (_tmp2_);
	_gtk_bitset_unref0 (_tmp2_);
	size = _tmp3_;
	if (size > ((guint64) 1)) {
		gchar* _tmp5_;
		_tmp5_ = g_strdup_printf ("%" G_GUINT64_FORMAT, size);
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp5_;
	} else {
		gchar* _tmp6_;
		_tmp6_ = g_strdup ((const gchar*) NULL);
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp6_;
	}
	_tmp7_ = _tmp4_;
	_tmp4_ = NULL;
	title = _tmp7_;
	_tmp8_ = g4_create_widget_paintable (widget, point, title, 64);
	_tmp9_ = _tmp8_;
	_tmp10_ = *point;
	_tmp11_ = *point;
	gtk_drag_source_set_icon (source, _tmp9_, (gint) _tmp10_.x, (gint) _tmp11_.y);
	_g_object_unref0 (_tmp9_);
	_g_free0 (title);
	_g_free0 (_tmp4_);
}

static GdkContentProvider*
g4_music_list_on_drag_prepare (G4MusicList* self,
                               G4Music* music)
{
	gint position = 0;
	GtkFilterListModel* _tmp0_;
	G4Playlist* playlist = NULL;
	G4Playlist* _tmp2_;
	GdkContentProvider* _tmp3_;
	GdkContentProvider* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filter_model;
	position = g4_find_item_in_model ((GListModel*) _tmp0_, (GObject*) music, 0);
	if (position != -1) {
		GtkMultiSelection* _tmp1_;
		_tmp1_ = self->priv->_selection;
		gtk_selection_model_select_item ((GtkSelectionModel*) _tmp1_, (guint) position, FALSE);
	}
	_tmp2_ = g4_music_list_create_playlist_for_selection (self);
	playlist = _tmp2_;
	_tmp3_ = g4_create_content_provider (playlist);
	result = _tmp3_;
	_g_object_unref0 (playlist);
	return result;
}

static void
____lambda101_ (G4MusicList* self,
                GObject* obj,
                GAsyncResult* res)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	G4Application* _tmp2_;
	g_return_if_fail (res != NULL);
	_tmp0_ = g4_music_list_get_modified (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->_app;
	g4_music_list_set_modified (self, _tmp1_ | g4_application_open_files_finish (_tmp2_, res));
}

static void
_____lambda101__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	____lambda101_ ((G4MusicList*) self, source_object, res);
	g_object_unref (self);
}

static gboolean
g4_music_list_on_drop_done (G4MusicList* self,
                            GValue* value,
                            gdouble x,
                            gdouble y)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (value != NULL, FALSE);
	if (self->priv->_editable) {
		guint position = 0U;
		guint _tmp0_;
		guint _tmp1_;
		_tmp0_ = g4_music_list_get_visible_count (self);
		_tmp1_ = _tmp0_;
		position = MIN ((guint) self->priv->_dropping_item, _tmp1_);
		if (G_VALUE_HOLDS (value, G4_TYPE_PLAYLIST)) {
			GObject* dst_obj = NULL;
			GtkFilterListModel* _tmp2_;
			GObject* _tmp3_;
			gboolean _tmp4_ = FALSE;
			GObject* _tmp5_;
			G4Playlist* playlist = NULL;
			GObject* _tmp11_;
			G4Playlist* _tmp12_;
			gboolean _tmp13_;
			gboolean _tmp14_;
			GListStore* _tmp15_;
			G4Playlist* _tmp16_;
			GPtrArray* _tmp17_;
			gboolean _tmp18_;
			_tmp2_ = self->priv->_filter_model;
			_tmp3_ = g_list_model_get_item ((GListModel*) _tmp2_, position);
			dst_obj = _tmp3_;
			_tmp5_ = dst_obj;
			if (_tmp5_ == NULL) {
				_tmp4_ = TRUE;
			} else {
				GListStore* _tmp6_;
				GObject* _tmp7_;
				guint _tmp8_ = 0U;
				gboolean _tmp9_;
				_tmp6_ = self->priv->_data_store;
				_tmp7_ = dst_obj;
				_tmp9_ = g_list_store_find (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, G_TYPE_OBJECT, GObject), &_tmp8_);
				position = _tmp8_;
				_tmp4_ = !_tmp9_;
			}
			if (_tmp4_) {
				GListStore* _tmp10_;
				_tmp10_ = self->priv->_data_store;
				position = g_list_model_get_n_items ((GListModel*) _tmp10_);
			}
			_tmp11_ = g_value_get_object (value);
			_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, G4_TYPE_PLAYLIST, G4Playlist));
			playlist = _tmp12_;
			_tmp13_ = g4_music_list_get_modified (self);
			_tmp14_ = _tmp13_;
			_tmp15_ = self->priv->_data_store;
			_tmp16_ = playlist;
			_tmp17_ = _tmp16_->items;
			_tmp18_ = g4_merge_items_to_store (_tmp15_, _tmp17_, &position);
			g4_music_list_set_modified (self, _tmp14_ | _tmp18_);
			_g_object_unref0 (playlist);
			_g_object_unref0 (dst_obj);
		} else {
			GFile** files = NULL;
			GValue _tmp19_;
			gint _tmp20_ = 0;
			GFile** _tmp21_;
			gint files_length1;
			gint _files_size_;
			G4Application* _tmp22_;
			GFile** _tmp23_;
			gint _tmp23__length1;
			_tmp19_ = *value;
			_tmp21_ = g4_get_dropped_files (&_tmp19_, &_tmp20_);
			files = _tmp21_;
			files_length1 = _tmp20_;
			_files_size_ = files_length1;
			_tmp22_ = self->_app;
			_tmp23_ = files;
			_tmp23__length1 = files_length1;
			g4_application_open_files_async (_tmp22_, _tmp23_, (gint) _tmp23__length1, position, FALSE, _____lambda101__gasync_ready_callback, g_object_ref (self));
			files = (_vala_array_free (files, files_length1, (GDestroyNotify) g_object_unref), NULL);
		}
	}
	g4_music_list_set_dropping_item (self, -1);
	result = TRUE;
	return result;
}

static Block21Data*
block21_data_ref (Block21Data* _data21_)
{
	g_atomic_int_inc (&_data21_->_ref_count_);
	return _data21_;
}

static void
block21_data_unref (void * _userdata_)
{
	Block21Data* _data21_;
	_data21_ = (Block21Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data21_->_ref_count_)) {
		G4MusicList* self;
		self = _data21_->self;
		_g_object_unref0 (self);
		g_slice_free (Block21Data, _data21_);
	}
}

static void
___lambda98_ (Block21Data* _data21_)
{
	G4MusicList* self;
	self = _data21_->self;
	self->priv->_activate_handle = (guint) 0;
	if (self->priv->_dropping_item == _data21_->index) {
		GtkGridView* _tmp0_;
		_tmp0_ = self->priv->_grid_view;
		g_signal_emit_by_name (_tmp0_, "activate", (guint) _data21_->index);
	}
}

static void
____lambda98__g4_void_func (gpointer self)
{
	___lambda98_ (self);
}

static GdkDragAction
g4_music_list_on_drop_motion (G4MusicList* self,
                              gdouble x,
                              gdouble y)
{
	Block21Data* _data21_;
	GtkGridView* _tmp0_;
	guint _tmp1_;
	gint col = 0;
	graphene_size_t _tmp2_;
	gint row = 0;
	GtkScrolledWindow* _tmp3_;
	GtkAdjustment* _tmp4_;
	GtkAdjustment* _tmp5_;
	gdouble _tmp6_;
	gdouble _tmp7_;
	graphene_size_t _tmp8_;
	gboolean _tmp9_ = FALSE;
	guint _tmp13_;
	guint _tmp14_;
	GdkDragAction result;
	g_return_val_if_fail (self != NULL, 0U);
	_data21_ = g_slice_new0 (Block21Data);
	_data21_->_ref_count_ = 1;
	_data21_->self = g_object_ref (self);
	_tmp0_ = self->priv->_grid_view;
	_tmp1_ = g4_get_grid_view_item_size (_tmp0_, &self->priv->_item_size, &self->priv->_cell_size);
	self->priv->_columns = _tmp1_;
	_tmp2_ = self->priv->_cell_size;
	col = (gint) (x / _tmp2_.width);
	_tmp3_ = self->priv->_scroll_view;
	_tmp4_ = gtk_scrolled_window_get_vadjustment (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gtk_adjustment_get_value (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->_cell_size;
	row = (gint) ((y + _tmp7_) / _tmp8_.height);
	_data21_->index = (((gint) self->priv->_columns) * row) + col;
	if (self->priv->_dropping_item != _data21_->index) {
		GtkFilterListModel* _tmp10_;
		GObject* _tmp11_;
		GObject* _tmp12_;
		_tmp10_ = self->priv->_filter_model;
		_tmp11_ = g_list_model_get_item ((GListModel*) _tmp10_, (guint) _data21_->index);
		_tmp12_ = _tmp11_;
		_tmp9_ = G4_IS_PLAYLIST (_tmp12_);
		_g_object_unref0 (_tmp12_);
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		if (self->priv->_activate_handle != ((guint) 0)) {
			g_source_remove (self->priv->_activate_handle);
		}
		self->priv->_activate_handle = g4_run_timeout_once ((guint) 1000, ____lambda98__g4_void_func, block21_data_ref (_data21_), block21_data_unref);
	}
	_tmp13_ = g4_music_list_get_visible_count (self);
	_tmp14_ = _tmp13_;
	g4_music_list_set_dropping_item (self, MIN (_data21_->index, (gint) _tmp14_));
	result = GDK_ACTION_LINK;
	block21_data_unref (_data21_);
	_data21_ = NULL;
	return result;
}

static G4MusicWidget*
g4_music_list_get_binding_widget (G4MusicList* self,
                                  G4Music* music)
{
	GtkListItem* _tmp0_ = NULL;
	GtkListItem* item = NULL;
	GtkListItem* _tmp3_;
	GtkListItem* _tmp4_ = NULL;
	GtkListItem* _tmp5_;
	GtkWidget* _tmp6_ = NULL;
	G4MusicWidget* _tmp9_;
	G4MusicWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (music != NULL) {
		GHashTable* _tmp1_;
		gconstpointer _tmp2_;
		_tmp1_ = self->priv->_binding_items;
		_tmp2_ = g_hash_table_lookup (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (music, G4_TYPE_MUSIC, G4Music));
		_tmp0_ = (GtkListItem*) _tmp2_;
	} else {
		_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (NULL, gtk_list_item_get_type (), GtkListItem);
	}
	_tmp3_ = _g_object_ref0 (_tmp0_);
	item = _tmp3_;
	_tmp5_ = item;
	_tmp4_ = _tmp5_;
	_tmp6_ = NULL;
	if (_tmp4_ != NULL) {
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		_tmp7_ = gtk_list_item_get_child (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_list_item_get_type (), GtkListItem));
		_tmp8_ = _tmp7_;
		_tmp6_ = _tmp8_;
	}
	_tmp9_ = _g_object_ref0 (G4_IS_MUSIC_WIDGET (_tmp6_) ? ((G4MusicWidget*) _tmp6_) : NULL);
	result = _tmp9_;
	_g_object_unref0 (item);
	return result;
}

static Block22Data*
block22_data_ref (Block22Data* _data22_)
{
	g_atomic_int_inc (&_data22_->_ref_count_);
	return _data22_;
}

static void
block22_data_unref (void * _userdata_)
{
	Block22Data* _data22_;
	_data22_ = (Block22Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data22_->_ref_count_)) {
		_g_object_unref0 (_data22_->source);
		_g_object_unref0 (_data22_->widget);
		_g_object_unref0 (_data22_->item);
		g_slice_free (Block22Data, _data22_);
	}
}

static void
__lambda90_ (Block22Data* _data22_,
             GdkDrag* drag)
{
	GtkWidget* list = NULL;
	GtkWidget* _tmp0_;
	G4MusicList* _tmp1_ = NULL;
	GtkWidget* _tmp2_;
	g_return_if_fail (drag != NULL);
	_tmp0_ = g4_find_ancestry_with_type (_data22_->widget, G4_TYPE_MUSIC_LIST);
	list = _tmp0_;
	_tmp2_ = list;
	_tmp1_ = G4_IS_MUSIC_LIST (_tmp2_) ? ((G4MusicList*) _tmp2_) : NULL;
	if (_tmp1_ != NULL) {
		graphene_point_t _tmp3_;
		_tmp3_ = _data22_->point;
		g4_music_list_on_drag_begin (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_MUSIC_LIST, G4MusicList), _data22_->source, drag, _data22_->widget, &_tmp3_);
	}
	_g_object_unref0 (list);
}

static void
___lambda90__gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                         GdkDrag* drag,
                                         gpointer self)
{
	__lambda90_ (self, drag);
}

static GdkContentProvider*
__lambda91_ (Block22Data* _data22_,
             gdouble x,
             gdouble y)
{
	GtkWidget* list = NULL;
	GtkWidget* _tmp0_;
	G4MusicList* _tmp1_ = NULL;
	GtkWidget* _tmp2_;
	GdkContentProvider* _tmp3_ = NULL;
	GdkContentProvider* _tmp7_;
	GdkContentProvider* result;
	graphene_point_init (&_data22_->point, (gfloat) x, (gfloat) y);
	_tmp0_ = g4_find_ancestry_with_type (_data22_->widget, G4_TYPE_MUSIC_LIST);
	list = _tmp0_;
	_tmp2_ = list;
	_tmp1_ = G4_IS_MUSIC_LIST (_tmp2_) ? ((G4MusicList*) _tmp2_) : NULL;
	_tmp3_ = NULL;
	if (_tmp1_ != NULL) {
		GObject* _tmp4_;
		GObject* _tmp5_;
		GdkContentProvider* _tmp6_;
		_tmp4_ = gtk_list_item_get_item (_data22_->item);
		_tmp5_ = _tmp4_;
		_tmp6_ = g4_music_list_on_drag_prepare (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_MUSIC_LIST, G4MusicList), G4_IS_MUSIC (_tmp5_) ? ((G4Music*) _tmp5_) : NULL);
		_g_object_unref0 (_tmp3_);
		_tmp3_ = _tmp6_;
	}
	_tmp7_ = _tmp3_;
	_tmp3_ = NULL;
	result = _tmp7_;
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (list);
	return result;
}

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

static void
g4_music_list_create_drag_source (GtkWidget* widget,
                                  GtkListItem* item)
{
	Block22Data* _data22_;
	GtkWidget* _tmp0_;
	GtkListItem* _tmp1_;
	GtkDragSource* _tmp2_;
	GtkEventController* _tmp3_;
	g_return_if_fail (widget != NULL);
	g_return_if_fail (item != NULL);
	_data22_ = g_slice_new0 (Block22Data);
	_data22_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (widget);
	_g_object_unref0 (_data22_->widget);
	_data22_->widget = _tmp0_;
	_tmp1_ = _g_object_ref0 (item);
	_g_object_unref0 (_data22_->item);
	_data22_->item = _tmp1_;
	memset (&_data22_->point, 0, sizeof (graphene_point_t));
	_tmp2_ = gtk_drag_source_new ();
	_data22_->source = _tmp2_;
	gtk_drag_source_set_actions (_data22_->source, GDK_ACTION_LINK);
	g_signal_connect_data (_data22_->source, "drag-begin", (GCallback) ___lambda90__gtk_drag_source_drag_begin, block22_data_ref (_data22_), (GClosureNotify) block22_data_unref, 0);
	g_signal_connect_data (_data22_->source, "prepare", (GCallback) ___lambda91__gtk_drag_source_prepare, block22_data_ref (_data22_), (GClosureNotify) block22_data_unref, 0);
	_tmp3_ = _g_object_ref0 ((GtkEventController*) _data22_->source);
	gtk_widget_add_controller (_data22_->widget, _tmp3_);
	block22_data_unref (_data22_);
	_data22_ = NULL;
}

static gboolean
__lambda97_ (G4MusicList* self,
             GdkDrop* drop)
{
	gboolean _tmp0_ = FALSE;
	GdkContentFormats* _tmp1_;
	GdkContentFormats* _tmp2_;
	gboolean result;
	g_return_val_if_fail (drop != NULL, FALSE);
	_tmp1_ = gdk_drop_get_formats (drop);
	_tmp2_ = _tmp1_;
	if (gdk_content_formats_contain_gtype (_tmp2_, G4_TYPE_PLAYLIST)) {
		_tmp0_ = TRUE;
	} else {
		GdkContentFormats* _tmp3_;
		GdkContentFormats* _tmp4_;
		_tmp3_ = gdk_drop_get_formats (drop);
		_tmp4_ = _tmp3_;
		_tmp0_ = gdk_content_formats_contain_gtype (_tmp4_, gdk_file_list_get_type ());
	}
	result = _tmp0_;
	return result;
}

static gboolean
___lambda97__gtk_drop_target_accept (GtkDropTarget* _sender,
                                     GdkDrop* drop,
                                     gpointer self)
{
	gboolean result;
	result = __lambda97_ ((G4MusicList*) self, drop);
	return result;
}

static GdkDragAction
_g4_music_list_on_drop_motion_gtk_drop_target_motion (GtkDropTarget* _sender,
                                                      gdouble x,
                                                      gdouble y,
                                                      gpointer self)
{
	GdkDragAction result;
	result = g4_music_list_on_drop_motion ((G4MusicList*) self, x, y);
	return result;
}

static void
__lambda100_ (G4MusicList* self)
{
	g4_music_list_set_dropping_item (self, -1);
}

static void
___lambda100__g4_void_func (gpointer self)
{
	__lambda100_ ((G4MusicList*) self);
}

static void
__lambda99_ (G4MusicList* self)
{
	g4_run_timeout_once ((guint) 100, ___lambda100__g4_void_func, g_object_ref (self), g_object_unref);
}

static void
___lambda99__gtk_drop_target_leave (GtkDropTarget* _sender,
                                    gpointer self)
{
	__lambda99_ ((G4MusicList*) self);
}

static gboolean
_g4_music_list_on_drop_done_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                  GValue* value,
                                                  gdouble x,
                                                  gdouble y,
                                                  gpointer self)
{
	gboolean result;
	result = g4_music_list_on_drop_done ((G4MusicList*) self, value, x, y);
	return result;
}

static void
g4_music_list_create_drop_target (G4MusicList* self,
                                  GtkWidget* widget)
{
	GtkDropTarget* target = NULL;
	GtkDropTarget* _tmp0_;
	GType* _tmp1_;
	GType* _tmp2_;
	gint _tmp2__length1;
	GtkEventController* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = gtk_drop_target_new (G_TYPE_INVALID, GDK_ACTION_COPY | GDK_ACTION_LINK);
	target = _tmp0_;
	_tmp1_ = g_new0 (GType, 2);
	_tmp1_[0] = G4_TYPE_PLAYLIST;
	_tmp1_[1] = gdk_file_list_get_type ();
	_tmp2_ = _tmp1_;
	_tmp2__length1 = 2;
	gtk_drop_target_set_gtypes (target, _tmp2_, (gsize) 2);
	_tmp2_ = (g_free (_tmp2_), NULL);
	g_signal_connect_object (target, "accept", (GCallback) ___lambda97__gtk_drop_target_accept, self, 0);
	g_signal_connect_object (target, "motion", (GCallback) _g4_music_list_on_drop_motion_gtk_drop_target_motion, self, 0);
	g_signal_connect_object (target, "leave", (GCallback) ___lambda99__gtk_drop_target_leave, self, 0);
	g_signal_connect_object (target, "drop", (GCallback) _g4_music_list_on_drop_done_gtk_drop_target_drop, self, 0);
	_tmp3_ = _g_object_ref0 ((GtkEventController*) target);
	gtk_widget_add_controller (widget, _tmp3_);
	_g_object_unref0 (target);
}

static G4Playlist*
g4_music_list_create_playlist_for_selection (G4MusicList* self)
{
	guint count = 0U;
	GtkFilterListModel* _tmp0_;
	GPtrArray* musics = NULL;
	GPtrArray* _tmp1_;
	G4Music* _tmp8_ = NULL;
	G4Music* _tmp9_;
	const gchar* _tmp10_ = NULL;
	GPtrArray* _tmp12_;
	gpointer* _tmp13_;
	gint _tmp13__length1;
	G4Playlist* _tmp14_;
	G4Playlist* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filter_model;
	count = g_list_model_get_n_items ((GListModel*) _tmp0_);
	_tmp1_ = g_ptr_array_new_full (count, _g_object_unref0_);
	musics = _tmp1_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GtkMultiSelection* _tmp4_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				if (!(((guint) i) < count)) {
					break;
				}
				_tmp4_ = self->priv->_selection;
				if (gtk_selection_model_is_selected ((GtkSelectionModel*) _tmp4_, (guint) i)) {
					GPtrArray* _tmp5_;
					GtkFilterListModel* _tmp6_;
					GObject* _tmp7_;
					_tmp5_ = musics;
					_tmp6_ = self->priv->_filter_model;
					_tmp7_ = g_list_model_get_item ((GListModel*) _tmp6_, (guint) i);
					g_ptr_array_add (_tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, G4_TYPE_MUSIC, G4Music));
				}
			}
		}
	}
	_tmp9_ = self->priv->_music_node;
	_tmp8_ = _tmp9_;
	_tmp10_ = NULL;
	if (_tmp8_ != NULL) {
		const gchar* _tmp11_;
		_tmp11_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, G4_TYPE_MUSIC, G4Music)->title;
		_tmp10_ = _tmp11_;
	}
	_tmp12_ = musics;
	_tmp13_ = _tmp12_->pdata;
	_tmp13__length1 = _tmp12_->len;
	_tmp14_ = g4_to_playlist (_tmp13_, (gint) _tmp13__length1, _tmp10_);
	result = _tmp14_;
	_g_ptr_array_unref0 (musics);
	return result;
}

static Block23Data*
block23_data_ref (Block23Data* _data23_)
{
	g_atomic_int_inc (&_data23_->_ref_count_);
	return _data23_;
}

static void
block23_data_unref (void * _userdata_)
{
	Block23Data* _data23_;
	_data23_ = (Block23Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
		G4MusicList* self;
		self = _data23_->self;
		_gtk_bitset_unref0 (_data23_->bits);
		_g_object_unref0 (self);
		g_slice_free (Block23Data, _data23_);
	}
}

static void
__lambda89_ (Block23Data* _data23_)
{
	G4MusicList* self;
	gboolean _tmp0_ = FALSE;
	self = _data23_->self;
	self->priv->_remove_selection_handle = (guint) 0;
	if (!self->priv->_multi_selection) {
		GtkBitset* _tmp1_;
		_tmp1_ = _data23_->bits;
		_tmp0_ = gtk_bitset_get_size (_tmp1_) == ((guint64) 1);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkMultiSelection* _tmp2_;
		GtkBitset* _tmp3_;
		_tmp2_ = self->priv->_selection;
		_tmp3_ = _data23_->bits;
		gtk_selection_model_unselect_item ((GtkSelectionModel*) _tmp2_, gtk_bitset_get_minimum (_tmp3_));
	}
}

static void
___lambda89__g4_void_func (gpointer self)
{
	__lambda89_ (self);
}

static void
g4_music_list_on_selection_changed (G4MusicList* self,
                                    guint position,
                                    guint n_items)
{
	Block23Data* _data23_;
	GtkMultiSelection* _tmp0_;
	GtkBitset* _tmp1_;
	guint64 selected = 0ULL;
	GtkBitset* _tmp2_;
	GtkLabel* _tmp3_ = NULL;
	GtkLabel* _tmp4_;
	gboolean enabled = FALSE;
	GPtrArray* _tmp13_;
	g_return_if_fail (self != NULL);
	_data23_ = g_slice_new0 (Block23Data);
	_data23_->_ref_count_ = 1;
	_data23_->self = g_object_ref (self);
	_tmp0_ = self->priv->_selection;
	_tmp1_ = gtk_selection_model_get_selection ((GtkSelectionModel*) _tmp0_);
	_data23_->bits = _tmp1_;
	_tmp2_ = _data23_->bits;
	selected = gtk_bitset_get_size (_tmp2_);
	if (selected > ((guint64) 1)) {
		g4_music_list_set_multi_selection (self, TRUE);
	}
	_tmp4_ = self->priv->_header_title;
	_tmp3_ = _tmp4_;
	if (_tmp3_ != NULL) {
		gchar* _tmp5_;
		gchar* _tmp6_;
		guint _tmp7_;
		guint _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		_tmp5_ = g_strdup_printf ("%" G_GUINT64_FORMAT, selected);
		_tmp6_ = _tmp5_;
		_tmp7_ = g4_music_list_get_visible_count (self);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strdup_printf ("%u", _tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = g_strconcat (_tmp6_, "/", _tmp10_, NULL);
		_tmp12_ = _tmp11_;
		gtk_label_set_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_label_get_type (), GtkLabel), _tmp12_);
		_g_free0 (_tmp12_);
		_g_free0 (_tmp10_);
		_g_free0 (_tmp6_);
	}
	enabled = selected > ((guint64) 0);
	_tmp13_ = self->priv->_action_buttons;
	{
		GPtrArray* button_collection = NULL;
		guint button_index = 0U;
		button_collection = _tmp13_;
		for (button_index = 0; button_index < button_collection->len; button_index = button_index + 1) {
			GtkButton* _tmp14_;
			GtkButton* button = NULL;
			_tmp14_ = _g_object_ref0 ((GtkButton*) g_ptr_array_index (button_collection, button_index));
			button = _tmp14_;
			{
				GtkButton* _tmp15_;
				_tmp15_ = button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp15_, enabled);
				_g_object_unref0 (button);
			}
		}
	}
	if (self->priv->_remove_selection_handle != ((guint) 0)) {
		g_source_remove (self->priv->_remove_selection_handle);
	}
	self->priv->_remove_selection_handle = g4_run_timeout_once ((guint) 3000, ___lambda89__g4_void_func, block23_data_ref (_data23_), block23_data_unref);
	block23_data_unref (_data23_);
	_data23_ = NULL;
}

static void
___lambda73_ (G4MusicList* self,
              GObject* obj,
              GAsyncResult* res)
{
	G4Result ret = 0;
	g_return_if_fail (res != NULL);
	ret = g4_music_list_save_if_modified_finish (self, res);
	if (ret != G4_RESULT_FAILED) {
		g4_music_list_set_modified (self, FALSE);
		g4_music_list_set_multi_selection (self, FALSE);
	}
}

static void
____lambda73__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda73_ ((G4MusicList*) self, source_object, res);
	g_object_unref (self);
}

static void
__lambda69_ (G4MusicList* self)
{
	gboolean _tmp0_ = FALSE;
	if (self->_modified) {
		_tmp0_ = self->_prompt_to_save;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		g4_music_list_save_if_modified (self, TRUE, ____lambda73__gasync_ready_callback, g_object_ref (self));
	} else {
		g4_music_list_set_multi_selection (self, FALSE);
	}
}

static void
___lambda69__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda69_ ((G4MusicList*) self);
}

static void
__lambda74_ (G4MusicList* self)
{
	GtkMultiSelection* _tmp0_;
	GtkBitset* _tmp1_;
	GtkBitset* _tmp2_;
	guint _tmp3_;
	guint _tmp4_;
	gboolean _tmp5_;
	_tmp0_ = self->priv->_selection;
	_tmp1_ = gtk_selection_model_get_selection ((GtkSelectionModel*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g4_music_list_get_visible_count (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = gtk_bitset_get_size (_tmp2_) == ((guint64) _tmp4_);
	_gtk_bitset_unref0 (_tmp2_);
	if (_tmp5_) {
		GtkMultiSelection* _tmp6_;
		_tmp6_ = self->priv->_selection;
		gtk_selection_model_unselect_all ((GtkSelectionModel*) _tmp6_);
	} else {
		GtkMultiSelection* _tmp7_;
		_tmp7_ = self->priv->_selection;
		gtk_selection_model_select_all ((GtkSelectionModel*) _tmp7_);
	}
}

static void
___lambda74__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda74_ ((G4MusicList*) self);
}

static void
__lambda75_ (G4MusicList* self)
{
	g4_music_list_button_command (self, G4_BUTTON_INSERT);
}

static void
___lambda75__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda75_ ((G4MusicList*) self);
}

static void
___lambda85_ (G4MusicList* self)
{
	g4_music_list_button_command (self, G4_BUTTON_QUEUE);
}

static void
____lambda85__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	___lambda85_ ((G4MusicList*) self);
}

static void
__lambda86_ (G4MusicList* self)
{
	g4_music_list_button_command (self, G4_BUTTON_ADDTO);
}

static void
___lambda86__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda86_ ((G4MusicList*) self);
}

static void
___lambda87_ (G4MusicList* self)
{
	g4_music_list_button_command (self, G4_BUTTON_REMOVE);
}

static void
____lambda87__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	___lambda87_ ((G4MusicList*) self);
}

static void
_gtk_box_append_gfunc (gconstpointer data,
                       gpointer self)
{
	gtk_box_append ((GtkBox*) self, (GtkWidget*) data);
}

static void
g4_music_list_setup_selection_header_bar (G4MusicList* self,
                                          GtkBox* header)
{
	GtkButton* back_btn = NULL;
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* all_btn = NULL;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	GtkButton* _tmp6_;
	GtkButton* _tmp7_;
	GtkLabel* title = NULL;
	GtkLabel* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	GtkLabel* _tmp11_;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	GtkLabel* _tmp14_;
	GtkButton* insert_btn = NULL;
	GtkButton* _tmp15_;
	GtkButton* _tmp16_;
	GtkButton* _tmp17_;
	GtkButton* _tmp18_;
	GPtrArray* _tmp19_;
	GtkButton* _tmp20_;
	GtkButton* _tmp21_;
	GtkButton* addto_btn = NULL;
	GtkButton* _tmp29_;
	GtkButton* _tmp30_;
	GtkButton* _tmp31_;
	GtkButton* _tmp32_;
	GPtrArray* _tmp33_;
	GtkButton* _tmp34_;
	GtkButton* _tmp35_;
	GPtrArray* _tmp43_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (header != NULL);
	gtk_widget_set_hexpand ((GtkWidget*) header, TRUE);
	gtk_widget_add_css_class ((GtkWidget*) header, "flat");
	gtk_widget_add_css_class ((GtkWidget*) header, "toolbar");
	_tmp0_ = (GtkButton*) gtk_button_new_from_icon_name ("go-previous-symbolic");
	g_object_ref_sink (_tmp0_);
	back_btn = _tmp0_;
	_tmp1_ = back_btn;
	g_signal_connect_object (_tmp1_, "clicked", (GCallback) ___lambda69__gtk_button_clicked, self, 0);
	_tmp2_ = back_btn;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _ ("Back"));
	_tmp3_ = back_btn;
	gtk_box_append (header, (GtkWidget*) _tmp3_);
	_tmp4_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-select-all-symbolic");
	g_object_ref_sink (_tmp4_);
	all_btn = _tmp4_;
	_tmp5_ = all_btn;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp5_, _ ("Select All"));
	_tmp6_ = all_btn;
	g_signal_connect_object (_tmp6_, "clicked", (GCallback) ___lambda74__gtk_button_clicked, self, 0);
	_tmp7_ = all_btn;
	gtk_box_append (header, (GtkWidget*) _tmp7_);
	_tmp8_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp8_);
	title = _tmp8_;
	_tmp9_ = title;
	gtk_widget_add_css_class ((GtkWidget*) _tmp9_, "dim-label");
	_tmp10_ = title;
	gtk_widget_set_halign ((GtkWidget*) _tmp10_, GTK_ALIGN_CENTER);
	_tmp11_ = title;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp11_, TRUE);
	_tmp12_ = title;
	gtk_box_append (header, (GtkWidget*) _tmp12_);
	_tmp13_ = title;
	_tmp14_ = _g_object_ref0 (_tmp13_);
	_g_object_unref0 (self->priv->_header_title);
	self->priv->_header_title = _tmp14_;
	_tmp15_ = (GtkButton*) gtk_button_new_from_icon_name ("format-indent-more-symbolic");
	g_object_ref_sink (_tmp15_);
	insert_btn = _tmp15_;
	_tmp16_ = insert_btn;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp16_, _ ("Play at Next"));
	_tmp17_ = insert_btn;
	g_signal_connect_object (_tmp17_, "clicked", (GCallback) ___lambda75__gtk_button_clicked, self, 0);
	_tmp18_ = insert_btn;
	gtk_widget_set_name ((GtkWidget*) _tmp18_, G4_BUTTON_INSERT);
	_tmp19_ = self->priv->_action_buttons;
	_tmp20_ = insert_btn;
	_tmp21_ = _g_object_ref0 (_tmp20_);
	g_ptr_array_add (_tmp19_, _tmp21_);
	if (self->_has_add_to_queque) {
		GtkButton* queue_btn = NULL;
		GtkButton* _tmp22_;
		GtkButton* _tmp23_;
		GtkButton* _tmp24_;
		GtkButton* _tmp25_;
		GPtrArray* _tmp26_;
		GtkButton* _tmp27_;
		GtkButton* _tmp28_;
		_tmp22_ = (GtkButton*) gtk_button_new_from_icon_name ("document-send-symbolic");
		g_object_ref_sink (_tmp22_);
		queue_btn = _tmp22_;
		_tmp23_ = queue_btn;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp23_, _ ("Add to Queue"));
		_tmp24_ = queue_btn;
		g_signal_connect_object (_tmp24_, "clicked", (GCallback) ____lambda85__gtk_button_clicked, self, 0);
		_tmp25_ = queue_btn;
		gtk_widget_set_name ((GtkWidget*) _tmp25_, G4_BUTTON_QUEUE);
		_tmp26_ = self->priv->_action_buttons;
		_tmp27_ = queue_btn;
		_tmp28_ = _g_object_ref0 (_tmp27_);
		g_ptr_array_add (_tmp26_, _tmp28_);
		_g_object_unref0 (queue_btn);
	}
	_tmp29_ = (GtkButton*) gtk_button_new_from_icon_name ("document-new-symbolic");
	g_object_ref_sink (_tmp29_);
	addto_btn = _tmp29_;
	_tmp30_ = addto_btn;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp30_, _ ("Add to Playlist"));
	_tmp31_ = addto_btn;
	g_signal_connect_object (_tmp31_, "clicked", (GCallback) ___lambda86__gtk_button_clicked, self, 0);
	_tmp32_ = addto_btn;
	gtk_widget_set_name ((GtkWidget*) _tmp32_, G4_BUTTON_ADDTO);
	_tmp33_ = self->priv->_action_buttons;
	_tmp34_ = addto_btn;
	_tmp35_ = _g_object_ref0 (_tmp34_);
	g_ptr_array_add (_tmp33_, _tmp35_);
	if (self->priv->_editable) {
		GtkButton* remove_btn = NULL;
		GtkButton* _tmp36_;
		GtkButton* _tmp37_;
		GtkButton* _tmp38_;
		GtkButton* _tmp39_;
		GPtrArray* _tmp40_;
		GtkButton* _tmp41_;
		GtkButton* _tmp42_;
		_tmp36_ = (GtkButton*) gtk_button_new_from_icon_name ("user-trash-symbolic");
		g_object_ref_sink (_tmp36_);
		remove_btn = _tmp36_;
		_tmp37_ = remove_btn;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp37_, _ ("Remove"));
		_tmp38_ = remove_btn;
		g_signal_connect_object (_tmp38_, "clicked", (GCallback) ____lambda87__gtk_button_clicked, self, 0);
		_tmp39_ = remove_btn;
		gtk_widget_set_name ((GtkWidget*) _tmp39_, G4_BUTTON_REMOVE);
		_tmp40_ = self->priv->_action_buttons;
		_tmp41_ = remove_btn;
		_tmp42_ = _g_object_ref0 (_tmp41_);
		g_ptr_array_add (_tmp40_, _tmp42_);
		_g_object_unref0 (remove_btn);
	}
	_tmp43_ = self->priv->_action_buttons;
	g_ptr_array_foreach (_tmp43_, _gtk_box_append_gfunc, header);
	_g_object_unref0 (addto_btn);
	_g_object_unref0 (insert_btn);
	_g_object_unref0 (title);
	_g_object_unref0 (all_btn);
	_g_object_unref0 (back_btn);
}

static Block24Data*
block24_data_ref (Block24Data* _data24_)
{
	g_atomic_int_inc (&_data24_->_ref_count_);
	return _data24_;
}

static void
block24_data_unref (void * _userdata_)
{
	Block24Data* _data24_;
	_data24_ = (Block24Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
		G4MusicList* self;
		self = _data24_->self;
		_g_object_unref0 (self);
		g_slice_free (Block24Data, _data24_);
	}
}

static void
__lambda88_ (Block24Data* _data24_,
             G4Music* music,
             GtkListItem* item)
{
	G4MusicList* self;
	self = _data24_->self;
	g_return_if_fail (music != NULL);
	g_return_if_fail (item != NULL);
	gtk_list_item_set_selectable (item, _data24_->enable);
}

static void
___lambda88__gh_func (gconstpointer key,
                      gconstpointer value,
                      gpointer self)
{
	__lambda88_ (self, (G4Music*) key, (GtkListItem*) value);
}

static void
g4_music_list_update_grid_view (G4MusicList* self)
{
	Block24Data* _data24_;
	gboolean _tmp0_ = FALSE;
	GtkGridView* _tmp1_;
	GtkGridView* _tmp2_;
	GHashTable* _tmp3_;
	g_return_if_fail (self != NULL);
	_data24_ = g_slice_new0 (Block24Data);
	_data24_->_ref_count_ = 1;
	_data24_->self = g_object_ref (self);
	if (self->priv->_multi_selection) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = !self->priv->_single_click_activate;
	}
	_data24_->enable = _tmp0_;
	_tmp1_ = self->priv->_grid_view;
	gtk_grid_view_set_enable_rubberband (_tmp1_, _data24_->enable);
	_tmp2_ = self->priv->_grid_view;
	gtk_grid_view_set_single_click_activate (_tmp2_, !_data24_->enable);
	_tmp3_ = self->priv->_binding_items;
	g_hash_table_foreach (_tmp3_, ___lambda88__gh_func, _data24_);
	block24_data_unref (_data24_);
	_data24_ = NULL;
}

gboolean
g4_music_list_get_compact_list (G4MusicList* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_compact_list;
	return result;
}

void
g4_music_list_set_compact_list (G4MusicList* self,
                                gboolean value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_compact_list != value) {
		self->priv->_compact_list = value;
		g4_music_list_create_factory (self);
	}
	g_object_notify_by_pspec ((GObject *) self, g4_music_list_properties[G4_MUSIC_LIST_COMPACT_LIST_PROPERTY]);
}

void
g4_music_list_set_current_node (G4MusicList* self,
                                G4Music* value)
{
	G4MusicWidget* cur = NULL;
	G4Music* _tmp0_;
	G4MusicWidget* _tmp1_;
	G4MusicWidget* _tmp2_;
	G4Music* _tmp6_;
	G4MusicWidget* widget = NULL;
	G4MusicWidget* _tmp7_;
	G4MusicWidget* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_current_node;
	_tmp1_ = g4_music_list_get_binding_widget (self, _tmp0_);
	cur = _tmp1_;
	_tmp2_ = cur;
	if (_tmp2_ != NULL) {
		G4MusicWidget* _tmp3_;
		GtkImage* _tmp4_;
		GtkImage* _tmp5_;
		_tmp3_ = cur;
		_tmp4_ = g4_music_widget_get_playing (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget));
		_tmp5_ = _tmp4_;
		gtk_widget_set_visible ((GtkWidget*) _tmp5_, FALSE);
	}
	_tmp6_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_current_node);
	self->priv->_current_node = _tmp6_;
	_tmp7_ = g4_music_list_get_binding_widget (self, value);
	widget = _tmp7_;
	_tmp8_ = widget;
	if (_tmp8_ != NULL) {
		G4MusicWidget* _tmp9_;
		GtkImage* _tmp10_;
		GtkImage* _tmp11_;
		_tmp9_ = widget;
		_tmp10_ = g4_music_widget_get_playing (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget));
		_tmp11_ = _tmp10_;
		gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE);
	}
	_g_object_unref0 (widget);
	_g_object_unref0 (cur);
	g_object_notify_by_pspec ((GObject *) self, g4_music_list_properties[G4_MUSIC_LIST_CURRENT_NODE_PROPERTY]);
}

GListStore*
g4_music_list_get_data_store (G4MusicList* self)
{
	GListStore* result;
	GListStore* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_data_store;
	result = _tmp0_;
	return result;
}

void
g4_music_list_set_data_store (G4MusicList* self,
                              GListStore* value)
{
	GListStore* _tmp0_;
	GtkFilterListModel* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_data_store);
	self->priv->_data_store = _tmp0_;
	_tmp1_ = self->priv->_filter_model;
	gtk_filter_list_model_set_model (_tmp1_, (GListModel*) value);
	g_object_notify_by_pspec ((GObject *) self, g4_music_list_properties[G4_MUSIC_LIST_DATA_STORE_PROPERTY]);
}

gint
g4_music_list_get_dropping_item (G4MusicList* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_dropping_item;
	return result;
}

void
g4_music_list_set_dropping_item (G4MusicList* self,
                                 gint value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_dropping_item != value) {
		self->priv->_dropping_item = value;
		gtk_widget_queue_draw ((GtkWidget*) self);
	}
	g_object_notify_by_pspec ((GObject *) self, g4_music_list_properties[G4_MUSIC_LIST_DROPPING_ITEM_PROPERTY]);
}

GtkFilterListModel*
g4_music_list_get_filter_model (G4MusicList* self)
{
	GtkFilterListModel* result;
	GtkFilterListModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filter_model;
	result = _tmp0_;
	return result;
}

gboolean
g4_music_list_get_grid_mode (G4MusicList* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_grid_mode;
	return result;
}

void
g4_music_list_set_grid_mode (G4MusicList* self,
                             gboolean value)
{
	gint _tmp0_ = 0;
	g_return_if_fail (self != NULL);
	if (value) {
		_tmp0_ = G4_THUMBNAILER_GRID_SIZE;
	} else {
		_tmp0_ = G4_THUMBNAILER_ICON_SIZE;
	}
	self->priv->_image_size = _tmp0_;
	if (self->priv->_grid_mode != value) {
		self->priv->_grid_mode = value;
		g4_music_list_create_factory (self);
	}
	g_object_notify_by_pspec ((GObject *) self, g4_music_list_properties[G4_MUSIC_LIST_GRID_MODE_PROPERTY]);
}

GType
g4_music_list_get_item_type (G4MusicList* self)
{
	GType result;
	g_return_val_if_fail (self != NULL, G_TYPE_INVALID);
	result = self->priv->_item_type;
	return result;
}

gboolean
g4_music_list_get_modified (G4MusicList* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->_modified;
	return result;
}

void
g4_music_list_set_modified (G4MusicList* self,
                            gboolean value)
{
	g_return_if_fail (self != NULL);
	self->_modified = value;
	g_object_notify_by_pspec ((GObject *) self, g4_music_list_properties[G4_MUSIC_LIST_MODIFIED_PROPERTY]);
}

gboolean
g4_music_list_get_multi_selection (G4MusicList* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_multi_selection;
	return result;
}

void
g4_music_list_set_multi_selection (G4MusicList* self,
                                   gboolean value)
{
	gboolean _tmp0_ = FALSE;
	GtkWidget* _tmp19_ = NULL;
	GtkWidget* _tmp20_;
	GtkRevealer* _tmp21_ = NULL;
	GtkRevealer* _tmp22_;
	g_return_if_fail (self != NULL);
	if (value) {
		GtkRevealer* _tmp1_;
		_tmp1_ = self->priv->_header_revealer;
		_tmp0_ = _tmp1_ == NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkWidget* child = NULL;
		GtkWidget* _tmp2_;
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_ = NULL;
		GtkWidget* _tmp5_;
		GtkScrolledWindow* _tmp6_;
		GtkWidget* _tmp8_;
		GtkBox* header = NULL;
		GtkBox* _tmp9_;
		GtkBox* _tmp10_;
		GtkRevealer* revealer = NULL;
		GtkRevealer* _tmp11_;
		GtkRevealer* _tmp12_;
		GtkBox* _tmp13_;
		GtkRevealer* _tmp14_;
		GtkRevealer* _tmp15_;
		GtkWidget* _tmp16_;
		GtkRevealer* _tmp17_;
		GtkRevealer* _tmp18_;
		_tmp2_ = gtk_widget_get_first_child ((GtkWidget*) self);
		_tmp3_ = _g_object_ref0 (_tmp2_);
		child = _tmp3_;
		_tmp5_ = child;
		_tmp6_ = self->priv->_scroll_view;
		if (_tmp5_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget)) {
			GtkWidget* _tmp7_;
			_tmp7_ = child;
			_tmp4_ = _tmp7_;
		} else {
			_tmp4_ = NULL;
		}
		_tmp8_ = _g_object_ref0 (_tmp4_);
		_g_object_unref0 (self->priv->_header_bar_hided);
		self->priv->_header_bar_hided = _tmp8_;
		_tmp9_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
		g_object_ref_sink (_tmp9_);
		header = _tmp9_;
		_tmp10_ = header;
		g4_music_list_setup_selection_header_bar (self, _tmp10_);
		_tmp11_ = (GtkRevealer*) gtk_revealer_new ();
		g_object_ref_sink (_tmp11_);
		revealer = _tmp11_;
		_tmp12_ = revealer;
		_tmp13_ = header;
		gtk_revealer_set_child (_tmp12_, (GtkWidget*) _tmp13_);
		_tmp14_ = revealer;
		gtk_revealer_set_transition_type (_tmp14_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
		_tmp15_ = revealer;
		_tmp16_ = self->priv->_header_bar_hided;
		gtk_widget_insert_after ((GtkWidget*) _tmp15_, (GtkWidget*) self, _tmp16_);
		_tmp17_ = revealer;
		_tmp18_ = _g_object_ref0 (_tmp17_);
		_g_object_unref0 (self->priv->_header_revealer);
		self->priv->_header_revealer = _tmp18_;
		_g_object_unref0 (revealer);
		_g_object_unref0 (header);
		_g_object_unref0 (child);
	}
	_tmp20_ = self->priv->_header_bar_hided;
	_tmp19_ = _tmp20_;
	if (_tmp19_ != NULL) {
		gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_widget_get_type (), GtkWidget), !value);
	}
	_tmp22_ = self->priv->_header_revealer;
	_tmp21_ = _tmp22_;
	if (_tmp21_ != NULL) {
		gtk_revealer_set_reveal_child (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_revealer_get_type (), GtkRevealer), value);
	}
	if (self->priv->_multi_selection != value) {
		self->priv->_multi_selection = value;
		g4_music_list_update_grid_view (self);
		if (value) {
			g4_music_list_on_selection_changed (self, (guint) 0, (guint) 0);
		} else {
			GtkMultiSelection* _tmp23_;
			_tmp23_ = self->priv->_selection;
			gtk_selection_model_unselect_all ((GtkSelectionModel*) _tmp23_);
		}
	}
	g_object_notify_by_pspec ((GObject *) self, g4_music_list_properties[G4_MUSIC_LIST_MULTI_SELECTION_PROPERTY]);
}

G4Music*
g4_music_list_get_music_node (G4MusicList* self)
{
	G4Music* result;
	G4Music* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_music_node;
	result = _tmp0_;
	return result;
}

gboolean
g4_music_list_get_playable (G4MusicList* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_item_type == G4_TYPE_MUSIC;
	return result;
}

gboolean
g4_music_list_get_single_click_activate (G4MusicList* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_single_click_activate;
	return result;
}

void
g4_music_list_set_single_click_activate (G4MusicList* self,
                                         gboolean value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_single_click_activate != value) {
		self->priv->_single_click_activate = value;
		g4_music_list_update_grid_view (self);
	}
	g_object_notify_by_pspec ((GObject *) self, g4_music_list_properties[G4_MUSIC_LIST_SINGLE_CLICK_ACTIVATE_PROPERTY]);
}

guint
g4_music_list_get_visible_count (G4MusicList* self)
{
	guint result;
	GtkFilterListModel* _tmp0_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->_filter_model;
	result = g_list_model_get_n_items ((GListModel*) _tmp0_);
	return result;
}

static void
g_cclosure_user_marshal_VOID__UINT_OBJECT (GClosure * closure,
                                           GValue * return_value,
                                           guint n_param_values,
                                           const GValue * param_values,
                                           gpointer invocation_hint,
                                           gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_OBJECT) (gpointer data1, guint arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT_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__UINT_OBJECT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_object (param_values + 2), data2);
}

static void
g4_music_list_class_init (G4MusicListClass * klass,
                          gpointer klass_data)
{
	g4_music_list_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &G4MusicList_private_offset);
	((G4MusicListClass *) klass)->save_if_modified = (void (*) (G4MusicList*, gboolean, GAsyncReadyCallback, gpointer)) g4_music_list_real_save_if_modified;
	((G4MusicListClass *) klass)->save_if_modified_finish = (G4Result (*) (G4MusicList*, GAsyncResult*)) g4_music_list_real_save_if_modified_finish;
	((GtkWidgetClass *) klass)->snapshot = (void (*) (GtkWidget*, GtkSnapshot*)) g4_music_list_real_snapshot;
	G_OBJECT_CLASS (klass)->get_property = _vala_g4_music_list_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_g4_music_list_set_property;
	G_OBJECT_CLASS (klass)->finalize = g4_music_list_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_COMPACT_LIST_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_COMPACT_LIST_PROPERTY] = g_param_spec_boolean ("compact-list", "compact-list", "compact-list", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_CURRENT_NODE_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_CURRENT_NODE_PROPERTY] = g_param_spec_object ("current-node", "current-node", "current-node", G4_TYPE_MUSIC, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_DATA_STORE_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_DATA_STORE_PROPERTY] = g_param_spec_object ("data-store", "data-store", "data-store", g_list_store_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_DROPPING_ITEM_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_DROPPING_ITEM_PROPERTY] = g_param_spec_int ("dropping-item", "dropping-item", "dropping-item", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_FILTER_MODEL_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_FILTER_MODEL_PROPERTY] = g_param_spec_object ("filter-model", "filter-model", "filter-model", gtk_filter_list_model_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_GRID_MODE_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_GRID_MODE_PROPERTY] = g_param_spec_boolean ("grid-mode", "grid-mode", "grid-mode", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_ITEM_TYPE_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_ITEM_TYPE_PROPERTY] = g_param_spec_gtype ("item-type", "item-type", "item-type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_MODIFIED_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_MODIFIED_PROPERTY] = g_param_spec_boolean ("modified", "modified", "modified", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_MULTI_SELECTION_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_MULTI_SELECTION_PROPERTY] = g_param_spec_boolean ("multi-selection", "multi-selection", "multi-selection", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_MUSIC_NODE_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_MUSIC_NODE_PROPERTY] = g_param_spec_object ("music-node", "music-node", "music-node", G4_TYPE_MUSIC, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_PLAYABLE_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_PLAYABLE_PROPERTY] = g_param_spec_boolean ("playable", "playable", "playable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_SINGLE_CLICK_ACTIVATE_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_SINGLE_CLICK_ACTIVATE_PROPERTY] = g_param_spec_boolean ("single-click-activate", "single-click-activate", "single-click-activate", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_MUSIC_LIST_VISIBLE_COUNT_PROPERTY, g4_music_list_properties[G4_MUSIC_LIST_VISIBLE_COUNT_PROPERTY] = g_param_spec_uint ("visible-count", "visible-count", "visible-count", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g4_music_list_signals[G4_MUSIC_LIST_ITEM_ACTIVATED_SIGNAL] = g_signal_new ("item-activated", G4_TYPE_MUSIC_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_OBJECT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_OBJECT);
	g4_music_list_signals[G4_MUSIC_LIST_ITEM_BINDED_SIGNAL] = g_signal_new ("item-binded", G4_TYPE_MUSIC_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, gtk_list_item_get_type ());
	g4_music_list_signals[G4_MUSIC_LIST_ITEM_CREATED_SIGNAL] = g_signal_new ("item-created", G4_TYPE_MUSIC_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, gtk_list_item_get_type ());
	g4_music_list_signals[G4_MUSIC_LIST_ITEM_UNBINDED_SIGNAL] = g_signal_new ("item-unbinded", G4_TYPE_MUSIC_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, gtk_list_item_get_type ());
}

static void
g4_music_list_instance_init (G4MusicList * self,
                             gpointer klass)
{
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GListStore* _tmp3_;
	GtkFilterListModel* _tmp4_;
	GtkGridView* _tmp5_;
	GtkScrolledWindow* _tmp6_;
	GPtrArray* _tmp7_;
	self->priv = g4_music_list_get_instance_private (self);
	_tmp0_ = g_direct_hash;
	_tmp1_ = g_direct_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_object_unref0_, _g_object_unref0_);
	self->priv->_binding_items = _tmp2_;
	self->priv->_compact_list = FALSE;
	self->priv->_current_node = NULL;
	_tmp3_ = g_list_store_new (G4_TYPE_MUSIC);
	self->priv->_data_store = _tmp3_;
	self->priv->_editable = FALSE;
	_tmp4_ = gtk_filter_list_model_new (NULL, NULL);
	self->priv->_filter_model = _tmp4_;
	self->priv->_grid_mode = FALSE;
	_tmp5_ = (GtkGridView*) gtk_grid_view_new (NULL, NULL);
	g_object_ref_sink (_tmp5_);
	self->priv->_grid_view = _tmp5_;
	self->priv->_image_size = G4_THUMBNAILER_ICON_SIZE;
	self->priv->_item_type = G4_TYPE_MUSIC;
	self->_modified = FALSE;
	self->priv->_music_node = NULL;
	_tmp6_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_ref_sink (_tmp6_);
	self->priv->_scroll_view = _tmp6_;
	self->priv->_selectable = FALSE;
	self->priv->_single_click_activate = TRUE;
	self->priv->_columns = (guint) 0;
	memset (&self->priv->_cell_size, 0, sizeof (graphene_size_t));
	memset (&self->priv->_item_size, 0, sizeof (graphene_size_t));
	self->priv->_scrolling_item = -1;
	self->_has_add_to_queque = TRUE;
	self->_prompt_to_save = TRUE;
	_tmp7_ = g_ptr_array_new_full ((guint) 4, _g_object_unref0_);
	self->priv->_action_buttons = _tmp7_;
	self->priv->_header_bar_hided = NULL;
	self->priv->_header_revealer = NULL;
	self->priv->_header_title = NULL;
	self->priv->_multi_selection = FALSE;
	self->priv->_scroll_animation = NULL;
	self->priv->_empty_label = NULL;
	self->priv->_dropping_item = -1;
	self->priv->_activate_handle = (guint) 0;
	self->priv->_remove_selection_handle = (guint) 0;
}

static void
g4_music_list_finalize (GObject * obj)
{
	G4MusicList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, G4_TYPE_MUSIC_LIST, G4MusicList);
	_g_object_unref0 (self->_app);
	_g_hash_table_unref0 (self->priv->_binding_items);
	_g_object_unref0 (self->priv->_current_node);
	_g_object_unref0 (self->priv->_data_store);
	_g_object_unref0 (self->priv->_filter_model);
	_g_object_unref0 (self->priv->_grid_view);
	_g_object_unref0 (self->priv->_music_node);
	_g_object_unref0 (self->priv->_scroll_view);
	_g_object_unref0 (self->priv->_selection);
	_g_object_unref0 (self->priv->_thmbnailer);
	_g_ptr_array_unref0 (self->priv->_action_buttons);
	_g_object_unref0 (self->priv->_header_bar_hided);
	_g_object_unref0 (self->priv->_header_revealer);
	_g_object_unref0 (self->priv->_header_title);
	_g_object_unref0 (self->priv->_scroll_animation);
	_g_object_unref0 (self->priv->_empty_label);
	G_OBJECT_CLASS (g4_music_list_parent_class)->finalize (obj);
}

static GType
g4_music_list_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (G4MusicListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) g4_music_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (G4MusicList), 0, (GInstanceInitFunc) g4_music_list_instance_init, NULL };
	GType g4_music_list_type_id;
	g4_music_list_type_id = g_type_register_static (gtk_box_get_type (), "G4MusicList", &g_define_type_info, 0);
	G4MusicList_private_offset = g_type_add_instance_private (g4_music_list_type_id, sizeof (G4MusicListPrivate));
	return g4_music_list_type_id;
}

GType
g4_music_list_get_type (void)
{
	static volatile gsize g4_music_list_type_id__once = 0;
	if (g_once_init_enter (&g4_music_list_type_id__once)) {
		GType g4_music_list_type_id;
		g4_music_list_type_id = g4_music_list_get_type_once ();
		g_once_init_leave (&g4_music_list_type_id__once, g4_music_list_type_id);
	}
	return g4_music_list_type_id__once;
}

static void
_vala_g4_music_list_get_property (GObject * object,
                                  guint property_id,
                                  GValue * value,
                                  GParamSpec * pspec)
{
	G4MusicList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, G4_TYPE_MUSIC_LIST, G4MusicList);
	switch (property_id) {
		case G4_MUSIC_LIST_COMPACT_LIST_PROPERTY:
		g_value_set_boolean (value, g4_music_list_get_compact_list (self));
		break;
		case G4_MUSIC_LIST_DATA_STORE_PROPERTY:
		g_value_set_object (value, g4_music_list_get_data_store (self));
		break;
		case G4_MUSIC_LIST_DROPPING_ITEM_PROPERTY:
		g_value_set_int (value, g4_music_list_get_dropping_item (self));
		break;
		case G4_MUSIC_LIST_FILTER_MODEL_PROPERTY:
		g_value_set_object (value, g4_music_list_get_filter_model (self));
		break;
		case G4_MUSIC_LIST_GRID_MODE_PROPERTY:
		g_value_set_boolean (value, g4_music_list_get_grid_mode (self));
		break;
		case G4_MUSIC_LIST_ITEM_TYPE_PROPERTY:
		g_value_set_gtype (value, g4_music_list_get_item_type (self));
		break;
		case G4_MUSIC_LIST_MODIFIED_PROPERTY:
		g_value_set_boolean (value, g4_music_list_get_modified (self));
		break;
		case G4_MUSIC_LIST_MULTI_SELECTION_PROPERTY:
		g_value_set_boolean (value, g4_music_list_get_multi_selection (self));
		break;
		case G4_MUSIC_LIST_MUSIC_NODE_PROPERTY:
		g_value_set_object (value, g4_music_list_get_music_node (self));
		break;
		case G4_MUSIC_LIST_PLAYABLE_PROPERTY:
		g_value_set_boolean (value, g4_music_list_get_playable (self));
		break;
		case G4_MUSIC_LIST_SINGLE_CLICK_ACTIVATE_PROPERTY:
		g_value_set_boolean (value, g4_music_list_get_single_click_activate (self));
		break;
		case G4_MUSIC_LIST_VISIBLE_COUNT_PROPERTY:
		g_value_set_uint (value, g4_music_list_get_visible_count (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_g4_music_list_set_property (GObject * object,
                                  guint property_id,
                                  const GValue * value,
                                  GParamSpec * pspec)
{
	G4MusicList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, G4_TYPE_MUSIC_LIST, G4MusicList);
	switch (property_id) {
		case G4_MUSIC_LIST_COMPACT_LIST_PROPERTY:
		g4_music_list_set_compact_list (self, g_value_get_boolean (value));
		break;
		case G4_MUSIC_LIST_CURRENT_NODE_PROPERTY:
		g4_music_list_set_current_node (self, g_value_get_object (value));
		break;
		case G4_MUSIC_LIST_DATA_STORE_PROPERTY:
		g4_music_list_set_data_store (self, g_value_get_object (value));
		break;
		case G4_MUSIC_LIST_DROPPING_ITEM_PROPERTY:
		g4_music_list_set_dropping_item (self, g_value_get_int (value));
		break;
		case G4_MUSIC_LIST_GRID_MODE_PROPERTY:
		g4_music_list_set_grid_mode (self, g_value_get_boolean (value));
		break;
		case G4_MUSIC_LIST_MODIFIED_PROPERTY:
		g4_music_list_set_modified (self, g_value_get_boolean (value));
		break;
		case G4_MUSIC_LIST_MULTI_SELECTION_PROPERTY:
		g4_music_list_set_multi_selection (self, g_value_get_boolean (value));
		break;
		case G4_MUSIC_LIST_SINGLE_CLICK_ACTIVATE_PROPERTY:
		g4_music_list_set_single_click_activate (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

G4MainMusicList*
g4_main_music_list_construct (GType object_type,
                              G4Application* app)
{
	G4MainMusicList * self = NULL;
	g_return_val_if_fail (app != NULL, NULL);
	self = (G4MainMusicList*) g4_music_list_construct (object_type, app, G4_TYPE_MUSIC, NULL, TRUE, TRUE);
	((G4MusicList*) self)->_has_add_to_queque = FALSE;
	((G4MusicList*) self)->_prompt_to_save = FALSE;
	return self;
}

G4MainMusicList*
g4_main_music_list_new (G4Application* app)
{
	return g4_main_music_list_construct (G4_TYPE_MAIN_MUSIC_LIST, app);
}

static void
g4_main_music_list_real_save_if_modified_data_free (gpointer _data)
{
	G4MainMusicListSaveIfModifiedData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (G4MainMusicListSaveIfModifiedData, _data_);
}

static void
g4_main_music_list_real_save_if_modified (G4MusicList* base,
                                          gboolean prompt,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	G4MainMusicList * self;
	G4MainMusicListSaveIfModifiedData* _data_;
	G4MainMusicList* _tmp0_;
	self = (G4MainMusicList*) base;
	_data_ = g_slice_new0 (G4MainMusicListSaveIfModifiedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, g4_main_music_list_real_save_if_modified_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->prompt = prompt;
	g4_main_music_list_real_save_if_modified_co (_data_);
}

static G4Result
g4_main_music_list_save_if_modified_finish (G4MusicList* base,
                                            GAsyncResult* _res_)
{
	G4Result result;
	G4MainMusicListSaveIfModifiedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
g4_main_music_list_save_if_modified_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_)
{
	G4MainMusicListSaveIfModifiedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	g4_main_music_list_real_save_if_modified_co (_data_);
}

static gboolean
g4_main_music_list_real_save_if_modified_co (G4MainMusicListSaveIfModifiedData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (((G4MusicList*) _data_->self)->_modified) {
		_data_->_tmp0_ = ((G4MusicList*) _data_->self)->_app;
		_data_->_state_ = 1;
		g4_application_save_queue_to_file (_data_->_tmp0_, g4_main_music_list_save_if_modified_ready, _data_);
		return FALSE;
		_state_1:
		_data_->ret = g4_application_save_queue_to_file_finish (_data_->_tmp0_, _data_->_res_);
		if (_data_->ret) {
			g4_music_list_set_modified ((G4MusicList*) _data_->self, FALSE);
		}
		if (_data_->ret) {
			_data_->_tmp1_ = G4_RESULT_OK;
		} else {
			_data_->_tmp1_ = G4_RESULT_FAILED;
		}
		_data_->result = _data_->_tmp1_;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = G4_RESULT_OK;
	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
g4_main_music_list_class_init (G4MainMusicListClass * klass,
                               gpointer klass_data)
{
	g4_main_music_list_parent_class = g_type_class_peek_parent (klass);
	((G4MusicListClass *) klass)->save_if_modified = (void (*) (G4MusicList*, gboolean, GAsyncReadyCallback, gpointer)) g4_main_music_list_real_save_if_modified;
	((G4MusicListClass *) klass)->save_if_modified_finish = (G4Result (*) (G4MusicList*, GAsyncResult*)) g4_main_music_list_save_if_modified_finish;
}

static void
g4_main_music_list_instance_init (G4MainMusicList * self,
                                  gpointer klass)
{
}

static GType
g4_main_music_list_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (G4MainMusicListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) g4_main_music_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (G4MainMusicList), 0, (GInstanceInitFunc) g4_main_music_list_instance_init, NULL };
	GType g4_main_music_list_type_id;
	g4_main_music_list_type_id = g_type_register_static (G4_TYPE_MUSIC_LIST, "G4MainMusicList", &g_define_type_info, 0);
	return g4_main_music_list_type_id;
}

GType
g4_main_music_list_get_type (void)
{
	static volatile gsize g4_main_music_list_type_id__once = 0;
	if (g_once_init_enter (&g4_main_music_list_type_id__once)) {
		GType g4_main_music_list_type_id;
		g4_main_music_list_type_id = g4_main_music_list_get_type_once ();
		g_once_init_leave (&g4_main_music_list_type_id__once, g4_main_music_list_type_id);
	}
	return g4_main_music_list_type_id__once;
}

static Block25Data*
block25_data_ref (Block25Data* _data25_)
{
	g_atomic_int_inc (&_data25_->_ref_count_);
	return _data25_;
}

static void
block25_data_unref (void * _userdata_)
{
	Block25Data* _data25_;
	_data25_ = (Block25Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data25_->_ref_count_)) {
		_g_ptr_array_unref0 (_data25_->files);
		g_slice_free (Block25Data, _data25_);
	}
}

static void
__lambda64_ (Block25Data* _data25_,
             G4Music* music)
{
	const gchar* _tmp0_;
	GFile* _tmp1_;
	g_return_if_fail (music != NULL);
	_tmp0_ = music->uri;
	_tmp1_ = g_file_new_for_uri (_tmp0_);
	g_ptr_array_add (_data25_->files, _tmp1_);
}

static void
___lambda64__gfunc (gconstpointer data,
                    gpointer self)
{
	__lambda64_ (self, (G4Music*) data);
}

GdkContentProvider*
g4_create_content_provider (G4Playlist* playlist)
{
	Block25Data* _data25_;
	GValue val = {0};
	GValue _tmp0_ = {0};
	guint _tmp1_;
	guint _tmp2_;
	GPtrArray* _tmp3_;
	GPtrArray* _tmp4_;
	GValue val2 = {0};
	GValue _tmp5_ = {0};
	gpointer* _tmp6_;
	gint _tmp6__length1;
	GdkFileList* _tmp7_;
	GValue _tmp8_;
	GdkContentProvider* _tmp9_;
	GValue _tmp10_;
	GdkContentProvider* _tmp11_;
	GdkContentProvider** _tmp12_;
	GdkContentProvider* _tmp13_;
	GdkContentProvider* result;
	g_return_val_if_fail (playlist != NULL, NULL);
	_data25_ = g_slice_new0 (Block25Data);
	_data25_->_ref_count_ = 1;
	g_value_init (&_tmp0_, G4_TYPE_PLAYLIST);
	val = _tmp0_;
	g_value_set_object (&val, (GObject*) playlist);
	_tmp1_ = g4_playlist_get_length (playlist);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_ptr_array_new_full (_tmp2_, _g_object_unref0_);
	_data25_->files = _tmp3_;
	_tmp4_ = playlist->items;
	g_ptr_array_foreach (_tmp4_, ___lambda64__gfunc, _data25_);
	g_value_init (&_tmp5_, gdk_file_list_get_type ());
	val2 = _tmp5_;
	_tmp6_ = _data25_->files->pdata;
	_tmp6__length1 = _data25_->files->len;
	_tmp7_ = gdk_file_list_new_from_array (_tmp6_, _tmp6__length1);
	g_value_set_boxed (&val2, _tmp7_);
	_tmp8_ = val;
	_tmp9_ = gdk_content_provider_new_for_value (&_tmp8_);
	_tmp10_ = val2;
	_tmp11_ = gdk_content_provider_new_for_value (&_tmp10_);
	_tmp12_ = g_new0 (GdkContentProvider*, 2 + 1);
	_tmp12_[0] = _tmp9_;
	_tmp12_[1] = _tmp11_;
	_tmp13_ = gdk_content_provider_new_union (_tmp12_, 2);
	result = _tmp13_;
	G_IS_VALUE (&val2) ? (g_value_unset (&val2), NULL) : NULL;
	G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
	block25_data_unref (_data25_);
	_data25_ = NULL;
	return result;
}

GMenuItem*
g4_create_menu_item_for_button (const gchar* button_name,
                                const gchar* label,
                                const gchar* action)
{
	GMenuItem* item = NULL;
	GMenuItem* _tmp0_;
	GVariant* _tmp1_;
	GVariant* _tmp2_;
	GMenuItem* result;
	g_return_val_if_fail (button_name != NULL, NULL);
	g_return_val_if_fail (label != NULL, NULL);
	g_return_val_if_fail (action != NULL, NULL);
	_tmp0_ = g_menu_item_new (label, NULL);
	item = _tmp0_;
	_tmp1_ = g_variant_new_string (button_name);
	g_variant_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	g_menu_item_set_action_and_target_value (item, action, _tmp2_);
	_g_variant_unref0 (_tmp2_);
	result = item;
	return result;
}

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

static gpointer
__g_type_dup0 (gpointer self)
{
	return self ? _g_type_dup (self) : NULL;
}

GtkWidget*
g4_find_ancestry_with_type (GtkWidget* widget,
                            GType type)
{
	GtkWidget* parent = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_ = NULL;
	GtkWidget* _tmp3_;
	GType* _tmp4_ = NULL;
	GType* _tmp7_ = NULL;
	gboolean* _tmp8_ = NULL;
	gboolean* _tmp11_ = NULL;
	gboolean* _tmp12_;
	GtkWidget* result;
	g_return_val_if_fail (widget != NULL, NULL);
	_tmp0_ = gtk_widget_get_parent (widget);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	parent = _tmp1_;
	_tmp3_ = parent;
	_tmp2_ = _tmp3_;
	_tmp4_ = NULL;
	if (_tmp2_ != NULL) {
		GType _tmp5_;
		GType* _tmp6_;
		_tmp5_ = G_TYPE_FROM_INSTANCE ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
		_tmp6_ = __g_type_dup0 (&_tmp5_);
		_g_free0 (_tmp4_);
		_tmp4_ = _tmp6_;
	}
	_tmp7_ = _tmp4_;
	_tmp8_ = NULL;
	if (_tmp7_ != NULL) {
		gboolean _tmp9_;
		gboolean* _tmp10_;
		_tmp9_ = g_type_is_a ((GType) (*_tmp7_), type);
		_tmp10_ = __bool_dup0 (&_tmp9_);
		_g_free0 (_tmp8_);
		_tmp8_ = _tmp10_;
	}
	_tmp12_ = __bool_dup0 (_tmp8_);
	_tmp11_ = _tmp12_;
	if (_tmp11_ == NULL) {
		gboolean _tmp13_;
		gboolean* _tmp14_;
		_tmp13_ = FALSE;
		_tmp14_ = __bool_dup0 (&_tmp13_);
		_g_free0 (_tmp11_);
		_tmp11_ = _tmp14_;
	}
	if ((gboolean) (*_tmp11_)) {
		GtkWidget* _tmp15_;
		GtkWidget* _tmp16_;
		_tmp15_ = parent;
		_tmp16_ = _g_object_ref0 ((GtkWidget*) (G4_IS_MUSIC_LIST (_tmp15_) ? ((G4MusicList*) _tmp15_) : NULL));
		result = _tmp16_;
		_g_free0 (_tmp11_);
		_g_free0 (_tmp8_);
		_g_free0 (_tmp4_);
		_g_object_unref0 (parent);
		return result;
	} else {
		GtkWidget* _tmp17_;
		_tmp17_ = parent;
		if (_tmp17_ != NULL) {
			GtkWidget* _tmp18_;
			GtkWidget* _tmp19_;
			_tmp18_ = parent;
			_tmp19_ = g4_find_ancestry_with_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), type);
			result = _tmp19_;
			_g_free0 (_tmp11_);
			_g_free0 (_tmp8_);
			_g_free0 (_tmp4_);
			_g_object_unref0 (parent);
			return result;
		}
	}
	result = NULL;
	_g_free0 (_tmp11_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp4_);
	_g_object_unref0 (parent);
	return result;
}

void
g4_counted_rect_init (G4CountedRect *self,
                      gint c,
                      gint i,
                      graphene_rect_t* rc)
{
	memset (self, 0, sizeof (G4CountedRect));
	(*self).count = c;
	(*self).index = i;
	if (rc != NULL) {
		(*self).rect = (graphene_rect_t) (*rc);
	} else {
		graphene_rect_init (&(*self).rect, (gfloat) 0, (gfloat) 0, (gfloat) 0, (gfloat) 0);
	}
}

G4CountedRect*
g4_counted_rect_dup (const G4CountedRect* self)
{
	G4CountedRect* dup;
	dup = g_new0 (G4CountedRect, 1);
	memcpy (dup, self, sizeof (G4CountedRect));
	return dup;
}

void
g4_counted_rect_free (G4CountedRect* self)
{
	g_free (self);
}

static GType
g4_counted_rect_get_type_once (void)
{
	GType g4_counted_rect_type_id;
	g4_counted_rect_type_id = g_boxed_type_register_static ("G4CountedRect", (GBoxedCopyFunc) g4_counted_rect_dup, (GBoxedFreeFunc) g4_counted_rect_free);
	return g4_counted_rect_type_id;
}

GType
g4_counted_rect_get_type (void)
{
	static volatile gsize g4_counted_rect_type_id__once = 0;
	if (g_once_init_enter (&g4_counted_rect_type_id__once)) {
		GType g4_counted_rect_type_id;
		g4_counted_rect_type_id = g4_counted_rect_get_type_once ();
		g_once_init_leave (&g4_counted_rect_type_id__once, g4_counted_rect_type_id);
	}
	return g4_counted_rect_type_id__once;
}

static Block26Data*
block26_data_ref (Block26Data* _data26_)
{
	g_atomic_int_inc (&_data26_->_ref_count_);
	return _data26_;
}

static void
block26_data_unref (void * _userdata_)
{
	Block26Data* _data26_;
	_data26_ = (Block26Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
		g_slice_free (Block26Data, _data26_);
	}
}

static void
_vala_graphene_rect_t_free (graphene_rect_t* self)
{
	g_boxed_free (graphene_rect_get_type (), self);
}

static void
__vala_graphene_rect_t_free0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (_vala_graphene_rect_t_free (var), NULL));
}

static void
_g4_counted_rect_free0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g4_counted_rect_free (var), NULL));
}

static gint
vala_g_ptr_array_get_length (GPtrArray* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = (gint) self->len;
	return result;
}

static gpointer
_g4_counted_rect_dup0 (gpointer self)
{
	return self ? g4_counted_rect_dup (self) : NULL;
}

static graphene_rect_t*
_vala_graphene_rect_t_copy (graphene_rect_t* self)
{
	return g_boxed_copy (graphene_rect_get_type (), self);
}

static gpointer
__vala_graphene_rect_t_copy0 (gpointer self)
{
	return self ? _vala_graphene_rect_t_copy (self) : NULL;
}

static void
__lambda82_ (Block26Data* _data26_,
             gint w,
             G4CountedRect* rect)
{
	G4CountedRect cr = {0};
	G4CountedRect _tmp0_;
	G4CountedRect _tmp1_;
	cr = (G4CountedRect) (*rect);
	_tmp0_ = _data26_->best_rect;
	_tmp1_ = cr;
	if (_tmp0_.count < _tmp1_.count) {
		G4CountedRect _tmp2_;
		G4CountedRect _tmp3_;
		G4CountedRect _tmp5_;
		graphene_rect_t _tmp6_;
		_tmp2_ = cr;
		_data26_->best_rect.count = _tmp2_.count;
		_tmp3_ = _data26_->best_rect;
		if (_tmp3_.index == -1) {
			G4CountedRect _tmp4_;
			_tmp4_ = cr;
			_data26_->best_rect.index = _tmp4_.index;
		}
		_tmp5_ = cr;
		_tmp6_ = _tmp5_.rect;
		_data26_->best_rect.rect = _tmp6_;
	}
}

static void
___lambda82__gh_func (gconstpointer key,
                      gconstpointer value,
                      gpointer self)
{
	__lambda82_ (self, (gint) ((gintptr) key), (G4CountedRect*) value);
}

guint
g4_get_grid_view_item_size (GtkGridView* grid_view,
                            graphene_size_t* inner_size,
                            graphene_size_t* outer_size)
{
	Block26Data* _data26_;
	GPtrArray* arr = NULL;
	GPtrArray* _tmp0_;
	GHashTable* w_map = NULL;
	GHashTable* _tmp1_;
	GHashTable* x_set = NULL;
	GHashTable* _tmp2_;
	guint columns = 0U;
	GHashTable* _tmp52_;
	guint _tmp53_;
	guint _tmp54_;
	guint _tmp55_;
	guint _tmp56_;
	guint _tmp57_;
	guint _tmp58_;
	GHashTable* _tmp59_;
	G4CountedRect _tmp60_;
	graphene_rect_t _tmp61_;
	graphene_size_t _tmp62_;
	graphene_size_t _tmp63_;
	gint index = 0;
	G4CountedRect _tmp64_;
	gboolean _tmp65_ = FALSE;
	guint result;
	g_return_val_if_fail (grid_view != NULL, 0U);
	g_return_val_if_fail (inner_size != NULL, 0U);
	g_return_val_if_fail (outer_size != NULL, 0U);
	_data26_ = g_slice_new0 (Block26Data);
	_data26_->_ref_count_ = 1;
	_tmp0_ = g_ptr_array_new_full ((guint) 0, __vala_graphene_rect_t_free0_);
	arr = _tmp0_;
	_tmp1_ = g_hash_table_new_full (NULL, NULL, NULL, _g4_counted_rect_free0_);
	w_map = _tmp1_;
	_tmp2_ = g_hash_table_new_full (NULL, NULL, NULL, NULL);
	x_set = _tmp2_;
	{
		GtkWidget* c = NULL;
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		_tmp3_ = gtk_widget_get_first_child ((GtkWidget*) grid_view);
		_tmp4_ = _g_object_ref0 (_tmp3_);
		c = _tmp4_;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				GtkWidget* _tmp11_;
				GtkWidget* child = NULL;
				GtkWidget* _tmp12_;
				GtkWidget* _tmp13_;
				graphene_rect_t rect = {0};
				gboolean _tmp14_ = FALSE;
				gboolean _tmp15_ = FALSE;
				gboolean _tmp16_ = FALSE;
				gboolean _tmp17_ = FALSE;
				gboolean _tmp18_ = FALSE;
				GtkWidget* _tmp19_;
				if (!_tmp5_) {
					GtkWidget* _tmp6_ = NULL;
					GtkWidget* _tmp7_;
					GtkWidget* _tmp8_ = NULL;
					GtkWidget* _tmp10_;
					_tmp7_ = c;
					_tmp6_ = _tmp7_;
					_tmp8_ = NULL;
					if (_tmp6_ != NULL) {
						GtkWidget* _tmp9_;
						_tmp9_ = gtk_widget_get_next_sibling (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
						_tmp8_ = _tmp9_;
					}
					_tmp10_ = _g_object_ref0 (_tmp8_);
					_g_object_unref0 (c);
					c = _tmp10_;
				}
				_tmp5_ = FALSE;
				_tmp11_ = c;
				if (!(_tmp11_ != NULL)) {
					break;
				}
				_tmp12_ = c;
				_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget));
				child = _tmp13_;
				memset (&rect, 0, sizeof (graphene_rect_t));
				_tmp19_ = child;
				if (gtk_widget_is_drawable (_tmp19_)) {
					GtkWidget* _tmp20_;
					graphene_rect_t _tmp21_ = {0};
					gboolean _tmp22_;
					_tmp20_ = child;
					_tmp22_ = gtk_widget_compute_bounds (_tmp20_, (GtkWidget*) grid_view, &_tmp21_);
					rect = _tmp21_;
					_tmp18_ = _tmp22_;
				} else {
					_tmp18_ = FALSE;
				}
				if (_tmp18_) {
					graphene_rect_t _tmp23_;
					graphene_point_t _tmp24_;
					_tmp23_ = rect;
					_tmp24_ = _tmp23_.origin;
					_tmp17_ = _tmp24_.x >= ((gfloat) 0);
				} else {
					_tmp17_ = FALSE;
				}
				if (_tmp17_) {
					graphene_rect_t _tmp25_;
					graphene_point_t _tmp26_;
					_tmp25_ = rect;
					_tmp26_ = _tmp25_.origin;
					_tmp16_ = _tmp26_.y >= ((gfloat) 0);
				} else {
					_tmp16_ = FALSE;
				}
				if (_tmp16_) {
					graphene_rect_t _tmp27_;
					graphene_size_t _tmp28_;
					_tmp27_ = rect;
					_tmp28_ = _tmp27_.size;
					_tmp15_ = _tmp28_.width > ((gfloat) 0);
				} else {
					_tmp15_ = FALSE;
				}
				if (_tmp15_) {
					graphene_rect_t _tmp29_;
					graphene_size_t _tmp30_;
					_tmp29_ = rect;
					_tmp30_ = _tmp29_.size;
					_tmp14_ = _tmp30_.height > ((gfloat) 0);
				} else {
					_tmp14_ = FALSE;
				}
				if (_tmp14_) {
					gint width = 0;
					graphene_rect_t _tmp31_;
					graphene_size_t _tmp32_;
					gint count = 0;
					gint index = 0;
					GPtrArray* _tmp33_;
					gint _tmp34_;
					gint _tmp35_;
					G4CountedRect* cr0 = NULL;
					GHashTable* _tmp36_;
					gconstpointer _tmp37_;
					G4CountedRect* _tmp38_;
					G4CountedRect* _tmp39_;
					G4CountedRect cr = {0};
					graphene_rect_t _tmp42_;
					GHashTable* _tmp43_;
					G4CountedRect _tmp44_;
					G4CountedRect* _tmp45_;
					GHashTable* _tmp46_;
					graphene_rect_t _tmp47_;
					graphene_point_t _tmp48_;
					GPtrArray* _tmp49_;
					graphene_rect_t _tmp50_;
					graphene_rect_t* _tmp51_;
					_tmp31_ = rect;
					_tmp32_ = _tmp31_.size;
					width = (gint) _tmp32_.width;
					count = 1;
					_tmp33_ = arr;
					_tmp34_ = vala_g_ptr_array_get_length (_tmp33_);
					_tmp35_ = _tmp34_;
					index = _tmp35_;
					_tmp36_ = w_map;
					_tmp37_ = g_hash_table_lookup (_tmp36_, (gpointer) ((gintptr) width));
					_tmp38_ = _g4_counted_rect_dup0 ((G4CountedRect*) _tmp37_);
					cr0 = _tmp38_;
					_tmp39_ = cr0;
					if (_tmp39_ != NULL) {
						G4CountedRect* _tmp40_;
						G4CountedRect* _tmp41_;
						_tmp40_ = cr0;
						count = ((G4CountedRect) (*_tmp40_)).count + 1;
						_tmp41_ = cr0;
						index = ((G4CountedRect) (*_tmp41_)).index;
					}
					_tmp42_ = rect;
					g4_counted_rect_init (&cr, count, index, &_tmp42_);
					_tmp43_ = w_map;
					_tmp44_ = cr;
					_tmp45_ = _g4_counted_rect_dup0 (&_tmp44_);
					g_hash_table_insert (_tmp43_, (gpointer) ((gintptr) width), _tmp45_);
					_tmp46_ = x_set;
					_tmp47_ = rect;
					_tmp48_ = _tmp47_.origin;
					g_hash_table_add (_tmp46_, (gpointer) ((gintptr) _tmp48_.x));
					_tmp49_ = arr;
					_tmp50_ = rect;
					_tmp51_ = __vala_graphene_rect_t_copy0 (&_tmp50_);
					g_ptr_array_add (_tmp49_, _tmp51_);
					_g4_counted_rect_free0 (cr0);
				}
				_g_object_unref0 (child);
			}
		}
		_g_object_unref0 (c);
	}
	_tmp52_ = x_set;
	_tmp53_ = g_hash_table_size (_tmp52_);
	_tmp54_ = _tmp53_;
	_tmp55_ = gtk_grid_view_get_min_columns (grid_view);
	_tmp56_ = _tmp55_;
	_tmp57_ = gtk_grid_view_get_max_columns (grid_view);
	_tmp58_ = _tmp57_;
	columns = CLAMP (_tmp54_, _tmp56_, _tmp58_);
	g4_counted_rect_init (&_data26_->best_rect, 0, 0, NULL);
	_data26_->best_rect.index = -1;
	_tmp59_ = w_map;
	g_hash_table_foreach (_tmp59_, ___lambda82__gh_func, _data26_);
	_tmp60_ = _data26_->best_rect;
	_tmp61_ = _tmp60_.rect;
	_tmp62_ = _tmp61_.size;
	graphene_size_init_from_size (inner_size, &_tmp62_);
	_tmp63_ = *inner_size;
	graphene_size_init_from_size (outer_size, &_tmp63_);
	_tmp64_ = _data26_->best_rect;
	index = _tmp64_.index;
	if (index >= 0) {
		GPtrArray* _tmp66_;
		gint _tmp67_;
		gint _tmp68_;
		_tmp66_ = arr;
		_tmp67_ = vala_g_ptr_array_get_length (_tmp66_);
		_tmp68_ = _tmp67_;
		_tmp65_ = (index + 1) < _tmp68_;
	} else {
		_tmp65_ = FALSE;
	}
	if (_tmp65_) {
		gfloat _tmp69_ = 0.0F;
		GPtrArray* _tmp76_;
		gint _tmp77_;
		gint _tmp78_;
		if (columns > ((guint) 1)) {
			GPtrArray* _tmp70_;
			gconstpointer _tmp71_;
			graphene_point_t _tmp72_;
			GPtrArray* _tmp73_;
			gconstpointer _tmp74_;
			graphene_point_t _tmp75_;
			_tmp70_ = arr;
			_tmp71_ = g_ptr_array_index (_tmp70_, (guint) (index + 1));
			_tmp72_ = ((graphene_rect_t) (*((graphene_rect_t*) _tmp71_))).origin;
			_tmp73_ = arr;
			_tmp74_ = g_ptr_array_index (_tmp73_, (guint) index);
			_tmp75_ = ((graphene_rect_t) (*((graphene_rect_t*) _tmp74_))).origin;
			_tmp69_ = _tmp72_.x - _tmp75_.x;
		} else {
			_tmp69_ = (gfloat) (gtk_widget_get_width ((GtkWidget*) grid_view) / MAX (1, (gint) columns));
		}
		(*outer_size).width = _tmp69_;
		_tmp76_ = arr;
		_tmp77_ = vala_g_ptr_array_get_length (_tmp76_);
		_tmp78_ = _tmp77_;
		if ((index + columns) < ((guint) _tmp78_)) {
			GPtrArray* _tmp79_;
			gconstpointer _tmp80_;
			graphene_point_t _tmp81_;
			GPtrArray* _tmp82_;
			gconstpointer _tmp83_;
			graphene_point_t _tmp84_;
			_tmp79_ = arr;
			_tmp80_ = g_ptr_array_index (_tmp79_, index + columns);
			_tmp81_ = ((graphene_rect_t) (*((graphene_rect_t*) _tmp80_))).origin;
			_tmp82_ = arr;
			_tmp83_ = g_ptr_array_index (_tmp82_, (guint) index);
			_tmp84_ = ((graphene_rect_t) (*((graphene_rect_t*) _tmp83_))).origin;
			(*outer_size).height = _tmp81_.y - _tmp84_.y;
		}
	}
	result = columns;
	_g_hash_table_unref0 (x_set);
	_g_hash_table_unref0 (w_map);
	_g_ptr_array_unref0 (arr);
	block26_data_unref (_data26_);
	_data26_ = NULL;
	return result;
}

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

