lindows/lcrash/driver/cap/textdisplay.h

63 lines
1.3 KiB
C

#pragma once
#include <lcrash/types.h>
#include <lcrash/driver/sysbus.h>
/**
* Text-mode display capability.
*/
struct TextModeDisplayCapability {
/**
* Switch the display into text mode if it supports
* other display modes
*
* \return 0 on success
*/
s32 (*Enable)(struct SysbusDevice* Device);
/**
* Clear the screen and reset it's attributes to a known
* state, what state exactly? That's for me to know and
* you to find out.
*
* \return 0 on success
*/
s32 (*Reset)(struct SysbusDevice* Device);
/**
* Get the maximum number of usable colors
*
* \return color count or -ERROR
*/
s32 (*GetPaletteSize)(struct SysbusDevice* Device);
/**
* Set a palette color
*
* \return 0 on success
*/
s32 (*SetPaletteColor)(struct SysbusDevice* Device, u32 ID, u8 Red, u8 Green, u8 Blue);
/**
* Set a character on the display
*
* \return 0 on success
*/
s32 (*SetCharacter)(struct SysbusDevice* Device, u32 Row, u32 Col, c8 Char, u32 ForegroundColor, u32 BackgroundColor);
};
/**
* Initialize the capability driver
*/
void TextModeDisplayCapabilityInitialize();
/**
* Function name
*/
struct SysbusDeviceCapability* TextModeDisplayCapabilityGetCapability();
/**
* Yeah
*/
bool TextModeDisplayCapabilityIsInitialized();