XenevaOS
Loading...
Searching...
No Matches
video.h
Go to the documentation of this file.
1
30#ifndef __VIDEO_H__
31#define __VIDEO_H__
32
33#include "xnldr.h"
34#include "font.h"
36#include <Library/UefiLib.h>
37#include "clib.h"
38
39
40#define RGB(r, g, b) \
41 ((r & 0xFF) | ((g << 8)&0xFF00) | ((b << 16)&0xFF0000))
42
43#define RED(col)\
44 (col & 0xFF)
45
46#define GREEN(col)\
47 ((col>>8) & 0xFF)
48
49#define BLUE(col) \
50 ((col>>16) & 0xFF)
51
52/*
53 * XEInitialiseGraphics -- Initialise the screen and store graphics
54 * information in fbinfo structure
55 * @GraphicsOutput -- Pointer to Graphics Output protocol
56 */
58/*
59 * XEPutPixel -- puts a pixel on the screen
60 * @param x -- x location of the screen
61 * @param y -- y location of the screen
62 * @param col -- color of the pixel
63 */
64extern void XEPutPixel(size_t x, size_t y, uint32_t col);
65
66/*
67 * XEGraphicsPutC -- put a character to the screen
68 * @param str -- character to print
69 */
70extern void XEGraphicsPutC(char str);
71
72/*
73 * XEGraphicsPuts -- put string on the screen
74 * @param str -- string to put
75 */
76extern void XEGraphicsPuts(const char* str);
77
78/*
79 * XEGraphicsClearScreen -- clear the entire screen
80 * @param gop -- Pointer to Graphics Output Protocol
81 */
83
87extern size_t XEGetFramebufferSz();
88extern size_t XEGetPixelsPerLine();
89extern uint32_t XEGetRedMask();
90extern uint32_t XEGetBlueMask();
92extern uint32_t XEGetResvMask();
93
94
95
96#endif
uint32_t XEGetGreenMask()
Definition video.cpp:280
EFI_STATUS XEInitialiseGraphics(EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput)
Definition video.cpp:68
uint16_t XEGetScreenHeight()
Definition video.cpp:260
void XEGraphicsPuts(const char *str)
Definition video.cpp:184
uint16_t XEGetScreenWidth()
Definition video.cpp:256
uint32_t XEGetRedMask()
Definition video.cpp:272
size_t XEGetFramebufferSz()
Definition video.cpp:264
void XEPutPixel(size_t x, size_t y, uint32_t col)
Definition video.cpp:132
uint32_t XEGetBlueMask()
Definition video.cpp:276
void XEGraphicsClearScreen(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
Definition video.cpp:241
uint32_t XEGetResvMask()
Definition video.cpp:285
void XEGraphicsPutC(char str)
Definition video.cpp:148
size_t XEGetPixelsPerLine()
Definition video.cpp:268
uint32_t * XEGetFramebuffer()
Definition video.cpp:252
EFI_GRAPHICS_OUTPUT_PROTOCOL * gop
Definition xnldr.cpp:49
RETURN_STATUS EFI_STATUS
Definition UefiBaseType.h:33
unsigned int uint32_t
Definition acefiex.h:163
unsigned short int uint16_t
Definition acefiex.h:162
Definition GraphicsOutput.h:264