Mercurial > pidgin
annotate libpurple/plugins/tcl/tcl_purple.h @ 22231:4af9179e33df
Made account.c use purple_connection_get_prpl instead of gc->prpl.
For the next minor bump would be useful to add getters for gc->flags and gc->wants_to_die.
This was done with the blessing of rekkanoryo.
author | Eoin Coffey <ecoffey@soc.pidgin.im> |
---|---|
date | Thu, 31 Jan 2008 02:23:55 +0000 |
parents | 506f0f7f4f21 |
children | 44f53d3fc54f |
rev | line source |
---|---|
15822 | 1 /** |
2 * @file tcl_purple.h Purple Tcl definitions | |
3 * | |
4 * purple | |
5 * | |
6 * Copyright (C) 2003 Ethan Blanton <eblanton@cs.purdue.edu> | |
7 * | |
8 * This program is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15822
diff
changeset
|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15822 | 21 */ |
22 | |
23 #ifndef _PURPLE_TCL_PURPLE_H_ | |
24 #define _PURPLE_TCL_PURPLE_H_ | |
25 | |
26 #include <tcl.h> | |
27 | |
28 #include "internal.h" | |
29 #include "cmds.h" | |
30 #include "plugin.h" | |
31 #include "value.h" | |
32 #include "stringref.h" | |
33 | |
34 struct tcl_signal_handler { | |
35 Tcl_Obj *signal; | |
36 Tcl_Interp *interp; | |
37 | |
38 void *instance; | |
39 Tcl_Obj *namespace; | |
40 /* These following two are temporary during setup */ | |
41 Tcl_Obj *args; | |
42 Tcl_Obj *proc; | |
43 | |
44 PurpleValue *returntype; | |
45 int nargs; | |
46 PurpleValue **argtypes; | |
47 }; | |
48 | |
49 struct tcl_cmd_handler { | |
50 int id; | |
51 Tcl_Obj *cmd; | |
52 Tcl_Interp *interp; | |
53 | |
54 Tcl_Obj *namespace; | |
55 /* These are temporary during setup */ | |
56 const char *args; | |
57 int priority; | |
58 int flags; | |
59 const char *prpl_id; | |
60 Tcl_Obj *proc; | |
61 const char *helpstr; | |
62 | |
63 int nargs; | |
64 }; | |
65 | |
66 extern PurplePlugin *_tcl_plugin; | |
67 | |
68 /* Capitalized this way because these are "types" */ | |
69 extern PurpleStringref *PurpleTclRefAccount; | |
70 extern PurpleStringref *PurpleTclRefConnection; | |
71 extern PurpleStringref *PurpleTclRefConversation; | |
72 extern PurpleStringref *PurpleTclRefPointer; | |
73 extern PurpleStringref *PurpleTclRefPlugin; | |
74 extern PurpleStringref *PurpleTclRefPresence; | |
75 extern PurpleStringref *PurpleTclRefStatus; | |
76 extern PurpleStringref *PurpleTclRefStatusAttr; | |
77 extern PurpleStringref *PurpleTclRefStatusType; | |
78 extern PurpleStringref *PurpleTclRefXfer; | |
20165
506f0f7f4f21
Another fabulous patch to our Tcl loader from venks on irc.freenode.net.
Ethan Blanton <elb@pidgin.im>
parents:
19681
diff
changeset
|
79 extern PurpleStringref *PurpleTclRefHandle; |
15822 | 80 |
81 PurplePlugin *tcl_interp_get_plugin(Tcl_Interp *interp); | |
82 | |
83 void tcl_signal_init(void); | |
84 void tcl_signal_handler_free(struct tcl_signal_handler *handler); | |
85 void tcl_signal_cleanup(Tcl_Interp *interp); | |
86 gboolean tcl_signal_connect(struct tcl_signal_handler *handler); | |
87 void tcl_signal_disconnect(void *instance, const char *signal, Tcl_Interp *interp); | |
88 | |
89 void tcl_cmd_init(void); | |
90 void tcl_cmd_handler_free(struct tcl_cmd_handler *handler); | |
91 void tcl_cmd_cleanup(Tcl_Interp *interp); | |
92 PurpleCmdId tcl_cmd_register(struct tcl_cmd_handler *handler); | |
93 void tcl_cmd_unregister(PurpleCmdId id, Tcl_Interp *interp); | |
94 | |
95 void purple_tcl_ref_init(void); | |
96 void *purple_tcl_ref_get(Tcl_Interp *interp, Tcl_Obj *obj, PurpleStringref *type); | |
97 Tcl_Obj *purple_tcl_ref_new(PurpleStringref *type, void *value); | |
98 | |
99 Tcl_ObjCmdProc tcl_cmd_account; | |
100 Tcl_ObjCmdProc tcl_cmd_signal_connect; | |
101 Tcl_ObjCmdProc tcl_cmd_buddy; | |
102 Tcl_ObjCmdProc tcl_cmd_cmd; | |
103 Tcl_ObjCmdProc tcl_cmd_connection; | |
104 Tcl_ObjCmdProc tcl_cmd_conversation; | |
105 Tcl_ObjCmdProc tcl_cmd_core; | |
106 Tcl_ObjCmdProc tcl_cmd_debug; | |
107 Tcl_ObjCmdProc tcl_cmd_notify; | |
108 Tcl_ObjCmdProc tcl_cmd_plugins; | |
109 Tcl_ObjCmdProc tcl_cmd_prefs; | |
110 Tcl_ObjCmdProc tcl_cmd_presence; | |
111 Tcl_ObjCmdProc tcl_cmd_savedstatus; | |
112 Tcl_ObjCmdProc tcl_cmd_send_im; | |
113 Tcl_ObjCmdProc tcl_cmd_signal; | |
114 Tcl_ObjCmdProc tcl_cmd_status; | |
115 Tcl_ObjCmdProc tcl_cmd_status_attr; | |
116 Tcl_ObjCmdProc tcl_cmd_status_type; | |
117 Tcl_ObjCmdProc tcl_cmd_unload; | |
118 | |
119 #endif /* _PURPLE_TCL_PURPLE_H_ */ |