summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2008-03-29 00:47:33 +0000
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2008-03-29 00:47:33 +0000
commit153d35da2e1c3e56ca41cd24cb5c64ca60633bdb (patch)
tree27d4988d3eb4c5a3f1bf7029592e89d62f7977b1 /src
parent660425fa9e4e519db602df1100ca8946155c151e (diff)
downloademacs-153d35da2e1c3e56ca41cd24cb5c64ca60633bdb.tar.gz
(struct scroll_bar): Rename member control_handle_low
and control_handle_high to control_ref_low and control_ref_high. All uses changed. (SCROLL_BAR_CONTROL_REF, SET_SCROLL_BAR_CONTROL_REF): Rename from SCROLL_BAR_CONTROL_HANDLE and SET_SCROLL_BAR_CONTROL_HANDLE, respectively. All uses changed. (XCreatePixmap, XCreatePixmapFromBitmapData, XSetWindowBackground) (install_window_handler, remove_window_handler): Replace WindowPtr with WindowRef in externs. (mac_get_window_bounds): Move extern from macfns.c. (FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y): New macros. (struct mac_output) [USE_MAC_TOOLBAR]: New member toolbar_win_gravity. (struct scroll_bar) [MAC_OSX]: New member fringe_extended_p. (update_frame_tool_bar, free_frame_tool_bar) [USE_MAC_TOOLBAR]: Add externs.
Diffstat (limited to 'src')
-rw-r--r--src/macterm.h53
1 files changed, 40 insertions, 13 deletions
diff --git a/src/macterm.h b/src/macterm.h
index 69d987b0cdc..c95d464544a 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -333,6 +333,16 @@ struct mac_output
/* Hints for the size and the position of a window. */
XSizeHints *size_hints;
+#if USE_MAC_TOOLBAR
+ /* This variable records the gravity value of the window position if
+ the window has an external tool bar when it is created. The
+ position of the window is adjusted using this information when
+ the tool bar is first redisplayed. Once the tool bar is
+ redisplayed, it is set to 0 in order to avoid further
+ adjustment. */
+ int toolbar_win_gravity;
+#endif
+
#if USE_CG_DRAWING
/* Quartz 2D graphics context. */
CGContextRef cg_context;
@@ -369,6 +379,12 @@ typedef struct mac_output mac_output;
/* This is the 'font_info *' which frame F has. */
#define FRAME_MAC_FONT_TABLE(f) (FRAME_MAC_DISPLAY_INFO (f)->font_table)
+/* The difference in pixels between the top left corner of the
+ Emacs window (including possible window manager decorations)
+ and FRAME_MAC_WINDOW (f). */
+#define FRAME_OUTER_TO_INNER_DIFF_X(f) ((f)->x_pixels_diff)
+#define FRAME_OUTER_TO_INNER_DIFF_Y(f) ((f)->y_pixels_diff)
+
/* Value is the smallest width of any character in any font on frame F. */
#define FRAME_SMALLEST_CHAR_WIDTH(F) \
@@ -406,9 +422,9 @@ struct scroll_bar {
/* The next and previous in the chain of scroll bars in this frame. */
Lisp_Object next, prev;
- /* The Mac control handle of this scroll bar. Since this is a
+ /* The Mac control reference of this scroll bar. Since this is a
pointer value, we store it split into two Lisp integers. */
- Lisp_Object control_handle_low, control_handle_high;
+ Lisp_Object control_ref_low, control_ref_high;
/* The position and size of the scroll bar in pixels, relative to the
frame. */
@@ -435,6 +451,12 @@ struct scroll_bar {
being dragged, this is Qnil. */
Lisp_Object dragging;
+#ifdef MAC_OSX
+ /* t if the background of the fringe that is adjacent to a scroll
+ bar is extended to the gap between the fringe and the bar. */
+ Lisp_Object fringe_extended_p;
+#endif
+
/* t if redraw needed in the next XTset_vertical_scroll_bar call. */
Lisp_Object redraw_needed_p;
@@ -469,14 +491,14 @@ struct scroll_bar {
/* Extract the Mac control handle of the scroll bar from a struct
scroll_bar. */
-#define SCROLL_BAR_CONTROL_HANDLE(ptr) \
- ((ControlHandle) SCROLL_BAR_PACK ((ptr)->control_handle_low, \
- (ptr)->control_handle_high))
+#define SCROLL_BAR_CONTROL_REF(ptr) \
+ ((ControlRef) SCROLL_BAR_PACK ((ptr)->control_ref_low, \
+ (ptr)->control_ref_high))
/* Store a Mac control handle in a struct scroll_bar. */
-#define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, handle) \
- (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, \
- (ptr)->control_handle_high, (unsigned long) (handle)))
+#define SET_SCROLL_BAR_CONTROL_REF(ptr, ref) \
+ (SCROLL_BAR_UNPACK ((ptr)->control_ref_low, \
+ (ptr)->control_ref_high, (unsigned long) (ref)))
/* Return the inside width of a vertical scroll bar, given the outside
width. */
@@ -618,9 +640,9 @@ extern void x_destroy_window P_ ((struct frame *));
extern void x_wm_set_size_hint P_ ((struct frame *, long, int));
extern void x_delete_display P_ ((struct x_display_info *));
extern void mac_initialize P_ ((void));
-extern Pixmap XCreatePixmap P_ ((Display *, WindowPtr, unsigned int,
+extern Pixmap XCreatePixmap P_ ((Display *, WindowRef, unsigned int,
unsigned int, unsigned int));
-extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *,
+extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowRef, char *,
unsigned int, unsigned int,
unsigned long, unsigned long,
unsigned int));
@@ -629,7 +651,7 @@ extern GC XCreateGC P_ ((Display *, void *, unsigned long, XGCValues *));
extern void XFreeGC P_ ((Display *, GC));
extern void XSetForeground P_ ((Display *, GC, unsigned long));
extern void XSetBackground P_ ((Display *, GC, unsigned long));
-extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long));
+extern void XSetWindowBackground P_ ((Display *, WindowRef, unsigned long));
extern void XDrawLine P_ ((Display *, Pixmap, GC, int, int, int, int));
extern void mac_clear_area P_ ((struct frame *, int, int,
unsigned int, unsigned int));
@@ -637,8 +659,8 @@ extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *));
extern int mac_font_panel_visible_p P_ ((void));
extern OSStatus mac_show_hide_font_panel P_ ((void));
extern OSStatus mac_set_font_info_for_selection P_ ((struct frame *, int, int));
-extern OSStatus install_window_handler P_ ((WindowPtr));
-extern void remove_window_handler P_ ((WindowPtr));
+extern OSStatus install_window_handler P_ ((WindowRef));
+extern void remove_window_handler P_ ((WindowRef));
extern OSStatus mac_post_mouse_moved_event P_ ((void));
#if !TARGET_API_MAC_CARBON
extern void do_apple_menu P_ ((SInt16));
@@ -646,7 +668,12 @@ extern void do_apple_menu P_ ((SInt16));
#if USE_CG_DRAWING
extern void mac_prepare_for_quickdraw P_ ((struct frame *));
#endif
+extern void mac_get_window_bounds P_ ((struct frame *, Rect *, Rect *));
extern int mac_quit_char_key_p P_ ((UInt32, UInt32));
+#if USE_MAC_TOOLBAR
+extern void update_frame_tool_bar P_ ((FRAME_PTR f));
+extern void free_frame_tool_bar P_ ((FRAME_PTR f));
+#endif
#define FONT_TYPE_FOR_UNIBYTE(font, ch) 0
#define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0