root/trunk/Plug-Ins/SDK/Python/Template.py

Revision 3464, 2.7 kB (checked in by timothy, 2 years ago)

Allow plugins and scripts to supply toolbar items that the user can add along side the standard Colloquy items. If a plugin or script supplies toolbar items they will show up in the toolbar customize sheet like the other items.

Line 
1 import objc
2 from Foundation import *
3 from AppKit import *
4
5 # called on load and reload
6 def load( scriptFilePath ):
7         pass
8
9 # called on unload and relead
10 def unload():
11         pass
12
13 # return an array of NSMenuItems that should be dispalyed for 'item' associated with 'view'
14 def contextualMenuItems( item, view ):
15         pass
16
17 # return an array of toolbar item identifier strings that can be associated with 'view'
18 def toolbarItemIdentifiers( view ):
19         pass
20
21 # return an NSToolbarItem for 'identifier' associated with 'view'
22 def toolbarItem( identifier, view, willBeInserted ):
23         pass
24
25 # perform the action associated with 'toolbarItem' for 'view'
26 def handleClickedToolbarItem( toolbarItem, view ):
27         pass
28
29 # process the command and return true if you handle it or False to pass on to another plugin
30 def processUserCommand( command, arguments, connection, view ):
31         # return true if the command was handled or to prevent other plugins or Colloquy from handling it
32         return False
33
34 # handle a ctcp request and return true if you handle it or False to pass on to another plugin
35 def processSubcodeRequest( command, arguments, user ):
36         # return true if the command was handled or to prevent other plugins or Colloquy from handling it
37         return False
38
39 # handle a ctcp reply and return true if you handle it or False to pass on to another plugin
40 def processSubcodeReply( command, arguments, user ):
41         # return true if the command was handled or to prevent other plugins or Colloquy from handling it
42         return False
43
44 # called when 'connection' connects
45 def connected( connection ):
46         pass
47
48 # called when 'connection' is disconnecting
49 def disconnecting( connection ):
50         pass
51
52 # perform a notification
53 def performNotification( identifier, context, preferences ):
54         pass
55
56 # called when an unhandled URL scheme is clicked in 'view'
57 def handleClickedLink( url, view ):
58         # return true if the link was handled or to prevent other plugins or Colloquy from handling it
59         return False
60
61 # called for each incoming message, the message is mutable
62 def processIncomingMessage( message, view ):
63         pass
64
65 # called for each outgoing message, the message is mutable
66 def processOutgoingMessage( message, view ):
67         pass
68
69 # called when a member joins 'room'
70 def memberJoined( member, room ):
71         pass
72
73 # called when a member parts 'room'
74 def memberParted( member, room, reason ):
75         pass
76
77 # called when a member is kicked from 'room' for 'reason'
78 def memberKicked( member, room, by, reason ):
79         pass
80
81 # called when the local user joins 'room'
82 def joinedRoom( room ):
83         pass
84
85 # called when the local user is parting 'room'
86 def partingFromRoom( room ):
87         pass
88
89 # called when the local user is kicked from 'room' for 'reason'
90 def kickedFromRoom( room, by, reason ):
91         pass
92
93 # called when the topic changes in 'room' by 'user'
94 def topicChanged( topic, room, user ):
95         pass
Note: See TracBrowser for help on using the browser.