Mercurial > emacs
annotate oldXMenu/Locate.c @ 110776:073caec7510f
* net/tramp.el (tramp-handle-directory-files-and-attributes)
(tramp-handle-file-exists-p, tramp-handle-file-newer-than-file-p):
New defuns, taken from tramp-smb.el.
(tramp-coding-system-change-eol-conversion)
(tramp-set-process-query-on-exit-flag): Removed.
* net/tramp-compat.el (top): Do not check for byte-compiler
objects.
(tramp-compat-coding-system-change-eol-conversion)
(tramp-compat-set-process-query-on-exit-flag): New defuns, taken
from tramp.el.
* net/tramp-gvfs.el:
* net/tramp-gw.el: Replace `tramp-set-process-query-on-exit-flag'
by `tramp-compat-set-process-query-on-exit-flag'.
* net/tramp-imap.el (tramp-imap-file-name-handler-alist): Use
`tramp-handle-directory-files-and-attributes',
`tramp-handle-file-exists-p' and
`tramp-handle-file-newer-than-file-p'.
(tramp-imap-handle-file-exists-p)
(tramp-imap-handle-file-executable-p)
(tramp-imap-handle-file-readable-p)
(tramp-imap-handle-directory-files-and-attributes)
(tramp-imap-handle-file-newer-than-file-p): Removed.
* net/tramp-sh.el: Replace `tramp-set-process-query-on-exit-flag'
by `tramp-compat-set-process-query-on-exit-flag' and
`tramp-coding-system-change-eol-conversion' by
`tramp-compat-coding-system-change-eol-conversion'.
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use
`tramp-handle-directory-files-and-attributes',
`tramp-handle-file-exists-p' and
`tramp-handle-file-newer-than-file-p'.
(tramp-smb-handle-directory-files-and-attributes)
(tramp-smb-handle-file-exists-p)
(tramp-smb-handle-file-newer-than-file-p): Removed.
(tramp-smb-maybe-open-connection): Replace
`tramp-set-process-query-on-exit-flag' by
`tramp-compat-set-process-query-on-exit-flag'.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Tue, 05 Oct 2010 16:20:24 +0200 |
parents | 5cc91198ffb2 |
children | ef719132ddfa |
rev | line source |
---|---|
76174
fec5e03aaf59
Remove FSF copyright since file does not differ significantly from X11
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
1 /* Copyright Massachusetts Institute of Technology 1985 */ |
fec5e03aaf59
Remove FSF copyright since file does not differ significantly from X11
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
2 |
25858 | 3 #include "copyright.h" |
4 | |
5 | |
6 /* | |
7 * XMenu: MIT Project Athena, X Window system menu package | |
8 * | |
9 * XMenuLocate - Return data necessary to position and locate | |
10 * a menu on the screen. | |
11 * | |
12 * Author: Tony Della Fera, DEC | |
13 * January 11, 1985 | |
14 * | |
15 */ | |
16 | |
17 #include "XMenuInt.h" | |
18 | |
19 int | |
109124
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
20 XMenuLocate(register Display *display, register XMenu *menu, int p_num, int s_num, int x_pos, int y_pos, int *ul_x, int *ul_y, int *width, int *height) |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
21 /* Previously opened display. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
22 /* Menu object being located. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
23 /* Active pane number. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
24 /* Active selection number. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
25 /* X coordinate of mouse active position. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
26 /* Y coordinate of mouse active position. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
27 /* Returned upper left menu X coordinate. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
28 /* Returned upper left menu Y coordinate. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
29 /* Returned menu width. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
30 /* Returned menu height. */ |
25858 | 31 { |
32 register XMPane *p_ptr; /* XMPane pointer. */ | |
33 register XMSelect *s_ptr; /* XMSelect pointer. */ | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
34 |
25858 | 35 /* |
36 * Are the position arguments positive? | |
37 */ | |
38 if ((x_pos <= 0) || (y_pos <= 0)) { | |
39 _XMErrorCode = XME_ARG_BOUNDS; | |
40 return(XM_FAILURE); | |
41 } | |
42 | |
43 /* | |
44 * Find the right pane. | |
45 */ | |
46 p_ptr = _XMGetPanePtr(menu, p_num); | |
47 if (p_ptr == NULL) return(XM_FAILURE); | |
48 | |
49 /* | |
50 * Find the right selection. | |
51 */ | |
52 s_ptr = _XMGetSelectionPtr(p_ptr, s_num); | |
53 | |
54 /* | |
55 * Check to see that the menu's dependencies have been | |
56 * recomputed and are up to date. If not, do it now. | |
57 */ | |
58 if (menu->recompute) XMenuRecompute(display, menu); | |
59 | |
60 /* | |
61 * Compute the new menu origin such that the active point lies | |
62 * in the center of the desired active pane and selection. | |
63 * This sets the values of ul_x and ul_y. | |
64 */ | |
65 _XMTransToOrigin(display, menu, p_ptr, s_ptr, x_pos, y_pos, ul_x, ul_y); | |
66 | |
67 /* | |
68 * Set remaining return argument values. | |
69 */ | |
70 *width = menu->width; | |
71 *height = menu->height; | |
72 | |
73 /* | |
74 * Return successfully. | |
75 */ | |
76 _XMErrorCode = XME_NO_ERROR; | |
77 return(XM_SUCCESS); | |
78 } | |
52401 | 79 |
80 /* arch-tag: 1ff94bab-cf67-4c92-bff4-dc0130153173 | |
81 (do not change this comment) */ |