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