Mercurial > emacs
annotate oldXMenu/Post.c @ 61394:31aa9a390538
* mh-customize.el (mh-speedbar-selected-folder-face): Special case
high number of colors displays.
* textmodes/table.el (table-cell-face): Add special case for
displays supporting a high number of colors.
* progmodes/vhdl-mode.el (vhdl-font-lock-prompt-face)
(vhdl-font-lock-reserved-words-face)
(vhdl-speedbar-architecture-face)
(vhdl-speedbar-instantiation-face)
(vhdl-speedbar-architecture-selected-face)
(vhdl-speedbar-instantiation-selected-face): Likewise.
* progmodes/sh-script.el (sh-heredoc-face): Likewise.
* progmodes/idlw-help.el (idlwave-help-link-face): Likewise.
* progmodes/ebrowse.el (ebrowse-tree-mark-face)
(ebrowse-root-class-face, ebrowse-member-attribute-face)
(ebrowse-progress-face): Likewise.
* progmodes/compile.el (compilation-info-face): Likewise.
* progmodes/cc-fonts.el (c-invalid-face): Likewise.
* emacs-lisp/re-builder.el (reb-match-3): Likewise.
* calendar/calendar.el (diary-face): Likewise.
* woman.el (woman-italic-face, woman-bold-face)
(woman-unknown-face): Likewise.
* wid-edit.el (widget-button-pressed-face): Likewise.
* whitespace.el (whitespace-highlight-face): Likewise.
* smerge-mode.el (smerge-mine-face, smerge-base-face): Likewise.
* pcvs-info.el (cvs-marked-face): Likewise.
* info.el (info-xref): Likewise.
* ido.el (ido-subdir-face, ido-indicator-face): Likewise.
* hilit-chg.el (highlight-changes-face)
(highlight-changes-delete-face): Likewise.
* hi-lock.el (hi-yellow, hi-green, hi-blue-b, hi-green-b)
(hi-red-b): Likewise.
* generic-x.el (show-tabs-tab-face, show-tabs-space-face): Likewise.
* font-lock.el (font-lock-keyword-face)
(font-lock-function-name-face, font-lock-warning-face): Likewise.
* cus-edit.el (custom-invalid-face, custom-modified-face)
(custom-set-face, custom-changed-face, custom-variable-tag-face)
(custom-group-tag-face-1, custom-group-tag-face): Likewise.
* comint.el (comint-highlight-prompt): Likewise.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Fri, 08 Apr 2005 14:26:13 +0000 |
parents | e8824c4f5f7e |
children | 3861ff8f4bf1 8e5779acd195 |
rev | line source |
---|---|
25858 | 1 #include "copyright.h" |
2 | |
3 /* Copyright Massachusetts Institute of Technology 1985 */ | |
4 | |
5 /* | |
6 * XMenu: MIT Project Athena, X Window system menu package | |
7 * | |
8 * XMenuPost - Maps a given menu to the display and activates | |
9 * the menu for user selection. The user is allowed to | |
10 * specify the mouse button event mask that will be used | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
27456
diff
changeset
|
11 * to identify a selection request. When a selection |
25858 | 12 * request is received (i.e., when the specified mouse |
13 * event occurs) the data returned will be either the | |
14 * data associated with the particular selection active | |
15 * at the time of the selection request or NULL if no | |
16 * selection was active. A menu selection is shown to | |
17 * be active by placing a highlight box around the | |
18 * selection as the mouse cursor enters its active | |
19 * region. Inactive selections will not be highlighted. | |
20 * As the mouse cursor moved from one menu pane | |
21 * to another menu pane the pane being entered is raised | |
22 * and activated and the pane being left is deactivated. | |
23 * If an error occurs NULL will be returned with the | |
24 * p_num set to POST_ERROR, s_num set to | |
25 * NO_SELECTION and _XMErrorCode set to an | |
26 * appropriate value. | |
27 * Every time the routine returns successfully the | |
28 * p_num and s_num indices will be set to indicate | |
29 * the currently active pane and/or selection. If the | |
30 * mouse was not in a selection window at the time | |
31 * s_num will be set to NO_SELECTION. | |
32 * | |
33 * Author: Tony Della Fera, DEC | |
34 * August, 1984 | |
35 * | |
36 */ | |
37 | |
38 #include "XMenuInt.h" | |
39 | |
40 char * | |
41 XMenuPost(display, menu, p_num, s_num, x_pos, y_pos, event_mask) | |
42 register Display *display; /* Previously opened display. */ | |
43 register XMenu *menu; /* Menu to post. */ | |
44 register int *p_num; /* Pane number selected. */ | |
45 register int *s_num; /* Selection number selected. */ | |
46 register int x_pos; /* X coordinate of menu position. */ | |
47 register int y_pos; /* Y coordinate of menu position. */ | |
48 int event_mask; /* Mouse button event mask. */ | |
49 { | |
50 register int stat; /* Routine call return status. */ | |
51 char *data; /* Return data. */ | |
52 | |
53 /* | |
54 * Set up initial pane and selection assumptions. | |
55 */ | |
56 | |
57 /* | |
58 * Make the procedure call. | |
59 */ | |
60 stat = XMenuActivate( | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
27456
diff
changeset
|
61 display, |
25858 | 62 menu, |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
27456
diff
changeset
|
63 p_num, s_num, |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
27456
diff
changeset
|
64 x_pos, y_pos, |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
27456
diff
changeset
|
65 event_mask, |
27456
4a9ea0d1735b
(XMenuPost): Pass null help callback to XMenuActivate.
Gerd Moellmann <gerd@gnu.org>
parents:
25858
diff
changeset
|
66 &data, 0); |
25858 | 67 |
68 /* | |
69 * Check the return value and return accordingly. | |
70 */ | |
71 switch (stat) { | |
72 case XM_FAILURE: | |
73 *p_num = POST_ERROR; | |
74 *s_num = NO_SELECTION; | |
75 return(NULL); | |
76 case XM_NO_SELECT: | |
77 case XM_IA_SELECT: | |
78 *s_num = NO_SELECTION; | |
79 return(NULL); | |
80 case XM_SUCCESS: | |
81 default: | |
82 return(data); | |
83 } | |
84 } | |
52401 | 85 |
86 /* arch-tag: 7b6104e5-fa32-4342-aa17-05296a30dd70 | |
87 (do not change this comment) */ |