RichString.h 893 Bytes
Newer Older
Hisham Muhammad's avatar
Hisham Muhammad committed
1
/* Do not edit this file. It was automatically generated. */
Hisham Muhammad's avatar
Hisham Muhammad committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

#ifndef HEADER_RichString
#define HEADER_RichString


#include <stdlib.h>
#include <string.h>
#include <curses.h>

#include "debug.h"
#include <assert.h>

#define RICHSTRING_MAXLEN 300


17
18
19
#define RichString_init(this) (this)->len = 0
#define RichString_initVal(this) (this).len = 0

Hisham Muhammad's avatar
Hisham Muhammad committed
20
21
22
23
24
25
typedef struct RichString_ {
   int len;
   chtype chstr[RICHSTRING_MAXLEN+1];
} RichString;


Hisham Muhammad's avatar
Hisham Muhammad committed
26
27
28
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
Hisham Muhammad's avatar
Hisham Muhammad committed
29
30
31

void RichString_write(RichString* this, int attrs, char* data);

32
extern void RichString_append(RichString* this, int attrs, char* data);
Hisham Muhammad's avatar
Hisham Muhammad committed
33

34
extern void RichString_appendn(RichString* this, int attrs, char* data, int len);
Hisham Muhammad's avatar
Hisham Muhammad committed
35
36
37
38
39
40
41
42

void RichString_setAttr(RichString *this, int attrs);

void RichString_applyAttr(RichString *this, int attrs);

RichString RichString_quickString(int attrs, char* data);

#endif