summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/perl/weechat-perl-api.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-05-10 01:22:08 +0200
committerSebastien Helleu <flashcode@flashtux.org>2009-05-10 01:22:08 +0200
commit57c6478b9184979ad1a09336076b0c07cd7fc56b (patch)
tree60a01bcb7d788217b5c47431c0c1db12dcc053b3 /src/plugins/scripts/perl/weechat-perl-api.c
parent09c42f4cf0787a72a70dd5273da355e522e9fdf5 (diff)
downloadweechat-57c6478b9184979ad1a09336076b0c07cd7fc56b.zip
Add function window_set_title in API (task #9361)
Diffstat (limited to 'src/plugins/scripts/perl/weechat-perl-api.c')
-rw-r--r--src/plugins/scripts/perl/weechat-perl-api.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c
index 0b99bc2cf..419f8b45b 100644
--- a/src/plugins/scripts/perl/weechat-perl-api.c
+++ b/src/plugins/scripts/perl/weechat-perl-api.c
@@ -4268,6 +4268,34 @@ static XS (XS_weechat_api_window_get_pointer)
}
/*
+ * weechat::window_set_title: set window title
+ */
+
+static XS (XS_weechat_api_window_set_title)
+{
+ dXSARGS;
+
+ /* make C compiler happy */
+ (void) cv;
+
+ if (!perl_current_script)
+ {
+ WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "window_set_title");
+ PERL_RETURN_ERROR;
+ }
+
+ if (items < 1)
+ {
+ WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "window_set_title");
+ PERL_RETURN_ERROR;
+ }
+
+ weechat_window_set_title (SvPV (ST (0), PL_na)); /* title */
+
+ PERL_RETURN_OK;
+}
+
+/*
* weechat::nicklist_add_group: add a group in nicklist
*/
@@ -5657,6 +5685,7 @@ weechat_perl_api_init (pTHX)
newXS ("weechat::window_get_integer", XS_weechat_api_window_get_integer, "weechat");
newXS ("weechat::window_get_string", XS_weechat_api_window_get_string, "weechat");
newXS ("weechat::window_get_pointer", XS_weechat_api_window_get_pointer, "weechat");
+ newXS ("weechat::window_set_title", XS_weechat_api_window_set_title, "weechat");
newXS ("weechat::nicklist_add_group", XS_weechat_api_nicklist_add_group, "weechat");
newXS ("weechat::nicklist_search_group", XS_weechat_api_nicklist_search_group, "weechat");
newXS ("weechat::nicklist_add_nick", XS_weechat_api_nicklist_add_nick, "weechat");