mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 22:06:38 +02:00
Add 256 colors support
Changes: - new section "palette" in weechat.conf - new API functions: list_search_pos and list_casesearch_pos
This commit is contained in:
@@ -85,6 +85,7 @@ my @ignore_options = ("aspell\\.dict\\..*",
|
||||
"logger\\.mask\\..*",
|
||||
"relay\\.port\\..*",
|
||||
"rmodifier\\.modifier\\..*",
|
||||
"weechat\\.palette\\..*",
|
||||
"weechat\\.proxy\\..*",
|
||||
"weechat\\.bar\\..*",
|
||||
"weechat\\.debug\\..*",
|
||||
|
||||
@@ -2474,6 +2474,48 @@ item = weechat.list_search(list, data)
|
||||
item = weechat.list_search(list, "my data")
|
||||
----------------------------------------
|
||||
|
||||
weechat_list_search_pos
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_New in version 0.3.4._
|
||||
|
||||
Search an item position in a list.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int weechat_list_search_pos (struct t_weelist *weelist,
|
||||
const char *data);
|
||||
----------------------------------------
|
||||
|
||||
Arguments:
|
||||
|
||||
* 'weelist': list pointer
|
||||
* 'data': data to search in list
|
||||
|
||||
Return value:
|
||||
|
||||
* position of item found, -1 if item was not found
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int pos_item = weechat_list_search_pos (list, "my data");
|
||||
----------------------------------------
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----------------------------------------
|
||||
# prototype
|
||||
pos_item = weechat.list_search_pos(list, data)
|
||||
|
||||
# example
|
||||
pos_item = weechat.list_search_pos(list, "my data")
|
||||
----------------------------------------
|
||||
|
||||
weechat_list_casesearch
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -2514,6 +2556,48 @@ item = weechat.list_casesearch(list, data)
|
||||
item = weechat.list_casesearch(list, "my data")
|
||||
----------------------------------------
|
||||
|
||||
weechat_list_casesearch_pos
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_New in version 0.3.4._
|
||||
|
||||
Search an item position in a list, ignoring case.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int weechat_list_casesearch_pos (struct t_weelist *weelist,
|
||||
const char *data);
|
||||
----------------------------------------
|
||||
|
||||
Arguments:
|
||||
|
||||
* 'weelist': list pointer
|
||||
* 'data': data to search in list
|
||||
|
||||
Return value:
|
||||
|
||||
* position of item found, -1 if item was not found
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int pos_item = weechat_list_casesearch_pos (list, "my data");
|
||||
----------------------------------------
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----------------------------------------
|
||||
# prototype
|
||||
pos_item = weechat.list_casesearch_pos(list, data)
|
||||
|
||||
# example
|
||||
pos_item = weechat.list_casesearch_pos(list, "my data")
|
||||
----------------------------------------
|
||||
|
||||
weechat_list_get
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -2501,6 +2501,48 @@ item = weechat.list_search(list, data)
|
||||
item = weechat.list_search(list, "ma donnée")
|
||||
----------------------------------------
|
||||
|
||||
weechat_list_search_pos
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_Nouveau dans la version 0.3.4._
|
||||
|
||||
Recherche la position d'un élément dans une liste.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int weechat_list_search_pos (struct t_weelist *weelist,
|
||||
const char *data);
|
||||
----------------------------------------
|
||||
|
||||
Paramètres :
|
||||
|
||||
* 'weelist' : pointeur vers la liste
|
||||
* 'data' : donnée à chercher dans la liste
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
* position de l'élément trouvé, -1 si aucun élément n'a été trouvé
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int pos_item = weechat_list_search_pos (list, "ma donnée");
|
||||
----------------------------------------
|
||||
|
||||
Script (Python) :
|
||||
|
||||
[source,python]
|
||||
----------------------------------------
|
||||
# prototype
|
||||
pos_item = weechat.list_search_pos(list, data)
|
||||
|
||||
# exemple
|
||||
pos_item = weechat.list_search_pos(list, "ma donnée")
|
||||
----------------------------------------
|
||||
|
||||
weechat_list_casesearch
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -2541,6 +2583,48 @@ item = weechat.list_casesearch(list, data)
|
||||
item = weechat.list_casesearch(list, "ma donnée")
|
||||
----------------------------------------
|
||||
|
||||
weechat_list_casesearch_pos
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_Nouveau dans la version 0.3.4._
|
||||
|
||||
Recherche la position d'un élément dans la liste, sans tenir compte de la casse.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int weechat_list_casesearch_pos (struct t_weelist *weelist,
|
||||
const char *data);
|
||||
----------------------------------------
|
||||
|
||||
Paramètres :
|
||||
|
||||
* 'weelist' : pointeur vers la liste
|
||||
* 'data' : données à chercher dans la liste
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
* position l'élément trouvé, -1 si aucun élément n'a été trouvé
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int pos_item = weechat_list_casesearch_pos (list, "ma donnée");
|
||||
----------------------------------------
|
||||
|
||||
Script (Python) :
|
||||
|
||||
[source,python]
|
||||
----------------------------------------
|
||||
# prototype
|
||||
pos_item = weechat.list_casesearch_pos(list, data)
|
||||
|
||||
# exemple
|
||||
pos_item = weechat.list_casesearch_pos(list, "ma donnée")
|
||||
----------------------------------------
|
||||
|
||||
weechat_list_get
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -2461,6 +2461,49 @@ item = weechat.list_search(list, data)
|
||||
item = weechat.list_search(list, "my data")
|
||||
----------------------------------------
|
||||
|
||||
// TRANSLATION MISSING
|
||||
weechat_list_search_pos
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_New in version 0.3.4._
|
||||
|
||||
Search an item position in a list.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int weechat_list_search_pos (struct t_weelist *weelist,
|
||||
const char *data);
|
||||
----------------------------------------
|
||||
|
||||
Arguments:
|
||||
|
||||
* 'weelist': list pointer
|
||||
* 'data': data to search in list
|
||||
|
||||
Return value:
|
||||
|
||||
* position of item found, -1 if item was not found
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int pos_item = weechat_list_search_pos (list, "my data");
|
||||
----------------------------------------
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----------------------------------------
|
||||
# prototype
|
||||
pos_item = weechat.list_search_pos(list, data)
|
||||
|
||||
# example
|
||||
pos_item = weechat.list_search_pos(list, "my data")
|
||||
----------------------------------------
|
||||
|
||||
weechat_list_casesearch
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -2502,6 +2545,49 @@ item = weechat.list_casesearch(list, data)
|
||||
item = weechat.list_casesearch(list, "my data")
|
||||
----------------------------------------
|
||||
|
||||
// TRANSLATION MISSING
|
||||
weechat_list_casesearch_pos
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
_New in version 0.3.4._
|
||||
|
||||
Search an item position in a list, ignoring case.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int weechat_list_casesearch_pos (struct t_weelist *weelist,
|
||||
const char *data);
|
||||
----------------------------------------
|
||||
|
||||
Arguments:
|
||||
|
||||
* 'weelist': list pointer
|
||||
* 'data': data to search in list
|
||||
|
||||
Return value:
|
||||
|
||||
* position of item found, -1 if item was not found
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
----------------------------------------
|
||||
int pos_item = weechat_list_casesearch_pos (list, "my data");
|
||||
----------------------------------------
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----------------------------------------
|
||||
# prototype
|
||||
pos_item = weechat.list_casesearch_pos(list, data)
|
||||
|
||||
# example
|
||||
pos_item = weechat.list_casesearch_pos(list, "my data")
|
||||
----------------------------------------
|
||||
|
||||
weechat_list_get
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user