Operating System
Macros
graphic.h File Reference

macro for graphic More...

Go to the source code of this file.

Macros

#define __G_R   (1 << 2)
 red More...
 
#define __G_G   (1 << 1)
 green More...
 
#define __G_B   (1)
 blue More...
 
#define G_BLACK   (0)
 
#define G_BLUE   (__G_B)
 
#define G_GREEN   (__G_G)
 
#define G_CYAN   (__G_B | __G_G)
 
#define G_RED   (__G_R)
 
#define G_PINKISH   (__G_R | __G_B)
 
#define G_BROWN   (__G_G | __G_R)
 
#define G_WHITE   (__G_G | __G_B | __G_R)
 
#define TO_FN(X)   (X)
 make defined color into describing font More...
 
#define TO_BG(X)   (X << 4)
 make defined color into describing background More...
 
#define G_FLASH   (1 << 7)
 whether font is Flash More...
 
#define G_DARK   (1 << 3)
 whether font is light More...
 
#define G_BG_BLACK   (TO_BG(G_BLACK))
 Graphic library BackGround Black. More...
 
#define G_BG_WHITE   (TO_BG(G_WHITE))
 Graphic library BackGround White. More...
 
#define G_FN_BLACK   (TO_FN(G_BLACK))
 Graphic library FoNt black. More...
 
#define G_FN_WHITE   (TO_FN(G_WHITE))
 Graphic library FoNt white. More...
 
#define G_DEFAULT   (TO_FN(G_WHITE) | TO_BG(G_BLACK))
 
#define G_DEFAULT_DARK   (G_DEFAULT | G_DARK)
 

Detailed Description

macro for graphic

See also
stdio.h

define adequate macro for full control of color that used in text mod in terminal.

Definition in file graphic.h.

Macro Definition Documentation

◆ __G_B

#define __G_B   (1)

blue

Definition at line 12 of file graphic.h.

◆ __G_G

#define __G_G   (1 << 1)

green

Definition at line 11 of file graphic.h.

◆ __G_R

#define __G_R   (1 << 2)

red

Definition at line 10 of file graphic.h.

◆ G_BG_BLACK

#define G_BG_BLACK   (TO_BG(G_BLACK))

Graphic library BackGround Black.

Definition at line 29 of file graphic.h.

◆ G_BG_WHITE

#define G_BG_WHITE   (TO_BG(G_WHITE))

Graphic library BackGround White.

Definition at line 30 of file graphic.h.

◆ G_BLACK

#define G_BLACK   (0)

Definition at line 14 of file graphic.h.

◆ G_BLUE

#define G_BLUE   (__G_B)

Definition at line 15 of file graphic.h.

◆ G_BROWN

#define G_BROWN   (__G_G | __G_R)

Definition at line 20 of file graphic.h.

◆ G_CYAN

#define G_CYAN   (__G_B | __G_G)

Definition at line 17 of file graphic.h.

◆ G_DARK

#define G_DARK   (1 << 3)

whether font is light

Definition at line 27 of file graphic.h.

◆ G_DEFAULT

#define G_DEFAULT   (TO_FN(G_WHITE) | TO_BG(G_BLACK))

Definition at line 36 of file graphic.h.

◆ G_DEFAULT_DARK

#define G_DEFAULT_DARK   (G_DEFAULT | G_DARK)

Definition at line 37 of file graphic.h.

◆ G_FLASH

#define G_FLASH   (1 << 7)

whether font is Flash

Definition at line 26 of file graphic.h.

◆ G_FN_BLACK

#define G_FN_BLACK   (TO_FN(G_BLACK))

Graphic library FoNt black.

Definition at line 32 of file graphic.h.

◆ G_FN_WHITE

#define G_FN_WHITE   (TO_FN(G_WHITE))

Graphic library FoNt white.

Definition at line 33 of file graphic.h.

◆ G_GREEN

#define G_GREEN   (__G_G)

Definition at line 16 of file graphic.h.

◆ G_PINKISH

#define G_PINKISH   (__G_R | __G_B)

Definition at line 19 of file graphic.h.

◆ G_RED

#define G_RED   (__G_R)

Definition at line 18 of file graphic.h.

◆ G_WHITE

#define G_WHITE   (__G_G | __G_B | __G_R)

Definition at line 21 of file graphic.h.

◆ TO_BG

#define TO_BG (   X)    (X << 4)

make defined color into describing background

Definition at line 24 of file graphic.h.

◆ TO_FN

#define TO_FN (   X)    (X)

make defined color into describing font

Definition at line 23 of file graphic.h.