1 /* 2 * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 6 * Distributed under the terms of the NewOS License. 7 */ 8 #ifndef _KERNEL_CONSOLE_H 9 #define _KERNEL_CONSOLE_H 10 11 12 #include <module.h> 13 #include <stdio.h> 14 15 struct kernel_args; 16 17 18 typedef struct { 19 module_info info; 20 21 status_t (*get_size)(int32 *_width, int32 *_height); 22 void (*move_cursor)(int32 x, int32 y); 23 void (*put_glyph)(int32 x, int32 y, uint8 glyph, uint8 attr); 24 void (*fill_glyph)(int32 x, int32 y, int32 width, int32 height, uint8 glyph, uint8 attr); 25 void (*blit)(int32 srcx, int32 srcy, int32 width, int32 height, int32 destx, int32 desty); 26 void (*clear)(uint8 attr); 27 } console_module_info; 28 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 int con_init(struct kernel_args *args); 35 void kprintf(const char *fmt, ...) __PRINTFLIKE(1,2); 36 void kprintf_xy(int x, int y, const char *fmt, ...) __PRINTFLIKE(3,4); 37 38 #ifdef __cplusplus 39 } 40 #endif 41 42 #endif /* _KERNEL_CONSOLE_H */ 43