Anna Schumaker
e660e3f0b2
This function isn't easy to test without knowledge of screen coordinates, so I didn't include a unit test this time. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
42 lines
1.1 KiB
C
42 lines
1.1 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 sorting display widget. */
|
|
static inline GtkLabel *gui_sorting()
|
|
{
|
|
return GTK_LABEL(gui_builder_widget("sorting"));
|
|
}
|
|
|
|
#endif /* OCARINA_GUI_TREEVIEW_H */
|