changeset 13412:1ed740e9aa64

[HAVE_NTGUI]: Test for a Win32 frame in procedures that test for an X frame. Use FRAME_WINDOW_P instead of testing for specific window system frames. Use HAVE_WINDOW_SYSTEM instead of testing for specific window systems.
author Geoff Voelker <voelker@cs.washington.edu>
date Tue, 07 Nov 1995 07:19:52 +0000
parents 58efb2561888
children 12b63cc21bdb
files src/frame.c
diffstat 1 files changed, 45 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Tue Nov 07 07:18:50 1995 +0000
+++ b/src/frame.c	Tue Nov 07 07:19:52 1995 +0000
@@ -76,6 +76,7 @@
 Lisp_Object Qmenu_bar_lines;
 Lisp_Object Qwidth;
 Lisp_Object Qx;
+Lisp_Object Qwin32;
 Lisp_Object Qvisible;
 Lisp_Object Qbuffer_predicate;
 
@@ -111,6 +112,8 @@
   staticpro (&Qwidth);
   Qx = intern ("x");
   staticpro (&Qx);
+  Qwin32 = intern ("win32");
+  staticpro (&Qwin32);
   Qvisible = intern ("visible");
   staticpro (&Qvisible);
   Qbuffer_predicate = intern ("buffer-predicate");
@@ -201,6 +204,8 @@
       return Qt;
     case output_x_window:
       return Qx;
+    case output_win32:
+      return Qwin32;
       /* The `pc' case is in the Fframep below.  */
     default:
       abort ();
@@ -547,8 +552,8 @@
     }
 #else /* ! 0 */
   /* Instead, apply it only to the frame we're pointing to.  */
-#ifdef HAVE_X_WINDOWS
-  if (track && FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (track && (FRAME_WINDOW_P (XFRAME (frame))))
     {
       Lisp_Object focus, xfocus;
 
@@ -968,8 +973,8 @@
 	  /* Verify that the frame's window still exists
 	     and we can still talk to it.  And note any recent change
 	     in visibility.  */
-#ifdef HAVE_X_WINDOWS
-	  if (FRAME_X_P (XFRAME (this)))
+#ifdef HAVE_WINDOW_SYSTEM
+	  if (FRAME_WINDOW_P (XFRAME (this)))
 	    {
 	      x_sync (XFRAME (this));
 	      FRAME_SAMPLE_VISIBILITY (XFRAME (this));
@@ -980,7 +985,7 @@
 	      || FRAME_ICONIFIED_P (XFRAME (this))
 	      /* Allow deleting the terminal frame when at least
 		 one X frame exists!  */
-	      || (FRAME_X_P (XFRAME (this)) && !FRAME_X_P (f)))
+	      || (FRAME_WINDOW_P (XFRAME (this)) && !FRAME_WINDOW_P (f)))
 	    count++;
 	}
       return count > 1;
@@ -1112,8 +1117,8 @@
      called the window-system-dependent frame destruction routine.  */
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     x_destroy_window (f);
 #endif
 
@@ -1289,8 +1294,8 @@
   CHECK_NUMBER (y, 1);
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (XFRAME (frame)))
     /* Warping the mouse will cause  enternotify and focus events. */
     x_set_mouse_position (XFRAME (frame), x, y);
 #endif
@@ -1313,8 +1318,8 @@
   CHECK_NUMBER (y, 1);
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (XFRAME (frame)))
     /* Warping the mouse will cause  enternotify and focus events. */
     x_set_mouse_pixel_position (XFRAME (frame), x, y);
 #endif
@@ -1335,8 +1340,8 @@
   CHECK_LIVE_FRAME (frame, 0);
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (XFRAME (frame)))
     {
       FRAME_SAMPLE_VISIBILITY (XFRAME (frame));
       x_make_frame_visible (XFRAME (frame));
@@ -1381,8 +1386,8 @@
     }
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (XFRAME (frame)))
     x_make_frame_invisible (XFRAME (frame));
 #endif
 
@@ -1419,8 +1424,8 @@
     }
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (XFRAME (frame)))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (XFRAME (frame)))
       x_iconify_frame (XFRAME (frame));
 #endif
 
@@ -1556,9 +1561,9 @@
   XFRAME (frame)->focus_frame = focus_frame;
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
   if (!NILP (focus_frame) && ! EQ (focus_frame, frame)
-      && FRAME_X_P (XFRAME (focus_frame)))
+      && (FRAME_WINDOW_P (XFRAME (focus_frame))))
     Ffocus_frame (focus_frame);
 #endif
 
@@ -1639,7 +1644,7 @@
   if (EQ (prop, Qbuffer_predicate))
     f->buffer_predicate = val;
 
-  if (! FRAME_X_P (f))
+  if (! FRAME_WINDOW_P (f))
     if (EQ (prop, Qmenu_bar_lines))
       set_menu_bar_lines (f, val, make_number (FRAME_MENU_BAR_LINES (f)));
 
@@ -1690,8 +1695,8 @@
   store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil));
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     x_report_frame_params (f, &alist);
   else
 #endif
@@ -1725,8 +1730,8 @@
     }
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     x_set_frame_parameters (f, alist);
   else
 #endif
@@ -1759,8 +1764,8 @@
       f = XFRAME (frame);
     }
 
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     return make_number (x_char_height (f));
   else
 #endif
@@ -1788,8 +1793,8 @@
       f = XFRAME (frame);
     }
 
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     return make_number (x_char_width (f));
   else
 #endif
@@ -1814,8 +1819,8 @@
       f = XFRAME (frame);
     }
 
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     return make_number (x_pixel_height (f));
   else
 #endif
@@ -1840,8 +1845,8 @@
       f = XFRAME (frame);
     }
 
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     return make_number (x_pixel_width (f));
   else
 #endif
@@ -1867,8 +1872,8 @@
     }
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     {
       if (XINT (rows) != f->height)
 	x_set_window_size (f, 1, f->width, XINT (rows));
@@ -1897,8 +1902,8 @@
     }
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     {
       if (XINT (cols) != f->width)
 	x_set_window_size (f, 1, XINT (cols), f->height);
@@ -1923,8 +1928,8 @@
   f = XFRAME (frame);
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     {
       if (XINT (rows) != f->height || XINT (cols) != f->width)
 	x_set_window_size (f, 1, XINT (cols), XINT (rows));
@@ -1954,8 +1959,8 @@
   f = XFRAME (frame);
 
   /* I think this should be done with a hook.  */
-#ifdef HAVE_X_WINDOWS
-  if (FRAME_X_P (f))
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f))
     x_set_offset (f, XINT (xoffset), XINT (yoffset), 1);
 #endif