diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-12-01 18:12:52 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-12-01 18:12:52 +0000 |
commit | 545b0d5de8455f583529bbbf4ce268b7661d13a6 (patch) | |
tree | ed5ea543f1f8ea3c1283fe4753f0051559f4a81e | |
parent | 227e90e52b65e95d62979f6a7626cb2be5c60b31 (diff) | |
download | irssi-545b0d5de8455f583529bbbf4ce268b7661d13a6.zip |
Add public header with interfaces to manage statusbar items, bug #535.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4935 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/fe-text/Makefile.am | 4 | ||||
-rw-r--r-- | src/fe-text/statusbar-item.h | 16 | ||||
-rw-r--r-- | src/fe-text/statusbar.h | 11 |
3 files changed, 21 insertions, 10 deletions
diff --git a/src/fe-text/Makefile.am b/src/fe-text/Makefile.am index 51a9a4a6..688a0441 100644 --- a/src/fe-text/Makefile.am +++ b/src/fe-text/Makefile.am @@ -66,6 +66,10 @@ irssi_SOURCES = \ irssi.c \ module-formats.c +pkginc_fe_textdir=$(pkgincludedir)/src/fe-text +pkginc_fe_text_HEADERS = \ + statusbar-item.h + noinst_HEADERS = \ gui-entry.h \ gui-printtext.h \ diff --git a/src/fe-text/statusbar-item.h b/src/fe-text/statusbar-item.h new file mode 100644 index 00000000..788fed75 --- /dev/null +++ b/src/fe-text/statusbar-item.h @@ -0,0 +1,16 @@ +#ifndef IRSSI_STATUSBAR_ITEM_H +#define IRSSI_STATUSBAR_ITEM_H + +struct SBAR_ITEM_REC; + +typedef void (*STATUSBAR_FUNC) (struct SBAR_ITEM_REC *item, int get_size_only); + +void statusbar_item_register(const char *name, const char *value, + STATUSBAR_FUNC func); +void statusbar_item_unregister(const char *name); +void statusbar_item_default_handler(struct SBAR_ITEM_REC *item, int get_size_only, + const char *str, const char *data, + int escape_vars); +void statusbar_items_redraw(const char *name); + +#endif diff --git a/src/fe-text/statusbar.h b/src/fe-text/statusbar.h index 148fd02e..309294b0 100644 --- a/src/fe-text/statusbar.h +++ b/src/fe-text/statusbar.h @@ -2,13 +2,13 @@ #define __STATUSBAR_H #include "mainwindows.h" +#include "statusbar-item.h" #define STATUSBAR_PRIORITY_HIGH 100 #define STATUSBAR_PRIORITY_NORMAL 0 #define STATUSBAR_PRIORITY_LOW -100 typedef struct SBAR_ITEM_REC SBAR_ITEM_REC; -typedef void (*STATUSBAR_FUNC) (SBAR_ITEM_REC *item, int get_size_only); /* type */ #define STATUSBAR_TYPE_ROOT 1 @@ -80,10 +80,6 @@ struct SBAR_ITEM_REC { extern GSList *statusbar_groups; extern STATUSBAR_GROUP_REC *active_statusbar_group; -void statusbar_item_register(const char *name, const char *value, - STATUSBAR_FUNC func); -void statusbar_item_unregister(const char *name); - STATUSBAR_GROUP_REC *statusbar_group_create(const char *name); void statusbar_group_destroy(STATUSBAR_GROUP_REC *rec); STATUSBAR_GROUP_REC *statusbar_group_find(const char *name); @@ -99,14 +95,9 @@ SBAR_ITEM_REC *statusbar_item_create(STATUSBAR_REC *bar, SBAR_ITEM_CONFIG_REC *config); void statusbar_item_destroy(SBAR_ITEM_REC *item); -void statusbar_item_default_handler(SBAR_ITEM_REC *item, int get_size_only, - const char *str, const char *data, - int escape_vars); - /* redraw statusbar, NULL = all */ void statusbar_redraw(STATUSBAR_REC *bar, int force); void statusbar_item_redraw(SBAR_ITEM_REC *item); -void statusbar_items_redraw(const char *name); void statusbar_recreate_items(STATUSBAR_REC *bar); void statusbars_recreate_items(void); |