48 lines
1.2 KiB
C
48 lines
1.2 KiB
C
/*
|
|
* Copyright 2016 (c) Anna Schumaker.
|
|
*/
|
|
#ifndef OCARINA_GUI_TREEVIEW_H
|
|
#define OCARINA_GUI_TREEVIEW_H
|
|
#include <gui/builder.h>
|
|
|
|
/* Called to initialize the treeview widget. */
|
|
void gui_treeview_init();
|
|
|
|
/* Called to deinitialize the treeview layer. */
|
|
void gui_treeview_deinit();
|
|
|
|
/* Called to set the current playlist. */
|
|
void gui_treeview_set_playlist(struct playlist *);
|
|
|
|
/* Called to scroll the treeview to the current track. */
|
|
void gui_treeview_scroll();
|
|
|
|
/* Called to select a path from (x, y) screen coodinates. */
|
|
void gui_treeview_select_path_at_pos(unsigned int x, unsigned int y);
|
|
|
|
/*
|
|
* Called to get a list of selected tracks.
|
|
* NOTE: The caller is responsible for freeing the list with g_list_free().
|
|
*/
|
|
GList *gui_treeview_list_selected_tracks(void);
|
|
|
|
/* Called to access the treeview widget. */
|
|
static inline GtkTreeView *gui_treeview()
|
|
{
|
|
return GTK_TREE_VIEW(gui_builder_widget("treeview"));
|
|
}
|
|
|
|
/* Called to access the treview selection. */
|
|
static inline GtkTreeSelection *gui_treeview_selection()
|
|
{
|
|
return gtk_tree_view_get_selection(gui_treeview());
|
|
}
|
|
|
|
/* Called to access the sorting display widget. */
|
|
static inline GtkLabel *gui_sorting()
|
|
{
|
|
return GTK_LABEL(gui_builder_widget("sorting"));
|
|
}
|
|
|
|
#endif /* OCARINA_GUI_TREEVIEW_H */
|