XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
aucon.h File Reference
#include <aurora.h>
Include dependency graph for aucon.h:

Go to the source code of this file.

Classes

struct  _aucon_
 

Macros

#define SCREEN_SETMODE   200
 
#define SCREEN_GETWIDTH   201
 
#define SCREEN_GETHEIGHT   202
 
#define SCREEN_GETBPP   203
 
#define SCREEN_SETBPP   204
 
#define SCREEN_UPDATE   205
 
#define SCREEN_GET_SCANLINE   206
 
#define SCREEN_GET_PITCH   207
 
#define SCREEN_REG_MNGR   208
 
#define SCREEN_GET_FB   209
 
#define SCREEN_RESTORE_BOOT_FB   210
 

Typedefs

typedef struct _aucon_ AuConsole
 
typedef void(* AuConsolePresentFn) (uint32_t *src, uint32_t src_pitch, int x, int y, int w, int h)
 

Functions

void AuConsoleInitialize (PKERNEL_BOOT_INFO info, bool early)
 AuConsoleInitialize – initialize kernel direct screen console.
 
void AuConsolePostInitialise (PKERNEL_BOOT_INFO info)
 AuConsolePostInitialise – initialise the post console process.
 
void AuPutS (char *str)
 Prints string to console output.
 
void AuPutS_Color (char *str, uint32_t color)
 Prints string to console output.
 
AU_EXTERN AU_EXPORT void AuTextOut (const char *text,...)
 AuTextOut – standard text printing function for entire kernel.
 
AU_EXTERN AU_EXPORT void AuTextOut_profiler (const char *text,...)
 
void AuConsoleEarlyEnable (bool value)
 AuConsoleEarlyEnable – enables or disable early mode text output.
 
void AuConsoleSetDisplayOwned (void)
 Put a character to console output.
 
int AuConsoleRestoreBootFb (void)
 AuConsoleRestoreBootFb – move the kernel console back onto the boot (GOP/ramfb) framebuffer saved by the first SetConInfo repoint.
 
AU_EXTERN AU_EXPORT void AuConsoleSetPresentHook (AuConsolePresentFn fn)
 
void AuConsolePresentRect (int x, int y, int w, int h)
 AuConsolePresentRect – hand an explicit damage rectangle to the scanout mirror installed by AuConsoleSetPresentHook.
 
uint32_t AuConsoleGetScreenWidth ()
 AuConsoleGetScreenWidth – return the screen width.
 
uint32_t AuConsoleGetScreenHeight ()
 AuConsoleGetScreenHeight – return the screen height.
 
AU_EXTERN AU_EXPORT void AuConsoleSetConInfo (uint64_t phys, uint64_t virt, size_t xres, size_t yres)
 

Macro Definition Documentation

◆ SCREEN_GET_FB

#define SCREEN_GET_FB   209

◆ SCREEN_GET_PITCH

#define SCREEN_GET_PITCH   207

◆ SCREEN_GET_SCANLINE

#define SCREEN_GET_SCANLINE   206

◆ SCREEN_GETBPP

#define SCREEN_GETBPP   203

◆ SCREEN_GETHEIGHT

#define SCREEN_GETHEIGHT   202

◆ SCREEN_GETWIDTH

#define SCREEN_GETWIDTH   201

◆ SCREEN_REG_MNGR

#define SCREEN_REG_MNGR   208

◆ SCREEN_RESTORE_BOOT_FB

#define SCREEN_RESTORE_BOOT_FB   210

◆ SCREEN_SETBPP

#define SCREEN_SETBPP   204

◆ SCREEN_SETMODE

#define SCREEN_SETMODE   200

BSD 2-Clause License

Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ SCREEN_UPDATE

#define SCREEN_UPDATE   205

Typedef Documentation

◆ AuConsole

typedef struct _aucon_ AuConsole

◆ AuConsolePresentFn

typedef void(* AuConsolePresentFn) (uint32_t *src, uint32_t src_pitch, int x, int y, int w, int h)

Function Documentation

◆ AuConsoleEarlyEnable()

void AuConsoleEarlyEnable ( bool  value)

AuConsoleEarlyEnable – enables or disable early mode text output.

Parameters
value– boolean value

◆ AuConsoleGetScreenHeight()

uint32_t AuConsoleGetScreenHeight ( )
extern

AuConsoleGetScreenHeight – return the screen height.

Returns
return screen height See AuConsoleGetScreenWidth: desktop size for pointer mapping. –axiss

◆ AuConsoleGetScreenWidth()

uint32_t AuConsoleGetScreenWidth ( )
extern

AuConsoleGetScreenWidth – return the screen width.

Returns
return screen width The only caller is the tablet driver: report the desktop size the compositor draws at, not the firmware GOP console size, so absolute pointer input spans the whole desktop at any resolution. Falls back to the real console geometry while no driver backs a manual override, same value SCREEN_GETWIDTH hands out. –axiss

◆ AuConsoleInitialize()

void AuConsoleInitialize ( PKERNEL_BOOT_INFO  info,
bool  early 
)
extern

AuConsoleInitialize – initialize kernel direct screen console.

Parameters
info– Pointer to kernel boot info structure

◆ AuConsolePostInitialise()

void AuConsolePostInitialise ( PKERNEL_BOOT_INFO  info)
extern

AuConsolePostInitialise – initialise the post console process.

Parameters
info– pointer to kernel boot info structure

◆ AuConsolePresentRect()

void AuConsolePresentRect ( int  x,
int  y,
int  w,
int  h 
)

AuConsolePresentRect – hand an explicit damage rectangle to the scanout mirror installed by AuConsoleSetPresentHook.

The text console marks its own damage and flushes through AuConsoleFlushMirror(); this entry is for userspace, which paints into the mapped framebuffer directly and has no way to say "this much changed" other than SCREEN_UPDATE. Unlike the text mirror it is deliberately not gated on display_owned: the request comes from the process that owns the display, and muzzling it would leave the scanout frozen on its last text frame once the compositor takes over.

◆ AuConsoleRestoreBootFb()

int AuConsoleRestoreBootFb ( void  )

AuConsoleRestoreBootFb – move the kernel console back onto the boot (GOP/ramfb) framebuffer saved by the first SetConInfo repoint.

Returns
1 when restored, 0 when there is nothing to restore

◆ AuConsoleSetConInfo()

AU_EXTERN AU_EXPORT void AuConsoleSetConInfo ( uint64_t  phys,
uint64_t  virt,
size_t  xres,
size_t  yres 
)

◆ AuConsoleSetDisplayOwned()

void AuConsoleSetDisplayOwned ( void  )

Put a character to console output.

Parameters
c– character to print

◆ AuConsoleSetPresentHook()

AU_EXTERN AU_EXPORT void AuConsoleSetPresentHook ( AuConsolePresentFn  fn)

◆ AuPutS()

void AuPutS ( char *  str)
extern

Prints string to console output.

Parameters
str– string to print

Scroll

◆ AuPutS_Color()

void AuPutS_Color ( char *  str,
uint32_t  color 
)
extern

Prints string to console output.

Parameters
str– string to print
col– foreground color

◆ AuTextOut()

AU_EXTERN AU_EXPORT void AuTextOut ( const char *  format,
  ... 
)

AuTextOut – standard text printing function for entire kernel.

Parameters
text– text to output

◆ AuTextOut_profiler()

AU_EXTERN AU_EXPORT void AuTextOut_profiler ( const char *  text,
  ... 
)