2019-05-01 16:22:22 -04:00
|
|
|
#ifndef IRSSI_FE_TEXT_GUI_WINDOWS_H
|
|
|
|
#define IRSSI_FE_TEXT_GUI_WINDOWS_H
|
2000-04-26 04:03:38 -04:00
|
|
|
|
2019-05-01 10:33:47 -04:00
|
|
|
#include <irssi/src/fe-text/mainwindows.h>
|
|
|
|
#include <irssi/src/fe-text/textbuffer-view.h>
|
2000-04-26 04:03:38 -04:00
|
|
|
|
|
|
|
#define WINDOW_GUI(a) ((GUI_WINDOW_REC *) ((a)->gui_data))
|
2001-08-07 08:41:10 -04:00
|
|
|
#define WINDOW_MAIN(a) (WINDOW_GUI(a)->parent)
|
2000-04-26 04:03:38 -04:00
|
|
|
|
|
|
|
#define is_window_visible(win) \
|
|
|
|
(WINDOW_GUI(win)->parent->active == (win))
|
|
|
|
|
2000-05-04 06:32:42 -04:00
|
|
|
typedef struct {
|
|
|
|
MAIN_WINDOW_REC *parent;
|
2001-04-14 18:24:56 -04:00
|
|
|
TEXT_BUFFER_VIEW_REC *view;
|
2000-05-04 06:32:42 -04:00
|
|
|
|
2001-08-13 21:14:26 -04:00
|
|
|
unsigned int scroll:1;
|
|
|
|
unsigned int use_scroll:1;
|
|
|
|
|
2001-08-07 08:41:10 -04:00
|
|
|
unsigned int sticky:1;
|
2001-04-14 18:24:56 -04:00
|
|
|
unsigned int use_insert_after:1;
|
|
|
|
LINE_REC *insert_after;
|
2014-01-08 07:49:46 -05:00
|
|
|
time_t insert_after_time;
|
2000-05-04 06:32:42 -04:00
|
|
|
} GUI_WINDOW_REC;
|
2000-04-26 04:03:38 -04:00
|
|
|
|
|
|
|
void gui_windows_init(void);
|
|
|
|
void gui_windows_deinit(void);
|
|
|
|
|
|
|
|
WINDOW_REC *gui_window_create(MAIN_WINDOW_REC *parent);
|
|
|
|
|
2001-04-14 18:24:56 -04:00
|
|
|
void gui_window_resize(WINDOW_REC *window, int width, int height);
|
2000-05-04 06:32:42 -04:00
|
|
|
void gui_window_reparent(WINDOW_REC *window, MAIN_WINDOW_REC *parent);
|
2000-04-26 04:03:38 -04:00
|
|
|
|
2001-04-14 18:24:56 -04:00
|
|
|
#define gui_window_redraw(window) \
|
|
|
|
textbuffer_view_redraw(WINDOW_GUI(window)->view)
|
2000-06-30 15:45:28 -04:00
|
|
|
|
2000-05-04 06:32:42 -04:00
|
|
|
void gui_window_scroll(WINDOW_REC *window, int lines);
|
2001-04-14 18:24:56 -04:00
|
|
|
void gui_window_scroll_line(WINDOW_REC *window, LINE_REC *line);
|
|
|
|
|
2001-08-07 08:41:10 -04:00
|
|
|
void gui_window_set_sticky(WINDOW_REC *window);
|
|
|
|
void gui_window_set_unsticky(WINDOW_REC *window);
|
|
|
|
|
2001-10-24 18:52:15 -04:00
|
|
|
void gui_windows_reset_settings(void);
|
|
|
|
|
2000-04-26 04:03:38 -04:00
|
|
|
#endif
|