1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

[draw] enum -> int

This commit is contained in:
Witold Filipczyk 2022-01-21 20:30:47 +01:00
parent 2f51c30d70
commit fca3a698b1
2 changed files with 12 additions and 11 deletions

View File

@ -336,12 +336,12 @@ fix_dwchar_around_box(struct terminal *term, struct el_box *box, int border,
#ifdef CONFIG_UTF8
void
draw_char(struct terminal *term, int x, int y,
unicode_val_T data, enum screen_char_attr attr,
unicode_val_T data, int attr,
struct color_pair *color)
#else
void
draw_char(struct terminal *term, int x, int y,
unsigned char data, enum screen_char_attr attr,
unsigned char data, int attr,
struct color_pair *color)
#endif /* CONFIG_UTF8 */
{
@ -359,7 +359,7 @@ draw_char(struct terminal *term, int x, int y,
void
draw_box(struct terminal *term, struct el_box *box,
unsigned char data, enum screen_char_attr attr,
unsigned char data, int attr,
struct color_pair *color)
{
struct screen_char *line, *pos, *end;
@ -423,7 +423,7 @@ draw_shadow(struct terminal *term, struct el_box *box,
static void
draw_text_utf8(struct terminal *term, int x, int y,
char *text, int length,
enum screen_char_attr attr, struct color_pair *color)
int attr, struct color_pair *color)
{
struct screen_char *start, *pos;
char *end = text + length;
@ -496,7 +496,7 @@ draw_text_utf8(struct terminal *term, int x, int y,
void
draw_text(struct terminal *term, int x, int y,
char *text, int length,
enum screen_char_attr attr, struct color_pair *color)
int attr, struct color_pair *color)
{
int end_pos;
struct screen_char *pos, *end;
@ -562,7 +562,7 @@ draw_text(struct terminal *term, int x, int y,
void
draw_dlg_text(struct dialog_data *dlg_data, int x, int y,
char *text, int length,
enum screen_char_attr attr, struct color_pair *color)
int attr, struct color_pair *color)
{
struct terminal *term = dlg_data->win->term;
struct el_box *box = &dlg_data->real_box;

View File

@ -28,6 +28,7 @@ struct terminal;
*
* XXX: The bold mask is used as part of the color encoding. */
enum screen_char_attr {
SCREEN_ATTR_NONE = 0,
SCREEN_ATTR_UNSEARCHABLE = 0x01,
SCREEN_ATTR_NODE_NUMBER = 0x02,
SCREEN_ATTR_BOLD = 0x08,
@ -256,17 +257,17 @@ void draw_border_cross(struct terminal *, int x, int y,
/** Draws a char. */
#ifdef CONFIG_UTF8
void draw_char(struct terminal *term, int x, int y,
unicode_val_T data, enum screen_char_attr attr,
unicode_val_T data, int attr,
struct color_pair *color);
#else
void draw_char(struct terminal *term, int x, int y,
unsigned char data, enum screen_char_attr attr,
unsigned char data, int attr,
struct color_pair *color);
#endif /* CONFIG_UTF8 */
/** Draws area defined by @a box using the same colors and attributes. */
void draw_box(struct terminal *term, struct el_box *box,
unsigned char data, enum screen_char_attr attr,
unsigned char data, int attr,
struct color_pair *color);
/** Draws a shadow of @a width and @a height with color @a color
@ -286,13 +287,13 @@ void fix_dwchar_around_box(struct terminal *term, struct el_box *box, int border
/** Draws @a length chars from @a text. */
void draw_text(struct terminal *term, int x, int y,
char *text, int length,
enum screen_char_attr attr,
int attr,
struct color_pair *color);
/** Draws text for dialogs. */
void draw_dlg_text(struct dialog_data *dlg_data, int x, int y,
char *text, int length,
enum screen_char_attr attr, struct color_pair *color);
int attr, struct color_pair *color);
/** Draws @a length chars from @a line on the screen. */