xref: /haiku/headers/private/kernel/console.h (revision d260b2c469621ad1fd4e2a3694180365851c8cf8)
152a38012Sejakowatz /*
2f5a934c9SAxel Dörfler  * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3f5a934c9SAxel Dörfler  * Distributed under the terms of the MIT License.
4f5a934c9SAxel Dörfler  *
5f5a934c9SAxel Dörfler  * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
6f5a934c9SAxel Dörfler  * Distributed under the terms of the NewOS License.
752a38012Sejakowatz  */
852a38012Sejakowatz #ifndef _KERNEL_CONSOLE_H
952a38012Sejakowatz #define _KERNEL_CONSOLE_H
1052a38012Sejakowatz 
11f5a934c9SAxel Dörfler 
12f5a934c9SAxel Dörfler #include <module.h>
13564cba31SAxel Dörfler #include <stdio.h>
1452a38012Sejakowatz 
15564cba31SAxel Dörfler struct kernel_args;
16564cba31SAxel Dörfler 
17f5a934c9SAxel Dörfler 
18f5a934c9SAxel Dörfler typedef struct {
19f5a934c9SAxel Dörfler 	module_info	info;
20f5a934c9SAxel Dörfler 
21f5a934c9SAxel Dörfler 	status_t (*get_size)(int32 *_width, int32 *_height);
22f5a934c9SAxel Dörfler 	void (*move_cursor)(int32 x, int32 y);
23f5a934c9SAxel Dörfler 	void (*put_glyph)(int32 x, int32 y, uint8 glyph, uint8 attr);
24f5a934c9SAxel Dörfler 	void (*fill_glyph)(int32 x, int32 y, int32 width, int32 height, uint8 glyph, uint8 attr);
25f5a934c9SAxel Dörfler 	void (*blit)(int32 srcx, int32 srcy, int32 width, int32 height, int32 destx, int32 desty);
26f5a934c9SAxel Dörfler 	void (*clear)(uint8 attr);
27f5a934c9SAxel Dörfler } console_module_info;
28f5a934c9SAxel Dörfler 
29f5a934c9SAxel Dörfler 
30*d260b2c4SAxel Dörfler #ifdef __cplusplus
31*d260b2c4SAxel Dörfler extern "C" {
32*d260b2c4SAxel Dörfler #endif
33*d260b2c4SAxel Dörfler 
34f5a934c9SAxel Dörfler int con_init(struct kernel_args *args);
355cdacbaaSlillo void kprintf(const char *fmt, ...) __PRINTFLIKE(1,2);
365cdacbaaSlillo void kprintf_xy(int x, int y, const char *fmt, ...) __PRINTFLIKE(3,4);
3752a38012Sejakowatz 
38*d260b2c4SAxel Dörfler #ifdef __cplusplus
39*d260b2c4SAxel Dörfler }
40*d260b2c4SAxel Dörfler #endif
41*d260b2c4SAxel Dörfler 
42564cba31SAxel Dörfler #endif	/* _KERNEL_CONSOLE_H */
43