annotate man/lispref/tooltalk.texi @ 2640:a4040d921acc

[xemacs-hg @ 2005-03-09 05:36:28 by stephent] internals and lispref <871xapfkkq.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Wed, 09 Mar 2005 05:36:50 +0000
parents 576fb035e263
children 9fae6227ede5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 @c -*-texinfo-*-
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @c This is part of the XEmacs Lisp Reference Manual.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
3 @c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 @c See the file lispref.texi for copying conditions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 @setfilename ../../info/tooltalk.info
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 @node ToolTalk Support, LDAP Support, X-Windows, top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 @chapter ToolTalk Support
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 @cindex ToolTalk
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 * XEmacs ToolTalk API Summary::
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 * Sending Messages::
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 * Receiving Messages::
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 @node XEmacs ToolTalk API Summary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 @section XEmacs ToolTalk API Summary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 The XEmacs Lisp interface to ToolTalk is similar, at least in spirit,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 to the standard C ToolTalk API. Only the message and pattern parts
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 of the API are supported at present; more of the API could be added
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 if needed. The Lisp interface departs from the C API in a few ways:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 @itemize @bullet
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 ToolTalk is initialized automatically at XEmacs startup-time. Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 can only be sent other ToolTalk applications connected to the same X11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 server that XEmacs is running on.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 There are fewer entry points; polymorphic functions with keyword
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 arguments are used instead.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 The callback interface is simpler and marginally less functional.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 A single callback may be associated with a message or a pattern;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 the callback is specified with a Lisp symbol (the symbol should
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 have a function binding).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 @item
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
41 The session attribute for messages and patterns is always
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 initialized to the default session.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 Anywhere a ToolTalk enum constant, e.g. @samp{TT_SESSION}, is valid, one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 can substitute the corresponding symbol, e.g. @code{'TT_SESSION}. This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 simplifies building lists that represent messages and patterns.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 @end itemize
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 @node Sending Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 @section Sending Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 @cindex sending ToolTalk messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 @cindex ToolTalk message
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 * Example of Sending Messages::
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 * Elisp Interface for Sending Messages::
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 @node Example of Sending Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 @subsection Example of Sending Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 Here's a simple example that sends a query to another application
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 and then displays its reply. Both the query and the reply are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 stored in the first argument of the message.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 (defun tooltalk-random-query-handler (msg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 (let ((state (get-tooltalk-message-attribute msg 'state)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 (cond
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 ((eq state 'TT_HANDLED)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 (message (get-tooltalk-message-attribute msg arg_val 0)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 ((memq state '(TT_FAILED TT_REJECTED))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 (message "Random query turns up nothing")))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 (defvar random-query-message
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
77 '( class TT_REQUEST
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
78 scope TT_SESSION
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 address TT_PROCEDURE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 op "random-query"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 args '((TT_INOUT "?" "string"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 callback tooltalk-random-query-handler))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 (let ((m (make-tooltalk-message random-query-message)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 (send-tooltalk-message m))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 @node Elisp Interface for Sending Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 @subsection Elisp Interface for Sending Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 @defun make-tooltalk-message attributes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 Create a ToolTalk message and initialize its attributes.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
93 The value of @var{attributes} must be a list of alternating keyword/values,
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
94 where keywords are symbols that name valid message attributes.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 For example:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 @example
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
98 (make-tooltalk-message
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 '(class TT_NOTICE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 scope TT_SESSION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 address TT_PROCEDURE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 op "do-something"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 args ("arg1" 12345 (TT_INOUT "arg3" "string"))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 Values must always be strings, integers, or symbols that represent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 ToolTalk constants. Attribute names are the same as those supported by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 @code{set-tooltalk-message-attribute}, plus @code{args}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 The value of @code{args} should be a list of message arguments where
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 each message argument has the following form:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 @quotation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 @samp{(mode [value [type]])} or just @samp{value}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 @end quotation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 Where @var{mode} is one of @code{TT_IN}, @code{TT_OUT}, or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 @code{TT_INOUT} and @var{type} is a string. If @var{type} isn't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 specified then @code{int} is used if @var{value} is a number; otherwise
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 @code{string} is used. If @var{type} is @code{string} then @var{value}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 is converted to a string (if it isn't a string already) with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 @code{prin1-to-string}. If only a value is specified then @var{mode}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 defaults to @code{TT_IN}. If @var{mode} is @code{TT_OUT} then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 @var{value} and @var{type} don't need to be specified. You can find out
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 more about the semantics and uses of ToolTalk message arguments in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 chapter 4 of the @cite{ToolTalk Programmer's Guide}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 @defun send-tooltalk-message msg
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 Send the message on its way. Once the message has been sent it's almost
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 always a good idea to get rid of it with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 @code{destroy-tooltalk-message}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 @defun return-tooltalk-message msg &optional mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 Send a reply to this message. The second argument can be @code{reply},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 @code{reject} or @code{fail}; the default is @code{reply}. Before
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 sending a reply, all message arguments whose mode is @code{TT_INOUT} or
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
141 @code{TT_OUT} should have been filled in---see
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 @code{set-tooltalk-message-attribute}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 @defun get-tooltalk-message-attribute msg attribute &optional argn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 Returns the indicated ToolTalk message attribute. Attributes are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 identified by symbols with the same name (underscores and all) as the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 suffix of the ToolTalk @samp{tt_message_<attribute>} function that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 extracts the value. String attribute values are copied and enumerated
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 type values (except disposition) are converted to symbols;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 e.g. @samp{TT_HANDLER} is @code{'TT_HANDLER}, @samp{uid} and @samp{gid}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 are represented by fixnums (small integers), @samp{opnum} is converted
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 to a string, and @samp{disposition} is converted to a fixnum. We
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 convert @samp{opnum} (a C int) to a string (e.g. @code{123} @result{}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 @code{"123"}) because there's no guarantee that opnums will fit within
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 the range of XEmacs Lisp integers.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 [TBD] Use the @code{plist} attribute instead of C API @code{user}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 attribute for user-defined message data. To retrieve the value of a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 message property, specify the indicator for @var{argn}. For example, to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 get the value of a property called @code{rflag}, use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 (get-tooltalk-message-attribute msg 'plist 'rflag)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 To get the value of a message argument use one of the @code{arg_val}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 (strings), @code{arg_ival} (integers), or @code{arg_bval} (strings with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 embedded nulls), attributes. For example, to get the integer value of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 the third argument:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 (get-tooltalk-message-attribute msg 'arg_ival 2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 As you can see, argument numbers are zero-based. The type of each
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 arguments can be retrieved with the @code{arg_type} attribute; however
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 ToolTalk doesn't define any semantics for the string value of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 @code{arg_type}. Conventionally @code{string} is used for strings and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 @code{int} for 32 bit integers. Note that XEmacs Lisp stores the lengths
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 of strings explicitly (unlike C) so treating the value returned by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 @code{arg_bval} like a string is fine.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 @defun set-tooltalk-message-attribute value msg attribute &optional argn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 Initialize one ToolTalk message attribute.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 Attribute names and values are the same as for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 @code{get-tooltalk-message-attribute}. A property list is provided for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 user data (instead of the @code{user} message attribute); see
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 @code{get-tooltalk-message-attribute}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 Callbacks are handled slightly differently than in the C ToolTalk API.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 The value of @var{callback} should be the name of a function of one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 argument. It will be called each time the state of the message changes.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 This is usually used to notice when the message's state has changed to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 @code{TT_HANDLED} (or @code{TT_FAILED}), so that reply argument values
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 can be used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 If one of the argument attributes is specified as @code{arg_val},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 @code{arg_ival}, or @code{arg_bval}, then @var{argn} must be the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 number of an already created argument. Arguments can be added to a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 message with @code{add-tooltalk-message-arg}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 @defun add-tooltalk-message-arg msg mode type &optional value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 Append one new argument to the message. @var{mode} must be one of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 @code{TT_IN}, @code{TT_INOUT}, or @code{TT_OUT}, @var{type} must be a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 string, and @var{value} can be a string or an integer. ToolTalk doesn't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 define any semantics for @var{type}, so only the participants in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 protocol you're using need to agree what types mean (if anything).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 Conventionally @code{string} is used for strings and @code{int} for 32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 bit integers. Arguments can initialized by providing a value or with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 @code{set-tooltalk-message-attribute}; the latter is necessary if you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 want to initialize the argument with a string that can contain embedded
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 nulls (use @code{arg_bval}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
226 @defun create-tooltalk-message &optional no-callback
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 Create a new ToolTalk message. The message's session attribute is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 initialized to the default session. Other attributes can be initialized
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 with @code{set-tooltalk-message-attribute}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 @code{make-tooltalk-message} is the preferred way to create and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 initialize a message.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
232
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
233 Optional arg @var{no-callback} says don't add a C-level callback at all.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
234 Normally don't do that; just don't specify the Lisp callback when
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
235 calling @code{make-tooltalk-message}.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 @defun destroy-tooltalk-message msg
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 Apply @samp{tt_message_destroy} to the message. It's not necessary to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 destroy messages after they've been processed by a message or pattern
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 callback, the Lisp/ToolTalk callback machinery does this for you.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 @node Receiving Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 @section Receiving Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 @cindex ToolTalk pattern
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 @cindex receiving ToolTalk messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 * Example of Receiving Messages::
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 * Elisp Interface for Receiving Messages::
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 @node Example of Receiving Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 @subsection Example of Receiving Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 Here's a simple example of a handler for a message that tells XEmacs to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 display a string in the mini-buffer area. The message operation is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 called @samp{emacs-display-string}. Its first (0th) argument is the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 string to display.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 (defun tooltalk-display-string-handler (msg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 (message (get-tooltalk-message-attribute msg 'arg_val 0)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 (defvar display-string-pattern
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 '(category TT_HANDLE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 scope TT_SESSION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 op "emacs-display-string"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 callback tooltalk-display-string-handler))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 (let ((p (make-tooltalk-pattern display-string-pattern)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 (register-tooltalk-pattern p))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 @node Elisp Interface for Receiving Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 @subsection Elisp Interface for Receiving Messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 @defun make-tooltalk-pattern attributes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 Create a ToolTalk pattern and initialize its attributes.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
282 The value of attributes must be a list of alternating keyword/values,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 where keywords are symbols that name valid pattern attributes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 or lists of valid attributes. For example:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 @example
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
287 (make-tooltalk-pattern
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 '(category TT_OBSERVE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 scope TT_SESSION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 op ("operation1" "operation2")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 args ("arg1" 12345 (TT_INOUT "arg3" "string"))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
294 Attribute names are the same as those supported by
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 @code{add-tooltalk-pattern-attribute}, plus @code{'args}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 Values must always be strings, integers, or symbols that represent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 ToolTalk constants or lists of same. When a list of values is provided
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 all of the list elements are added to the attribute. In the example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 above, messages whose @samp{op} attribute is @samp{"operation1"} or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 @samp{"operation2"} would match the pattern.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 The value of @var{args} should be a list of pattern arguments where each
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 pattern argument has the following form:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 @quotation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 @samp{(mode [value [type]])} or just @samp{value}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 @end quotation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 Where @var{mode} is one of @code{TT_IN}, @code{TT_OUT}, or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 @code{TT_INOUT} and @var{type} is a string. If @var{type} isn't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 specified then @code{int} is used if @var{value} is a number; otherwise
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 @code{string} is used. If @var{type} is @code{string} then @var{value}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 is converted to a string (if it isn't a string already) with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 @code{prin1-to-string}. If only a value is specified then @var{mode}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 defaults to @code{TT_IN}. If @var{mode} is @code{TT_OUT} then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 @var{value} and @var{type} don't need to be specified. You can find out
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 more about the semantics and uses of ToolTalk pattern arguments in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 chapter 3 of the @cite{ToolTalk Programmer's Guide}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
323 @defun register-tooltalk-pattern pattern
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 XEmacs will begin receiving messages that match this pattern.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
327 @defun unregister-tooltalk-pattern pattern
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 XEmacs will stop receiving messages that match this pattern.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
331 @defun add-tooltalk-pattern-attribute value pattern indicator
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 Add one value to the indicated pattern attribute. The names of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 attributes are the same as the ToolTalk accessors used to set them less
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 the @samp{tooltalk_pattern_} prefix and the @samp{_add} suffix. For
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 example, the name of the attribute for the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336 @samp{tt_pattern_disposition_add} attribute is @code{disposition}. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 @code{category} attribute is handled specially, since a pattern can only
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 be a member of one category (@code{TT_OBSERVE} or @code{TT_HANDLE}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 Callbacks are handled slightly differently than in the C ToolTalk API.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342 The value of @var{callback} should be the name of a function of one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 argument. It will be called each time the pattern matches an incoming
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 message.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
347 @defun add-tooltalk-pattern-arg pattern mode vtype &optional value
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 Add one fully-specified argument to a ToolTalk pattern. @var{mode} must
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
349 be one of @code{TT_IN}, @code{TT_INOUT}, or @code{TT_OUT}. @var{vtype}
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 must be a string. @var{value} can be an integer, string or @code{nil}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 If @var{value} is an integer then an integer argument
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 (@samp{tt_pattern_iarg_add}) is added; otherwise a string argument is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 added. At present there's no way to add a binary data argument.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 @refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 @defun create-tooltalk-pattern
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358 Create a new ToolTalk pattern and initialize its session attribute to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 be the default session.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 440
diff changeset
362 @defun destroy-tooltalk-pattern pattern
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 Apply @samp{tt_pattern_destroy} to the pattern. This effectively
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 unregisters the pattern.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 @defun describe-tooltalk-message msg &optional stream
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 Print the message's attributes and arguments to @var{stream}. This is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369 often useful for debugging.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370 @end defun