summaryrefslogtreecommitdiffstats
path: root/src/fe-text/gui-windows.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:18:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:18:39 +0000
commitfff5217f02d91268ce90c8c05665602c059faaef (patch)
tree2ba24d32dc96eafe7ed0a85269548e76796d849d /src/fe-text/gui-windows.h
parentInitial commit. (diff)
downloadirssi-fff5217f02d91268ce90c8c05665602c059faaef.tar.xz
irssi-fff5217f02d91268ce90c8c05665602c059faaef.zip
Adding upstream version 1.4.5.upstream/1.4.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/fe-text/gui-windows.h')
-rw-r--r--src/fe-text/gui-windows.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/fe-text/gui-windows.h b/src/fe-text/gui-windows.h
new file mode 100644
index 0000000..52a64ce
--- /dev/null
+++ b/src/fe-text/gui-windows.h
@@ -0,0 +1,45 @@
+#ifndef IRSSI_FE_TEXT_GUI_WINDOWS_H
+#define IRSSI_FE_TEXT_GUI_WINDOWS_H
+
+#include <irssi/src/fe-text/mainwindows.h>
+#include <irssi/src/fe-text/textbuffer-view.h>
+
+#define WINDOW_GUI(a) ((GUI_WINDOW_REC *) ((a)->gui_data))
+#define WINDOW_MAIN(a) (WINDOW_GUI(a)->parent)
+
+#define is_window_visible(win) \
+ (WINDOW_GUI(win)->parent->active == (win))
+
+typedef struct {
+ MAIN_WINDOW_REC *parent;
+ TEXT_BUFFER_VIEW_REC *view;
+
+ unsigned int scroll:1;
+ unsigned int use_scroll:1;
+
+ unsigned int sticky:1;
+ unsigned int use_insert_after:1;
+ LINE_REC *insert_after;
+ time_t insert_after_time;
+} GUI_WINDOW_REC;
+
+void gui_windows_init(void);
+void gui_windows_deinit(void);
+
+WINDOW_REC *gui_window_create(MAIN_WINDOW_REC *parent);
+
+void gui_window_resize(WINDOW_REC *window, int width, int height);
+void gui_window_reparent(WINDOW_REC *window, MAIN_WINDOW_REC *parent);
+
+#define gui_window_redraw(window) \
+ textbuffer_view_redraw(WINDOW_GUI(window)->view)
+
+void gui_window_scroll(WINDOW_REC *window, int lines);
+void gui_window_scroll_line(WINDOW_REC *window, LINE_REC *line);
+
+void gui_window_set_sticky(WINDOW_REC *window);
+void gui_window_set_unsticky(WINDOW_REC *window);
+
+void gui_windows_reset_settings(void);
+
+#endif