Mercurial > hg > xemacs-beta
comparison src/tooltalk.c @ 3025:facf3239ba30
[xemacs-hg @ 2005-10-25 11:16:19 by ben]
rename new->new_, convert 'foo to `foo'
EmacsFrame.c, ExternalClient.c, ExternalShell.c, chartab.c, cmdloop.c, compiler.h, console.c, database.c, device-msw.c, device-x.c, device.c, doc.c, dragdrop.c, eval.c, event-msw.c, event-stream.c, events.c, extents.c, file-coding.c, fns.c, frame-tty.c, frame.c, gpmevent.c, gutter.c, hash.c, imgproc.c, indent.c, keymap.c, lisp-union.h, macros.c, malloc.c, marker.c, menubar-x.c, menubar.c, mule-charset.c, number.c, process.c, profile.h, ralloc.c, redisplay.c, select-common.h, select.c, syntax.c, sysfile.h, sysproc.h, systime.h, syswindows.h, toolbar.c, tooltalk.c, tparam.c, unexaix.c, unexalpha.c, unexconvex.c, unexec.c, unexhp9k800.c, unexmips.c, unicode.c, window.c: new -> new_.
'foo -> `foo'.
lwlib-internal.h: redo assert macros to follow lisp.h and not trigger warnings.
lwlib.c, xlwtabs.c: new -> new_.
author | ben |
---|---|
date | Tue, 25 Oct 2005 11:16:49 +0000 |
parents | 1e7cc382eb16 |
children | b3ea9c582280 3742ea8250b5 |
comparison
equal
deleted
inserted
replaced
3024:b7f26b2f78bd | 3025:facf3239ba30 |
---|---|
555 2, 3, 0, /* | 555 2, 3, 0, /* |
556 Return the indicated Tooltalk message attribute. Attributes are | 556 Return the indicated Tooltalk message attribute. Attributes are |
557 identified by symbols with the same name (underscores and all) as the | 557 identified by symbols with the same name (underscores and all) as the |
558 suffix of the Tooltalk tt_message_<attribute> function that extracts the value. | 558 suffix of the Tooltalk tt_message_<attribute> function that extracts the value. |
559 String attribute values are copied, enumerated type values (except disposition) | 559 String attribute values are copied, enumerated type values (except disposition) |
560 are converted to symbols - e.g. TT_HANDLER is 'TT_HANDLER, uid and gid are | 560 are converted to symbols - e.g. TT_HANDLER is `TT_HANDLER', uid and gid are |
561 represented by fixnums (small integers), opnum is converted to a string, | 561 represented by fixnums (small integers), opnum is converted to a string, |
562 and disposition is converted to a fixnum. We convert opnum (a C int) to a | 562 and disposition is converted to a fixnum. We convert opnum (a C int) to a |
563 string, e.g. 123 => "123" because there's no guarantee that opnums will fit | 563 string, e.g. 123 => "123" because there's no guarantee that opnums will fit |
564 within the range of Lisp integers. | 564 within the range of Lisp integers. |
565 | 565 |
566 Use the 'plist attribute instead of the C API 'user attribute | 566 Use the `plist' attribute instead of the C API `user' attribute |
567 for user defined message data. To retrieve the value of a message property | 567 for user defined message data. To retrieve the value of a message property |
568 specify the indicator for argn. For example to get the value of a property | 568 specify the indicator for argn. For example to get the value of a property |
569 called 'rflag, use | 569 called `rflag', use |
570 (get-tooltalk-message-attribute message 'plist 'rflag) | 570 (get-tooltalk-message-attribute message 'plist 'rflag) |
571 | 571 |
572 To get the value of a message argument use one of the 'arg_val (strings), | 572 To get the value of a message argument use one of the `arg_val' (strings), |
573 'arg_ival (integers), or 'arg_bval (strings with embedded nulls), attributes. | 573 `arg_ival' (integers), or `arg_bval' (strings with embedded nulls), attributes. |
574 For example to get the integer value of the third argument: | 574 For example to get the integer value of the third argument: |
575 | 575 |
576 (get-tooltalk-message-attribute message 'arg_ival 2) | 576 (get-tooltalk-message-attribute message 'arg_ival 2) |
577 | 577 |
578 As you can see, argument numbers are zero based. The type of each argument | 578 As you can see, argument numbers are zero based. The type of each argument |
579 can be retrieved with the 'arg_type attribute; however, Tooltalk doesn't | 579 can be retrieved with the `arg_type' attribute; however, Tooltalk doesn't |
580 define any semantics for the string value of 'arg_type. Conventionally | 580 define any semantics for the string value of `arg_type'. Conventionally |
581 "string" is used for strings and "int" for 32 bit integers. Note that | 581 "string" is used for strings and "int" for 32 bit integers. Note that |
582 Emacs Lisp stores the lengths of strings explicitly (unlike C) so treating the | 582 Emacs Lisp stores the lengths of strings explicitly (unlike C) so treating the |
583 value returned by 'arg_bval like a string is fine. | 583 value returned by `arg_bval' like a string is fine. |
584 */ | 584 */ |
585 (message_, attribute, argn)) | 585 (message_, attribute, argn)) |
586 { | 586 { |
587 Tt_message m = unbox_tooltalk_message (message_); | 587 Tt_message m = unbox_tooltalk_message (message_); |
588 int n = 0; | 588 int n = 0; |
697 3, 4, 0, /* | 697 3, 4, 0, /* |
698 Initialize one Tooltalk message attribute. | 698 Initialize one Tooltalk message attribute. |
699 | 699 |
700 Attribute names and values are the same as for | 700 Attribute names and values are the same as for |
701 `get-tooltalk-message-attribute'. A property list is provided for user | 701 `get-tooltalk-message-attribute'. A property list is provided for user |
702 data (instead of the 'user message attribute); see | 702 data (instead of the `user' message attribute); see |
703 `get-tooltalk-message-attribute'. | 703 `get-tooltalk-message-attribute'. |
704 | 704 |
705 The value of callback should be the name of a function of one argument. | 705 The value of callback should be the name of a function of one argument. |
706 It will be applied to the message and matching pattern each time the state of the | 706 It will be applied to the message and matching pattern each time the state of the |
707 message changes. This is usually used to notice when the messages state has | 707 message changes. This is usually used to notice when the messages state has |
708 changed to TT_HANDLED (or TT_FAILED), so that reply argument values | 708 changed to TT_HANDLED (or TT_FAILED), so that reply argument values |
709 can be used. | 709 can be used. |
710 | 710 |
711 If one of the argument attributes is specified, 'arg_val, 'arg_ival, or | 711 If one of the argument attributes is specified, `arg_val', `arg_ival', or |
712 'arg_bval then argn must be the number of an already created argument. | 712 `arg_bval' then argn must be the number of an already created argument. |
713 New arguments can be added to a message with add-tooltalk-message-arg. | 713 New arguments can be added to a message with add-tooltalk-message-arg. |
714 */ | 714 */ |
715 (value, message_, attribute, argn)) | 715 (value, message_, attribute, argn)) |
716 { | 716 { |
717 Tt_message m = unbox_tooltalk_message (message_); | 717 Tt_message m = unbox_tooltalk_message (message_); |
821 return Qnil; | 821 return Qnil; |
822 } | 822 } |
823 | 823 |
824 DEFUN ("return-tooltalk-message", Freturn_tooltalk_message, 1, 2, 0, /* | 824 DEFUN ("return-tooltalk-message", Freturn_tooltalk_message, 1, 2, 0, /* |
825 Send a reply to this message. The second argument can be | 825 Send a reply to this message. The second argument can be |
826 'reply, 'reject or 'fail; the default is 'reply. Before sending | 826 `reply', `reject' or `fail'; the default is `reply'. Before sending |
827 a reply all message arguments whose mode is TT_INOUT or TT_OUT should | 827 a reply all message arguments whose mode is TT_INOUT or TT_OUT should |
828 have been filled in - see set-tooltalk-message-attribute. | 828 have been filled in - see set-tooltalk-message-attribute. |
829 */ | 829 */ |
830 (message_, mode)) | 830 (message_, mode)) |
831 { | 831 { |
911 protocol you're using need to agree what types mean (if anything). | 911 protocol you're using need to agree what types mean (if anything). |
912 Conventionally "string" is used for strings and "int" for 32 bit integers. | 912 Conventionally "string" is used for strings and "int" for 32 bit integers. |
913 Arguments can initialized by providing a value or with | 913 Arguments can initialized by providing a value or with |
914 `set-tooltalk-message-attribute'. The latter is necessary if you | 914 `set-tooltalk-message-attribute'. The latter is necessary if you |
915 want to initialize the argument with a string that can contain | 915 want to initialize the argument with a string that can contain |
916 embedded nulls (use 'arg_bval). | 916 embedded nulls (use `arg_bval'). |
917 */ | 917 */ |
918 (message_, mode, vtype, value)) | 918 (message_, mode, vtype, value)) |
919 { | 919 { |
920 Tt_message m = unbox_tooltalk_message (message_); | 920 Tt_message m = unbox_tooltalk_message (message_); |
921 Tt_mode n; | 921 Tt_mode n; |
999 } | 999 } |
1000 | 1000 |
1001 | 1001 |
1002 DEFUN ("add-tooltalk-pattern-attribute", Fadd_tooltalk_pattern_attribute, 3, 3, 0, /* | 1002 DEFUN ("add-tooltalk-pattern-attribute", Fadd_tooltalk_pattern_attribute, 3, 3, 0, /* |
1003 Add one value to the indicated pattern attribute. | 1003 Add one value to the indicated pattern attribute. |
1004 All Tooltalk pattern attributes are supported except 'user. The names | 1004 All Tooltalk pattern attributes are supported except `user'. The names |
1005 of attributes are the same as the Tooltalk accessors used to set them | 1005 of attributes are the same as the Tooltalk accessors used to set them |
1006 less the "tooltalk_pattern_" prefix and the "_add" ... | 1006 less the "tooltalk_pattern_" prefix and the "_add" ... |
1007 */ | 1007 */ |
1008 (value, pattern, attribute)) | 1008 (value, pattern, attribute)) |
1009 { | 1009 { |