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#define RGB(r, g, b) \
40 (((b) & 0xFF) | (((g) << 8) & 0xFF00) | \
41 (((r) << 16) & 0xFF0000)) // ((r & 0xFF) | ((g << 8)&0xFF00) | ((b << 16)&0xFF0000))
42
43#define RED(col) ((col >> 16) & 0xFF)
44
45#define GREEN(col) ((col >> 8) & 0xFF)
46
47#define BLUE(col) (col & 0xFF)
48
49/*
50 * XEInitialiseGraphics -- Initialise the screen and store graphics
51 * information in fbinfo structure
52 * @GraphicsOutput -- Pointer to Graphics Output protocol
53 */
55/*
56 * XEPutPixel -- puts a pixel on the screen
57 * @param x -- x location of the screen
58 * @param y -- y location of the screen
59 * @param col -- color of the pixel
60 */
61extern void XEPutPixel(size_t x, size_t y, uint32_t col);
62
63/*
64 * XEGraphicsPutC -- put a character to the screen
65 * @param str -- character to print
66 */
67extern void XEGraphicsPutC(char str);
68
69/*
70 * XEGraphicsPuts -- put string on the screen
71 * @param str -- string to put
72 */
73extern void XEGraphicsPuts(const char* str);
74
75/*
76 * XEGraphicsClearScreen -- clear the entire screen
77 * @param gop -- Pointer to Graphics Output Protocol
78 */
80
84extern size_t XEGetFramebufferSz();
85extern size_t XEGetPixelsPerLine();
86extern uint32_t XEGetRedMask();
87extern uint32_t XEGetBlueMask();
89extern uint32_t XEGetResvMask();
90
91#endif
uint32_t XEGetGreenMask()
Definition video.cpp:279
EFI_STATUS XEInitialiseGraphics(EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput)
Definition video.cpp:69
uint16_t XEGetScreenHeight()
Definition video.cpp:259
void XEGraphicsPuts(const char *str)
Definition video.cpp:188
uint16_t XEGetScreenWidth()
Definition video.cpp:255
uint32_t XEGetRedMask()
Definition video.cpp:271
size_t XEGetFramebufferSz()
Definition video.cpp:263
void XEPutPixel(size_t x, size_t y, uint32_t col)
Definition video.cpp:136
uint32_t XEGetBlueMask()
Definition video.cpp:275
void XEGraphicsClearScreen(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
Definition video.cpp:240
uint32_t XEGetResvMask()
Definition video.cpp:284
void XEGraphicsPutC(char str)
Definition video.cpp:152
size_t XEGetPixelsPerLine()
Definition video.cpp:267
uint32_t * XEGetFramebuffer()
Definition video.cpp:251
EFI_GRAPHICS_OUTPUT_PROTOCOL * gop
Definition xnldr.cpp:51
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