blob: 3523f4bc11fd1e19856553c61b5b4d27f3690ffa (
plain) (
tree)
|
|
#ifndef UI_BUFFER_H
#define UI_BUFFER_H
#include "config.h"
//#include "ui/window.h"
#define BUFF_SIZE 1000
typedef struct prof_buff_entry_t {
char show_char;
char *date_fmt;
int flags;
int attrs;
char *from;
char *message;
} ProfBuffEntry;
typedef struct prof_buff_t {
ProfBuffEntry entry[BUFF_SIZE];
int wrap;
int current;
} ProfBuff;
ProfBuff* buffer_create();
void buffer_free(ProfBuff* buffer);
void buffer_push(ProfBuff* buffer, const char show_char, const char * const date_fmt, int flags, int attrs, const char * const from, const char * const message);
int buffer_size(ProfBuff* buffer);
int buffer_yield(ProfBuff* buffer, int line, ProfBuffEntry** list);
ProfBuffEntry buffer_yield_entry(ProfBuff* buffer, int entry);
#endif
|