]> code.delx.au - gnu-emacs/blobdiff - src/macterm.h
2005-09-11 Chris Prince <cprince@gmail.com> (tiny change)
[gnu-emacs] / src / macterm.h
index 27cd1f4964662e3c926a8fb5a4bf52840f8a0c87..b3855f142c698506ed428c6713254ce8e57212b0 100644 (file)
@@ -1,5 +1,6 @@
 /* Display module for Mac OS.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2003, 2004,
+                 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -15,8 +16,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 /* Contributed by Andrew Choi (akochoi@mac.com).  */
 
@@ -38,11 +39,6 @@ Boston, MA 02111-1307, USA.  */
 #define BLACK_PIX_DEFAULT(f) RGB_TO_ULONG(0,0,0)
 #define WHITE_PIX_DEFAULT(f) RGB_TO_ULONG(255,255,255)
 
-/* A black pixel in a mask bitmap/pixmap means ``draw a source
-   pixel''.  A white pixel means ``retain the current pixel''. */
-#define PIX_MASK_DRAW(f) BLACK_PIX_DEFAULT(f)
-#define PIX_MASK_RETAIN(f) WHITE_PIX_DEFAULT(f)
-
 #define FONT_WIDTH(f)   ((f)->max_bounds.width)
 #define FONT_HEIGHT(f)  ((f)->ascent + (f)->descent)
 #define FONT_BASE(f)    ((f)->ascent)
@@ -149,7 +145,7 @@ struct mac_display_info
   int smallest_font_height;
 
   /* Reusable Graphics Context for drawing a cursor in a non-default face. */
-  XGCValues *scratch_cursor_gc;
+  GC scratch_cursor_gc;
 
   /* These variables describe the range of text currently shown in its
      mouse-face, together with the window they apply to. As long as
@@ -195,14 +191,14 @@ struct mac_display_info
   int bitmaps_last;
 
   /* The frame (if any) which has the window that has keyboard focus.
-     Zero if none.  This is examined by Ffocus_frame in w32fns.c.  Note
+     Zero if none.  This is examined by Ffocus_frame in macfns.c.  Note
      that a mere EnterNotify event can set this; if you need to know the
      last frame specified in a FocusIn or FocusOut event, use
-     w32_focus_event_frame.  */
+     x_focus_event_frame.  */
   struct frame *x_focus_frame;
 
   /* The last frame mentioned in a FocusIn or FocusOut event.  This is
-     separate from w32_focus_frame, because whether or not LeaveNotify
+     separate from x_focus_frame, because whether or not LeaveNotify
      events cause us to lose focus depends on whether or not we have
      received a FocusIn event for it.  */
   struct frame *x_focus_event_frame;
@@ -210,7 +206,7 @@ struct mac_display_info
   /* The frame which currently has the visual highlight, and should get
      keyboard input (other sorts of input have the frame encoded in the
      event).  It points to the focus frame's selected window's
-     frame.  It differs from w32_focus_frame when we're using a global
+     frame.  It differs from x_focus_frame when we're using a global
      minibuffer.  */
   struct frame *x_highlight_frame;
 
@@ -355,6 +351,12 @@ struct mac_output {
 
 #endif
 
+#if TARGET_API_MAC_CARBON
+  /* The Mac control reference for the hourglass (progress indicator)
+     shown at the upper-right corner of the window.  */
+  ControlRef hourglass_control;
+#endif
+
 #if 0
   DWORD dwStyle;
 #endif
@@ -382,7 +384,7 @@ struct mac_output {
   /* Relief GCs, colors etc.  */
   struct relief
   {
-    XGCValues *gc;
+    GC gc;
     unsigned long pixel;
     int allocated_p;
   }
@@ -415,7 +417,7 @@ typedef struct mac_output mac_output;
 
 #define FRAME_SIZE_HINTS(f) ((f)->output_data.mac->size_hints)
 
-/* This gives the w32_display_info structure for the display F is on.  */
+/* This gives the mac_display_info structure for the display F is on.  */
 #define FRAME_MAC_DISPLAY_INFO(f) (&one_mac_display_info)
 #define FRAME_X_DISPLAY_INFO(f) (&one_mac_display_info)
 
@@ -489,6 +491,12 @@ struct scroll_bar {
      place where the user grabbed it.  If the handle isn't currently
      being dragged, this is Qnil.  */
   Lisp_Object dragging;
+
+#ifdef USE_TOOLKIT_SCROLL_BARS
+  /* The position and size of the scroll bar handle track area in
+     pixels, relative to the frame.  */
+  Lisp_Object track_top, track_height;
+#endif
 };
 
 /* The number of elements a vector holding a struct scroll_bar needs.  */
@@ -573,6 +581,10 @@ struct scroll_bar {
    text from glomming up against the scroll bar */
 #define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
 
+/* Size of hourglass controls */
+#define HOURGLASS_WIDTH 16
+#define HOURGLASS_HEIGHT 16
+
 struct frame;
 struct face;
 struct image;
@@ -585,9 +597,8 @@ EXFUN (Fx_display_color_p, 1);
 EXFUN (Fx_display_grayscale_p, 1);
 EXFUN (Fx_display_planes, 1);
 extern void x_free_gcs P_ ((struct frame *));
-
-void activate_scroll_bars (FRAME_PTR);
-void deactivate_scroll_bars (FRAME_PTR);
+extern int XParseGeometry P_ ((char *, int *, int *, unsigned int *,
+                              unsigned int *));
 
 /* Defined in macterm.c.  */
 
@@ -601,6 +612,7 @@ extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *,
                                               unsigned long, unsigned long,
                                               unsigned int));
 extern void XFreePixmap P_ ((Display *, Pixmap));
+extern GC XCreateGC P_ ((Display *, Window, unsigned long, XGCValues *));
 extern void XSetForeground P_ ((Display *, GC, unsigned long));
 extern void XSetBackground P_ ((Display *, GC, unsigned long));
 extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long));
@@ -613,6 +625,10 @@ extern void remove_window_handler P_ ((WindowPtr));
 #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0
 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0
 
+/* Defined in macselect.c */
+
+extern void x_clear_frame_selections P_ ((struct frame *));
+
 /* Defined in mac.c.  */
 
 extern OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *));
@@ -620,7 +636,18 @@ extern OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int));
 extern void mac_clear_font_name_table P_ ((void));
 #if TARGET_API_MAC_CARBON
 extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *));
+extern CFStringRef cfstring_create_with_string P_ ((Lisp_Object));
+extern Lisp_Object cfdata_to_lisp P_ ((CFDataRef));
+extern Lisp_Object cfstring_to_lisp P_ ((CFStringRef));
+extern Lisp_Object cfnumber_to_lisp P_ ((CFNumberRef));
+extern Lisp_Object cfdate_to_lisp P_ ((CFDateRef));
+extern Lisp_Object cfboolean_to_lisp P_ ((CFBooleanRef));
+extern Lisp_Object cfobject_desc_to_lisp P_ ((CFTypeRef));
+extern Lisp_Object cfproperty_list_to_lisp P_ ((CFPropertyListRef, int, int));
 #endif
+extern void xrm_merge_string_database P_ ((XrmDatabase, char *));
+extern Lisp_Object xrm_get_resource P_ ((XrmDatabase, char *, char *));
+extern XrmDatabase xrm_get_preference_database P_ ((char *));
 
 /* arch-tag: 6b4ca125-5bef-476d-8ee8-31ed808b7e79
    (do not change this comment) */