Mercurial > pidgin
annotate plugins/tcl/tcl_gaim.h @ 14077:034a3ffa09de
[gaim-migrate @ 16698]
CID 218
Also a win32 compile fix.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 11 Aug 2006 02:20:18 +0000 |
parents | 4d577b63299a |
children |
rev | line source |
---|---|
6694 | 1 /** |
2 * @file tcl_gaim.h Gaim Tcl definitions | |
3 * | |
4 * gaim | |
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 | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
22 | |
23 #ifndef _GAIM_TCL_GAIM_H_ | |
24 #define _GAIM_TCL_GAIM_H_ | |
25 | |
26 #include <tcl.h> | |
27 | |
28 #include "internal.h" | |
13845
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
29 #include "cmds.h" |
6694 | 30 #include "plugin.h" |
31 #include "value.h" | |
13810 | 32 #include "stringref.h" |
6694 | 33 |
34 struct tcl_signal_handler { | |
10597 | 35 Tcl_Obj *signal; |
6694 | 36 Tcl_Interp *interp; |
37 | |
38 void *instance; | |
10597 | 39 Tcl_Obj *namespace; |
40 /* These following two are temporary during setup */ | |
41 Tcl_Obj *args; | |
6694 | 42 Tcl_Obj *proc; |
43 | |
44 GaimValue *returntype; | |
45 int nargs; | |
46 GaimValue **argtypes; | |
47 }; | |
48 | |
13845
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
49 struct tcl_cmd_handler { |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
50 int id; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
51 Tcl_Obj *cmd; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
52 Tcl_Interp *interp; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
53 |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
54 Tcl_Obj *namespace; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
55 /* These are temporary during setup */ |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
56 const char *args; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
57 int priority; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
58 int flags; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
59 const char *prpl_id; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
60 Tcl_Obj *proc; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
61 const char *helpstr; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
62 |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
63 int nargs; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
64 }; |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
65 |
6694 | 66 extern GaimPlugin *_tcl_plugin; |
67 | |
13810 | 68 /* Capitalized this way because these are "types" */ |
69 extern GaimStringref *GaimTclRefAccount; | |
13815 | 70 extern GaimStringref *GaimTclRefConnection; |
13810 | 71 extern GaimStringref *GaimTclRefConversation; |
13817 | 72 extern GaimStringref *GaimTclRefPointer; |
13946 | 73 extern GaimStringref *GaimTclRefPlugin; |
13821 | 74 extern GaimStringref *GaimTclRefPresence; |
13810 | 75 extern GaimStringref *GaimTclRefStatus; |
76 extern GaimStringref *GaimTclRefStatusAttr; | |
77 extern GaimStringref *GaimTclRefStatusType; | |
13946 | 78 extern GaimStringref *GaimTclRefXfer; |
13810 | 79 |
6694 | 80 GaimPlugin *tcl_interp_get_plugin(Tcl_Interp *interp); |
81 | |
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
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 | |
13845
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
88 void tcl_cmd_init(void); |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
89 void tcl_cmd_handler_free(struct tcl_cmd_handler *handler); |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
90 void tcl_cmd_cleanup(Tcl_Interp *interp); |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
91 GaimCmdId tcl_cmd_register(struct tcl_cmd_handler *handler); |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
92 void tcl_cmd_unregister(GaimCmdId id, Tcl_Interp *interp); |
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
93 |
13824 | 94 void gaim_tcl_ref_init(void); |
13810 | 95 void *gaim_tcl_ref_get(Tcl_Interp *interp, Tcl_Obj *obj, GaimStringref *type); |
96 Tcl_Obj *gaim_tcl_ref_new(GaimStringref *type, void *value); | |
97 | |
6694 | 98 Tcl_ObjCmdProc tcl_cmd_account; |
99 Tcl_ObjCmdProc tcl_cmd_signal_connect; | |
100 Tcl_ObjCmdProc tcl_cmd_buddy; | |
13845
d0ff520f87da
[gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents:
13824
diff
changeset
|
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; | |
107 Tcl_ObjCmdProc tcl_cmd_prefs; | |
13821 | 108 Tcl_ObjCmdProc tcl_cmd_presence; |
6694 | 109 Tcl_ObjCmdProc tcl_cmd_send_im; |
110 Tcl_ObjCmdProc tcl_cmd_signal; | |
13810 | 111 Tcl_ObjCmdProc tcl_cmd_status; |
112 Tcl_ObjCmdProc tcl_cmd_status_attr; | |
113 Tcl_ObjCmdProc tcl_cmd_status_type; | |
6694 | 114 Tcl_ObjCmdProc tcl_cmd_unload; |
115 | |
116 #endif /* _GAIM_TCL_GAIM_H_ */ |