CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
constyle.h File Reference

Console text styling: colors, attributes, and styled writes. More...

#include "console.h"

Go to the source code of this file.

Data Structures

struct  ConStyle
 

Macros

#define CON_ColorDefault   0u
 
#define CON_Idx(n)   (0x01000000u | (uint32)(uint8)(n))
 
#define CON_RGB(r, g, b)    (0x02000000u | ((uint32)(uint8)(r) << 16) | ((uint32)(uint8)(g) << 8) | (uint32)(uint8)(b))
 
#define CONSTYLE(fg, attr)   ((ConStyle) { (fg), CON_ColorDefault, (attr) })
 
#define CONSTYLE2(fg, bg, attr)   ((ConStyle) { (fg), (bg), (attr) })
 
Standard 16-color palette

Typedefs

typedef struct ConStyle ConStyle
 

Enumerations

enum  CON_ATTR_FLAGS
 

Functions

void conSetStyle (ConStream *con, ConStyle style)
 
void conResetStyle (ConStream *con)
 
void conGetStyle (ConStream *con, ConStyle *out)
 
bool conWriteS (ConStream *con, ConStyle style, const void *buf, size_t sz)
 
bool conPutsS (ConStream *con, ConStyle style, strref s)
 
bool conPutszS (ConStream *con, ConStyle style, const char *sz)
 
bool conPutcS (ConStream *con, ConStyle style, int32 codepoint)
 
bool _conFmtS (ConStream *con, ConStyle style, strref fmt, int n, stvar *args)
 

Detailed Description

Console text styling: colors, attributes, and styled writes.

Definition in file constyle.h.