Added SILC Thread Queue API
[crypto.git] / apps / irssi / src / fe-common / core / window-items.h
1 #ifndef __WINDOW_ITEMS_H
2 #define __WINDOW_ITEMS_H
3
4 #include "fe-windows.h"
5
6 /* Add/remove/destroy window item from `window' */
7 void window_item_add(WINDOW_REC *window, WI_ITEM_REC *item, int automatic);
8 void window_item_remove(WI_ITEM_REC *item);
9 void window_item_destroy(WI_ITEM_REC *item);
10
11 /* Find a window for `item' and call window_item_add(). */
12 void window_item_create(WI_ITEM_REC *item, int automatic);
13
14 #define window_item_window(item) \
15         ((WINDOW_REC *) ((WI_ITEM_REC *) (item))->window)
16 void window_item_change_server(WI_ITEM_REC *item, void *server);
17
18 void window_item_set_active(WINDOW_REC *window, WI_ITEM_REC *item);
19 /* Return TRUE if `item' is the active window item in the window.
20    `item' can be NULL. */
21 int window_item_is_active(WI_ITEM_REC *item);
22
23 void window_item_prev(WINDOW_REC *window);
24 void window_item_next(WINDOW_REC *window);
25
26 /* Find wanted window item by name. `server' can be NULL. */
27 WI_ITEM_REC *window_item_find(void *server, const char *name);
28 WI_ITEM_REC *window_item_find_window(WINDOW_REC *window,
29                                      void *server, const char *name);
30
31 void window_items_init(void);
32 void window_items_deinit(void);
33
34 #endif