/[emacs]/emacs/src/frame.c
ViewVC logotype

Diff of /emacs/src/frame.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.274 by pj, Wed Oct 31 15:05:48 2001 UTC revision 1.275 by pj, Fri Nov 2 20:28:00 2001 UTC
# Line 337  make_frame_without_minibuffer (mini_wind Line 337  make_frame_without_minibuffer (mini_wind
337    struct gcpro gcpro1;    struct gcpro gcpro1;
338    
339    if (!NILP (mini_window))    if (!NILP (mini_window))
340      CHECK_LIVE_WINDOW (mini_window, 0);      CHECK_LIVE_WINDOW (mini_window);
341    
342  #ifdef MULTI_KBOARD  #ifdef MULTI_KBOARD
343    if (!NILP (mini_window)    if (!NILP (mini_window)
# Line 579  do_switch_frame (frame, track, for_delet Line 579  do_switch_frame (frame, track, for_delet
579    /* This used to say CHECK_LIVE_FRAME, but apparently it's possible for    /* This used to say CHECK_LIVE_FRAME, but apparently it's possible for
580       a switch-frame event to arrive after a frame is no longer live,       a switch-frame event to arrive after a frame is no longer live,
581       especially when deleting the initial frame during startup.  */       especially when deleting the initial frame during startup.  */
582    CHECK_FRAME (frame, 0);    CHECK_FRAME (frame);
583    if (! FRAME_LIVE_P (XFRAME (frame)))    if (! FRAME_LIVE_P (XFRAME (frame)))
584      return Qnil;      return Qnil;
585    
# Line 703  DEFUN ("window-frame", Fwindow_frame, Sw Line 703  DEFUN ("window-frame", Fwindow_frame, Sw
703       (window)       (window)
704       Lisp_Object window;       Lisp_Object window;
705  {  {
706    CHECK_LIVE_WINDOW (window, 0);    CHECK_LIVE_WINDOW (window);
707    return XWINDOW (window)->frame;    return XWINDOW (window)->frame;
708  }  }
709    
# Line 719  If omitted, FRAME defaults to the curren Line 719  If omitted, FRAME defaults to the curren
719      w = SELECTED_FRAME ()->root_window;      w = SELECTED_FRAME ()->root_window;
720    else    else
721      {      {
722        CHECK_LIVE_FRAME (frame, 0);        CHECK_LIVE_FRAME (frame);
723        w = XFRAME (frame)->root_window;        w = XFRAME (frame)->root_window;
724      }      }
725    while (NILP (XWINDOW (w)->buffer))    while (NILP (XWINDOW (w)->buffer))
# Line 754  If omitted, FRAME defaults to the curren Line 754  If omitted, FRAME defaults to the curren
754      window = SELECTED_FRAME ()->root_window;      window = SELECTED_FRAME ()->root_window;
755    else    else
756      {      {
757        CHECK_LIVE_FRAME (frame, 0);        CHECK_LIVE_FRAME (frame);
758        window = XFRAME (frame)->root_window;        window = XFRAME (frame)->root_window;
759      }      }
760        
# Line 774  If omitted, FRAME defaults to the curren Line 774  If omitted, FRAME defaults to the curren
774      window = SELECTED_FRAME ()->selected_window;      window = SELECTED_FRAME ()->selected_window;
775    else    else
776      {      {
777        CHECK_LIVE_FRAME (frame, 0);        CHECK_LIVE_FRAME (frame);
778        window = XFRAME (frame)->selected_window;        window = XFRAME (frame)->selected_window;
779      }      }
780    
# Line 792  If FRAME is the selected frame, this mak Line 792  If FRAME is the selected frame, this mak
792    if (NILP (frame))    if (NILP (frame))
793      frame = selected_frame;      frame = selected_frame;
794        
795    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
796    CHECK_LIVE_WINDOW (window, 1);    CHECK_LIVE_WINDOW (window);
797    
798    if (! EQ (frame, WINDOW_FRAME (XWINDOW (window))))    if (! EQ (frame, WINDOW_FRAME (XWINDOW (window))))
799      error ("In `set-frame-selected-window', WINDOW is not on FRAME");      error ("In `set-frame-selected-window', WINDOW is not on FRAME");
# Line 840  next_frame (frame, minibuf) Line 840  next_frame (frame, minibuf)
840    
841    /* If this frame is dead, it won't be in Vframe_list, and we'll loop    /* If this frame is dead, it won't be in Vframe_list, and we'll loop
842       forever.  Forestall that.  */       forever.  Forestall that.  */
843    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
844    
845    while (1)    while (1)
846      for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))      for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
# Line 992  Otherwise, include all frames.  */) Line 992  Otherwise, include all frames.  */)
992    if (NILP (frame))    if (NILP (frame))
993      frame = selected_frame;      frame = selected_frame;
994        
995    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
996    return next_frame (frame, miniframe);    return next_frame (frame, miniframe);
997  }  }
998    
# Line 1012  Otherwise, include all frames.  */) Line 1012  Otherwise, include all frames.  */)
1012  {  {
1013    if (NILP (frame))    if (NILP (frame))
1014      frame = selected_frame;      frame = selected_frame;
1015    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
1016    return prev_frame (frame, miniframe);    return prev_frame (frame, miniframe);
1017  }  }
1018    
# Line 1084  frame.  The hook is called with one argu Line 1084  frame.  The hook is called with one argu
1084      }      }
1085    else    else
1086      {      {
1087        CHECK_FRAME (frame, 0);        CHECK_FRAME (frame);
1088        f = XFRAME (frame);        f = XFRAME (frame);
1089      }      }
1090    
# Line 1404  before calling this function on it, like Line 1404  before calling this function on it, like
1404    (frame, x, y)    (frame, x, y)
1405       Lisp_Object frame, x, y;       Lisp_Object frame, x, y;
1406  {  {
1407    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
1408    CHECK_NUMBER (x, 2);    CHECK_NUMBER (x);
1409    CHECK_NUMBER (y, 1);    CHECK_NUMBER (y);
1410    
1411    /* I think this should be done with a hook.  */    /* I think this should be done with a hook.  */
1412  #ifdef HAVE_WINDOW_SYSTEM  #ifdef HAVE_WINDOW_SYSTEM
# Line 1436  before calling this function on it, like Line 1436  before calling this function on it, like
1436    (frame, x, y)    (frame, x, y)
1437       Lisp_Object frame, x, y;       Lisp_Object frame, x, y;
1438  {  {
1439    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
1440    CHECK_NUMBER (x, 2);    CHECK_NUMBER (x);
1441    CHECK_NUMBER (y, 1);    CHECK_NUMBER (y);
1442    
1443    /* I think this should be done with a hook.  */    /* I think this should be done with a hook.  */
1444  #ifdef HAVE_WINDOW_SYSTEM  #ifdef HAVE_WINDOW_SYSTEM
# Line 1470  If omitted, FRAME defaults to the curren Line 1470  If omitted, FRAME defaults to the curren
1470    if (NILP (frame))    if (NILP (frame))
1471      frame = selected_frame;      frame = selected_frame;
1472    
1473    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
1474    
1475    /* I think this should be done with a hook.  */    /* I think this should be done with a hook.  */
1476  #ifdef HAVE_WINDOW_SYSTEM  #ifdef HAVE_WINDOW_SYSTEM
# Line 1524  but if the second optional argument FORC Line 1524  but if the second optional argument FORC
1524    if (NILP (frame))    if (NILP (frame))
1525      frame = selected_frame;      frame = selected_frame;
1526    
1527    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
1528    
1529    if (NILP (force) && !other_visible_frames (XFRAME (frame)))    if (NILP (force) && !other_visible_frames (XFRAME (frame)))
1530      error ("Attempt to make invisible the sole visible or iconified frame");      error ("Attempt to make invisible the sole visible or iconified frame");
# Line 1566  If omitted, FRAME defaults to the curren Line 1566  If omitted, FRAME defaults to the curren
1566    if (NILP (frame))    if (NILP (frame))
1567      frame = selected_frame;      frame = selected_frame;
1568        
1569    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
1570    
1571  #if 0 /* This isn't logically necessary, and it can do GC.  */  #if 0 /* This isn't logically necessary, and it can do GC.  */
1572    /* Don't let the frame remain selected.  */    /* Don't let the frame remain selected.  */
# Line 1604  Return the symbol `icon' if frame is vis Line 1604  Return the symbol `icon' if frame is vis
1604       (frame)       (frame)
1605       Lisp_Object frame;       Lisp_Object frame;
1606  {  {
1607    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
1608    
1609    FRAME_SAMPLE_VISIBILITY (XFRAME (frame));    FRAME_SAMPLE_VISIBILITY (XFRAME (frame));
1610    
# Line 1650  doesn't support multiple overlapping fra Line 1650  doesn't support multiple overlapping fra
1650    if (NILP (frame))    if (NILP (frame))
1651      frame = selected_frame;      frame = selected_frame;
1652    
1653    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
1654    
1655    /* Do like the documentation says. */    /* Do like the documentation says. */
1656    Fmake_frame_visible (frame);    Fmake_frame_visible (frame);
# Line 1673  doesn't support multiple overlapping fra Line 1673  doesn't support multiple overlapping fra
1673    if (NILP (frame))    if (NILP (frame))
1674      frame = selected_frame;      frame = selected_frame;
1675    
1676    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
1677        
1678    if (frame_raise_lower_hook)    if (frame_raise_lower_hook)
1679      (*frame_raise_lower_hook) (XFRAME (frame), 0);      (*frame_raise_lower_hook) (XFRAME (frame), 0);
# Line 1713  The redirection lasts until `redirect-fr Line 1713  The redirection lasts until `redirect-fr
1713    /* Note that we don't check for a live frame here.  It's reasonable    /* Note that we don't check for a live frame here.  It's reasonable
1714       to redirect the focus of a frame you're about to delete, if you       to redirect the focus of a frame you're about to delete, if you
1715       know what other frame should receive those keystrokes.  */       know what other frame should receive those keystrokes.  */
1716    CHECK_FRAME (frame, 0);    CHECK_FRAME (frame);
1717    
1718    if (! NILP (focus_frame))    if (! NILP (focus_frame))
1719      CHECK_LIVE_FRAME (focus_frame, 1);      CHECK_LIVE_FRAME (focus_frame);
1720    
1721    XFRAME (frame)->focus_frame = focus_frame;    XFRAME (frame)->focus_frame = focus_frame;
1722    
# Line 1734  See `redirect-frame-focus'.  */) Line 1734  See `redirect-frame-focus'.  */)
1734       (frame)       (frame)
1735       Lisp_Object frame;       Lisp_Object frame;
1736  {  {
1737    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
1738    
1739    return FRAME_FOCUS_FRAME (XFRAME (frame));    return FRAME_FOCUS_FRAME (XFRAME (frame));
1740  }  }
# Line 1879  set_term_frame_name (f, name) Line 1879  set_term_frame_name (f, name)
1879      }      }
1880    else    else
1881      {      {
1882        CHECK_STRING (name, 0);        CHECK_STRING (name);
1883    
1884        /* Don't change the name if it's already NAME.  */        /* Don't change the name if it's already NAME.  */
1885        if (! NILP (Fstring_equal (name, f->name)))        if (! NILP (Fstring_equal (name, f->name)))
# Line 1976  If FRAME is omitted, return information Line 1976  If FRAME is omitted, return information
1976    if (NILP (frame))    if (NILP (frame))
1977      frame = selected_frame;      frame = selected_frame;
1978    
1979    CHECK_FRAME (frame, 0);    CHECK_FRAME (frame);
1980    f = XFRAME (frame);    f = XFRAME (frame);
1981    
1982    if (!FRAME_LIVE_P (f))    if (!FRAME_LIVE_P (f))
# Line 2071  If FRAME is nil, describe the currently Line 2071  If FRAME is nil, describe the currently
2071    if (NILP (frame))    if (NILP (frame))
2072      frame = selected_frame;      frame = selected_frame;
2073    else    else
2074      CHECK_FRAME (frame, 0);      CHECK_FRAME (frame);
2075    CHECK_SYMBOL (parameter, 1);    CHECK_SYMBOL (parameter);
2076        
2077    f = XFRAME (frame);    f = XFRAME (frame);
2078    value = Qnil;    value = Qnil;
# Line 2166  enabled such bindings for that variable Line 2166  enabled such bindings for that variable
2166    
2167    if (EQ (frame, Qnil))    if (EQ (frame, Qnil))
2168      frame = selected_frame;      frame = selected_frame;
2169    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
2170    f = XFRAME (frame);    f = XFRAME (frame);
2171    
2172    /* I think this should be done with a hook.  */    /* I think this should be done with a hook.  */
# Line 2226  For a terminal frame, the value is alway Line 2226  For a terminal frame, the value is alway
2226    
2227    if (NILP (frame))    if (NILP (frame))
2228      frame = selected_frame;      frame = selected_frame;
2229    CHECK_FRAME (frame, 0);    CHECK_FRAME (frame);
2230    f = XFRAME (frame);    f = XFRAME (frame);
2231    
2232  #ifdef HAVE_WINDOW_SYSTEM  #ifdef HAVE_WINDOW_SYSTEM
# Line 2252  For a terminal screen, the value is alwa Line 2252  For a terminal screen, the value is alwa
2252    
2253    if (NILP (frame))    if (NILP (frame))
2254      frame = selected_frame;      frame = selected_frame;
2255    CHECK_FRAME (frame, 0);    CHECK_FRAME (frame);
2256    f = XFRAME (frame);    f = XFRAME (frame);
2257    
2258  #ifdef HAVE_WINDOW_SYSTEM  #ifdef HAVE_WINDOW_SYSTEM
# Line 2277  If FRAME is omitted, the selected frame Line 2277  If FRAME is omitted, the selected frame
2277    
2278    if (NILP (frame))    if (NILP (frame))
2279      frame = selected_frame;      frame = selected_frame;
2280    CHECK_FRAME (frame, 0);    CHECK_FRAME (frame);
2281    f = XFRAME (frame);    f = XFRAME (frame);
2282    
2283  #ifdef HAVE_WINDOW_SYSTEM  #ifdef HAVE_WINDOW_SYSTEM
# Line 2300  If FRAME is omitted, the selected frame Line 2300  If FRAME is omitted, the selected frame
2300    
2301    if (NILP (frame))    if (NILP (frame))
2302      frame = selected_frame;      frame = selected_frame;
2303    CHECK_FRAME (frame, 0);    CHECK_FRAME (frame);
2304    f = XFRAME (frame);    f = XFRAME (frame);
2305    
2306  #ifdef HAVE_WINDOW_SYSTEM  #ifdef HAVE_WINDOW_SYSTEM
# Line 2320  but that the idea of the actual height o Line 2320  but that the idea of the actual height o
2320  {  {
2321    register struct frame *f;    register struct frame *f;
2322    
2323    CHECK_NUMBER (lines, 0);    CHECK_NUMBER (lines);
2324    if (NILP (frame))    if (NILP (frame))
2325      frame = selected_frame;      frame = selected_frame;
2326    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
2327    f = XFRAME (frame);    f = XFRAME (frame);
2328    
2329    /* I think this should be done with a hook.  */    /* I think this should be done with a hook.  */
# Line 2348  but that the idea of the actual width of Line 2348  but that the idea of the actual width of
2348       Lisp_Object frame, cols, pretend;       Lisp_Object frame, cols, pretend;
2349  {  {
2350    register struct frame *f;    register struct frame *f;
2351    CHECK_NUMBER (cols, 0);    CHECK_NUMBER (cols);
2352    if (NILP (frame))    if (NILP (frame))
2353      frame = selected_frame;      frame = selected_frame;
2354    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
2355    f = XFRAME (frame);    f = XFRAME (frame);
2356    
2357    /* I think this should be done with a hook.  */    /* I think this should be done with a hook.  */
# Line 2375  DEFUN ("set-frame-size", Fset_frame_size Line 2375  DEFUN ("set-frame-size", Fset_frame_size
2375  {  {
2376    register struct frame *f;    register struct frame *f;
2377    
2378    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
2379    CHECK_NUMBER (cols, 2);    CHECK_NUMBER (cols);
2380    CHECK_NUMBER (rows, 1);    CHECK_NUMBER (rows);
2381    f = XFRAME (frame);    f = XFRAME (frame);
2382    
2383    /* I think this should be done with a hook.  */    /* I think this should be done with a hook.  */
# Line 2407  the rightmost or bottommost possible pos Line 2407  the rightmost or bottommost possible pos
2407  {  {
2408    register struct frame *f;    register struct frame *f;
2409    
2410    CHECK_LIVE_FRAME (frame, 0);    CHECK_LIVE_FRAME (frame);
2411    CHECK_NUMBER (xoffset, 1);    CHECK_NUMBER (xoffset);
2412    CHECK_NUMBER (yoffset, 2);    CHECK_NUMBER (yoffset);
2413    f = XFRAME (frame);    f = XFRAME (frame);
2414    
2415    /* I think this should be done with a hook.  */    /* I think this should be done with a hook.  */

Legend:
Removed from v.1.274  
changed lines
  Added in v.1.275

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26