XenevaOS
Loading...
Searching...
No Matches
Functions | Variables
icon.cpp File Reference
#include "icon.h"
#include <_xeneva.h>
#include <stdlib.h>
#include <sys\_kefile.h>
#include <sys\mman.h>
#include "..\bmp.h"
Include dependency graph for icon.cpp:

Functions

XE_EXTERN XE_LIB ChIconChCreateIcon ()
 ChCreateIcon – create a blank icon slot.
 
XE_EXTERN XE_LIB void ChIconOpen (ChIcon *ico, char *filename)
 ChIconOpen – open an icon file.
 
XE_EXTERN XE_LIB void ChIconRead (ChIcon *ico)
 ChIconRead – read an icon file.
 
XE_EXTERN XE_LIB void ChDrawIcon (ChCanvas *canv, ChIcon *ico, int x, int y)
 ChDrawIcon – draws an icon to canvas.
 
XE_EXTERN XE_LIB void ChDrawIconClipped (ChCanvas *canv, ChIcon *ico, int x, int y, ChRect *limit)
 ChDrawIconClipped – draws an icon to canvas within clipped boundary.
 
void ChInitialiseDefaultIcons ()
 ChInitialiseDefaultIcons – initialise all chitralekha default icons.
 
ChIconChIconGetSystemIcon (uint8_t iconnum)
 ChIconGetSystemIcon – returns all system icons.
 

Variables

ChIconwarning
 
ChIconsuccess
 
ChIconexclaim
 
ChIconinformation
 

Detailed Description

BSD 2-Clause License

Copyright (c) 2022, 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.

Function Documentation

◆ ChCreateIcon()

XE_EXTERN XE_LIB ChIcon * ChCreateIcon ( )

ChCreateIcon – create a blank icon slot.

Returns
icon slot

◆ ChDrawIcon()

XE_EXTERN XE_LIB void ChDrawIcon ( ChCanvas canv,
ChIcon ico,
int  x,
int  y 
)

ChDrawIcon – draws an icon to canvas.

Parameters
canv– Pointer to canvas
ico– pointer to icon file
x– X coord
y– Y coord

◆ ChDrawIconClipped()

XE_EXTERN XE_LIB void ChDrawIconClipped ( ChCanvas canv,
ChIcon ico,
int  x,
int  y,
ChRect limit 
)

ChDrawIconClipped – draws an icon to canvas within clipped boundary.

Parameters
canv– Pointer to canvas
ico– pointer to icon file
x– X coord
y– Y coord
limit– Pointer to limit rect

◆ ChIconGetSystemIcon()

ChIcon * ChIconGetSystemIcon ( uint8_t  iconnum)

ChIconGetSystemIcon – returns all system icons.

Parameters
iconnum– Icon code number

◆ ChIconOpen()

XE_EXTERN XE_LIB void ChIconOpen ( ChIcon ico,
char *  filename 
)

ChIconOpen – open an icon file.

Parameters
ico– pointer to icon file
filename– icon file's path

◆ ChIconRead()

XE_EXTERN XE_LIB void ChIconRead ( ChIcon ico)

ChIconRead – read an icon file.

Parameters
ico– pointer to icon structure

◆ ChInitialiseDefaultIcons()

void ChInitialiseDefaultIcons ( )

ChInitialiseDefaultIcons – initialise all chitralekha default icons.

Variable Documentation

◆ exclaim

ChIcon* exclaim

◆ information

ChIcon* information

◆ success

ChIcon* success

◆ warning

ChIcon* warning