usb compatibility improvements (rodries)
[libogc.git] / gc / ogc / consol.h
blob294f7e6b11a93a0ad0181070425fb1d8ea741f60
1 #ifndef __CONSOL_H__
2 #define __CONSOL_H__
4 /*!
5 * \file consol.h
6 * \brief Console subsystem
8 */
10 #include "gx_struct.h"
12 /* macros to support old function names */
13 #define console_init CON_Init
14 #define SYS_ConsoleInit CON_InitEx
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 /*!
21 * \fn CON_Init(void *framebuffer,int xstart,int ystart,int xres,int yres,int stride)
22 * \brief Initializes the console subsystem with given parameters
24 * \param[in] framebuffer pointer to the framebuffer used for drawing the characters
25 * \param[in] xstart,ystart start position of the console output in pixel
26 * \param[in] xres,yres size of the console in pixel
27 * \param[in] stride size of one line of the framebuffer in bytes
29 * \return none
31 void CON_Init(void *framebuffer,int xstart,int ystart,int xres,int yres,int stride);
33 /*!
34 * \fn s32 CON_InitEx(GXRModeObj *rmode, s32 conXOrigin,s32 conYOrigin,s32 conWidth,s32 conHeight)
35 * \brief Initialize stdout console
36 * \param[in] rmode pointer to the video/render mode configuration
37 * \param[in] conXOrigin starting pixel in X direction of the console output on the external framebuffer
38 * \param[in] conYOrigin starting pixel in Y direction of the console output on the external framebuffer
39 * \param[in] conWidth width of the console output 'window' to be drawn
40 * \param[in] conHeight height of the console output 'window' to be drawn
42 * \return 0 on success, <0 on error
44 s32 CON_InitEx(GXRModeObj *rmode, s32 conXOrigin,s32 conYOrigin,s32 conWidth,s32 conHeight);
46 /*!
47 * \fn CON_GetMetrics(int *cols, int *rows)
48 * \brief retrieve the columns and rows of the current console
50 * \param[out] cols,rows number of columns and rows of the current console
52 * \return none
54 void CON_GetMetrics(int *cols, int *rows);
56 /*!
57 * \fn CON_GetPosition(int *col, int *row)
58 * \brief retrieve the current cursor position of the current console
60 * \param[out] col,row current cursor position
62 * \return none
64 void CON_GetPosition(int *cols, int *rows);
66 /*!
67 * \fn CON_EnableGecko(int channel, int safe)
68 * \brief Enable or disable the USB gecko console.
70 * \param[in] channel EXI channel, or -1 ¨to disable the gecko console
71 * \param[in] safe If true, use safe mode (wait for peer)
73 * \return none
75 void CON_EnableGecko(int channel,int safe);
77 #ifdef __cplusplus
79 #endif
81 #endif