console: allow retrieving console flags

This adds a new function that allows external subsystems to retrieve the
current flags of the console.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-05-30 18:19:03 +02:00
parent 320b838644
commit 2630ee585b
2 changed files with 11 additions and 0 deletions

View File

@ -1061,6 +1061,14 @@ void kmscon_console_reset_flags(struct kmscon_console *con, unsigned int flags)
con->cells->flags &= ~flags;
}
unsigned int kmscon_console_get_flags(struct kmscon_console *con)
{
if (!con)
return 0;
return con->cells->flags;
}
void kmscon_console_draw(struct kmscon_console *con, struct font_screen *fscr)
{
if (!con)

View File

@ -44,8 +44,10 @@ struct kmscon_console;
/* console objects */
/* modes for kmscon_console_write() */
#define KMSCON_CONSOLE_INSERT 0x01
#define KMSCON_CONSOLE_WRAP 0x02
/* modes for kmscon_console_re/set() */
#define KMSCON_CONSOLE_REL_ORIGIN 0x04
int kmscon_console_new(struct kmscon_console **out);
@ -59,6 +61,7 @@ int kmscon_console_resize(struct kmscon_console *con, unsigned int x,
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);
unsigned int kmscon_console_get_flags(struct kmscon_console *con);
void kmscon_console_draw(struct kmscon_console *con, struct font_screen *fscr);