int poll_add(poll_t **p, int fd, short evt);
int poll_rm(poll_t **p, int fd);
int poll_update(poll_t *p, int fd, short evt);
int poll_wait(poll_t *p, int timeout);
int poll_canread(poll_t *p, int fd);
int poll_canwrite(poll_t *p, int fd);
int poll_isclose(poll_t *p, int fd);
typedef struct ui_s {
void (*init)(struct ui_s *);
void (*free)(struct ui_s *);
void (*update)(struct ui_s *);
bool (*getEvent)(struct ui_s *);
void (*processEvent)(struct ui_s *);
void (*initWindows)(struct ui_s *);
void (*freeWindows)(struct ui_s *);
bool (*getServerEvent)(struct ui_s *);
void (*processServerEvent)(struct ui_s *);
void (*sendServerEvent)(struct ui_s *);
void (*fileEvent)(struct ui_s *);
win_t *w_chat;
win_t *w_chan;
win_t *w_info;
win_t *w_logs;
size_t framecap;
bool hasToQuit;
sess_t *session;
char *buffer;
char buffer_last;
size_t buffer_idx;
size_t buffer_size;
} ui_t;