doc: use boxes/arrows chars for diagram in differences with C API (scripting guide)

v2.8-utf8proc
Sebastien Helleu 2013-01-26 11:42:02 +01:00
parent 95bcc49063
commit 54a2067422
6 changed files with 62 additions and 36 deletions

View File

@ -219,18 +219,22 @@ Falls Ihr Skript 'test.py' eine WeeChat API Funktion aufruft wird der Aufruf
wie folgt abgearbeitet:
........................................
(Skript API) (C API)
\/ \/
test.py -------> python Erweiterung (python.so) -------> WeeChat core
┌──────────────────────┐ ╔══════════════════╗
│ python Erweiterung │ ║ WeeChat "core" ║
├────────────┬─────────┤ ╟─────────┐ ║
test.py ─────► │ Skript API │ C API │ ─────► ║ C API │ ║
└────────────┴─────────┘ ╚═════════╧════════╝
........................................
Gibt WeeChat einen Rückgabewert an Ihr Skript 'test.py' zurück wird der
Aufruf in umgekehrter Reihenfolge abgearbeitet:
........................................
(C API) (Skript API)
\/ \/
WeeChat core -------> python Erweiterung (python.so) -------> test.py
╔══════════════════╗ ┌──────────────────────┐
║ WeeChat "core" ║ │ python Erweiterung │
║ ┌─────────╢ ├─────────┬────────────┤
║ │ C API ║ ─────► │ C API │ Skript API │ ─────► test.py
╚════════╧═════════╝ └─────────┴────────────┘
........................................
[[pointers]]

View File

@ -215,18 +215,22 @@ a 'script' is a text file loaded with a plugin like 'python' with command
When your script 'test.py' calls a WeeChat API function, path is like that:
........................................
(script API) (C API)
\/ \/
test.py -------> python plugin (python.so) -------> WeeChat core
┌──────────────────────┐ ╔══════════════════╗
│ python plugin │ ║ WeeChat "core" ║
├────────────┬─────────┤ ╟─────────┐ ║
test.py ─────► │ script API │ C API │ ─────► ║ C API │ ║
└────────────┴─────────┘ ╚═════════╧════════╝
........................................
When WeeChat calls a callback in your script 'test.py', it's reverse of
previous path:
........................................
(C API) (script API)
\/ \/
WeeChat core -------> python plugin (python.so) -------> test.py
╔══════════════════╗ ┌──────────────────────┐
║ WeeChat "core" ║ │ python plugin │
║ ┌─────────╢ ├─────────┬────────────┤
║ │ C API ║ ─────► │ C API │ script API │ ─────► test.py
╚════════╧═════════╝ └─────────┴────────────┘
........................................
[[pointers]]

View File

@ -219,18 +219,22 @@ Quand votre script 'test.py' appelle une fonction de l'API WeeChat, le chemin
est le suivant :
........................................
(API script) (API C)
\/ \/
test.py -------> extension python (python.so) -------> WeeChat core
┌──────────────────────┐ ╔══════════════════╗
│ extension python │ ║ WeeChat "core" ║
├────────────┬─────────┤ ╟─────────┐ ║
test.py ─────► │ API script │ API C │ ─────► ║ API C │ ║
└────────────┴─────────┘ ╚═════════╧════════╝
........................................
Quand WeeChat appelle un "callback" dans votre script 'test.py', le chemin
est inversé :
........................................
(API C) (API script)
\/ \/
WeeChat core -------> extension plugin (python.so) -------> test.py
╔══════════════════╗ ┌──────────────────────┐
║ WeeChat "core" ║ │ extension python │
║ ┌─────────╢ ├─────────┬────────────┤
║ │ API C ║ ─────► │ API C │ API script │ ─────► test.py
╚════════╧═════════╝ └─────────┴────────────┘
........................................
[[pointers]]

View File

@ -221,18 +221,22 @@ Quando il proprio script 'test.py' chiama una funzione delle API di
Weechat, il path è simile a questo:
........................................
(script API) (C API)
\/ \/
test.py -------> python plugin (python.so) -------> core di WeeChat
┌──────────────────────┐ ╔══════════════════╗
│ python plugin │ ║ WeeChat "core" ║
├────────────┬─────────┤ ╟─────────┐ ║
test.py ─────► │ script API │ C API │ ─────► ║ C API │ ║
└────────────┴─────────┘ ╚═════════╧════════╝
........................................
Quando WeeChat chiama una callback nel proprio script 'test.py', è
l'opposto del path precedente:
........................................
(C API) (script API)
\/ \/
WeeChat core -------> python plugin (python.so) -------> test.py
╔══════════════════╗ ┌──────────────────────┐
║ WeeChat "core" ║ │ python plugin │
║ ┌─────────╢ ├─────────┬────────────┤
║ │ C API ║ ─────► │ C API │ script API │ ─────► test.py
╚════════╧═════════╝ └─────────┴────────────┘
........................................
[[pointers]]

View File

@ -205,19 +205,25 @@ directory is automatically created.
例えば 'test.py' スクリプトが WeeChat API 関数を呼び出す場合、以下の順に呼び出されます:
// PLEASE DO NOT TRANSLATE
........................................
(スクリプト API) (C API)
\/ \/
test.py -------> python プラグイン (python.so) -------> WeeChat core
┌──────────────────────┐ ╔══════════════════╗
│ python plugin │ ║ WeeChat "core" ║
├────────────┬─────────┤ ╟─────────┐ ║
test.py ─────► │ script API │ C API │ ─────► ║ C API │ ║
└────────────┴─────────┘ ╚═════════╧════════╝
........................................
WeeChat が 'test.py'
スクリプトで定義されたコールバックを呼び出す場合、順番は逆になります:
// PLEASE DO NOT TRANSLATE
........................................
(C API) (スクリプト API)
\/ \/
WeeChat core -------> python プラグイン (python.so) -------> test.py
╔══════════════════╗ ┌──────────────────────┐
║ WeeChat "core" ║ │ python plugin │
║ ┌─────────╢ ├─────────┬────────────┤
║ │ C API ║ ─────► │ C API │ script API │ ─────► test.py
╚════════╧═════════╝ └─────────┴────────────┘
........................................
[[pointers]]

View File

@ -218,17 +218,21 @@ plikiem tekstowym załadowanym przez wtyczkę jak 'python' za pomocą komendy
W momencie, kiedy Twój skrypt 'test.py' wywołuje funkcję z API Weechat, wygląda to tak:
........................................
(API skryptów) (C API)
\/ \/
test.py -------> wtyczka python (python.so) -------> rdzeń WeeChat
┌────────────────────────┐ ╔══════════════════╗
│ wtyczka python │ ║ WeeChat "core" ║
├──────────────┬─────────┤ ╟─────────┐ ║
test.py ─────► │ API skryptów │ C API │ ─────► ║ C API │ ║
└──────────────┴─────────┘ ╚═════════╧════════╝
........................................
Kiedy WeeChat odwołuje się do Twojego skryptu 'test.py' wygląda to tak:
........................................
(C API) (API skryptów)
\/ \/
rdzeń WeeChat -------> wtyczka python (python.so) -------> test.py
╔══════════════════╗ ┌────────────────────────┐
║ WeeChat "core" ║ │ wtyczka python │
║ ┌─────────╢ ├─────────┬──────────────┤
║ │ C API ║ ─────► │ C API │ API skryptów │ ─────► test.py
╚════════╧═════════╝ └─────────┴──────────────┘
........................................
[[pointers]]