annotate plugins/tcl/tcl_gaim.h @ 19835:d99e36279d41

[gaim-migrate @ 17181] add PSM in tooltips fix oim bug in windows committed by MaYuan<mayuan2006@gmail.com> committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Wed, 06 Sep 2006 16:14:22 +0000
parents d0ff520f87da
children 4d577b63299a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
1 /**
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
2 * @file tcl_gaim.h Gaim Tcl definitions
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
3 *
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
4 * gaim
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
5 *
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
6 * Copyright (C) 2003 Ethan Blanton <eblanton@cs.purdue.edu>
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
7 *
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
11 * (at your option) any later version.
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
12 *
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
16 * GNU General Public License for more details.
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
17 *
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
21 */
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
22
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
23 #ifndef _GAIM_TCL_GAIM_H_
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
24 #define _GAIM_TCL_GAIM_H_
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
25
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
26 #include <tcl.h>
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
27
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
28 #include "internal.h"
13845
d0ff520f87da [gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents: 13824
diff changeset
29 #include "cmds.h"
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
30 #include "plugin.h"
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
31 #include "value.h"
13810
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
32 #include "stringref.h"
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
33
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
34 struct tcl_signal_handler {
10597
0e886a234d92 [gaim-migrate @ 12012]
Ethan Blanton <elb@pidgin.im>
parents: 6694
diff changeset
35 Tcl_Obj *signal;
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
36 Tcl_Interp *interp;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
37
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
38 void *instance;
10597
0e886a234d92 [gaim-migrate @ 12012]
Ethan Blanton <elb@pidgin.im>
parents: 6694
diff changeset
39 Tcl_Obj *namespace;
0e886a234d92 [gaim-migrate @ 12012]
Ethan Blanton <elb@pidgin.im>
parents: 6694
diff changeset
40 /* These following two are temporary during setup */
0e886a234d92 [gaim-migrate @ 12012]
Ethan Blanton <elb@pidgin.im>
parents: 6694
diff changeset
41 Tcl_Obj *args;
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
42 Tcl_Obj *proc;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
43
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
44 GaimValue *returntype;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
45 int nargs;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
46 GaimValue **argtypes;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
47 };
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
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
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
66 extern GaimPlugin *_tcl_plugin;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
67
13810
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
68 /* Capitalized this way because these are "types" */
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
69 extern GaimStringref *GaimTclRefAccount;
13815
724e4c08391a [gaim-migrate @ 16247]
Ethan Blanton <elb@pidgin.im>
parents: 13810
diff changeset
70 extern GaimStringref *GaimTclRefConnection;
13810
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
71 extern GaimStringref *GaimTclRefConversation;
13817
ad8ddfa756ad [gaim-migrate @ 16249]
Ethan Blanton <elb@pidgin.im>
parents: 13815
diff changeset
72 extern GaimStringref *GaimTclRefPointer;
13821
e5e07c996c56 [gaim-migrate @ 16254]
Ethan Blanton <elb@pidgin.im>
parents: 13817
diff changeset
73 extern GaimStringref *GaimTclRefPresence;
13810
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
74 extern GaimStringref *GaimTclRefStatus;
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
75 extern GaimStringref *GaimTclRefStatusAttr;
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
76 extern GaimStringref *GaimTclRefStatusType;
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
77
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
78 GaimPlugin *tcl_interp_get_plugin(Tcl_Interp *interp);
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
79
12323
fc464a0abccc [gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents: 10597
diff changeset
80 void tcl_signal_init(void);
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
81 void tcl_signal_handler_free(struct tcl_signal_handler *handler);
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
82 void tcl_signal_cleanup(Tcl_Interp *interp);
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
83 gboolean tcl_signal_connect(struct tcl_signal_handler *handler);
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
84 void tcl_signal_disconnect(void *instance, const char *signal, Tcl_Interp *interp);
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
85
13845
d0ff520f87da [gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents: 13824
diff changeset
86 void tcl_cmd_init(void);
d0ff520f87da [gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents: 13824
diff changeset
87 void tcl_cmd_handler_free(struct tcl_cmd_handler *handler);
d0ff520f87da [gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents: 13824
diff changeset
88 void tcl_cmd_cleanup(Tcl_Interp *interp);
d0ff520f87da [gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents: 13824
diff changeset
89 GaimCmdId tcl_cmd_register(struct tcl_cmd_handler *handler);
d0ff520f87da [gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents: 13824
diff changeset
90 void tcl_cmd_unregister(GaimCmdId id, Tcl_Interp *interp);
d0ff520f87da [gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents: 13824
diff changeset
91
13824
3b8dc44ff25f [gaim-migrate @ 16268]
Ethan Blanton <elb@pidgin.im>
parents: 13821
diff changeset
92 void gaim_tcl_ref_init(void);
13810
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
93 void *gaim_tcl_ref_get(Tcl_Interp *interp, Tcl_Obj *obj, GaimStringref *type);
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
94 Tcl_Obj *gaim_tcl_ref_new(GaimStringref *type, void *value);
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
95
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
96 Tcl_ObjCmdProc tcl_cmd_account;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
97 Tcl_ObjCmdProc tcl_cmd_signal_connect;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
98 Tcl_ObjCmdProc tcl_cmd_buddy;
13845
d0ff520f87da [gaim-migrate @ 16301]
Etan Reisner <pidgin@unreliablesource.net>
parents: 13824
diff changeset
99 Tcl_ObjCmdProc tcl_cmd_cmd;
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
100 Tcl_ObjCmdProc tcl_cmd_connection;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
101 Tcl_ObjCmdProc tcl_cmd_conversation;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
102 Tcl_ObjCmdProc tcl_cmd_core;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
103 Tcl_ObjCmdProc tcl_cmd_debug;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
104 Tcl_ObjCmdProc tcl_cmd_notify;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
105 Tcl_ObjCmdProc tcl_cmd_prefs;
13821
e5e07c996c56 [gaim-migrate @ 16254]
Ethan Blanton <elb@pidgin.im>
parents: 13817
diff changeset
106 Tcl_ObjCmdProc tcl_cmd_presence;
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
107 Tcl_ObjCmdProc tcl_cmd_send_im;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
108 Tcl_ObjCmdProc tcl_cmd_signal;
13810
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
109 Tcl_ObjCmdProc tcl_cmd_status;
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
110 Tcl_ObjCmdProc tcl_cmd_status_attr;
a84523152a24 [gaim-migrate @ 16240]
Ethan Blanton <elb@pidgin.im>
parents: 12323
diff changeset
111 Tcl_ObjCmdProc tcl_cmd_status_type;
6694
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
112 Tcl_ObjCmdProc tcl_cmd_unload;
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
113
2d2f04c5c7d2 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
114 #endif /* _GAIM_TCL_GAIM_H_ */