\f
;;;; Function keys
-;;; make f10 activate the real menubar rather than the mini-buffer menu
-;;; navigation feature.
-(defun menu-bar-open (&optional frame)
- "Start key navigation of the menu bar in FRAME.
-
-This initially activates the first menu-bar item, and you can then navigate
-with the arrow keys, select a menu entry with the Return key or cancel with
-the Escape key. If FRAME has no menu bar, this function does nothing.
-
-If FRAME is nil or not given, use the selected frame."
- (interactive "i")
- (w32-send-sys-command ?\xf100 frame))
-;
-(global-set-key [f10] 'menu-bar-open)
-
-(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
- global-map)
-
-(define-key function-key-map [S-tab] [backtab])
-
++ ;;; make f10 activate the real menubar rather than the mini-buffer menu
++ ;;; navigation feature.
++ (defun menu-bar-open (&optional frame)
++ "Start key navigation of the menu bar in FRAME.
++
++ This initially activates the first menu-bar item, and you can then navigate
++ with the arrow keys, select a menu entry with the Return key or cancel with
++ the Escape key. If FRAME has no menu bar, this function does nothing.
++
++ If FRAME is nil or not given, use the selected frame."
++ (interactive "i")
++ (w32-send-sys-command ?\xf100 frame))
++
+(defun x-setup-function-keys (frame)
+ "Setup Function Keys for w32."
- ;; make f10 activate the real menubar rather than the mini-buffer menu
- ;; navigation feature.
+ (with-selected-frame frame
- (define-key local-function-key-map [f10]
- (lambda ()
- (interactive) (w32-send-sys-command ?\xf100)))
++ (define-key local-function-key-map [f10] 'menu-bar-open)
+
+ (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
+ local-function-key-map global-map)
+
+ (define-key local-function-key-map [S-tab] [backtab]))
+ (set-terminal-parameter frame 'x-setup-function-keys t))
\f
-;;; Do the actual Windows setup here; the above code just defines
-;;; functions and variables that we use now.
-
-(setq command-line-args (x-handle-args command-line-args))
-
-;;; Make sure we have a valid resource name.
-(or (stringp x-resource-name)
- (setq x-resource-name
- ;; Change any . or * characters in x-resource-name to hyphens,
- ;; so as not to choke when we use it in X resource queries.
- (replace-regexp-in-string "[.*]" "-" (invocation-name))))
-
-;; For the benefit of older Emacses (19.27 and earlier) that are sharing
-;; the same lisp directory, don't pass the third argument unless we seem
-;; to have the multi-display support.
-(if (fboundp 'x-close-connection)
- (x-open-connection ""
- x-command-line-resources
- ;; Exit Emacs with fatal error if this fails.
- t)
- (x-open-connection ""
- x-command-line-resources))
-
-(setq frame-creation-function 'x-create-frame-with-faces)
-
-(setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
- x-cut-buffer-max))
-
-;; W32 expects the menu bar cut and paste commands to use the clipboard.
-;; This has ,? to match both on Sunos and on Solaris.
-(menu-bar-enable-clipboard)
;; W32 systems have different fonts than commonly found on X, so
;; we define our own standard fontset here.
#include <stdio.h>
#include <ctype.h>
#include <string.h>
- #include <unistd.h> /* For isatty. */
+#include <errno.h>
+#include <sys/file.h>
++
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+#if HAVE_TERMIOS_H
+#include <termios.h> /* For TIOCNOTTY. */
+#endif
+
+#include <signal.h>
+
+#include "lisp.h"
#include "termchar.h"
#include "termopts.h"
-#include "lisp.h"
#include "charset.h"
#include "coding.h"
#include "keyboard.h"
{
struct window *w = XWINDOW (Qmouse_face_window);
int save_x, save_y;
- int i, j;
+ int i;
+ struct frame *f = XFRAME (w->frame);
+ struct tty_display_info *tty = FRAME_TTY (f);
+
if (/* If window is in the process of being destroyed, don't bother
to do anything. */
w->current_matrix != NULL
}
int
-handle_one_term_event (Gpm_Event *event, struct input_event* hold_quit)
+handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event, struct input_event* hold_quit)
{
- struct frame *f = SELECTED_FRAME ();
+ struct frame *f = XFRAME (tty->top_frame);
- int i, j, fd;
+ int fd;
struct input_event ie;
int do_help = 0;
int count = 0;