46 #include "asterisk/utils.h"
126 if (b->
text == NULL) {
134 b->
blank = SDL_CreateRGBSurface(screen->flags, br.w, br.h,
135 screen->format->BitsPerPixel,
136 screen->format->Rmask, screen->format->Gmask,
137 screen->format->Bmask, screen->format->Amask);
139 if (b->
blank == NULL) {
169 int first_char = b->
v_w * first_row;
170 int last_char = first_char + b->
p_h * b->
v_w;
185 for (i = first_char, col = 0; i < last_char; i++) {
186 int c = b->
text[i] - 32;
207 else if (cur >= b->
v_h - b->
p_h)
208 cur = b->
v_h - b->
p_h - 1;
249 for (i = 0; i < l; i++) {
286 for (i = 0; i < l; i++) {
331 SDL_FreeSurface(b->
blank);
340 static int scroll_message(...)
342 if moving up, scroll
text up;
343 if (gui->message_board.screen_cur > 0)
344 gui->message_board.screen_cur--;
345 otherwise scroll
text down.
346 if ((b->screen_cur + b->p_line) < b->board_next) {
347 gui->message_board.screen_cur++;
Asterisk main include file. File version handling, generic pbx functions.
int reset_board(struct board *b)
reset the board to blank
void delete_board(struct board *b)
deallocates memory space for a board
static force_inline int attribute_pure ast_strlen_zero(const char *s)
struct board * board_setup(SDL_Surface *screen, SDL_Rect *dest, SDL_Surface *font, SDL_Rect *font_rects)
Initialize the board. return 0 on success, 1 on error TODO, if this is done at reload time...
static void render_board(struct board *b)
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
void move_message_board(struct board *b, int dy)
const char * read_message(const struct board *b)
return the whole text from a board
int print_message(struct board *b, const char *s)
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.