Index: src/macfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macfns.c,v
retrieving revision 1.63
diff -c -r1.63 macfns.c
*** src/macfns.c	4 Jul 2005 16:06:33 -0000	1.63
--- src/macfns.c	17 Jul 2005 20:28:16 -0000
***************
*** 3028,3033 ****
--- 3029,3064 ----
    return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx));
  }
  
+ 
+ 
+ DEFUN ("mac-display-available-pixel-bounds", Fmac_display_available_pixel_bounds, Smac_display_available_pixel_bounds, 0, 0, 0,
+        doc: /* Get the available bounds of the main display in pixels, 
+ excluding the Dock. Return a 4 element list with the bounds
+ in the form of (left top right bottom). */)
+   (void)
+ {
+   Rect rect;
+   Lisp_Object rv = Qnil;
+   GDHandle main_device_handle = LMGetMainDevice();
+   BLOCK_INPUT;   
+   if (main_device_handle && 
+       GetAvailableWindowPositioningBounds(main_device_handle, &rect)
+       == noErr) {
+ 
+   rv = 
+     Fcons( make_number (rect.left),
+ 	   Fcons( make_number (rect.top),
+ 		  Fcons( make_number (rect.right),
+ 			 Fcons( make_number (rect.bottom), Qnil))));
+   }
+   UNBLOCK_INPUT;
+   return rv;
+ 
+ }
+ 
+ 
+ 
+ 
  DEFUN ("x-display-backing-store", Fx_display_backing_store,
         Sx_display_backing_store, 0, 1, 0,
         doc: /* Returns an indication of whether display DISPLAY does backing store.
***************
*** 4530,4535 ****
--- 4776,4783 ----
    defsubr (&Sx_synchronize);
    defsubr (&Sx_focus_frame);
  
+   defsubr (&Smac_display_available_pixel_bounds);
+ 
    /* Setting callback functions for fontset handler.  */
    get_font_info_func = x_get_font_info;
  