35#ifndef TCOD_CONSOLE_PRINTING_H_
36#define TCOD_CONSOLE_PRINTING_H_
72TCOD_DEPRECATED(
"Use TCOD_console_printf instead.")
85TCOD_DEPRECATED(
"Use TCOD_console_printf_ex instead.")
102TCOD_DEPRECATED(
"Use TCOD_console_printf_rect instead.")
120TCOD_DEPRECATED(
"Use TCOD_console_printf_rect_ex instead.")
152TCOD_DEPRECATED(
"Use TCOD_console_printf_frame instead.")
154 TCOD_console_t con,
int x,
int y,
int w,
int h,
bool empty,
TCOD_bkgnd_flag_t flag, const
char* fmt, ...);
169TCOD_DEPRECATED(
"Use TCOD_console_get_height_rect_fmt instead.")
178TCOD_DEPRECATED(
"Use TCOD_console_printf instead.")
186TCOD_DEPRECATED(
"Use TCOD_console_printf_ex instead.")
195TCOD_DEPRECATED(
"Use TCOD_console_printf_rect instead.")
203TCOD_DEPRECATED(
"Use TCOD_console_printf_rect_ex instead.")
219TCOD_DEPRECATED(
"Use TCOD_console_get_height_rect_fmt instead.")
221 TCOD_Console* con,
int x,
int y,
int w,
int h, const
wchar_t* fmt, ...);
225typedef enum TCOD_colctrl_t {
231 TCOD_COLCTRL_NUMBER = 5,
232 TCOD_COLCTRL_FORE_RGB,
233 TCOD_COLCTRL_BACK_RGB,
246#ifndef TCOD_NO_UNICODE
259TCOD_DEPRECATED(
"Use TCOD_printf_rgb instead.")
271TCOD_DEPRECATED(
"Use TCOD_printf_rgb instead.")
278 const
char* __restrict fmt,
289TCOD_DEPRECATED(
"Use TCOD_printf_rgb instead.")
291 TCOD_Console* __restrict con,
int x,
int y,
int w,
int h, const
char* __restrict fmt, ...);
301TCOD_DEPRECATED(
"Use TCOD_printf_rgb instead.")
310 const
char* __restrict fmt,
325TCOD_DEPRECATED(
"Print function TCOD_printf_rgb and TCOD_console_draw_frame_rgb should be called separately.")
334 const
char* __restrict fmt,
346 TCOD_Console* __restrict con,
int x,
int y,
int w,
int h, const
char* __restrict fmt, ...);
372 const
char* __restrict str,
406 const
char* __restrict str,
428 TCOD_Console* __restrict console,
int x,
int y,
int width,
int height,
size_t n, const
char* __restrict str);
442TCOD_DEPRECATED(
"Print function TCOD_printn_rgb and TCOD_console_draw_frame_rgb should be called separately.")
443TCOD_PUBLIC
TCOD_Error TCOD_console_printn_frame(
450 const
char* __restrict title,
475TCOD_DEPRECATED(
"Use TCOD_vprintf_rgb instead.")
480 const TCOD_color_t* __restrict fg,
481 const TCOD_color_t* __restrict bg,
484 const
char* __restrict fmt,
508TCOD_DEPRECATED(
"Use TCOD_vprintf_rgb instead.")
515 const TCOD_color_t* __restrict fg,
516 const TCOD_color_t* __restrict bg,
void TCOD_console_set_color_control(TCOD_colctrl_t con, TCOD_color_t fore, TCOD_color_t back)
Assign a foreground and background color to a color control index.
C types for console functions.
TCOD_Error
An enum of libtcod error codes.
Definition error.h:48
TCOD_alignment_t
Print justification options.
Definition console.h:81
TCOD_bkgnd_flag_t
Background color blend modes.
Definition console.h:60
void TCOD_console_print_frame(TCOD_console_t con, int x, int y, int w, int h, bool empty, TCOD_bkgnd_flag_t flag, const char *fmt,...)
Print an EASCII titled, framed region on a console, using default colors and alignment.
void TCOD_console_print(TCOD_Console *con, int x, int y, const char *fmt,...)
Print an EASCII string on a console, using default colors and alignment.
int TCOD_console_print_rect_ex_utf(TCOD_Console *con, int x, int y, int w, int h, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const wchar_t *fmt,...)
void TCOD_console_print_utf(TCOD_Console *con, int x, int y, const wchar_t *fmt,...)
int TCOD_console_print_rect(TCOD_Console *con, int x, int y, int w, int h, const char *fmt,...)
Print an EASCII string on a console constrained to a rectangle, using default colors and alignment.
int TCOD_console_print_rect_utf(TCOD_Console *con, int x, int y, int w, int h, const wchar_t *fmt,...)
void TCOD_console_print_ex_utf(TCOD_Console *con, int x, int y, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const wchar_t *fmt,...)
int TCOD_console_get_height_rect(TCOD_Console *con, int x, int y, int w, int h, const char *fmt,...)
Return the number of lines that would be printed by an EASCII string.
void TCOD_console_print_ex(TCOD_Console *con, int x, int y, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt,...)
Print an EASCII string on a console, using default colors.
int TCOD_console_get_height_rect_utf(TCOD_Console *con, int x, int y, int w, int h, const wchar_t *fmt,...)
int TCOD_console_print_rect_ex(TCOD_Console *con, int x, int y, int w, int h, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt,...)
Print an EASCII string on a console constrained to a rectangle, using default colors.
TCOD_Error TCOD_console_printn(TCOD_Console *console, int x, int y, size_t n, const char *str, const TCOD_ColorRGB *fg, const TCOD_ColorRGB *bg, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment)
Print a string of a specified length to a console.
int TCOD_printn_rgb(TCOD_Console *console, TCOD_PrintParamsRGB params, int n, const char *str)
Prints n-bytes of a string string to the console.
int TCOD_console_get_height_rect_n(TCOD_Console *console, int x, int y, int width, int height, size_t n, const char *str)
Return the height of the word-wrapped text with the given parameters.
int TCOD_printf_rgb(TCOD_Console *console, TCOD_PrintParamsRGB params, const char *fmt,...)
Prints a formatted string to the console.
int TCOD_console_printf_rect_ex(TCOD_Console *con, int x, int y, int w, int h, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt,...)
Format and print a UTF-8 string to a console.
TCOD_Error TCOD_console_printf_frame(TCOD_Console *con, int x, int y, int w, int h, int empty, TCOD_bkgnd_flag_t flag, const char *fmt,...)
Print a framed and optionally titled region to a console, using default colors and alignment.
TCOD_Error TCOD_console_printf_ex(TCOD_Console *con, int x, int y, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt,...)
Format and print a UTF-8 string to a console.
TCOD_Error TCOD_console_vprintf(TCOD_Console *console, int x, int y, const TCOD_color_t *fg, const TCOD_color_t *bg, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt, va_list args)
Print a formatted string using a va_list.
int TCOD_console_printn_rect(TCOD_Console *console, int x, int y, int width, int height, size_t n, const char *str, const TCOD_ColorRGB *fg, const TCOD_ColorRGB *bg, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment)
Print a string of a specified length in a bounding box to a console.
int TCOD_console_printf_rect(TCOD_Console *con, int x, int y, int w, int h, const char *fmt,...)
Format and print a UTF-8 string to a console.
int TCOD_console_vprintf_rect(TCOD_Console *console, int x, int y, int width, int height, const TCOD_color_t *fg, const TCOD_color_t *bg, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt, va_list args)
Print a formatted string using a va_list within a bounding box.
int TCOD_console_get_height_rect_fmt(TCOD_Console *con, int x, int y, int w, int h, const char *fmt,...)
Return the number of lines that would be printed by this formatted string.
TCOD_Error TCOD_console_printf(TCOD_Console *con, int x, int y, const char *fmt,...)
Format and print a UTF-8 string to a console.
int TCOD_console_get_height_rect_wn(int width, size_t n, const char *str)
Return the height of the word-wrapped text with the given width.
int TCOD_vprintf_rgb(TCOD_Console *console, TCOD_PrintParamsRGB params, const char *fmt, va_list args)
Prints a formatted string using va_list.
A 3-channel RGB color struct.
Definition color.h:50
A libtcod console containing a grid of tiles with {ch, fg, bg} information.
Definition console.h:125
Information about a string to be printed.
Definition console_printing.h:524