#ifndef MW_FORMAT_H #define MW_FORMAT_H #define MW_FMT_FAMILY (1<<0) #define MW_FMT_SIZE (1<<1) #define MW_FMT_BOLD (1<<2) #define MW_FMT_ITALIC (1<<3) #define MW_FMT_ULINE (1<<4) #define MW_FMT_FG (1<<5) #define MW_FMT_BG (1<<6) #define MW_FMT_BORDERS (1<<7) #define MW_FMT_VADJ (1<<8) #define MW_FMT_HADJ (1<<9) #define MW_FMT_STYLE (1<<10) #define MW_FMT_STRIKE (1<<11) #include typedef struct MwFmt { char *family; int size; int bold, italic, uline, strike; char *fg, *bg; int borders; int vadj, hadj; int style; } MwFmt; extern void MwDecodeFormat(int, long, MwFmt *); extern int MwEncodeFormat(long, MwFmt *); #define MW_BORDER_MASK (MW_BORDER_LEFT | MW_BORDER_RIGHT | MW_BORDER_TOP | MW_BORDER_BOTTOM) #define MW_BORDER_LEFT (256) #define MW_BORDER_RIGHT (512) #define MW_BORDER_TOP (1024) #define MW_BORDER_BOTTOM (2048) #define MW_HADJ_MASK (4096 | 8192) #define MW_HADJ_LEFT (0) #define MW_HADJ_FULL (4096) #define MW_HADJ_CENTER (8192) #define MW_HADJ_RIGHT (4096+8192) #define MW_VADJ_MASK (16384 | 32768) #define MW_VADJ_TOP (16384) #define MW_VADJ_CENTER (0) #define MW_VADJ_BOTTOM (16384+32768) /* First available bit is 65536 = 0x10000 = (1 << 16) */ #define MW_FMT_SHIFT (16) #define MW_FMT_MASK (15<