home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / frame-tty.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-04  |  2.3 KB  |  76 lines

  1. /* TTY frame functions.
  2.    Copyright (C) 1995 Amdahl Corporation
  3.  
  4. This file is part of XEmacs.
  5.  
  6. XEmacs is free software; you can redistribute it and/or modify it
  7. under the terms of the GNU General Public License as published by the
  8. Free Software Foundation; either version 2, or (at your option) any
  9. later version.
  10.  
  11. XEmacs is distributed in the hope that it will be useful, but WITHOUT
  12. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14. for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with XEmacs; see the file COPYING.  If not, write to the Free
  18. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* Synched up with: Not in FSF. */
  21.  
  22. /* Written by Ben Wing. */
  23.  
  24. /* #### This file is just a stub.  It should be possible to have more
  25.    than one frame on a tty, with only one frame being "active" (displayed)
  26.    at a time. */
  27.  
  28. #include <config.h>
  29. #include "lisp.h"
  30.  
  31. #include "device-tty.h"
  32. #include "frame.h"
  33.  
  34. Lisp_Object Vdefault_tty_frame_alist;
  35.  
  36. static void
  37. tty_init_frame (struct frame *f, Lisp_Object frame_data)
  38. {
  39.   struct device *d = XDEVICE (FRAME_DEVICE (f));
  40.   if (!NILP (DEVICE_FRAME_LIST (d)))
  41.     error ("Only one frame allowed on TTY devices");
  42.  
  43.   f->name = build_string ("emacs");
  44.   f->height = DEVICE_TTY_DATA (d)->height;
  45.   f->width = DEVICE_TTY_DATA (d)->width;
  46.   f->visible = 1;
  47.   f->scrollbar_on_left = 1;
  48.   f->scrollbar_on_top = 0;
  49.   SET_FRAME_CLEAR (f);
  50. }
  51.  
  52.  
  53. /************************************************************************/
  54. /*                            initialization                            */
  55. /************************************************************************/
  56.  
  57. void
  58. device_type_create_frame_tty (void)
  59. {
  60.   /* frame methods */
  61.   DEVICE_HAS_METHOD (tty, init_frame);
  62. }
  63.  
  64. void
  65. vars_of_frame_tty (void)
  66. {
  67.   DEFVAR_LISP ("default-tty-frame-alist", &Vdefault_tty_frame_alist,
  68.     "Alist of default frame-creation parameters for tty frames.\n\
  69. These are in addition to and override what is specified in\n\
  70. `default-frame-alist', but are overridden by the arguments to the\n\
  71. particular call to `make-frame'.");
  72.   Vdefault_tty_frame_alist = Qnil;
  73.  
  74.   tty_device_methods->device_specific_frame_params = &Vdefault_tty_frame_alist;
  75. }
  76.