mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 17:53:13 +02:00
core: use buffer pointer instead of window in input functions, add new function window_search_with_buffer in plugin API
This commit is contained in:
@@ -8624,7 +8624,7 @@ Script (Python):
|
||||
value = weechat.buffer_get_pointer(buffer, property)
|
||||
|
||||
# example
|
||||
weechat.prnt("", "plugin pointer of my buffer: %lx" % weechat.buffer_get_pointer(my_buffer, "plugin"))
|
||||
weechat.prnt("", "plugin pointer of my buffer: %s" % weechat.buffer_get_pointer(my_buffer, "plugin"))
|
||||
----------------------------------------
|
||||
|
||||
weechat_buffer_set
|
||||
@@ -8977,6 +8977,49 @@ window = weechat.current_window()
|
||||
current_window = weechat.current_window()
|
||||
----------------------------------------
|
||||
|
||||
weechat_window_search_with_buffer
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_New in version 0.3.5._
|
||||
|
||||
Return pointer to window displaying buffer.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
struct t_gui_window *weechat_window_search_with_buffer (struct t_gui_buffer *buffer);
|
||||
----------------------------------------
|
||||
|
||||
Arguments:
|
||||
|
||||
* 'buffer': buffer pointer
|
||||
|
||||
Return value:
|
||||
|
||||
* pointer to window displaying buffer (NULL if no window is displaying buffer)
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
weechat_printf (NULL,
|
||||
"window displaying core buffer: %lx",
|
||||
weechat_window_search_with_buffer (weechat_buffer_search_main ()));
|
||||
----------------------------------------
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----------------------------------------
|
||||
# prototype
|
||||
window = weechat.window_search_with_buffer(buffer)
|
||||
|
||||
# example
|
||||
weechat.prnt("", "window displaying core buffer: %s"
|
||||
% weechat.window_search_with_buffer(weechat.buffer_search_main()))
|
||||
----------------------------------------
|
||||
|
||||
weechat_window_get_integer
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -9104,7 +9147,7 @@ Script (Python):
|
||||
value = weechat.window_get_pointer(window, property)
|
||||
|
||||
# example
|
||||
weechat.prnt("", "buffer displayed in current window: %lx"
|
||||
weechat.prnt("", "buffer displayed in current window: %s"
|
||||
% weechat.window_get_pointer(weechat.current_window(), "buffer"))
|
||||
----------------------------------------
|
||||
|
||||
@@ -11243,7 +11286,7 @@ Script (Python):
|
||||
value = weechat.infolist_pointer(infolist, var)
|
||||
|
||||
# example
|
||||
weechat.prnt("", "pointer = 0x%lx" % weechat.infolist_pointer(infolist, "my_pointer"))
|
||||
weechat.prnt("", "pointer = 0x%s" % weechat.infolist_pointer(infolist, "my_pointer"))
|
||||
----------------------------------------
|
||||
|
||||
weechat_infolist_buffer
|
||||
|
||||
@@ -8756,7 +8756,7 @@ Script (Python) :
|
||||
value = weechat.buffer_get_pointer(buffer, property)
|
||||
|
||||
# exemple
|
||||
weechat.prnt("", "pointeur vers l'extension de mon tampon : %lx" % weechat.buffer_get_pointer(my_buffer, "plugin"))
|
||||
weechat.prnt("", "pointeur vers l'extension de mon tampon : %s" % weechat.buffer_get_pointer(my_buffer, "plugin"))
|
||||
----------------------------------------
|
||||
|
||||
weechat_buffer_set
|
||||
@@ -9122,6 +9122,50 @@ window = weechat.current_window()
|
||||
current_window = weechat.current_window()
|
||||
----------------------------------------
|
||||
|
||||
weechat_window_search_with_buffer
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_Nouveau dans la version 0.3.5._
|
||||
|
||||
Retourne le pointeur vers la fenêtre affichant un tampon.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
struct t_gui_window *weechat_window_search_with_buffer (struct t_gui_buffer *buffer);
|
||||
----------------------------------------
|
||||
|
||||
Paramètre :
|
||||
|
||||
* 'buffer': buffer pointer
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
* pointeur vers la fenêtre affichant un tampon (NULL si aucune fenêtre n'affiche
|
||||
ce tampon)
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
weechat_printf (NULL,
|
||||
"fenêtre affichant le tampon core: %lx",
|
||||
weechat_window_search_with_buffer (weechat_buffer_search_main ()));
|
||||
----------------------------------------
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----------------------------------------
|
||||
# prototype
|
||||
window = weechat.window_search_with_buffer(buffer)
|
||||
|
||||
# exemple
|
||||
weechat.prnt("", "fenêtre affichant le tampon core: %s"
|
||||
% weechat.window_search_with_buffer(weechat.buffer_search_main()))
|
||||
----------------------------------------
|
||||
|
||||
weechat_window_get_integer
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -9257,7 +9301,7 @@ Script (Python) :
|
||||
value = weechat.window_get_pointer(window, property)
|
||||
|
||||
# exemple
|
||||
weechat.prnt("", "tampon affiché dans la fenêtre courante : %lx"
|
||||
weechat.prnt("", "tampon affiché dans la fenêtre courante : %s"
|
||||
% weechat.window_get_pointer(weechat.current_window(), "buffer"))
|
||||
----------------------------------------
|
||||
|
||||
@@ -11418,7 +11462,7 @@ Script (Python) :
|
||||
value = weechat.infolist_pointer(infolist, var)
|
||||
|
||||
# exemple
|
||||
weechat.prnt("", "pointeur = 0x%lx" % weechat.infolist_pointer(infolist, "mon_pointeur"))
|
||||
weechat.prnt("", "pointeur = 0x%s" % weechat.infolist_pointer(infolist, "mon_pointeur"))
|
||||
----------------------------------------
|
||||
|
||||
weechat_infolist_buffer
|
||||
|
||||
@@ -8674,7 +8674,7 @@ Script (Python):
|
||||
value = weechat.buffer_get_pointer(buffer, property)
|
||||
|
||||
# esempio
|
||||
weechat.prnt("", "plugin pointer of my buffer: %lx" % weechat.buffer_get_pointer(my_buffer, "plugin"))
|
||||
weechat.prnt("", "plugin pointer of my buffer: %s" % weechat.buffer_get_pointer(my_buffer, "plugin"))
|
||||
----------------------------------------
|
||||
|
||||
weechat_buffer_set
|
||||
@@ -9038,6 +9038,50 @@ window = weechat.current_window()
|
||||
current_window = weechat.current_window()
|
||||
----------------------------------------
|
||||
|
||||
// TRANSLATION MISSING
|
||||
weechat_window_search_with_buffer
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_Novità nella versione 0.3.5._
|
||||
|
||||
Return pointer to window displaying buffer.
|
||||
|
||||
Prototipo:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
struct t_gui_window *weechat_window_search_with_buffer (struct t_gui_buffer *buffer);
|
||||
----------------------------------------
|
||||
|
||||
Argomenti:
|
||||
|
||||
* 'buffer': buffer pointer
|
||||
|
||||
Valore restituito:
|
||||
|
||||
* pointer to window displaying buffer (NULL if no window is displaying buffer)
|
||||
|
||||
Esempio in C:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
weechat_printf (NULL,
|
||||
"window displaying core buffer: %lx",
|
||||
weechat_window_search_with_buffer (weechat_buffer_search_main ()));
|
||||
----------------------------------------
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----------------------------------------
|
||||
# prototipo
|
||||
window = weechat.window_search_with_buffer(buffer)
|
||||
|
||||
# esempio
|
||||
weechat.prnt("", "window displaying core buffer: %s"
|
||||
% weechat.window_search_with_buffer(weechat.buffer_search_main()))
|
||||
----------------------------------------
|
||||
|
||||
weechat_window_get_integer
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -9168,7 +9212,7 @@ Script (Python):
|
||||
value = weechat.window_get_pointer(window, property)
|
||||
|
||||
# esempio
|
||||
weechat.prnt("", "buffer displayed in current window: %lx"
|
||||
weechat.prnt("", "buffer displayed in current window: %s"
|
||||
% weechat.window_get_pointer(weechat.current_window(), "buffer"))
|
||||
----------------------------------------
|
||||
|
||||
@@ -11333,7 +11377,7 @@ Script (Python):
|
||||
value = weechat.infolist_pointer(infolist, var)
|
||||
|
||||
# esempio
|
||||
weechat.prnt("", "pointer = 0x%lx" % weechat.infolist_pointer(infolist, "my_pointer"))
|
||||
weechat.prnt("", "pointer = 0x%s" % weechat.infolist_pointer(infolist, "my_pointer"))
|
||||
----------------------------------------
|
||||
|
||||
weechat_infolist_buffer
|
||||
|
||||
Reference in New Issue
Block a user