summaryrefslogtreecommitdiff
path: root/src/gui/gui-bar-item.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui-bar-item.h')
-rw-r--r--src/gui/gui-bar-item.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/gui/gui-bar-item.h b/src/gui/gui-bar-item.h
new file mode 100644
index 000000000..5f5dfec7c
--- /dev/null
+++ b/src/gui/gui-bar-item.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
+ * See README for License detail, AUTHORS for developers list.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef __WEECHAT_GUI_BAR_ITEM_H
+#define __WEECHAT_GUI_BAR_ITEM_H 1
+
+enum t_gui_bar_item_weechat
+{
+ GUI_BAR_ITEM_WEECHAT_BUFFER_COUNT = 0,
+ GUI_BAR_ITEM_WEECHAT_BUFFER_PLUGIN,
+ GUI_BAR_ITEM_WEECHAT_BUFFER_NAME,
+ GUI_BAR_ITEM_WEECHAT_NICKLIST_COUNT,
+ GUI_BAR_ITEM_WEECHAT_SCROLL,
+ GUI_BAR_ITEM_WEECHAT_HOTLIST,
+ /* number of bar items */
+ GUI_BAR_NUM_ITEMS,
+};
+
+struct t_gui_window;
+
+struct t_gui_bar_item
+{
+ struct t_weechat_plugin *plugin; /* plugin */
+ char *name; /* bar item name */
+ char *(*build_callback)(void *data,
+ struct t_gui_bar_item *item,
+ struct t_gui_window *window,
+ int max_width);
+ /* callback called for building item */
+ void *build_callback_data; /* data for callback */
+ struct t_gui_bar_item *prev_item; /* link to previous bar item */
+ struct t_gui_bar_item *next_item; /* link to next bar item */
+};
+
+/* variables */
+
+extern struct t_gui_bar_item *gui_bar_items;
+extern struct t_gui_bar_item *last_gui_bar_item;
+
+/* functions */
+
+extern struct t_gui_bar_item *gui_bar_item_search (char *name);
+extern struct t_gui_bar_item *gui_bar_item_new (struct t_weechat_plugin *plugin,
+ char *name,
+ char *(*build_callback)(void *data,
+ struct t_gui_bar_item *item,
+ struct t_gui_window *window,
+ int max_width),
+ void *build_callback_data);
+extern void gui_bar_item_update (char *name);
+extern void gui_bar_item_free (struct t_gui_bar_item *item);
+extern void gui_bar_item_free_all ();
+extern void gui_bar_item_free_all_plugin (struct t_weechat_plugin *plugin);
+extern void gui_bar_item_init ();
+extern void gui_bar_item_end ();
+extern void gui_bar_item_print_log ();
+
+#endif /* gui-bar-item.h */