Thu, 22 Aug 2013 01:35:32 +0530
Merged default branch
| 6694 | 1 | /** |
| 15884 | 2 | * @file tcl_purple.h Purple Tcl definitions |
| 6694 | 3 | * |
| 15884 | 4 | * purple |
| 6694 | 5 | * |
| 6 | * Copyright (C) 2003 Ethan Blanton <eblanton@cs.purdue.edu> | |
|
31293
169eeb43b52c
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
20393
diff
changeset
|
7 | * |
| 6694 | 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 | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15906
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 6694 | 21 | */ |
| 22 | ||
| 15884 | 23 | #ifndef _PURPLE_TCL_PURPLE_H_ |
| 24 | #define _PURPLE_TCL_PURPLE_H_ | |
| 6694 | 25 | |
| 26 | #include <tcl.h> | |
| 27 | ||
| 28 | #include "internal.h" | |
| 13847 | 29 | #include "cmds.h" |
| 6694 | 30 | #include "plugin.h" |
| 13812 | 31 | #include "stringref.h" |
| 6694 | 32 | |
| 33 | struct tcl_signal_handler { | |
| 10597 | 34 | Tcl_Obj *signal; |
| 6694 | 35 | Tcl_Interp *interp; |
| 36 | ||
| 37 | void *instance; | |
| 10597 | 38 | Tcl_Obj *namespace; |
| 39 | /* These following two are temporary during setup */ | |
| 40 | Tcl_Obj *args; | |
| 6694 | 41 | Tcl_Obj *proc; |
| 42 | ||
|
34806
182a4df77539
Refactored tcl plugins to use GType instead of PurpleValue.
Ankit Vani <a@nevitus.org>
parents:
34799
diff
changeset
|
43 | GType returntype; |
| 6694 | 44 | int nargs; |
|
34806
182a4df77539
Refactored tcl plugins to use GType instead of PurpleValue.
Ankit Vani <a@nevitus.org>
parents:
34799
diff
changeset
|
45 | GType *argtypes; |
| 6694 | 46 | }; |
| 47 | ||
| 13847 | 48 | struct tcl_cmd_handler { |
|
34304
faf0414a8b51
Fix most of libpurple warnings about -Wsign-compare
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
31293
diff
changeset
|
49 | PurpleCmdId id; |
| 13847 | 50 | Tcl_Obj *cmd; |
| 51 | Tcl_Interp *interp; | |
| 52 | ||
| 53 | Tcl_Obj *namespace; | |
| 54 | /* These are temporary during setup */ | |
| 55 | const char *args; | |
| 56 | int priority; | |
| 57 | int flags; | |
| 58 | const char *prpl_id; | |
| 59 | Tcl_Obj *proc; | |
| 60 | const char *helpstr; | |
| 61 | ||
| 62 | int nargs; | |
| 63 | }; | |
| 64 | ||
| 15884 | 65 | extern PurplePlugin *_tcl_plugin; |
| 6694 | 66 | |
| 13812 | 67 | /* Capitalized this way because these are "types" */ |
| 15884 | 68 | extern PurpleStringref *PurpleTclRefAccount; |
| 69 | extern PurpleStringref *PurpleTclRefConnection; | |
| 70 | extern PurpleStringref *PurpleTclRefConversation; | |
| 71 | extern PurpleStringref *PurpleTclRefPointer; | |
| 72 | extern PurpleStringref *PurpleTclRefPlugin; | |
| 73 | extern PurpleStringref *PurpleTclRefPresence; | |
| 74 | extern PurpleStringref *PurpleTclRefStatus; | |
| 75 | extern PurpleStringref *PurpleTclRefStatusAttr; | |
| 76 | extern PurpleStringref *PurpleTclRefStatusType; | |
| 77 | extern PurpleStringref *PurpleTclRefXfer; | |
|
20393
6280efb8c658
Another fabulous patch to our Tcl loader from venks on irc.freenode.net.
Ethan Blanton <elb@pidgin.im>
parents:
19859
diff
changeset
|
78 | extern PurpleStringref *PurpleTclRefHandle; |
| 13812 | 79 | |
| 15884 | 80 | PurplePlugin *tcl_interp_get_plugin(Tcl_Interp *interp); |
| 6694 | 81 | |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
10597
diff
changeset
|
82 | void tcl_signal_init(void); |
| 6694 | 83 | void tcl_signal_handler_free(struct tcl_signal_handler *handler); |
| 84 | void tcl_signal_cleanup(Tcl_Interp *interp); | |
| 85 | gboolean tcl_signal_connect(struct tcl_signal_handler *handler); | |
| 86 | void tcl_signal_disconnect(void *instance, const char *signal, Tcl_Interp *interp); | |
| 87 | ||
| 13847 | 88 | void tcl_cmd_init(void); |
| 89 | void tcl_cmd_handler_free(struct tcl_cmd_handler *handler); | |
| 90 | void tcl_cmd_cleanup(Tcl_Interp *interp); | |
| 15884 | 91 | PurpleCmdId tcl_cmd_register(struct tcl_cmd_handler *handler); |
| 92 | void tcl_cmd_unregister(PurpleCmdId id, Tcl_Interp *interp); | |
| 13847 | 93 | |
| 15884 | 94 | void purple_tcl_ref_init(void); |
| 95 | void *purple_tcl_ref_get(Tcl_Interp *interp, Tcl_Obj *obj, PurpleStringref *type); | |
| 96 | Tcl_Obj *purple_tcl_ref_new(PurpleStringref *type, void *value); | |
| 13812 | 97 | |
| 6694 | 98 | Tcl_ObjCmdProc tcl_cmd_account; |
| 99 | Tcl_ObjCmdProc tcl_cmd_signal_connect; | |
| 100 | Tcl_ObjCmdProc tcl_cmd_buddy; | |
| 13847 | 101 | Tcl_ObjCmdProc tcl_cmd_cmd; |
| 6694 | 102 | Tcl_ObjCmdProc tcl_cmd_connection; |
| 103 | Tcl_ObjCmdProc tcl_cmd_conversation; | |
| 104 | Tcl_ObjCmdProc tcl_cmd_core; | |
| 105 | Tcl_ObjCmdProc tcl_cmd_debug; | |
| 106 | Tcl_ObjCmdProc tcl_cmd_notify; | |
|
15750
c238e0966eb1
gaim::plugin Tcl command, thanks to Dossy Shiobara
Ethan Blanton <elb@pidgin.im>
parents:
15435
diff
changeset
|
107 | Tcl_ObjCmdProc tcl_cmd_plugins; |
| 6694 | 108 | Tcl_ObjCmdProc tcl_cmd_prefs; |
| 13823 | 109 | Tcl_ObjCmdProc tcl_cmd_presence; |
|
15758
d31f3317c849
Tcl savedstatus command, again from Dossy Shiobara. Dossy is on fire.
Ethan Blanton <elb@pidgin.im>
parents:
15750
diff
changeset
|
110 | Tcl_ObjCmdProc tcl_cmd_savedstatus; |
| 6694 | 111 | Tcl_ObjCmdProc tcl_cmd_send_im; |
| 112 | Tcl_ObjCmdProc tcl_cmd_signal; | |
| 13812 | 113 | Tcl_ObjCmdProc tcl_cmd_status; |
| 114 | Tcl_ObjCmdProc tcl_cmd_status_attr; | |
| 115 | Tcl_ObjCmdProc tcl_cmd_status_type; | |
| 6694 | 116 | Tcl_ObjCmdProc tcl_cmd_unload; |
| 117 | ||
| 15884 | 118 | #endif /* _PURPLE_TCL_PURPLE_H_ */ |