2016-01-12 08:19:05 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2016 (c) Anna Schumaker.
|
|
|
|
*/
|
|
|
|
#include <gui/queue.h>
|
|
|
|
|
2016-01-13 16:48:43 -05:00
|
|
|
struct gui_queue *gui_queue_alloc(struct queue *queue, const gchar *text)
|
2016-01-12 08:19:05 -05:00
|
|
|
{
|
|
|
|
struct gui_queue *gq = g_malloc(sizeof(struct gui_queue));
|
|
|
|
|
|
|
|
gq->gq_queue = queue;
|
2016-01-13 16:48:43 -05:00
|
|
|
gq->gq_text = g_strdup(text);
|
2016-01-12 08:19:05 -05:00
|
|
|
return gq;
|
|
|
|
}
|
|
|
|
|
|
|
|
void gui_queue_free(struct queue *queue)
|
|
|
|
{
|
|
|
|
struct gui_queue *gq = gui_queue(queue);
|
|
|
|
|
|
|
|
queue->q_private = NULL;
|
2016-01-13 16:48:43 -05:00
|
|
|
|
|
|
|
g_free(gq->gq_text);
|
2016-01-12 08:19:05 -05:00
|
|
|
g_free(gq);
|
|
|
|
}
|