Version 2.0.0-0

video Reference

File
core/xeos/include/xeos/video.h
Date
Wednesday, June 25, 2014
Includes
  • <system/macros.h>
  • <stdarg.h>
  • <stdbool.h>
  • <string.h>

Tasks

XEOS_Video_Clear Top

Clears the screem

void XEOS_Video_Clear( void );

XEOS_Video_GetPromptLength Top

Gets the standard prompt length

size_t XEOS_Video_GetPromptLength( void );

Return value

The length of the standard prompt string

XEOS_Video_MoveCursor Top

Moves the hardware cursor

void XEOS_Video_MoveCursor( unsigned int x, unsigned int y );

Parameters
  • x
    The X position
  • y
    The Y position

XEOS_Video_Print Top

Displays a message

int XEOS_Video_Print( const char *s );

Parameters
  • s
    The message
Return value

The number of character printed

XEOS_Video_Printf Top

Displays a formatted message

int XEOS_Video_Printf( const char *format, ... ) FORMAT_ATTRIBUTE( printf, 1, 2 );

Parameters
  • format
    The message format
Return value

The number of character printed

XEOS_Video_PrintPrompt Top

Prints the standard prompt

int XEOS_Video_PrintPrompt( void );

Return value

The number of character printed

XEOS_Video_Prompt Top

Displays a message with the standard prompt

int XEOS_Video_Prompt( const char *s );

Parameters
  • s
    The message
Return value

The number of character printed

XEOS_Video_Promptf Top

Displays a formatted message with the standard prompt

int XEOS_Video_Promptf( const char *format, ... ) FORMAT_ATTRIBUTE( printf, 1, 2 );

Parameters
  • format
    The message format
Return value

The number of character printed

XEOS_Video_Putc Top

Displays a single character

void XEOS_Video_Putc( char c, bool updateCursor );

Parameters
  • c
    The character to display
  • updateCursor
    If set, updates the hardware cursor

XEOS_Video_Scroll Top

Scrolls the screen

void XEOS_Video_Scroll( unsigned int n );

Parameters
  • n
    The number of lines to scroll

XEOS_Video_SetBG Top

Sets the screen background color

void XEOS_Video_SetBG( XEOS_Video_Color color );

Parameters
  • color
    The background color

XEOS_Video_SetFG Top

Sets the screen foreground color

void XEOS_Video_SetFG( XEOS_Video_Color color );

Parameters
  • color
    The foregournd color

XEOS_Video_SetStickyLines Top

Scrolls the number of sticky lines (that won't scroll)

void XEOS_Video_SetStickyLines( unsigned int lines );

Parameters
  • lines
    The number of lines

XEOS_Video_VPrintf Top

Displays a formatted message

int XEOS_Video_VPrintf( const char *format, va_list arg );

Parameters
  • format
    The message format
  • arg
    The arguments for the format
Return value

The number of character printed

XEOS_Video_X Top

Gets the hardware cursor's X position

unsigned int XEOS_Video_X( void );

Return value

The X position

XEOS_Video_Y Top

Gets the hardware cursor's X position

unsigned int XEOS_Video_Y( void );

Return value

The Y position

Types

XEOS_Video_Color Top

Video colors

typedef enum { XEOS_Video_ColorBlack = 0x00, XEOS_Video_ColorBlue = 0x01, XEOS_Video_ColorGreen = 0x02, XEOS_Video_ColorCyan = 0x03, XEOS_Video_ColorRed = 0x04, XEOS_Video_ColorMagenta = 0x05, XEOS_Video_ColorBrown = 0x06, XEOS_Video_ColorGrayLight = 0x07, XEOS_Video_ColorGray = 0x08, XEOS_Video_ColorBlueLight = 0x09, XEOS_Video_ColorGreenLight = 0x0A, XEOS_Video_ColorCyanLight = 0x0B, XEOS_Video_ColorRedLight = 0x0C, XEOS_Video_ColorMagentaLight = 0x0D, XEOS_Video_ColorBrownLight = 0x0E, XEOS_Video_ColorWhite = 0x0F } XEOS_Video_Color;

Constants
  • XEOS_Video_ColorBlack
    Black
  • XEOS_Video_ColorBlue
    Dark blue
  • XEOS_Video_ColorGreen
    Dark green
  • XEOS_Video_ColorCyan
    Dark cyan
  • XEOS_Video_ColorRed
    Dark red
  • XEOS_Video_ColorMagenta
    Dark magenta
  • XEOS_Video_ColorBrown
    Dark brown
  • XEOS_Video_ColorGrayLight
    Light gray
  • XEOS_Video_ColorGray
    Dark gray
  • XEOS_Video_ColorBlueLight
    Light blue
  • XEOS_Video_ColorGreenLight
    Light green
  • XEOS_Video_ColorCyanLight
    Light cyan
  • XEOS_Video_ColorRedLight
    Light red
  • XEOS_Video_ColorMagentaLight
    Light magenta
  • XEOS_Video_ColorBrownLight
    Light brown
  • XEOS_Video_ColorWhite
    White

Macros

__XEOS_VIDEO_H__ Top

#define __XEOS_VIDEO_H__

XEOS_VIDEO_COLS Top

The number of video columns

#define XEOS_VIDEO_COLS 80

XEOS_VIDEO_MEM Top

The video buffer location

#define XEOS_VIDEO_MEM 0xB8000

XEOS_VIDEO_ROWS Top

The number of video rows

#define XEOS_VIDEO_ROWS 25