RetroArch
|
#include <stdlib.h>
#include <string.h>
#include <boolean.h>
#include <queues/message_queue.h>
#include <compat/strl.h>
#include <compat/posix_string.h>
Classes | |
struct | queue_elem |
struct | msg_queue |
Functions | |
msg_queue_t * | msg_queue_new (size_t size) |
void | msg_queue_free (msg_queue_t *queue) |
void | msg_queue_push (msg_queue_t *queue, const char *msg, unsigned prio, unsigned duration) |
void | msg_queue_clear (msg_queue_t *queue) |
const char * | msg_queue_pull (msg_queue_t *queue) |
void msg_queue_clear | ( | msg_queue_t * | queue | ) |
msg_queue_clear: : pointer to queue object
Clears out everything in the queue.
void msg_queue_free | ( | msg_queue_t * | queue | ) |
msg_queue_free: : pointer to queue object
Frees message queue..
msg_queue_t* msg_queue_new | ( | size_t | size | ) |
msg_queue_new: : maximum size of message
Creates a message queue with maximum size different messages.
Returns: NULL if allocation error, pointer to a message queue if successful. Has to be freed manually.
const char* msg_queue_pull | ( | msg_queue_t * | queue | ) |
msg_queue_pull: : pointer to queue object
Pulls highest priority message in queue.
Returns: NULL if no message in queue, otherwise a string containing the message.
void msg_queue_push | ( | msg_queue_t * | queue, |
const char * | msg, | ||
unsigned | prio, | ||
unsigned | duration | ||
) |
msg_queue_push: : pointer to queue object : message to add to the queue : priority level of the message : how many times the message can be pulled before it vanishes (E.g. show a message for 3 seconds @ 60fps = 180 duration).
Push a new message onto the queue.