summaryrefslogtreecommitdiff
path: root/examples/dte/screen.h
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2023-11-09 23:19:53 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2023-11-09 23:19:53 +0100
commit1566b6faa8534118c3566188181367cd0868468f (patch)
tree1de8d4b369efb5e592685a31088f798a6b63ffa1 /examples/dte/screen.h
parent349991bf6efe473ab9a5cbdae0a8114d72b997e3 (diff)
downloadcrep-1566b6faa8534118c3566188181367cd0868468f.tar.gz
Added partial matching and introduced threads
Diffstat (limited to 'examples/dte/screen.h')
-rw-r--r--examples/dte/screen.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/examples/dte/screen.h b/examples/dte/screen.h
new file mode 100644
index 0000000..a3041c0
--- /dev/null
+++ b/examples/dte/screen.h
@@ -0,0 +1,59 @@
1#ifndef SCREEN_H
2#define SCREEN_H
3
4#include <stdbool.h>
5#include <stddef.h>
6#include "buffer.h"
7#include "editor.h"
8#include "syntax/color.h"
9#include "terminal/output.h"
10#include "terminal/terminal.h"
11#include "util/debug.h"
12#include "util/macros.h"
13#include "util/utf8.h"
14#include "view.h"
15#include "window.h"
16
17typedef struct {
18 bool is_modified;
19 unsigned long id;
20 long cy;
21 long vx;
22 long vy;
23} ScreenState;
24
25// screen.c
26void update_screen(EditorState *e, const ScreenState *s);
27void update_term_title(Terminal *term, const Buffer *buffer, bool set_window_title);
28void update_window_sizes(Terminal *term, Frame *frame);
29void update_screen_size(Terminal *term, Frame *root_frame);
30void set_color(Terminal *term, const ColorScheme *colors, const TermColor *color);
31void set_builtin_color(Terminal *term, const ColorScheme *colors, BuiltinColorEnum c);
32void mask_color(TermColor *color, const TermColor *over);
33void start_update(Terminal *term);
34void end_update(EditorState *e);
35void normal_update(EditorState *e);
36void restore_cursor(EditorState *e);
37
38// screen-cmdline.c
39void update_command_line(EditorState *e);
40void show_message(Terminal *term, const ColorScheme *colors, const char *msg, bool is_error);
41
42// screen-tabbar.c
43void print_tabbar(Terminal *term, const ColorScheme *colors, Window *window);
44
45// screen-status.c
46void update_status_line(const Window *window);
47
48// screen-view.c
49void update_range(EditorState *e, const View *view, long y1, long y2);
50
51// screen-window.c
52void update_all_windows(EditorState *e);
53void update_buffer_windows(EditorState *e, const Buffer *buffer);
54
55// screen-prompt.c
56char status_prompt(EditorState *e, const char *question, const char *choices) NONNULL_ARGS;
57char dialog_prompt(EditorState *e, const char *question, const char *choices) NONNULL_ARGS;
58
59#endif