Go to the source code of this file.
Data Structures | |
struct | board |
Macros | |
#define | FONT_H 20 /* char height, pixels */ |
#define | FONT_W 9 /* char width, pixels */ |
Functions | |
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, free resources before allocate new ones TODO: resource deallocation in case of error. TODO: move the font load at gui_initialization TODO: deallocation of the message history. More... | |
void | delete_board (struct board *b) |
deallocates memory space for a board More... | |
void | move_message_board (struct board *b, int dy) |
int | print_message (struct board *b, const char *s) |
const char * | read_message (const struct board *b) |
return the whole text from a board More... | |
static void | render_board (struct board *b) |
int | reset_board (struct board *b) |
reset the board to blank More... | |
#define FONT_H 20 /* char height, pixels */ |
Definition at line 53 of file console_board.c.
Referenced by board_setup(), and render_board().
#define FONT_W 9 /* char width, pixels */ |
Definition at line 54 of file console_board.c.
Referenced by board_setup(), and render_board().
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, free resources before allocate new ones TODO: resource deallocation in case of error. TODO: move the font load at gui_initialization TODO: deallocation of the message history.
Definition at line 95 of file console_board.c.
References ast_calloc, ast_free, ast_log(), board::blank, board::cur_col, board::cur_line, board::font, FONT_H, board::font_rects, FONT_W, LOG_WARNING, board::p_h, board::p_rect, board::p_w, board::screen, board::text, board::v_h, and board::v_w.
Referenced by init_board(), and sdl_setup().
void delete_board | ( | struct board * | b | ) |
deallocates memory space for a board
Definition at line 324 of file console_board.c.
References ast_free, board::blank, and board::text.
Referenced by cleanup_sdl().
void move_message_board | ( | struct board * | b, |
int | dy | ||
) |
Definition at line 202 of file console_board.c.
References board::cur_line, board::p_h, render_board(), and board::v_h.
Referenced by eventhandler().
int print_message | ( | struct board * | b, |
const char * | s | ||
) |
Definition at line 231 of file console_board.c.
References ast_strlen_zero(), board::cur_col, render_board(), board::text, board::v_h, and board::v_w.
Referenced by handle_keyboard_input(), handle_mousedown(), keypad_digit(), keypad_pick_up(), and update_device_info().
const char* read_message | ( | const struct board * | b | ) |
return the whole text from a board
Definition at line 214 of file console_board.c.
References board::text.
Referenced by keypad_pick_up().
|
static |
Definition at line 166 of file console_board.c.
References board::blank, board::cur_line, board::font, FONT_H, board::font_rects, FONT_W, board::p_h, board::p_rect, board::screen, board::text, board::v_h, and board::v_w.
Referenced by move_message_board(), print_message(), and reset_board().
int reset_board | ( | struct board * | b | ) |
reset the board to blank
Definition at line 219 of file console_board.c.
References board::cur_col, board::cur_line, render_board(), board::text, board::v_h, and board::v_w.
Referenced by keypad_pick_up(), and update_device_info().