X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Firssi%2Fsrc%2Ffe-text%2Fgui-windows.h;fp=apps%2Firssi%2Fsrc%2Ffe-text%2Fgui-windows.h;h=fb94b46f589d1a8583bfe40c589d529d9d49c09b;hb=23c5df1c8b0bfe539d3fa65802186e6e09e044aa;hp=0000000000000000000000000000000000000000;hpb=0f9738ce962b8498bbed0a75d5fb6fa127e3577f;p=silc.git diff --git a/apps/irssi/src/fe-text/gui-windows.h b/apps/irssi/src/fe-text/gui-windows.h new file mode 100644 index 00000000..fb94b46f --- /dev/null +++ b/apps/irssi/src/fe-text/gui-windows.h @@ -0,0 +1,36 @@ +#ifndef __GUI_WINDOWS_H +#define __GUI_WINDOWS_H + +#include "mainwindows.h" +#include "textbuffer-view.h" + +#define WINDOW_GUI(a) ((GUI_WINDOW_REC *) ((a)->gui_data)) + +#define is_window_visible(win) \ + (WINDOW_GUI(win)->parent->active == (win)) + +typedef struct { + MAIN_WINDOW_REC *parent; + TEXT_BUFFER_VIEW_REC *view; + + unsigned int use_insert_after:1; + LINE_REC *insert_after; +} 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 window_update_prompt(void); + +#endif