diff options
author | James Booth <boothj5@gmail.com> | 2015-11-29 23:58:52 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-11-29 23:58:52 +0000 |
commit | d9435d3b659c4bd6728b9157bd8c67023050257e (patch) | |
tree | 4f8a2808bb2c7430a362d61fb36a386733e565e6 /src/ui/window.c | |
parent | 6e304bb8678921cb22617d2e8eaf7deb8448c1b4 (diff) | |
download | profani-tty-d9435d3b659c4bd6728b9157bd8c67023050257e.tar.gz |
Tidy wins_create_summary()
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index d6500a67..039d4770 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -285,6 +285,47 @@ win_get_title(ProfWin *window) return NULL; } +char* +win_get_string(ProfWin *window) +{ + assert(window != NULL); + + switch (window->type) { + case WIN_CONSOLE: + { + ProfConsoleWin *conswin = (ProfConsoleWin*)window; + return cons_get_string(conswin); + } + case WIN_CHAT: + { + ProfChatWin *chatwin = (ProfChatWin*)window; + return chatwin_get_string(chatwin); + } + case WIN_MUC: + { + ProfMucWin *mucwin = (ProfMucWin*)window; + return mucwin_get_string(mucwin); + } + case WIN_MUC_CONFIG: + { + ProfMucConfWin *mucconfwin = (ProfMucConfWin*)window; + return mucconfwin_get_string(mucconfwin); + } + case WIN_PRIVATE: + { + ProfPrivateWin *privwin = (ProfPrivateWin*)window; + return privwin_get_string(privwin); + } + case WIN_XML: + { + ProfXMLWin *xmlwin = (ProfXMLWin*)window; + return xmlwin_get_string(xmlwin); + } + default: + return NULL; + } +} + void win_hide_subwin(ProfWin *window) { |