XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
ftmngr.c File Reference
#include <ftmngr.h>
#include <_null.h>
#include <Fs\vfs.h>
#include <Mm\vmmngr.h>
#include <Mm\pmmngr.h>
#include <Drivers/uart.h>
#include <aucon.h>
#include <Mm\kmalloc.h>
#include <Mm\shm.h>
#include <stdio.h>
#include <Hal/AA64/aa64lowlevel.h>
Include dependency graph for ftmngr.c:

Macros

#define FONTMGR_KEY   0x1234
 

Functions

void FontManagerAddSegment (FontSeg *seg)
 FontManagerAddSegment – add a font segment.
 
void FontManagerRemoveSegment (FontSeg *seg)
 FontManagerRemoveSegment – remove a font segment.
 
uint16_t FontManagerGetKey ()
 FontManagerGetKey – obtain a key.
 
FontSegFontManagerAllocateSegment (AuVFSNode *fontfile, char *fontname)
 FontManagerAllocateSegment – allocate a font segment.
 
AuVFSNodeFontManagerOpenFontFile (char *filename)
 FontManagerOpenFontFile– opens a font file from disk.
 
void FontManagerIterateFontList (uint8_t *fontlst)
 FontManagerIterateFontList– iterates all fonts from the font config file.
 
int FontManagerGetFontCount (uint8_t *fontlst)
 FontManagerGetFontCount – returns number of font counts.
 
void FontManagerInitialise ()
 FontManagerInitialise – initialise font manager.
 
int AuFTMngrGetFontID (char *fontname)
 AuFTMngrGetFontID – returns the font id of given font name.
 
int AuFTMngrGetFontSize (char *fontname)
 AuFTMngrGetFontSize – returns font size.
 
int AuFTMngrGetNumFonts ()
 AuFTMngrGetNumFonts – return number system fonts installed.
 

Variables

uint8_tfont_conf_data
 
uint16_t fontKey
 
int totalSysFonts
 

Detailed Description

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.

Macro Definition Documentation

◆ FONTMGR_KEY

#define FONTMGR_KEY   0x1234

Function Documentation

◆ AuFTMngrGetFontID()

int AuFTMngrGetFontID ( char *  fontname)

AuFTMngrGetFontID – returns the font id of given font name.

Parameters
fontname– name of the desired font
Returns
id of the desired font

◆ AuFTMngrGetFontSize()

int AuFTMngrGetFontSize ( char *  fontname)

AuFTMngrGetFontSize – returns font size.

Parameters
fontname– name of the font
Returns
the size of the font in bytes

◆ AuFTMngrGetNumFonts()

int AuFTMngrGetNumFonts ( )

AuFTMngrGetNumFonts – return number system fonts installed.

Returns
total count of system font FontManagerGetFontCount does the same thing except it uses the font config file to get the number of total font count

◆ FontManagerAddSegment()

void FontManagerAddSegment ( FontSeg seg)

FontManagerAddSegment – add a font segment.

Parameters
seg– font segment

◆ FontManagerAllocateSegment()

FontSeg * FontManagerAllocateSegment ( AuVFSNode fontfile,
char *  fontname 
)

FontManagerAllocateSegment – allocate a font segment.

Parameters
fontfile– Pointer to fontfile
fontname– name of the font
Returns
shared memory segment allocated by font manager

◆ FontManagerGetFontCount()

int FontManagerGetFontCount ( uint8_t fontlst)

FontManagerGetFontCount – returns number of font counts.

Parameters
fontlst– font list buffer
Returns
the number of total font available in the system

◆ FontManagerGetKey()

uint16_t FontManagerGetKey ( )

FontManagerGetKey – obtain a key.

Returns
key allocated by font manager

◆ FontManagerInitialise()

void FontManagerInitialise ( )

FontManagerInitialise – initialise font manager.

◆ FontManagerIterateFontList()

void FontManagerIterateFontList ( uint8_t fontlst)

FontManagerIterateFontList– iterates all fonts from the font config file.

Parameters
fontlst– pointer to font list buffer

◆ FontManagerOpenFontFile()

AuVFSNode * FontManagerOpenFontFile ( char *  filename)

FontManagerOpenFontFile– opens a font file from disk.

Returns
font file opened by font manager

◆ FontManagerRemoveSegment()

void FontManagerRemoveSegment ( FontSeg seg)

FontManagerRemoveSegment – remove a font segment.

Parameters
seg– Pointer to font segment

Variable Documentation

◆ font_conf_data

uint8_t* font_conf_data

◆ fontKey

uint16_t fontKey

◆ totalSysFonts

int totalSysFonts