-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframe.h
More file actions
41 lines (36 loc) · 1.2 KB
/
frame.h
File metadata and controls
41 lines (36 loc) · 1.2 KB
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
#ifndef MARISA_FRAME
#define MARISA_FRAME
typedef struct frame frame;
struct frame {
WINDOW *frame;
textEditorBuffer *currentBuffer;
int cx, cy; /* cursor position relative to the file */
int rx; /* cursor's file position after render */
int rowoff; /* cursor row (y) position relative to the window */
int coloff; /* cursor column (x) position relative to the window */
int screenrows; /* max frame row */
int screencols; /* max frame column */
};
void editorRefreshScreen (void);
void editorDrawRows (void);
void editorScroll (void);
void drawWelcome (void);
void editorDrawStatusBar (void);
void editorSetStatusMessage (const wchar_t *, ...);
void editorDrawMessageBar (void);
void newFrame (WINDOW *, textEditorBuffer *);
void switchBuffer (char *);
void switchFrame(void);
/* TODO: use delwin() to free window, use glib what ever to free frame struct */
void killFrame (void);
/* TODO: draw window in right dimension and size and boarder */
void drawFrame (WINDOW *);
/* TODO: resize all windows function */
void resizeWindow (void);
WINDOW *createNewWin (int, int, int, int, unsigned int);
/*
* TODO: frame layout functions
* Split vertical
* Split horizontal
*/
#endif /* MARISA_FRAME header guard */