forked from notsecure/uTox
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathedit.h
34 lines (26 loc) · 976 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
/*todo: replace windows functions, multiline edits, add missing edit functions (ex: double click to select word)*/
struct edit {
PANEL panel;
_Bool multiline, mouseover;
uint16_t mouseover_char, length, maxlength;
char_t *data;
void (*onenter)(void);
void (*ontab)(void);
};
void edit_draw(EDIT *edit, int x, int y, int width, int height);
_Bool edit_mmove(EDIT *edit, int x, int y, int dy, int width, int height);
_Bool edit_mdown(EDIT *edit);
_Bool edit_dclick(EDIT *edit, _Bool triclick);
_Bool edit_mright(EDIT *edit);
_Bool edit_mwheel(EDIT *edit, int height, double d);
_Bool edit_mup(EDIT *edit);
_Bool edit_mleave(EDIT *edit);
void edit_char(uint32_t ch, _Bool control);
int edit_copy(char_t *data, int len);
void edit_paste(char_t *data, int len);
void edit_delete(void);
void edit_selectall(void);
void edit_clear(void);
_Bool edit_active(void);
void edit_resetfocus(void);
void edit_setstr(EDIT *edit, char_t *str, uint16_t length);