summaryrefslogtreecommitdiff
path: root/src/perl/textui/TextUI.xs
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2008-12-10 09:35:25 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2008-12-10 09:35:25 +0000
commit29a56d7974b6d29aebe0bb43e66914d01267e4fe (patch)
treeb05a1567534ac2ab7cfedbfcbd7461ce2d2f5009 /src/perl/textui/TextUI.xs
parent0327b7d5dc067eb04f065ea165ceb7d5202c3316 (diff)
downloadirssi-29a56d7974b6d29aebe0bb43e66914d01267e4fe.zip
Add print_after method to Window perl object analogous to
gui_printtext_after but which also expands formats and forces a full line. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4962 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/textui/TextUI.xs')
-rw-r--r--src/perl/textui/TextUI.xs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/perl/textui/TextUI.xs b/src/perl/textui/TextUI.xs
index 25384d56..67c4c87b 100644
--- a/src/perl/textui/TextUI.xs
+++ b/src/perl/textui/TextUI.xs
@@ -138,6 +138,24 @@ CODE:
MODULE = Irssi::TextUI PACKAGE = Irssi::UI::Window
void
+print_after(window, prev, level, str)
+ Irssi::UI::Window window
+ Irssi::TextUI::Line prev
+ int level
+ char *str
+PREINIT:
+ TEXT_DEST_REC dest;
+ char *text;
+ char *text2;
+CODE:
+ format_create_dest(&dest, NULL, NULL, level, window);
+ text = format_string_expand(str, NULL);
+ text2 = g_strconcat(text, "\n", NULL);
+ gui_printtext_after(&dest, prev, text2);
+ g_free(text);
+ g_free(text2);
+
+void
gui_printtext_after(window, prev, level, str)
Irssi::UI::Window window
Irssi::TextUI::Line prev