comparison src/frame.c @ 987:afb21e974ed2

* frame.c (make_frame): Stop passing zero to make_window; it's not expecting any arguments.
author Jim Blandy <jimb@redhat.com>
date Fri, 14 Aug 1992 02:31:41 +0000
parents 0eb68c6c452a
children a13ee72d74a2
comparison
equal deleted inserted replaced
986:83605f96f58e 987:afb21e974ed2
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ 18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19 19
20 #include <stdio.h> 20 #include <stdio.h>
21 21
22 #include "config.h" 22 #include "config.h"
23
24 #ifdef MULTI_FRAME
25
26 #include "lisp.h" 23 #include "lisp.h"
27 #include "frame.h" 24 #include "frame.h"
25
26 #ifdef MULTI_FRAME
27
28 #include "window.h" 28 #include "window.h"
29 #include "termhooks.h" 29 #include "termhooks.h"
30 30
31 Lisp_Object Vemacs_iconified; 31 Lisp_Object Vemacs_iconified;
32 Lisp_Object Vframe_list; 32 Lisp_Object Vframe_list;
151 f->has_minibuffer = mini_p; 151 f->has_minibuffer = mini_p;
152 f->focus_frame = frame; 152 f->focus_frame = frame;
153 153
154 f->param_alist = Qnil; 154 f->param_alist = Qnil;
155 155
156 root_window = make_window (0); 156 root_window = make_window ();
157 if (mini_p) 157 if (mini_p)
158 { 158 {
159 mini_window = make_window (0); 159 mini_window = make_window ();
160 XWINDOW (root_window)->next = mini_window; 160 XWINDOW (root_window)->next = mini_window;
161 XWINDOW (mini_window)->prev = root_window; 161 XWINDOW (mini_window)->prev = root_window;
162 XWINDOW (mini_window)->mini_p = Qt; 162 XWINDOW (mini_window)->mini_p = Qt;
163 XWINDOW (mini_window)->frame = frame; 163 XWINDOW (mini_window)->frame = frame;
164 f->minibuffer_window = mini_window; 164 f->minibuffer_window = mini_window;
1325 #endif /* HAVE_X11 */ 1325 #endif /* HAVE_X11 */
1326 } 1326 }
1327 1327
1328 #else /* not MULTI_SCREEN */ 1328 #else /* not MULTI_SCREEN */
1329 1329
1330 /* If we're not using multi-frame stuff, we still need to provide 1330 /* If we're not using multi-frame stuff, we still need to provide some
1331 some support functions. These were present in Emacs 18. */ 1331 support functions. */
1332
1333 /* Unless this function is defined, providing set-frame-height and
1334 set-frame-width doesn't help compatibility any, since they both
1335 want this as their first argument. */
1336 DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0,
1337 "Return the frame that is now selected.")
1338 ()
1339 {
1340 Lisp_Object tem;
1341 XFASTINT (tem) = 0;
1342 return tem;
1343 }
1332 1344
1333 DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0, 1345 DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0,
1334 "Specify that the frame FRAME has LINES lines.\n\ 1346 "Specify that the frame FRAME has LINES lines.\n\
1335 Optional third arg non-nil means that redisplay should use LINES lines\n\ 1347 Optional third arg non-nil means that redisplay should use LINES lines\n\
1336 but that the idea of the actual height of the frame should not be changed.") 1348 but that the idea of the actual height of the frame should not be changed.")
1367 change_frame_size (0, XINT (rows), XINT (cols), 0, 0); 1379 change_frame_size (0, XINT (rows), XINT (cols), 0, 0);
1368 1380
1369 return Qnil; 1381 return Qnil;
1370 } 1382 }
1371 1383
1384 DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 0, 0,
1385 "Return number of lines available for display on selected frame.")
1386 ()
1387 {
1388 return make_number (FRAME_HEIGHT (selected_frame));
1389 }
1390
1391 DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 0, 0,
1392 "Return number of columns available for display on selected frame.")
1393 ()
1394 {
1395 return make_number (FRAME_WIDTH (selected_frame));
1396 }
1397
1398 /* These are for backward compatibility with Emacs 18. */
1399
1372 DEFUN ("set-screen-height", Fset_screen_height, Sset_screen_height, 1, 2, 0, 1400 DEFUN ("set-screen-height", Fset_screen_height, Sset_screen_height, 1, 2, 0,
1373 "Tell redisplay that the screen has LINES lines.\n\ 1401 "Tell redisplay that the screen has LINES lines.\n\
1374 Optional second arg non-nil means that redisplay should use LINES lines\n\ 1402 Optional second arg non-nil means that redisplay should use LINES lines\n\
1375 but that the idea of the actual height of the screen should not be changed.") 1403 but that the idea of the actual height of the screen should not be changed.")
1376 (lines, pretend) 1404 (lines, pretend)
1391 { 1419 {
1392 CHECK_NUMBER (cols, 0); 1420 CHECK_NUMBER (cols, 0);
1393 1421
1394 change_frame_size (0, 0, XINT (cols), !NILP (pretend), 0); 1422 change_frame_size (0, 0, XINT (cols), !NILP (pretend), 0);
1395 return Qnil; 1423 return Qnil;
1396 }
1397
1398 DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 0, 0,
1399 "Return number of lines available for display on selected frame.")
1400 ()
1401 {
1402 return make_number (FRAME_HEIGHT (selected_frame));
1403 }
1404
1405 DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 0, 0,
1406 "Return number of columns available for display on selected frame.")
1407 ()
1408 {
1409 return make_number (FRAME_WIDTH (selected_frame));
1410 } 1424 }
1411 1425
1412 syms_of_frame () 1426 syms_of_frame ()
1413 { 1427 {
1414 defsubr (&Sset_frame_height); 1428 defsubr (&Sset_frame_height);