/* * Copyright 2014 (c) Anna Schumaker. */ extern "C" { #include #include } static void *history_init(struct queue *queue) { return gui_queue_alloc(queue, "History", 0); } static void history_added(struct queue *queue, unsigned int pos) { gui_queue_added(queue, pos); gui_sidebar_set_size(gui_queue(queue)); } static bool history_erase(struct queue *queue, struct track *track) { return false; } static void history_removed(struct queue *queue, unsigned int pos) { gui_queue_removed(queue, pos); gui_sidebar_set_size(gui_queue(queue)); } struct queue_ops history_ops = { history_init, gui_queue_free, history_added, history_erase, history_removed, gui_queue_cleared, NULL, gui_queue_updated, };