?? alt_up_vga.h
字號:
#ifndef __ALT_UP_CHARACTER_VGA_H__
#define __ALT_UP_CHARACTER_VGA_H__
#include <stddef.h>
#include <alt_types.h>
//////////////////////////////////////////////////////////////////////////////////////
// Pixel Mode Functions
//////////////////////////////////////////////////////////////////////////////////////
/**
* @brief Draw a pixel in the location specified by <em>(x, y)</em> on the VGA monitor
*
* @param pixel -- the pixel
* @param x -- the \em x coordinate
* @param y -- the \em y coordinate
*
* @return 0 for suceess, -1 for error (such as out of bounds)
**/
int alt_up_vga_draw_pixel(alt_u32 pixel, unsigned x, unsigned y);
//////////////////////////////////////////////////////////////////////////////////////
// Character Mode Functions
//////////////////////////////////////////////////////////////////////////////////////
/**
* @brief Draw a character to the location sepcified by <em>(x, y)</em> on the
* VGA monitor with white color and transparent background
*
* @param ch -- the character to draw
* @param x -- the \em x coordinate
* @param y -- the \em y coordinate
*
* @return 0 for success, -1 for error (such as out of bounds)
**/
int alt_up_vga_draw_char_1b(alt_u8 ch, unsigned x, unsigned y);
/* ************************************************************************
* The following functions is not supported by the hardware currently. They
* will be supported in future releases.
* ************************************************************************/
/**
* @brief Draw a character to the location sepcified by <em>(x, y)</em> on the
* VGA monitor by specifying the R, G, B value of the character (9-bit color
* mode)
*
* @param ch -- the character to draw
* @param x -- the \em x coordinate
* @param y -- the \em y coordinate
* @param r -- the Red value for the character foreground. Ranging from 0 to 7 (3 bits).
* @param g -- the Green color value for the character foreground. Ranging from 0 to 7 (3 bits).
* @param b -- the Blue color value for the character foreground. Ranging from 0 to 7 (3 bits).
*
* @return 0 for success, -1 for error (coordinates out of boundary or invalid color values)
**/
int alt_up_vga_draw_char_9b(alt_u8 ch, unsigned x, unsigned y, unsigned r, unsigned g, unsigned b);
/**
* @brief Draw a character to the location sepcified by <em>(x, y)</em> on the
* VGA monitor by specifying the foreground, background and its transparency
* value of the character (8-bit color mode)
*
* @param ch -- the character to draw
* @param x -- the \em x coordinate
* @param y -- the \em y coordinate
* @param fg -- the foreground color index, ranging from 0 to 15 (4 bits)
* @param bg -- the background color index, ranging from 0 to 15 (4 bits)
* @param transparency -- the Blue color value for the character foreground. Either 0 or 1 (1 bit).
*
* @return 0 for success, -1 for error (coordinates out of boundary or invalid color values)
**/
int alt_up_vga_draw_char_8b(alt_u8 ch, unsigned x, unsigned y, unsigned fg, unsigned bg, unsigned transparency);
/**
* @brief Draw a character to the location sepcified by <em>(x, y)</em> on the
* VGA monitor by specifying the foreground color index of the character (4-bit
* color mode)
*
* @param ch -- the character to draw
* @param x -- the \em x coordinate
* @param y -- the \em y coordinate
* @param fg -- the foreground color index, ranging from 0 to 15 (4 bits)
*
* @return 0 for success, -1 for error (coordinates out of boundary or invalid color values)
**/
int alt_up_vga_draw_char_4b(alt_u8 ch, unsigned x, unsigned y, unsigned fg);
#endif /* __ALT_UP_CHARACTER_VGA_H__ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -