Mercurial > emacs
annotate oldXMenu/Locate.c @ 82991:2b26656ff804
MULTI_KBOARD support for ttys. Input-related bugfixes for X+tty sessions.
lib-src/emacsclient.c (pty_conversation): Fix errno check for read from fileno(in).
src/config.in: Unconditionally define MULTI_KBOARD.
src/frame.c (make_terminal_frame): Initialize f->kboard.
src/keyboard.c (cmd_error_internal): Don't kill Emacs if a Quit was
pressed on the tty of a X+tty session.
(read_avail_input): Initialize nread to zero. Abort if there is no
tty after a termcap read.
(interrupt_signal)[USG]: Always reset signal handler.
(init_keyboard): Always set signal handler for SIGINT/SIGQUIT if
noninteractive.
src/term.c (term_dummy_init): Initialize kboard to the initial_kboard.
(term_init): Free component structures of the initial tty. Clear xmalloced structures.
Moved rif initialization to syms_of_term.
(term_init)[MULTI_KBOARD]: Initialize tty->kboard.
(delete_tty)[MULTI_KBOARD]: Delete the keyboard.
(syms_of_term): Initialize tty_display_method_template.
src/termchar.h (tty_output)[MULTI_KBOARD]: Added kboard member.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-31
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Fri, 02 Jan 2004 02:54:17 +0000 |
parents | f0eb34e60705 |
children | 8e5779acd195 |
rev | line source |
---|---|
25858 | 1 #include "copyright.h" |
2 | |
53224
f0eb34e60705
tag of miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-137
Karoly Lorentey <lorentey@elte.hu>
parents:
52401
diff
changeset
|
3 /* $Header: /cvsroot/emacs/emacs/oldXMenu/Locate.c,v 1.3 2003/09/01 15:45:47 miles Exp $ */ |
25858 | 4 /* Copyright Massachusetts Institute of Technology 1985 */ |
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 | |
20 XMenuLocate(display, menu, p_num, s_num, x_pos, y_pos, ul_x, ul_y, width, height) | |
21 register Display *display; /* Previously opened display. */ | |
22 register XMenu *menu; /* Menu object being located. */ | |
23 int p_num; /* Active pane number. */ | |
24 int s_num; /* Active selection number. */ | |
25 int x_pos; /* X coordinate of mouse active position. */ | |
26 int y_pos; /* Y coordinate of mouse active position. */ | |
27 int *ul_x; /* Returned upper left menu X coordinate. */ | |
28 int *ul_y; /* Returned upper left menu Y coordinate. */ | |
29 int *width; /* Returned menu width. */ | |
30 int *height; /* Returned menu height. */ | |
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) */ |