summaryrefslogtreecommitdiff
path: root/doc/en/plugins.txt
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-10 15:17:01 +0100
committermathieui <mathieui@mathieui.net>2011-11-10 15:17:01 +0100
commitd3d4bd156cb8a76d5406f7b6c690bbb09e55afde (patch)
treed5edb091dd310b3d5cd90567b11ab244ded660b3 /doc/en/plugins.txt
parent628ff3b0d982526aad48151bdce623d12b8db2b7 (diff)
downloadpoezio-d3d4bd156cb8a76d5406f7b6c690bbb09e55afde.tar.gz
poezio-d3d4bd156cb8a76d5406f7b6c690bbb09e55afde.tar.bz2
poezio-d3d4bd156cb8a76d5406f7b6c690bbb09e55afde.tar.xz
poezio-d3d4bd156cb8a76d5406f7b6c690bbb09e55afde.zip
Doc for the new API function
Diffstat (limited to 'doc/en/plugins.txt')
-rw-r--r--doc/en/plugins.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/en/plugins.txt b/doc/en/plugins.txt
index 32fe45c3..4cef6db9 100644
--- a/doc/en/plugins.txt
+++ b/doc/en/plugins.txt
@@ -61,6 +61,41 @@ Everything else is handled by that _auto_completion()_ method (checking what
strings match, how to cycle between matches, etc). If you don’t want any
special completion for that command, just pass None (the default value).
+*del_command*:: +self+, +name+ +
+This command removes a tab command added by your plugin.
+
+* _name_: (string) the name of the command you want to remove.
+
+
+*add_tab_command*:: +self+, +tab_type+, +name+, +handler+, +help+, +completion+ +
+This method adds a tab-custom command to poezio. For example you can add /dou
+command that the user could call in a specific tab when the plugin is loaded.
+
+
+* _tab_type_: You have to _import tabs_ in order to get tabs types. The
+ following are possible:
+** _tabs.MucTab_: The MultiUserChat tabs
+** _tabs.PrivateTab_: The Private tabs
+** _tabs.ConversationTab_: The Roster tab
+** _tabs.RosterInfoTab_: The MultiUserChat, Private, and Conversation tabs
+** _tabs.ChatTab_: The MultiUserChat, Private, and Conversation tabs
+** _tabs.MucListTab_: The MultiUserChat list tabs
+* _name_: (string) the name of the command (for example, if it is 'plugintest',
+ it can add a /plugintest command)
+* _handler_: (function) the function to be called when the command is executed.
+the handler takes *args* as a parameter, which is a string of what
+is entered after the command. Split *args* (with _common.shell_split_) to use
+that as command arguments.
+* _help_: (string) the help message available for that command through the
+ _/help_ command.
+* _completion_: (function) the completion for the args of that command. It
+ takes an input object as its only argument. This function should call the
+_auto_completion()_ method on the input object, passing a list of possible
+ strings for the completion and returning the value of that call directly.
+Everything else is handled by that _auto_completion()_ method (checking what
+ strings match, how to cycle between matches, etc). If you don’t want any
+ special completion for that command, just pass None (the default value).
+
*add_event_handler**: +self+, +event_name+, +handler+ +position+
This methods adds a callback that will be called whenever the given event
occurs. <<example-2,ex 2>>
@@ -76,6 +111,7 @@ It must accept the arguments specified for that event in the
with the internal poezio events described below.
+
Attributes
----------