Turnstone Operating System
Loading...
Searching...
No Matches
video.h File Reference

video out interface More...

#include <types.h>
#include <memory.h>
#include <list.h>
#include <graphics/image.h>

Classes

struct  video_psf2_font_t
 psf v2 font header More...
 
struct  video_psf1_font_t
 psf v1 font header More...
 
struct  video_frame_buffer_t
 video frame buffer information More...
 

Macros

#define ___VIDEO_H   0
 
#define VIDEO_PSF2_FONT_MAGIC   0x864ab572
 
#define VIDEO_PSF1_FONT_MAGIC   0x0436
 
#define VIDEO_PCI_DEVICE_VENDOR_VIRTIO   0x1AF4
 
#define VIDEO_PCI_DEVICE_ID_VIRTIO_GPU   0x1050
 
#define VIDEO_PCI_DEVICE_VENDOR_VMWARE   0x15AD
 
#define VIDEO_PCI_DEVICE_ID_VMWARE_SVGA2   0x0405
 

Typedefs

typedef struct video_psf2_font_t video_psf2_font_t
 short hand for struct video_psf2_font_s
 
typedef struct video_psf1_font_t video_psf1_font_t
 short hand for struct video_psf1_font_s
 
typedef struct video_frame_buffer_t video_frame_buffer_t
 short hand for struct video_frame_buffer_s
 
typedef uint32_t pixel_t
 
typedef void(* video_display_flush_f) (uint32_t scanout, uint64_t offset, uint32_t x, uint32_t y, uint32_t width, uint32_t height)
 
typedef void(* video_move_cursor_f) (uint32_t x, uint32_t y)
 

Functions

void video_init (void)
 initialize video support on kernel
 
void video_refresh_frame_buffer_address (void)
 updates frame buffer address for page mapping changes
 
void video_clear_screen (void)
 clears screen aka write space to all buffer More...
 
int8_t video_display_init (memory_heap_t *heap, list_t *display_controllers)
 video diplay pci devices init More...
 
int8_t video_copy_contents_to_frame_buffer (uint8_t *buffer, uint64_t new_width, uint64_t new_height, uint64_t new_pixels_per_scanline)
 
void video_set_color (uint32_t foreground, uint32_t background)
 
void video_print (const char_t *string)
 prints string to console with efi system table's console output protocol. More...
 
int8_t video_move_text_cursor (int32_t x, int32_t y)
 
graphics_raw_image_tvideo_get_mouse_image (void)
 

Variables

video_display_flush_f VIDEO_DISPLAY_FLUSH
 
video_move_cursor_f VIDEO_MOVE_CURSOR
 

Detailed Description

video out interface

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Macro Definition Documentation

◆ ___VIDEO_H

#define ___VIDEO_H   0

prevent duplicate header error macro

◆ VIDEO_PSF1_FONT_MAGIC

#define VIDEO_PSF1_FONT_MAGIC   0x0436

magic for psf1 fonts

◆ VIDEO_PSF2_FONT_MAGIC

#define VIDEO_PSF2_FONT_MAGIC   0x864ab572

magic for psf2 fonts

Typedef Documentation

◆ pixel_t

typedef uint32_t pixel_t

pixel type

Function Documentation

◆ video_clear_screen()

void video_clear_screen ( void  )

clears screen aka write space to all buffer

clears screen aka write space to all buffer

◆ video_display_init()

int8_t video_display_init ( memory_heap_t heap,
list_t display_controllers 
)

video diplay pci devices init

Parameters
[in]heapheap to allocate memory
[in]display_controllerslist of display controllers
Returns
0 if success

◆ video_print()

void video_print ( const char_t string)

prints string to console with efi system table's console output protocol.

Parameters
[in]stringstring to print.