]> code.delx.au - gnu-emacs/blobdiff - src/macfns.c
(BYTES_USED): Use uordblks, not arena.
[gnu-emacs] / src / macfns.c
index daa1767fd52c3d07f562f95484a6bfb45ef547ad..64e20af4a4771491ee1df90a299a51f8da453053 100644 (file)
@@ -1,5 +1,5 @@
 /* Graphical user interface functions for Mac OS.
-   Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -94,6 +94,11 @@ Lisp_Object Qcancel_timer;
 
 extern Lisp_Object Vwindow_system_version;
 
+#if GLYPH_DEBUG
+int image_cache_refcount, dpyinfo_refcount;
+#endif
+
+
 #if 0 /* Use xstricmp instead.  */
 /* compare two strings ignoring case */
 
@@ -1740,8 +1745,7 @@ x_set_tool_bar_lines (f, value, oldval)
       int y = nlines * FRAME_LINE_HEIGHT (f);
 
       BLOCK_INPUT;
-      XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
-                   0, y, width, height, 0);
+      mac_clear_area (f, 0, y, width, height);
       UNBLOCK_INPUT;
 
       if (WINDOWP (f->tool_bar_window))
@@ -2434,7 +2438,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
   frame = Qnil;
   GCPRO4 (parms, parent, name, frame);
   tem = mac_get_arg (parms, Qminibuffer, "minibuffer", "Minibuffer",
-                     RES_TYPE_SYMBOL);
+                    RES_TYPE_SYMBOL);
   if (EQ (tem, Qnone) || NILP (tem))
     f = make_frame_without_minibuffer (Qnil, kb, display);
   else if (EQ (tem, Qonly))
@@ -2475,7 +2479,11 @@ This function is an internal primitive--use `make-frame' instead.  */)
   if (! STRINGP (f->icon_name))
     f->icon_name = Qnil;
 
-/*  FRAME_W32_DISPLAY_INFO (f) = dpyinfo; */
+/*   FRAME_MAC_DISPLAY_INFO (f) = dpyinfo; */
+#if GLYPH_DEBUG
+  image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount;
+  dpyinfo_refcount = dpyinfo->reference_count;
+#endif /* GLYPH_DEBUG */
 #ifdef MULTI_KBOARD
   FRAME_KBOARD (f) = kb;
 #endif
@@ -2527,6 +2535,10 @@ This function is an internal primitive--use `make-frame' instead.  */)
       }
 
     /* Try out a font which we hope has bold and italic variations.  */
+#if USE_ATSUI
+    if (! STRINGP (font))
+      font = x_new_font (f, "-*-monaco-medium-r-normal--12-*-*-*-*-*-iso10646-1");
+#endif
     if (! STRINGP (font))
       font = x_new_font (f, "-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1");
     /* If those didn't work, look for something which will at least work.  */
@@ -2597,9 +2609,10 @@ This function is an internal primitive--use `make-frame' instead.  */)
   x_default_parameter (f, parms, Qmenu_bar_lines, make_number (1),
                       "menuBar", "MenuBar", RES_TYPE_NUMBER);
   x_default_parameter (f, parms, Qtool_bar_lines, make_number (1),
-                       "toolBar", "ToolBar", RES_TYPE_NUMBER);
+                      "toolBar", "ToolBar", RES_TYPE_NUMBER);
   x_default_parameter (f, parms, Qbuffer_predicate, Qnil,
-                      "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL);
+                      "bufferPredicate", "BufferPredicate",
+                      RES_TYPE_SYMBOL);
   x_default_parameter (f, parms, Qtitle, Qnil,
                       "title", "Title", RES_TYPE_STRING);
   x_default_parameter (f, parms, Qfullscreen, Qnil,
@@ -3335,6 +3348,10 @@ start_hourglass ()
   EMACS_TIME delay;
   int secs, usecs = 0;
 
+  /* Don't bother for ttys.  */
+  if (NILP (Vwindow_system))
+    return;
+
   cancel_hourglass ();
 
   if (INTEGERP (Vhourglass_delay)
@@ -3580,8 +3597,8 @@ x_create_tip_frame (dpyinfo, parms, text)
 
   FRAME_FONTSET (f)  = -1;
   f->icon_name = Qnil;
-
-#if 0 /* GLYPH_DEBUG TODO: image support.  */
+/*   FRAME_X_DISPLAY_INFO (f) = dpyinfo; */
+#if GLYPH_DEBUG
   image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount;
   dpyinfo_refcount = dpyinfo->reference_count;
 #endif /* GLYPH_DEBUG */
@@ -3625,6 +3642,10 @@ x_create_tip_frame (dpyinfo, parms, text)
       }
 
     /* Try out a font which we hope has bold and italic variations.  */
+#if USE_ATSUI
+    if (! STRINGP (font))
+      font = x_new_font (f, "-*-monaco-medium-r-normal--12-*-*-*-*-*-iso10646-1");
+#endif
     if (! STRINGP (font))
       font = x_new_font (f, "-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1");
     /* If those didn't work, look for something which will at least work.  */
@@ -4030,6 +4051,9 @@ Text larger than the specified size is clipped.  */)
   BringToFront (FRAME_MAC_WINDOW (f));
   UNBLOCK_INPUT;
 
+  FRAME_PIXEL_WIDTH (f) = width;
+  FRAME_PIXEL_HEIGHT (f) = height;
+
   /* Draw into the window.  */
   w->must_be_updated_p = 1;
   update_single_window (w, 1);
@@ -4145,6 +4169,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories.  */)
     options.optionFlags = kNavDefaultNavDlogOptions;
     options.optionFlags |= kNavAllFilesInPopup;  /* All files allowed */
     options.optionFlags |= kNavSelectAllReadableItem;
+    options.optionFlags &= ~kNavAllowMultipleFiles;
     if (!NILP(prompt))
       {
        message = cfstring_create_with_string (prompt);