diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-09-06 20:07:26 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-09-06 20:07:26 +0200 |
commit | 48c9fbec35bfab789d99b4cd7a2aaf5ca51646a7 (patch) | |
tree | 5ed8c1189f165404ee83b6d8d00643fc4f7a6bcf /src/plugins | |
parent | 776f8e272543754ed0184cfb3f0f139218cc62d2 (diff) | |
download | weechat-48c9fbec35bfab789d99b4cd7a2aaf5ca51646a7.zip |
php: add missing functions current_buffer and current_window
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/php/weechat-php-api.c | 28 | ||||
-rw-r--r-- | src/plugins/php/weechat-php-api.h | 2 | ||||
-rw-r--r-- | src/plugins/php/weechat-php.c | 2 |
3 files changed, 32 insertions, 0 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c index ee2a65e81..74f59408c 100644 --- a/src/plugins/php/weechat-php-api.c +++ b/src/plugins/php/weechat-php-api.c @@ -3195,6 +3195,20 @@ PHP_FUNCTION(weechat_buffer_search_main) char *__retstr = API_PTR2STR(retval); SAFE_RETURN_STRING(__retstr); } +PHP_FUNCTION(weechat_current_buffer) +{ + struct t_gui_buffer *retval; + + API_FUNC_INIT(weechat_current_buffer); + + if (zend_parse_parameters_none () == FAILURE) + { + return; + } + retval = weechat_current_buffer (); + char *__retstr = API_PTR2STR(retval); SAFE_RETURN_STRING(__retstr); +} + PHP_FUNCTION(weechat_buffer_clear) { zend_string *z_buffer; @@ -3388,6 +3402,20 @@ PHP_FUNCTION(weechat_buffer_match_list) RETURN_LONG(retval); } +PHP_FUNCTION(weechat_current_window) +{ + struct t_gui_window *retval; + + API_FUNC_INIT(weechat_current_window); + + if (zend_parse_parameters_none () == FAILURE) + { + return; + } + retval = weechat_current_window (); + char *__retstr = API_PTR2STR(retval); SAFE_RETURN_STRING(__retstr); +} + PHP_FUNCTION(weechat_window_search_with_buffer) { zend_string *z_buffer; diff --git a/src/plugins/php/weechat-php-api.h b/src/plugins/php/weechat-php-api.h index aef80cebb..95d38caa7 100644 --- a/src/plugins/php/weechat-php-api.h +++ b/src/plugins/php/weechat-php-api.h @@ -134,6 +134,7 @@ PHP_FUNCTION(weechat_unhook_all); PHP_FUNCTION(weechat_buffer_new); PHP_FUNCTION(weechat_buffer_search); PHP_FUNCTION(weechat_buffer_search_main); +PHP_FUNCTION(weechat_current_buffer); PHP_FUNCTION(weechat_buffer_clear); PHP_FUNCTION(weechat_buffer_close); PHP_FUNCTION(weechat_buffer_merge); @@ -144,6 +145,7 @@ PHP_FUNCTION(weechat_buffer_get_pointer); PHP_FUNCTION(weechat_buffer_set); PHP_FUNCTION(weechat_buffer_string_replace_local_var); PHP_FUNCTION(weechat_buffer_match_list); +PHP_FUNCTION(weechat_current_window); PHP_FUNCTION(weechat_window_search_with_buffer); PHP_FUNCTION(weechat_window_get_integer); PHP_FUNCTION(weechat_window_get_string); diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c index b9c3c2baa..59ded5371 100644 --- a/src/plugins/php/weechat-php.c +++ b/src/plugins/php/weechat-php.c @@ -179,6 +179,7 @@ const zend_function_entry weechat_functions[] = { PHP_FE(weechat_buffer_new, NULL) PHP_FE(weechat_buffer_search, NULL) PHP_FE(weechat_buffer_search_main, NULL) + PHP_FE(weechat_current_buffer, NULL) PHP_FE(weechat_buffer_clear, NULL) PHP_FE(weechat_buffer_close, NULL) PHP_FE(weechat_buffer_merge, NULL) @@ -189,6 +190,7 @@ const zend_function_entry weechat_functions[] = { PHP_FE(weechat_buffer_set, NULL) PHP_FE(weechat_buffer_string_replace_local_var, NULL) PHP_FE(weechat_buffer_match_list, NULL) + PHP_FE(weechat_current_window, NULL) PHP_FE(weechat_window_search_with_buffer, NULL) PHP_FE(weechat_window_get_integer, NULL) PHP_FE(weechat_window_get_string, NULL) |