4 #include "window-item-def.h"
5 #include "command-history.h"
17 unsigned int sticky:1;
28 SERVER_REC *active_server;
29 SERVER_REC *connect_server;
30 char *servertag; /* active_server must be either NULL or have this tag (unless there's items in this window) */
32 int level; /* message level */
33 GSList *bound_items; /* list of WINDOW_BIND_RECs */
35 unsigned int immortal:1;
36 unsigned int sticky_refnum:1;
37 unsigned int destroying:1;
39 /* window-specific command line history */
43 int data_level; /* current data level */
44 char *hilight_color; /* current hilight color in %format */
46 time_t last_timestamp; /* When was last timestamp printed */
47 time_t last_line; /* When was last line printed */
49 char *theme_name; /* active theme in window, NULL = default */
50 void *theme; /* THEME_REC */
55 extern GSList *windows;
56 extern WINDOW_REC *active_win;
58 WINDOW_REC *window_create(WI_ITEM_REC *item, int automatic);
59 void window_destroy(WINDOW_REC *window);
61 void window_auto_destroy(WINDOW_REC *window);
63 void window_set_active(WINDOW_REC *window);
64 void window_change_server(WINDOW_REC *window, void *server);
66 void window_set_refnum(WINDOW_REC *window, int refnum);
67 void window_set_name(WINDOW_REC *window, const char *name);
68 void window_set_history(WINDOW_REC *window, const char *name);
69 void window_set_level(WINDOW_REC *window, int level);
70 void window_set_immortal(WINDOW_REC *window, int immortal);
72 /* return active item's name, or if none is active, window's name */
73 const char *window_get_active_name(WINDOW_REC *window);
75 WINDOW_REC *window_find_level(void *server, int level);
76 WINDOW_REC *window_find_closest(void *server, const char *name, int level);
77 WINDOW_REC *window_find_refnum(int refnum);
78 WINDOW_REC *window_find_name(const char *name);
79 WINDOW_REC *window_find_item(SERVER_REC *server, const char *name);
81 int window_refnum_prev(int refnum, int wrap);
82 int window_refnum_next(int refnum, int wrap);
83 int windows_refnum_last(void);
85 int window_refnum_cmp(WINDOW_REC *w1, WINDOW_REC *w2);
86 GSList *windows_get_sorted(void);
88 /* Add a new bind to window - if duplicate is found it's returned */
89 WINDOW_BIND_REC *window_bind_add(WINDOW_REC *window, const char *servertag,
91 void window_bind_destroy(WINDOW_REC *window, WINDOW_BIND_REC *rec);
93 WINDOW_BIND_REC *window_bind_find(WINDOW_REC *window, const char *servertag,
95 void window_bind_remove_unsticky(WINDOW_REC *window);
97 void windows_init(void);
98 void windows_deinit(void);