Initial check-in: changes for building Emacs under Mac OS.
[bpt/emacs.git] / src / frame.c
index b4afa56..403261e 100644 (file)
@@ -29,6 +29,9 @@ Boston, MA 02111-1307, USA.  */
 #ifdef WINDOWSNT
 #include "w32term.h"
 #endif
+#ifdef macintosh
+#include "macterm.h"
+#endif
 #include "buffer.h"
 /* These help us bind and responding to switch-frame events.  */
 #include "commands.h"
@@ -45,11 +48,6 @@ Boston, MA 02111-1307, USA.  */
 #include "dosfns.h"
 #endif
 
-#ifdef macintosh
-extern struct mac_output *NewMacWindow ();
-extern void DisposeMacWindow (struct mac_output *);
-#endif
-
 /* Evaluate this expression to rebuild the section of syms_of_frame
    that initializes and staticpros the symbols declared below.  Note
    that Emacs 18 has a bug that keeps C-x C-e from being able to
@@ -582,25 +580,15 @@ make_terminal_frame ()
     f->output_method = output_termcap;
 #else
 #ifdef macintosh
-  f->output_data.mac = NewMacWindow(f);
-  f->output_data.mac->background_pixel = 0xffffff;
-  f->output_data.mac->foreground_pixel = 0;
-  f->output_data.mac->n_param_faces = 0;
-  f->output_data.mac->n_computed_faces = 0;
-  f->output_data.mac->size_computed_faces = 0;  
-  f->output_method = output_mac;
-  f->auto_raise = 1;
-  f->auto_lower = 1;
-  init_frame_faces (f);
-#else  /* !macintosh */
+  make_mac_terminal_frame (f);
+#else
   f->output_data.x = &tty_display;
-#endif /* !macintosh */
+#endif /* macintosh */
 #endif /* MSDOS */
 
-#ifndef macintosh
   if (!noninteractive)
     init_frame_faces (f);
-#endif
+
   return f;
 }
 
@@ -1288,14 +1276,6 @@ but if the second optional argument FORCE is non-nil, you may do so.")
     x_destroy_window (f);
 #endif
 
-/* Done by x_destroy_window above already */
-#if 0
-#ifdef macintosh
-  if (FRAME_MAC_P (f))
-    DisposeMacWindow (f->output_data.mac);
-#endif
-#endif
-
   f->output_data.nothing = 0;
 
   /* If we've deleted the last_nonminibuf_frame, then try to find
@@ -2229,11 +2209,6 @@ enabled such bindings for that variable with `make-variable-frame-local'.")
     IT_set_frame_parameters (f, alist);
   else
 #endif
-#ifdef macintosh
-  if (FRAME_MAC_P (f))
-    mac_set_frame_parameters (f, alist);
-  else
-#endif
 
     {
       int length = XINT (Flength (alist));