Combine three arguments of curses_putch into one
It will need another parameter for 256-colour support. To avoid having too many arguments, put glyph colour, background colour and attributes into a struct and, since to curses library all of that is attributes that are handled by same function, call the struct "gryph attributes". curses_putch was also declared in two different headers, remove one of those declarations.
This commit is contained in:
@@ -6,6 +6,11 @@
|
||||
#ifndef CURSWIN_H
|
||||
# define CURSWIN_H
|
||||
|
||||
struct glyph_attributes {
|
||||
int color;
|
||||
int framecolor;
|
||||
int attribute_flags;
|
||||
};
|
||||
|
||||
/* Global declarations */
|
||||
|
||||
@@ -27,11 +32,11 @@ void curses_del_wid(winid wid);
|
||||
void curs_destroy_all_wins(void);
|
||||
#ifdef ENHANCED_SYMBOLS
|
||||
void curses_putch(winid wid, int x, int y, int ch,
|
||||
struct unicode_representation *ur, int color,
|
||||
int framecolor, int attrs);
|
||||
struct unicode_representation *ur,
|
||||
const struct glyph_attributes *attr);
|
||||
#else
|
||||
void curses_putch(winid wid, int x, int y, int ch, int color,
|
||||
int framecolor, int attrs);
|
||||
void curses_putch(winid wid, int x, int y, int ch,
|
||||
const struct glyph_attributes *attr);
|
||||
#endif
|
||||
void curses_get_window_xy(winid wid, int *x, int *y);
|
||||
boolean curses_window_has_border(winid wid);
|
||||
|
||||
Reference in New Issue
Block a user