diff options
Diffstat (limited to 'testing/toxic/windows.h')
-rw-r--r-- | testing/toxic/windows.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/toxic/windows.h b/testing/toxic/windows.h index 648243d0..7d81e814 100644 --- a/testing/toxic/windows.h +++ b/testing/toxic/windows.h | |||
@@ -1,8 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * Toxic -- Tox Curses Client | 2 | * Toxic -- Tox Curses Client |
3 | */ | 3 | */ |
4 | #ifndef _windows_h | ||
5 | #define _windows_h | ||
4 | 6 | ||
7 | #include <curses.h> | ||
8 | #include <stdint.h> | ||
5 | #include <stdbool.h> | 9 | #include <stdbool.h> |
10 | #include "../../core/Messenger.h" | ||
6 | #define TOXWINDOWS_MAX_NUM 32 | 11 | #define TOXWINDOWS_MAX_NUM 32 |
7 | #define MAX_FRIENDS_NUM 100 | 12 | #define MAX_FRIENDS_NUM 100 |
8 | #define MAX_STR_SIZE 256 | 13 | #define MAX_STR_SIZE 256 |
@@ -14,6 +19,10 @@ | |||
14 | /* maximum window slots for WINDOW_STATUS array */ | 19 | /* maximum window slots for WINDOW_STATUS array */ |
15 | #define MAX_WINDOW_SLOTS N_DEFAULT_WINS+MAX_FRIENDS_NUM | 20 | #define MAX_WINDOW_SLOTS N_DEFAULT_WINS+MAX_FRIENDS_NUM |
16 | 21 | ||
22 | #ifndef TOXICVER | ||
23 | #define TOXICVER "NOVER" //Use the -D flag to set this | ||
24 | #endif | ||
25 | |||
17 | typedef struct ToxWindow_ ToxWindow; | 26 | typedef struct ToxWindow_ ToxWindow; |
18 | 27 | ||
19 | struct ToxWindow_ { | 28 | struct ToxWindow_ { |
@@ -32,3 +41,17 @@ struct ToxWindow_ { | |||
32 | 41 | ||
33 | WINDOW* window; | 42 | WINDOW* window; |
34 | }; | 43 | }; |
44 | |||
45 | void on_request(uint8_t *public_key, uint8_t *data, uint16_t length, void* userdata); | ||
46 | void on_message(Messenger *m, int friendnumber, uint8_t *string, uint16_t length, void* userdata); | ||
47 | void on_action(Messenger *m, int friendnumber, uint8_t *string, uint16_t length, void* userdata); | ||
48 | void on_nickchange(Messenger *m, int friendnumber, uint8_t *string, uint16_t length, void* userdata); | ||
49 | void on_statuschange(Messenger *m, int friendnumber, uint8_t *string, uint16_t length, void* userdata); | ||
50 | void init_window_status(); | ||
51 | ToxWindow * init_windows(); | ||
52 | void draw_active_window(Messenger * m); | ||
53 | int add_window(Messenger *m, ToxWindow w, int n); | ||
54 | void del_window(ToxWindow *w, int f_num); | ||
55 | void set_active_window(int ch); | ||
56 | #endif | ||
57 | |||