aboutsummaryrefslogtreecommitdiff
path: root/src/messenger_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger_cli.c')
-rw-r--r--src/messenger_cli.c84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/messenger_cli.c b/src/messenger_cli.c
index 0c9fda2..1c68b9a 100644
--- a/src/messenger_cli.c
+++ b/src/messenger_cli.c
@@ -24,90 +24,6 @@
24 24
25#include "application.h" 25#include "application.h"
26 26
27/*static void
28run (void *cls, char* const* args,
29 const char *cfgfile,
30 const struct GNUNET_CONFIGURATION_Handle *cfg)
31{
32 struct GNUNET_CHAT_Handle *handle = GNUNET_CHAT_start(
33 cfg,
34 "appdir",
35 NULL, NULL
36 );
37
38 initscr();
39 noecho();
40
41 int bx, by, mx, my;
42 getbegyx(stdscr, by, bx);
43 getmaxyx(stdscr, my, mx);
44
45 WINDOW *win = newwin(15, 30, by + (my - by - 15) / 2, bx + (mx - bx - 30) / 2);
46 keypad(win, TRUE);
47
48 int selected = 0;
49
50 int c;
51 do {
52 getbegyx(stdscr, by, bx);
53 getmaxyx(stdscr, my, mx);
54
55 int x = bx + (mx - bx - 30) / 2;
56 int y = by + (my - by - 15) / 2;
57
58 int w = 30;
59 int h = 15;
60
61 if (mx - x < w)
62 w = (mx - x > 0? mx - x : 0);
63
64 if (my - y < h)
65 h = (my - y > 0? my - y : 0);
66
67 if (w * h > 0)
68 {
69 mvwin(win, y, x);
70 wresize(win, h, w);
71
72 werase(win);
73 box(win, 0, 0);
74
75 wmove(win, 1, 1);
76 wprintw(win, "%d %d, %d %d | %d %d", bx, by, mx, my, c, KEY_DOWN);
77
78 const int attrs_select = A_BOLD;
79
80 for (int i = 0; i < 5; i++) {
81 if (i == selected) wattron(win, attrs_select);
82
83 wmove(win, i+2, 1);
84 wprintw(win, "Option %d", i+1);
85
86 if (i == selected) wattroff(win, attrs_select);
87 }
88
89 wmove(win, 7, 1);
90 c = wgetch(win);
91 }
92 else
93 {
94 c = getch();
95 }
96
97 if (KEY_UP == c) selected = (selected > 0? selected - 1 : 0);
98 else if (KEY_DOWN == c) selected = (selected < 4? selected + 1 : 4);
99
100 clear();
101 refresh();
102 } while (c != 'q');
103
104 delwin(win);
105
106 endwin();
107
108 GNUNET_CHAT_stop(handle);
109}*/
110
111int 27int
112main (int argc, char** argv) 28main (int argc, char** argv)
113{ 29{