Mercurial > hg > xemacs-beta
comparison lisp/sunpro/sunpro-sparcworks.el @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 ;;; sunpro-sparcworks.el --- support SPARCworks manager ToolTalk messages | |
2 | |
3 ;; Copyright (C) Sun Microsystems, Inc. | |
4 | |
5 ;; Author: Vladimir Ivanovic <vladimir@Eng.Sun.COM> | |
6 ;; Maintainer: Vladimir Ivanovic <vladimir@Eng.Sun.COM> | |
7 ;; Created: 20 Mar 95 | |
8 | |
9 ;; Keywords: SPARCworks, ToolTalk, messages | |
10 | |
11 ;;; Commentary: | |
12 | |
13 ;; Called from the SPARCworks Manager with the command: | |
14 ;; | |
15 ;; xemacs -q -l sunpro-sparcworks $SUNPRO_SWM_TT_ARGS $SUNPRO_SWM_GUI_ARGS | |
16 ;; | |
17 | |
18 ;;; To Do: | |
19 | |
20 ;;; Code: | |
21 | |
22 (require 'cl) ; Common Lisp compatibility | |
23 (require 'cl-19) ; Version for XEmacs 19 | |
24 | |
25 (defvar sunpro-sparcworks-ops | |
26 '("quit" | |
27 "hide" | |
28 "expose" | |
29 "PEI_CLOSE" | |
30 "PEI_OPEN" | |
31 "PEI_NOP") | |
32 "The ToolTalk operations that are handled.") | |
33 | |
34 (defvar sunpro-sparcworks-callbacks | |
35 '(sp-sw-quit-handler | |
36 sp-sw-hide-handler | |
37 sp-sw-expose-handler | |
38 sp-sw-close-handler | |
39 sp-sw--open-handler | |
40 sp-sw-nop-handler) | |
41 "The ToolTalk operations that are handled.") | |
42 | |
43 (defvar sunpro-sparcworks-invocation-count nil | |
44 "The number of XEmacsen invoked via the SPARCworks Manager.") | |
45 | |
46 (defun sp-sw-quit-handler (msg pat) | |
47 (return-tooltalk-message msg 'reply) | |
48 (save-buffers-kill-emacs)) | |
49 | |
50 (defun sp-sw-hide-handler (msg pat) | |
51 (return-tooltalk-message msg 'reply) | |
52 (mapcar #'make-frame-invisible (frame-list))) | |
53 | |
54 (defun sp-sw-expose-handler (msg pat) | |
55 (return-tooltalk-message msg 'reply) | |
56 (mapcar #'make-frame-visible (frame-list))) | |
57 | |
58 (defun sp-sw-close-handler (msg pat) | |
59 (return-tooltalk-message msg 'reply) | |
60 (mapcar #'iconify-frame (frame-list))) | |
61 | |
62 (defun sp-sw-open-handler (msg pat) | |
63 (return-tooltalk-message msg 'reply) | |
64 (mapcar #'deiconify-frame (frame-list))) | |
65 | |
66 (defun sp-sw-nop-handler (msg pat) | |
67 (return-tooltalk-message msg 'reply) | |
68 '()) | |
69 | |
70 (register-tooltalk-pattern | |
71 (make-tooltalk-pattern | |
72 '(category TT_HANDLE | |
73 scope TT_SESSION | |
74 op "quit" | |
75 callback sp-sw-quit-handler))) | |
76 | |
77 (register-tooltalk-pattern | |
78 (make-tooltalk-pattern | |
79 '(category TT_HANDLE | |
80 scope TT_SESSION | |
81 op "hide" | |
82 callback sp-sw-hide-handler))) | |
83 | |
84 (register-tooltalk-pattern | |
85 (make-tooltalk-pattern | |
86 '(category TT_HANDLE | |
87 scope TT_SESSION | |
88 op "expose" | |
89 callback sp-sw-expose-handler))) | |
90 | |
91 (register-tooltalk-pattern | |
92 (make-tooltalk-pattern | |
93 '(category TT_HANDLE | |
94 scope TT_SESSION | |
95 op "PEI_CLOSE" | |
96 callback sp-sw-close-handler))) | |
97 | |
98 (register-tooltalk-pattern | |
99 (make-tooltalk-pattern | |
100 '(category TT_HANDLE | |
101 scope TT_SESSION | |
102 op "PEI_OPEN" | |
103 callback sp-sw-open-handler))) | |
104 | |
105 (register-tooltalk-pattern | |
106 (make-tooltalk-pattern | |
107 '(category TT_HANDLE | |
108 scope TT_SESSION | |
109 op "PEI_NOP" | |
110 callback sp-sw-nop-handler))) | |
111 | |
112 (defun sunpro-sparcworks-handle-command-line (arg) | |
113 "Handle the SPARCworks Manager-specific command line arguments." | |
114 (setq *sunpro-sparcworks-invocation-count* arg) | |
115 ;;Fix up the command-line in case there are more arguments | |
116 (setq command-line-args-left | |
117 (cdr command-line-args-left))) | |
118 | |
119 | |
120 ;;; Initialize | |
121 (setq command-switch-alist | |
122 (purecopy | |
123 (append '(("-swtm" . sunpro-sparcworks-handle-command-line)) | |
124 command-switch-alist))) | |
125 | |
126 | |
127 ;;; sunpro-sparcworks.el ends here | |
128 |