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"
35#include "clib.h"
36#ifdef _MSC_VER
38 #include <Library/UefiLib.h>
39#elif __GNUC__
40 #include <efi/efi.h>
41#endif
42
43
44#define RGB(r, g, b) \
45 ((r & 0xFF) | ((g << 8)&0xFF00) | ((b << 16)&0xFF0000))
46
47#define RED(col)\
48 (col & 0xFF)
49
50#define GREEN(col)\
51 ((col>>8) & 0xFF)
52
53#define BLUE(col) \
54 ((col>>16) & 0xFF)
55
56/*
57 * XEInitialiseGraphics -- Initialise the screen and store graphics
58 * information in fbinfo structure
59 * @GraphicsOutput -- Pointer to Graphics Output protocol
60 */
62/*
63 * XEPutPixel -- puts a pixel on the screen
64 * @param x -- x location of the screen
65 * @param y -- y location of the screen
66 * @param col -- color of the pixel
67 */
68extern void XEPutPixel(size_t x, size_t y, uint32_t col);
69
70/*
71 * XEGraphicsPutC -- put a character to the screen
72 * @param str -- character to print
73 */
74extern void XEGraphicsPutC(char str);
75
76/*
77 * XEGraphicsPuts -- put string on the screen
78 * @param str -- string to put
79 */
80extern void XEGraphicsPuts(const char* str);
81
82/*
83 * XEGraphicsClearScreen -- clear the entire screen
84 * @param gop -- Pointer to Graphics Output Protocol
85 */
87
91extern size_t XEGetFramebufferSz();
92extern size_t XEGetPixelsPerLine();
93extern uint32_t XEGetRedMask();
94extern uint32_t XEGetBlueMask();
96extern uint32_t XEGetResvMask();
97
98
99
100#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