-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit.h
57 lines (44 loc) · 869 Bytes
/
edit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
*
* https://ramiroblan.co
* mail: [email protected]
*
*/
#define INITIAL_CHARS_BUFFER_SIZE 2000000
#define INITIAL_GRID_PARAS 60
#define BLINKS_LIMIT 7
#define BLINKS_START 0
#define LINE_ADD 1
#define LINE_REMOVE -1
#define SCROLL_BAR_WIDTH 20
#define PARA_BUFFER_SIZE 1024
#define PARA_BUFFER_GROWTH 256
//#define SHOW_FPS
#define FPS_AVG_COUNT 1
typedef struct
{
int width, height;
}
W_SIZE;
typedef struct paragraph_
{
struct paragraph_* next;
struct paragraph_* prev;
GLfloat* buffer;
unsigned int lines_count;
unsigned int buffer_pos;
unsigned int buffer_count;
GLfloat* gap;
unsigned int gap_pos;
unsigned int gap_count;
unsigned int gap_del;
}
PARA;
typedef struct
{
GLfloat width, height, cell_width, cell_height;
}
GRID;
void cursor_reset(void);
void get_top_paragraph_scroll(void);
void load_selection_tex(void);