KallistiOS  ##version##
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
fb_console.h
Go to the documentation of this file.
1 /* KallistiOS ##version##
2 
3  dc/fb_console.h
4  Copyright (C) 2009 Lawrence Sebald
5 
6 */
7 
8 /** \file dc/fb_console.h
9  \brief A simple dbgio interface to draw to the framebuffer.
10 
11  This file contains definitions to interact with a simple framebuffer dbgio
12  interface. This interface can be moved around in memory and can have its
13  width and height set so that you can truly customize it to the environment
14  as needed. This utilizes the bios font functionality to actually draw any
15  characters.
16 
17  To actually use the framebuffer device, pass "fb" as the parameter to
18  dbgio_dev_select().
19 
20  \author Lawrence Sebald
21 */
22 
23 #ifndef __DC_FB_CONSOLE_H
24 #define __DC_FB_CONSOLE_H
25 
26 #include <sys/cdefs.h>
27 __BEGIN_DECLS
28 
29 #include <kos/dbgio.h>
30 
31 /* \cond */
32 extern dbgio_handler_t dbgio_fb;
33 /* \endcond */
34 
35 /** \brief Set the target for the framebuffer dbgio device.
36 
37  This function allows you to set a target for the dbgio device on the
38  framebuffer. This allows you to do things like setting it to render to a
39  texture rather than to the whole framebuffer, for instance.
40 
41  The default setup for the framebuffer dbgio device is to print to the full
42  640x480 framebuffer (minus a 32-pixel border around the outside). If you
43  change this, you can restore the original functionality by passing NULL for
44  t, 640 for w, 480 for h, and 32 for borderx and bordery.
45 
46  \param t The target in memory to render to.
47  \param w The width of the target.
48  \param h The height of the target.
49  \param borderx How much border to leave around the target in the
50  X direction.
51  \param bordery How much border to leave around the target in the
52  Y direction.
53 */
54 void dbgio_fb_set_target(uint16 *t, int w, int h, int borderx, int bordery);
55 
56 __END_DECLS
57 
58 #endif /* __DC_FB_CONSOLE_H */
void dbgio_fb_set_target(uint16 *t, int w, int h, int borderx, int bordery)
Set the target for the framebuffer dbgio device.
Debug I/O Interface.
Definition: dbgio.h:37
unsigned short uint16
16-bit unsigned integer
Definition: types.h:29
Debug I/O.