2000-04-26 04:03:38 -04:00
|
|
|
#ifndef __GUI_WINDOWS_H
|
|
|
|
#define __GUI_WINDOWS_H
|
|
|
|
|
2000-05-04 06:32:42 -04:00
|
|
|
#include "mainwindows.h"
|
2001-04-14 18:24:56 -04:00
|
|
|
#include "textbuffer-view.h"
|
2000-04-26 04:03:38 -04:00
|
|
|
|
|
|
|
#define WINDOW_GUI(a) ((GUI_WINDOW_REC *) ((a)->gui_data))
|
|
|
|
|
|
|
|
#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-04-14 18:24:56 -04:00
|
|
|
unsigned int use_insert_after:1;
|
|
|
|
LINE_REC *insert_after;
|
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);
|
|
|
|
|
|
|
|
void window_update_prompt(void);
|
2000-04-26 04:03:38 -04:00
|
|
|
|
|
|
|
#endif
|