41 lines
716 B
C
41 lines
716 B
C
|
#include <curses.h>
|
||
|
#include <stdio.h>
|
||
|
#include "giteaAPI.h"
|
||
|
|
||
|
#include <ncurses.h>
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
SESSION s = teaui_gitea_session("https://git.herisson.ovh");
|
||
|
|
||
|
#if 0
|
||
|
initscr();
|
||
|
start_color();
|
||
|
init_pair(1, COLOR_RED, COLOR_GREEN);
|
||
|
WINDOW* test = newwin(16, 9, 2, 2);
|
||
|
wattron(test, COLOR_PAIR(1));
|
||
|
box(test, 0, 0);
|
||
|
wattroff(test, COLOR_PAIR(1));
|
||
|
noecho();
|
||
|
timeout(0);
|
||
|
refresh();
|
||
|
bool should_quit = false;
|
||
|
while(!should_quit){
|
||
|
wrefresh(test);
|
||
|
int in = getch();
|
||
|
if(in != ERR){
|
||
|
switch (in) {
|
||
|
case 'a':
|
||
|
should_quit = true;
|
||
|
break;
|
||
|
case 'd':
|
||
|
wattron(test, COLOR_PAIR(1));
|
||
|
wprintw(test, "Hello, Dari!");
|
||
|
wattroff(test, COLOR_PAIR(1));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
endwin();
|
||
|
#endif
|
||
|
}
|