annotate src/frame-tty.c @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children ec9a17fef872
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* TTY frame functions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1995 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 Copyright (C) 1995, 1996 Ben Wing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 /* Synched up with: Not in FSF. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 /* Written by Ben Wing. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 /* #### This file is just a stub. It should be possible to have more
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 than one frame on a tty, with only one frame being "active" (displayed)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 at a time. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 #include <config.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 #include "lisp.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 #include "console-tty.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 #include "frame.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 Lisp_Object Vdefault_tty_frame_plist;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 tty_init_frame_1 (struct frame *f, Lisp_Object props)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 struct device *d = XDEVICE (FRAME_DEVICE (f));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 struct console *c = XCONSOLE (DEVICE_CONSOLE (d));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 if (!NILP (DEVICE_FRAME_LIST (d)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 error ("Only one frame allowed on TTY devices");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 f->name = build_string ("emacs");
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 f->height = CONSOLE_TTY_DATA (c)->height;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 f->width = CONSOLE_TTY_DATA (c)->width;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 f->visible = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 #ifdef HAVE_SCROLLBARS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 f->scrollbar_on_left = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 f->scrollbar_on_top = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 SET_FRAME_CLEAR (f);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 tty_after_init_frame (struct frame *f, int first_on_device,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 int first_on_console)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 if (first_on_console)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 call1 (Qinit_post_tty_win, FRAME_CONSOLE (f));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 /************************************************************************/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 /* initialization */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 /************************************************************************/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 console_type_create_frame_tty (void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 CONSOLE_HAS_METHOD (tty, init_frame_1);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 CONSOLE_HAS_METHOD (tty, after_init_frame);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 vars_of_frame_tty (void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 DEFVAR_LISP ("default-tty-frame-plist", &Vdefault_tty_frame_plist /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 Plist of default frame-creation properties for tty frames.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 These are in addition to and override what is specified in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 `default-frame-plist', but are overridden by the arguments to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 particular call to `make-frame'.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 */ );
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 Vdefault_tty_frame_plist = Qnil;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 tty_console_methods->device_specific_frame_props =
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 &Vdefault_tty_frame_plist;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 }