comparison src/frame.c @ 49600:23a1cea22d13

Trailing whitespace deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 04 Feb 2003 14:56:31 +0000
parents 755c4233cfba
children e5a09c97e444 d7ddb3e565de
comparison
equal deleted inserted replaced
49599:5ade352e8d1c 49600:23a1cea22d13
90 struct window *w = XWINDOW (window); 90 struct window *w = XWINDOW (window);
91 91
92 XSETFASTINT (w->last_modified, 0); 92 XSETFASTINT (w->last_modified, 0);
93 XSETFASTINT (w->top, XFASTINT (w->top) + n); 93 XSETFASTINT (w->top, XFASTINT (w->top) + n);
94 XSETFASTINT (w->height, XFASTINT (w->height) - n); 94 XSETFASTINT (w->height, XFASTINT (w->height) - n);
95 95
96 if (INTEGERP (w->orig_top)) 96 if (INTEGERP (w->orig_top))
97 XSETFASTINT (w->orig_top, XFASTINT (w->orig_top) + n); 97 XSETFASTINT (w->orig_top, XFASTINT (w->orig_top) + n);
98 if (INTEGERP (w->orig_height)) 98 if (INTEGERP (w->orig_height))
99 XSETFASTINT (w->orig_height, XFASTINT (w->orig_height) - n); 99 XSETFASTINT (w->orig_height, XFASTINT (w->orig_height) - n);
100 100
365 /* If there's no minibuffer frame to use, create one. */ 365 /* If there's no minibuffer frame to use, create one. */
366 kb->Vdefault_minibuffer_frame = 366 kb->Vdefault_minibuffer_frame =
367 call1 (intern ("make-initial-minibuffer-frame"), display); 367 call1 (intern ("make-initial-minibuffer-frame"), display);
368 UNGCPRO; 368 UNGCPRO;
369 } 369 }
370 370
371 mini_window = XFRAME (kb->Vdefault_minibuffer_frame)->minibuffer_window; 371 mini_window = XFRAME (kb->Vdefault_minibuffer_frame)->minibuffer_window;
372 } 372 }
373 373
374 f->minibuffer_window = mini_window; 374 f->minibuffer_window = mini_window;
375 375
574 do_switch_frame (frame, track, for_deletion) 574 do_switch_frame (frame, track, for_deletion)
575 Lisp_Object frame; 575 Lisp_Object frame;
576 int track, for_deletion; 576 int track, for_deletion;
577 { 577 {
578 struct frame *sf = SELECTED_FRAME (); 578 struct frame *sf = SELECTED_FRAME ();
579 579
580 /* If FRAME is a switch-frame event, extract the frame we should 580 /* If FRAME is a switch-frame event, extract the frame we should
581 switch to. */ 581 switch to. */
582 if (CONSP (frame) 582 if (CONSP (frame)
583 && EQ (XCAR (frame), Qswitch_frame) 583 && EQ (XCAR (frame), Qswitch_frame)
584 && CONSP (XCDR (frame))) 584 && CONSP (XCDR (frame)))
772 If omitted, FRAME defaults to the currently selected frame. */) 772 If omitted, FRAME defaults to the currently selected frame. */)
773 (frame) 773 (frame)
774 Lisp_Object frame; 774 Lisp_Object frame;
775 { 775 {
776 Lisp_Object window; 776 Lisp_Object window;
777 777
778 if (NILP (frame)) 778 if (NILP (frame))
779 window = SELECTED_FRAME ()->root_window; 779 window = SELECTED_FRAME ()->root_window;
780 else 780 else
781 { 781 {
782 CHECK_LIVE_FRAME (frame); 782 CHECK_LIVE_FRAME (frame);
783 window = XFRAME (frame)->root_window; 783 window = XFRAME (frame)->root_window;
784 } 784 }
785 785
786 return window; 786 return window;
787 } 787 }
788 788
789 DEFUN ("frame-selected-window", Fframe_selected_window, 789 DEFUN ("frame-selected-window", Fframe_selected_window,
790 Sframe_selected_window, 0, 1, 0, 790 Sframe_selected_window, 0, 1, 0,
792 If omitted, FRAME defaults to the currently selected frame. */) 792 If omitted, FRAME defaults to the currently selected frame. */)
793 (frame) 793 (frame)
794 Lisp_Object frame; 794 Lisp_Object frame;
795 { 795 {
796 Lisp_Object window; 796 Lisp_Object window;
797 797
798 if (NILP (frame)) 798 if (NILP (frame))
799 window = SELECTED_FRAME ()->selected_window; 799 window = SELECTED_FRAME ()->selected_window;
800 else 800 else
801 { 801 {
802 CHECK_LIVE_FRAME (frame); 802 CHECK_LIVE_FRAME (frame);
814 (frame, window) 814 (frame, window)
815 Lisp_Object frame, window; 815 Lisp_Object frame, window;
816 { 816 {
817 if (NILP (frame)) 817 if (NILP (frame))
818 frame = selected_frame; 818 frame = selected_frame;
819 819
820 CHECK_LIVE_FRAME (frame); 820 CHECK_LIVE_FRAME (frame);
821 CHECK_LIVE_WINDOW (window); 821 CHECK_LIVE_WINDOW (window);
822 822
823 if (! EQ (frame, WINDOW_FRAME (XWINDOW (window)))) 823 if (! EQ (frame, WINDOW_FRAME (XWINDOW (window))))
824 error ("In `set-frame-selected-window', WINDOW is not on FRAME"); 824 error ("In `set-frame-selected-window', WINDOW is not on FRAME");
1014 (frame, miniframe) 1014 (frame, miniframe)
1015 Lisp_Object frame, miniframe; 1015 Lisp_Object frame, miniframe;
1016 { 1016 {
1017 if (NILP (frame)) 1017 if (NILP (frame))
1018 frame = selected_frame; 1018 frame = selected_frame;
1019 1019
1020 CHECK_LIVE_FRAME (frame); 1020 CHECK_LIVE_FRAME (frame);
1021 return next_frame (frame, miniframe); 1021 return next_frame (frame, miniframe);
1022 } 1022 }
1023 1023
1024 DEFUN ("previous-frame", Fprevious_frame, Sprevious_frame, 0, 2, 0, 1024 DEFUN ("previous-frame", Fprevious_frame, Sprevious_frame, 0, 2, 0,
1209 #ifdef HAVE_X_WINDOWS 1209 #ifdef HAVE_X_WINDOWS
1210 if (FRAME_X_P (f)) 1210 if (FRAME_X_P (f))
1211 x_clear_frame_selections (f); 1211 x_clear_frame_selections (f);
1212 #endif 1212 #endif
1213 1213
1214 /* Free glyphs. 1214 /* Free glyphs.
1215 This function must be called before the window tree of the 1215 This function must be called before the window tree of the
1216 frame is deleted because windows contain dynamically allocated 1216 frame is deleted because windows contain dynamically allocated
1217 memory. */ 1217 memory. */
1218 free_glyphs (f); 1218 free_glyphs (f);
1219 1219
1220 /* Mark all the windows that used to be on FRAME as deleted, and then 1220 /* Mark all the windows that used to be on FRAME as deleted, and then
1590 (frame) 1590 (frame)
1591 Lisp_Object frame; 1591 Lisp_Object frame;
1592 { 1592 {
1593 if (NILP (frame)) 1593 if (NILP (frame))
1594 frame = selected_frame; 1594 frame = selected_frame;
1595 1595
1596 CHECK_LIVE_FRAME (frame); 1596 CHECK_LIVE_FRAME (frame);
1597 1597
1598 #if 0 /* This isn't logically necessary, and it can do GC. */ 1598 #if 0 /* This isn't logically necessary, and it can do GC. */
1599 /* Don't let the frame remain selected. */ 1599 /* Don't let the frame remain selected. */
1600 if (EQ (frame, selected_frame)) 1600 if (EQ (frame, selected_frame))
1699 { 1699 {
1700 if (NILP (frame)) 1700 if (NILP (frame))
1701 frame = selected_frame; 1701 frame = selected_frame;
1702 1702
1703 CHECK_LIVE_FRAME (frame); 1703 CHECK_LIVE_FRAME (frame);
1704 1704
1705 if (frame_raise_lower_hook) 1705 if (frame_raise_lower_hook)
1706 (*frame_raise_lower_hook) (XFRAME (frame), 0); 1706 (*frame_raise_lower_hook) (XFRAME (frame), 0);
1707 1707
1708 return Qnil; 1708 return Qnil;
1709 } 1709 }
1747 1747
1748 XFRAME (frame)->focus_frame = focus_frame; 1748 XFRAME (frame)->focus_frame = focus_frame;
1749 1749
1750 if (frame_rehighlight_hook) 1750 if (frame_rehighlight_hook)
1751 (*frame_rehighlight_hook) (XFRAME (frame)); 1751 (*frame_rehighlight_hook) (XFRAME (frame));
1752 1752
1753 return Qnil; 1753 return Qnil;
1754 } 1754 }
1755 1755
1756 1756
1757 DEFUN ("frame-focus", Fframe_focus, Sframe_focus, 1, 1, 0, 1757 DEFUN ("frame-focus", Fframe_focus, Sframe_focus, 1, 1, 0,
1947 else 1947 else
1948 Fsetcdr (old_alist_elt, val); 1948 Fsetcdr (old_alist_elt, val);
1949 1949
1950 /* Update some other special parameters in their special places 1950 /* Update some other special parameters in their special places
1951 in addition to the alist. */ 1951 in addition to the alist. */
1952 1952
1953 if (EQ (prop, Qbuffer_predicate)) 1953 if (EQ (prop, Qbuffer_predicate))
1954 f->buffer_predicate = val; 1954 f->buffer_predicate = val;
1955 1955
1956 if (! FRAME_WINDOW_P (f)) 1956 if (! FRAME_WINDOW_P (f))
1957 { 1957 {
1997 if (!FRAME_LIVE_P (f)) 1997 if (!FRAME_LIVE_P (f))
1998 return Qnil; 1998 return Qnil;
1999 1999
2000 alist = Fcopy_alist (f->param_alist); 2000 alist = Fcopy_alist (f->param_alist);
2001 GCPRO1 (alist); 2001 GCPRO1 (alist);
2002 2002
2003 if (!FRAME_WINDOW_P (f)) 2003 if (!FRAME_WINDOW_P (f))
2004 { 2004 {
2005 int fg = FRAME_FOREGROUND_PIXEL (f); 2005 int fg = FRAME_FOREGROUND_PIXEL (f);
2006 int bg = FRAME_BACKGROUND_PIXEL (f); 2006 int bg = FRAME_BACKGROUND_PIXEL (f);
2007 Lisp_Object elt; 2007 Lisp_Object elt;
2086 if (NILP (frame)) 2086 if (NILP (frame))
2087 frame = selected_frame; 2087 frame = selected_frame;
2088 else 2088 else
2089 CHECK_FRAME (frame); 2089 CHECK_FRAME (frame);
2090 CHECK_SYMBOL (parameter); 2090 CHECK_SYMBOL (parameter);
2091 2091
2092 f = XFRAME (frame); 2092 f = XFRAME (frame);
2093 value = Qnil; 2093 value = Qnil;
2094 2094
2095 if (FRAME_LIVE_P (f)) 2095 if (FRAME_LIVE_P (f))
2096 { 2096 {
2097 /* Avoid consing in frequent cases. */ 2097 /* Avoid consing in frequent cases. */
2098 if (EQ (parameter, Qname)) 2098 if (EQ (parameter, Qname))
2099 value = f->name; 2099 value = f->name;
2144 || EQ (parameter, Qbackground_mode)) 2144 || EQ (parameter, Qbackground_mode))
2145 value = Fcdr (Fassq (parameter, f->param_alist)); 2145 value = Fcdr (Fassq (parameter, f->param_alist));
2146 else 2146 else
2147 value = Fcdr (Fassq (parameter, Fframe_parameters (frame))); 2147 value = Fcdr (Fassq (parameter, Fframe_parameters (frame)));
2148 } 2148 }
2149 2149
2150 return value; 2150 return value;
2151 } 2151 }
2152 2152
2153 2153
2154 DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, 2154 DEFUN ("modify-frame-parameters", Fmodify_frame_parameters,
2155 Smodify_frame_parameters, 2, 2, 0, 2155 Smodify_frame_parameters, 2, 2, 0,
2156 doc: /* Modify the parameters of frame FRAME according to ALIST. 2156 doc: /* Modify the parameters of frame FRAME according to ALIST.
2157 If FRAME is nil, it defaults to the selected frame. 2157 If FRAME is nil, it defaults to the selected frame.
2158 ALIST is an alist of parameters to change and their new values. 2158 ALIST is an alist of parameters to change and their new values.
2159 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol. 2159 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol.
2276 else 2276 else
2277 #endif 2277 #endif
2278 return make_number (1); 2278 return make_number (1);
2279 } 2279 }
2280 2280
2281 DEFUN ("frame-pixel-height", Fframe_pixel_height, 2281 DEFUN ("frame-pixel-height", Fframe_pixel_height,
2282 Sframe_pixel_height, 0, 1, 0, 2282 Sframe_pixel_height, 0, 1, 0,
2283 doc: /* Return a FRAME's height in pixels. 2283 doc: /* Return a FRAME's height in pixels.
2284 This counts only the height available for text lines, 2284 This counts only the height available for text lines,
2285 not menu bars on window-system Emacs frames. 2285 not menu bars on window-system Emacs frames.
2286 For a terminal frame, the result really gives the height in characters. 2286 For a terminal frame, the result really gives the height in characters.
2301 else 2301 else
2302 #endif 2302 #endif
2303 return make_number (FRAME_HEIGHT (f)); 2303 return make_number (FRAME_HEIGHT (f));
2304 } 2304 }
2305 2305
2306 DEFUN ("frame-pixel-width", Fframe_pixel_width, 2306 DEFUN ("frame-pixel-width", Fframe_pixel_width,
2307 Sframe_pixel_width, 0, 1, 0, 2307 Sframe_pixel_width, 0, 1, 0,
2308 doc: /* Return FRAME's width in pixels. 2308 doc: /* Return FRAME's width in pixels.
2309 For a terminal frame, the result really gives the width in characters. 2309 For a terminal frame, the result really gives the width in characters.
2310 If FRAME is omitted, the selected frame is used. */) 2310 If FRAME is omitted, the selected frame is used. */)
2311 (frame) 2311 (frame)
2409 change_frame_size (f, XINT (rows), XINT (cols), 0, 0, 0); 2409 change_frame_size (f, XINT (rows), XINT (cols), 0, 0, 0);
2410 2410
2411 return Qnil; 2411 return Qnil;
2412 } 2412 }
2413 2413
2414 DEFUN ("set-frame-position", Fset_frame_position, 2414 DEFUN ("set-frame-position", Fset_frame_position,
2415 Sset_frame_position, 3, 3, 0, 2415 Sset_frame_position, 3, 3, 0,
2416 doc: /* Sets position of FRAME in pixels to XOFFSET by YOFFSET. 2416 doc: /* Sets position of FRAME in pixels to XOFFSET by YOFFSET.
2417 This is actually the position of the upper left corner of the frame. 2417 This is actually the position of the upper left corner of the frame.
2418 Negative values for XOFFSET or YOFFSET are interpreted relative to 2418 Negative values for XOFFSET or YOFFSET are interpreted relative to
2419 the rightmost or bottommost possible position (that stays within the screen). */) 2419 the rightmost or bottommost possible position (that stays within the screen). */)
2523 This abnormal hook exists for the benefit of packages like `xt-mouse.el' 2523 This abnormal hook exists for the benefit of packages like `xt-mouse.el'
2524 which need to do mouse handling at the Lisp level. */); 2524 which need to do mouse handling at the Lisp level. */);
2525 Vmouse_position_function = Qnil; 2525 Vmouse_position_function = Qnil;
2526 2526
2527 DEFVAR_LISP ("mouse-highlight", &Vmouse_highlight, 2527 DEFVAR_LISP ("mouse-highlight", &Vmouse_highlight,
2528 doc: /* If non-nil, clickable text is highlighted when mouse is over it. 2528 doc: /* If non-nil, clickable text is highlighted when mouse is over it.
2529 If the value is an integer, highlighting is only shown after moving the 2529 If the value is an integer, highlighting is only shown after moving the
2530 mouse, while keyboard input turns off the highlight even when the mouse 2530 mouse, while keyboard input turns off the highlight even when the mouse
2531 is over the clickable text. However, the mouse shape still indicates 2531 is over the clickable text. However, the mouse shape still indicates
2532 when the mouse is over clickable text. */); 2532 when the mouse is over clickable text. */);
2533 Vmouse_highlight = Qt; 2533 Vmouse_highlight = Qt;