-
Notifications
You must be signed in to change notification settings - Fork 0
/
input.h
42 lines (34 loc) · 1.06 KB
/
input.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
#ifndef input_h
#define input_h
#include <stdbool.h>
#define Prev(P) P->prev
#define Info(P) P->info
#define Next(P) P->next
#define Head(L) (L).head
#define Current(L) (L).current
#define Tail(L) (L).tail
#define MAX_ROWS 5
#define MAX_COLUMNS 5
typedef struct element_list *address;
typedef struct element_list{
address prev;
char info;
address next;
}element_input;
typedef struct{
address head;
address current;
address tail;
}list;
address Alokasi(char ch);
void create_text_editor(list *L);
void input_keyboard(list *L, int *baris, int *kolom, char namaFile[], bool validasi_file);
bool cek_input(char ch);
void normal_input(list *L, address P, int *baris, int *kolom);
void handling_input(list *L, char ch, int *baris, int *kolom, bool *status_bar);
void arrows(list *L, char ch, int *baris, int *kolom);
void enter(list *L, char ch, int *baris, int *kolom);
void dealokasi(list *L);
void backspace(list *L, char ch, int *baris, int *kolom);
void F1_12(list *L, char ch, int *baris, int *kolom, bool *status_bar);
#endif