Mercurial > pidgin
comparison plugins/tcl/tcl_gaim.h @ 13810:a84523152a24
[gaim-migrate @ 16240]
This is not a completed update, but it has useful bits and bug fixes
and the completed update will take some more time.
This adds support for some of the status API to Tcl, as well as
improving the handling of several of the pointer types (by introducing
a gaim reference object type and appropriate string roundtrip
functions) and introducing some "type safety".
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Sat, 10 Jun 2006 18:01:11 +0000 |
parents | fc464a0abccc |
children | 724e4c08391a |
comparison
equal
deleted
inserted
replaced
13809:cd93e6e90044 | 13810:a84523152a24 |
---|---|
26 #include <tcl.h> | 26 #include <tcl.h> |
27 | 27 |
28 #include "internal.h" | 28 #include "internal.h" |
29 #include "plugin.h" | 29 #include "plugin.h" |
30 #include "value.h" | 30 #include "value.h" |
31 #include "stringref.h" | |
31 | 32 |
32 struct tcl_signal_handler { | 33 struct tcl_signal_handler { |
33 Tcl_Obj *signal; | 34 Tcl_Obj *signal; |
34 Tcl_Interp *interp; | 35 Tcl_Interp *interp; |
35 | 36 |
44 GaimValue **argtypes; | 45 GaimValue **argtypes; |
45 }; | 46 }; |
46 | 47 |
47 extern GaimPlugin *_tcl_plugin; | 48 extern GaimPlugin *_tcl_plugin; |
48 | 49 |
50 /* Capitalized this way because these are "types" */ | |
51 extern GaimStringref *GaimTclRefAccount; | |
52 extern GaimStringref *GaimTclRefConversation; | |
53 extern GaimStringref *GaimTclRefStatus; | |
54 extern GaimStringref *GaimTclRefStatusAttr; | |
55 extern GaimStringref *GaimTclRefStatusType; | |
56 | |
49 GaimPlugin *tcl_interp_get_plugin(Tcl_Interp *interp); | 57 GaimPlugin *tcl_interp_get_plugin(Tcl_Interp *interp); |
50 | 58 |
51 void tcl_signal_init(void); | 59 void tcl_signal_init(void); |
52 void tcl_signal_handler_free(struct tcl_signal_handler *handler); | 60 void tcl_signal_handler_free(struct tcl_signal_handler *handler); |
53 void tcl_signal_cleanup(Tcl_Interp *interp); | 61 void tcl_signal_cleanup(Tcl_Interp *interp); |
54 gboolean tcl_signal_connect(struct tcl_signal_handler *handler); | 62 gboolean tcl_signal_connect(struct tcl_signal_handler *handler); |
55 void tcl_signal_disconnect(void *instance, const char *signal, Tcl_Interp *interp); | 63 void tcl_signal_disconnect(void *instance, const char *signal, Tcl_Interp *interp); |
64 | |
65 void gaim_tcl_ref_init(); | |
66 void *gaim_tcl_ref_get(Tcl_Interp *interp, Tcl_Obj *obj, GaimStringref *type); | |
67 Tcl_Obj *gaim_tcl_ref_new(GaimStringref *type, void *value); | |
56 | 68 |
57 Tcl_ObjCmdProc tcl_cmd_account; | 69 Tcl_ObjCmdProc tcl_cmd_account; |
58 Tcl_ObjCmdProc tcl_cmd_signal_connect; | 70 Tcl_ObjCmdProc tcl_cmd_signal_connect; |
59 Tcl_ObjCmdProc tcl_cmd_buddy; | 71 Tcl_ObjCmdProc tcl_cmd_buddy; |
60 Tcl_ObjCmdProc tcl_cmd_connection; | 72 Tcl_ObjCmdProc tcl_cmd_connection; |
63 Tcl_ObjCmdProc tcl_cmd_debug; | 75 Tcl_ObjCmdProc tcl_cmd_debug; |
64 Tcl_ObjCmdProc tcl_cmd_notify; | 76 Tcl_ObjCmdProc tcl_cmd_notify; |
65 Tcl_ObjCmdProc tcl_cmd_prefs; | 77 Tcl_ObjCmdProc tcl_cmd_prefs; |
66 Tcl_ObjCmdProc tcl_cmd_send_im; | 78 Tcl_ObjCmdProc tcl_cmd_send_im; |
67 Tcl_ObjCmdProc tcl_cmd_signal; | 79 Tcl_ObjCmdProc tcl_cmd_signal; |
80 Tcl_ObjCmdProc tcl_cmd_status; | |
81 Tcl_ObjCmdProc tcl_cmd_status_attr; | |
82 Tcl_ObjCmdProc tcl_cmd_status_type; | |
68 Tcl_ObjCmdProc tcl_cmd_unload; | 83 Tcl_ObjCmdProc tcl_cmd_unload; |
69 | 84 |
70 #endif /* _GAIM_TCL_GAIM_H_ */ | 85 #endif /* _GAIM_TCL_GAIM_H_ */ |