Enumerations | Functions
gntcolors.h File Reference

Colors API. More...

#include <glib.h>

Go to the source code of this file.

Enumerations

enum  GntColorType {
  GNT_COLOR_NORMAL = 1 , GNT_COLOR_HIGHLIGHT , GNT_COLOR_DISABLED , GNT_COLOR_HIGHLIGHT_D ,
  GNT_COLOR_TEXT_NORMAL , GNT_COLOR_TEXT_INACTIVE , GNT_COLOR_MNEMONIC , GNT_COLOR_MNEMONIC_D ,
  GNT_COLOR_SHADOW , GNT_COLOR_TITLE , GNT_COLOR_TITLE_D , GNT_COLOR_URGENT ,
  GNT_COLORS
}
 Different classes of colors.
 
enum  {
  GNT_COLOR_BLACK = 0 , GNT_COLOR_RED , GNT_COLOR_GREEN , GNT_COLOR_BLUE ,
  GNT_COLOR_WHITE , GNT_COLOR_GRAY , GNT_COLOR_DARK_GRAY , GNT_TOTAL_COLORS
}
 

Functions

void gnt_init_colors (void)
 Initialize the colors.
 
void gnt_uninit_colors (void)
 Uninitialize the colors.
 
int gnt_color_pair (int color)
 Return the appropriate character attribute for a specified color. More...
 
int gnt_color_add_pair (int fg, int bg)
 Adds a color definition. More...
 

Detailed Description

Colors API.

Definition in file gntcolors.h.

Function Documentation

◆ gnt_color_add_pair()

int gnt_color_add_pair ( int  fg,
int  bg 
)

Adds a color definition.

Parameters
fgForeground
bgBackground
Returns
A color pair
Since
2.4.0

◆ gnt_color_pair()

int gnt_color_pair ( int  color)

Return the appropriate character attribute for a specified color.

If the terminal doesn't have color support, this returns A_STANDOUT when deemed appropriate.

Parameters
colorThe color code.
Returns
A character attribute.
Since
2.3.0