console: add function to set default-attribute
This new function allows other layers to control the default attribute of a console. This attribute is used when clearing the screen or when allocating new cells. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
47b1aa3bb9
commit
cb178cdc4e
@ -627,6 +627,15 @@ void kmscon_console_clear_sb(struct kmscon_console *con)
|
||||
con->sb_pos = NULL;
|
||||
}
|
||||
|
||||
void kmscon_console_set_def_attr(struct kmscon_console *con,
|
||||
const struct font_char_attr *attr)
|
||||
{
|
||||
if (!con || !attr)
|
||||
return;
|
||||
|
||||
memcpy(&con->def_attr, attr, sizeof(*attr));
|
||||
}
|
||||
|
||||
void kmscon_console_reset(struct kmscon_console *con)
|
||||
{
|
||||
unsigned int i;
|
||||
|
@ -63,6 +63,8 @@ int kmscon_console_set_margins(struct kmscon_console *con,
|
||||
void kmscon_console_set_max_sb(struct kmscon_console *con, unsigned int max);
|
||||
void kmscon_console_clear_sb(struct kmscon_console *con);
|
||||
|
||||
void kmscon_console_set_def_attr(struct kmscon_console *con,
|
||||
const struct font_char_attr *attr);
|
||||
void kmscon_console_reset(struct kmscon_console *con);
|
||||
void kmscon_console_set_flags(struct kmscon_console *con, unsigned int flags);
|
||||
void kmscon_console_reset_flags(struct kmscon_console *con, unsigned int flags);
|
||||
|
Loading…
x
Reference in New Issue
Block a user