From 29a56d7974b6d29aebe0bb43e66914d01267e4fe Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Wed, 10 Dec 2008 09:35:25 +0000 Subject: 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 --- src/perl/textui/TextUI.xs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/perl/textui/TextUI.xs') 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 @@ -137,6 +137,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 -- cgit v1.2.3