Cthulhu  0.2.10
Cthulhu compiler collection
colour.h File Reference
#include <ctu_format_api.h>
#include "core/compiler.h"
#include "core/analyze.h"
#include <stdarg.h>
Include dependency graph for colour.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  colour_pallete_t
 a colour pallete More...
 
struct  format_context_t
 a formatting context when using colours More...
 

Typedefs

typedef typedefCT_BEGIN_API struct arena_t arena_t
 

Enumerations

enum  colour_t {
  eColourRed , eColourGreen , eColourYellow , eColourBlue ,
  eColourMagenta , eColourCyan , eColourWhite , eColourDefault ,
  eColourCount
}
 a colour code More...
 

Functions

STA_RET_STRING CT_PUREFN CT_FORMAT_API const char * colour_get (const colour_pallete_t *colours, colour_t idx)
 get a colours string form from a pallete More...
 
STA_RET_STRING CT_PUREFN CT_FORMAT_API const char * colour_reset (const colour_pallete_t *colours)
 get a reset string from a pallete More...
 
STA_RET_STRING CT_FORMAT_API char * colour_text (format_context_t context, colour_t idx, const char *text)
 add colour to a string More...
 
STA_RET_STRING STA_PRINTF (3, 4) CT_FORMAT_API char *colour_format(format_context_t context
 format a string and add colour to it More...
 
STA_RET_STRING colour_t STA_FORMAT_STRING const char STA_RET_STRING CT_FORMAT_API char * colour_vformat (format_context_t context, colour_t idx, const char *fmt, va_list args)
 format a string and add colour to it More...
 

Variables

CT_FORMAT_API const colour_pallete_t kColourNone
 a colour pallete that applies no colours More...
 
CT_FORMAT_API const colour_pallete_t kColourDefault
 a colour pallete that applies ANSI VT100 colours More...
 
STA_RET_STRING colour_t idx
 
STA_RET_STRING colour_t STA_FORMAT_STRING const char * fmt
 

Typedef Documentation

◆ arena_t

typedef typedefCT_BEGIN_API struct arena_t arena_t

Definition at line 12 of file colour.h.