XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
icon.h File Reference
#include <stdint.h>
#include "base.h"
#include "..\image.h"
#include <_xeneva.h>
#include "..\chitralekha.h"
Include dependency graph for icon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _icon_
 

Macros

#define CHITRALEKHA_ICON_ICO   1
 
#define CHITRALEKHA_ICON_BMP   2
 
#define CHITRALEKHA_ICON_WARNING   100
 System icons codes.
 
#define CHITRALEKHA_ICON_SUCCESS   101
 
#define CHITRALEKHA_ICON_INFORMATION   102
 
#define CHITRALEKHA_ICON_EXCLAIMATION   103
 

Typedefs

typedef struct _icon_ ChIcon
 

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.
 
XE_EXTERN XE_LIB ChIconChIconGetSystemIcon (uint8_t iconnum)
 ChIconGetSystemIcon – returns all system icons.
 

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.

Macro Definition Documentation

◆ CHITRALEKHA_ICON_BMP

#define CHITRALEKHA_ICON_BMP   2

◆ CHITRALEKHA_ICON_EXCLAIMATION

#define CHITRALEKHA_ICON_EXCLAIMATION   103

◆ CHITRALEKHA_ICON_ICO

#define CHITRALEKHA_ICON_ICO   1

◆ CHITRALEKHA_ICON_INFORMATION

#define CHITRALEKHA_ICON_INFORMATION   102

◆ CHITRALEKHA_ICON_SUCCESS

#define CHITRALEKHA_ICON_SUCCESS   101

◆ CHITRALEKHA_ICON_WARNING

#define CHITRALEKHA_ICON_WARNING   100

System icons codes.

Typedef Documentation

◆ ChIcon

typedef struct _icon_ ChIcon

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()

XE_EXTERN XE_LIB 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 ( )
extern

ChInitialiseDefaultIcons – initialise all chitralekha default icons.