aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2007-06-07 08:44:14 +0000
committerYAMAMOTO Mitsuharu2007-06-07 08:44:14 +0000
commit1f23bcb73b4079ab2bd7f0d5cc481744686b4fe7 (patch)
tree9fa654fa632477b06b7facf24919a6293bde7c95 /src
parente50652234f56290cea23831b34cd544d89187a19 (diff)
downloademacs-1f23bcb73b4079ab2bd7f0d5cc481744686b4fe7.tar.gz
emacs-1f23bcb73b4079ab2bd7f0d5cc481744686b4fe7.zip
(mac_get_window_bounds): Move extern to macterm.h.
(compute_tip_xy) [TARGET_API_MAC_CARBON]: Use GetGlobalMouse.
Diffstat (limited to 'src')
-rw-r--r--src/macfns.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/macfns.c b/src/macfns.c
index c7834e636df..b98e2814281 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -218,9 +218,6 @@ void x_explicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
218void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)); 218void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
219void x_set_title P_ ((struct frame *, Lisp_Object, Lisp_Object)); 219void x_set_title P_ ((struct frame *, Lisp_Object, Lisp_Object));
220void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)); 220void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
221
222extern void mac_get_window_bounds P_ ((struct frame *, Rect *, Rect *));
223
224 221
225 222
226/* Store the screen positions of frame F into XPTR and YPTR. 223/* Store the screen positions of frame F into XPTR and YPTR.
@@ -2263,11 +2260,11 @@ mac_window (f)
2263 FRAME_MAC_WINDOW (f) = NULL; 2260 FRAME_MAC_WINDOW (f) = NULL;
2264 } 2261 }
2265 } 2262 }
2266#else 2263#else /* !TARGET_API_MAC_CARBON */
2267 FRAME_MAC_WINDOW (f) 2264 FRAME_MAC_WINDOW (f)
2268 = NewCWindow (NULL, &r, "\p", false, zoomDocProc, 2265 = NewCWindow (NULL, &r, "\p", false, zoomDocProc,
2269 (WindowRef) -1, 1, (long) f->output_data.mac); 2266 (WindowRef) -1, 1, (long) f->output_data.mac);
2270#endif 2267#endif /* !TARGET_API_MAC_CARBON */
2271 /* so that update events can find this mac_output struct */ 2268 /* so that update events can find this mac_output struct */
2272 f->output_data.mac->mFP = f; /* point back to emacs frame */ 2269 f->output_data.mac->mFP = f; /* point back to emacs frame */
2273 2270
@@ -3120,7 +3117,7 @@ If omitted or nil, that stands for the selected frame's display. */)
3120 UNBLOCK_INPUT; 3117 UNBLOCK_INPUT;
3121 } 3118 }
3122#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020 3119#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
3123 else 3120 else /* CGDisplayScreenSize == NULL */
3124#endif 3121#endif
3125#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */ 3122#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
3126#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020 3123#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
@@ -3157,7 +3154,7 @@ If omitted or nil, that stands for the selected frame's display. */)
3157 UNBLOCK_INPUT; 3154 UNBLOCK_INPUT;
3158 } 3155 }
3159#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020 3156#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
3160 else 3157 else /* CGDisplayScreenSize == NULL */
3161#endif 3158#endif
3162#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */ 3159#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
3163#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020 3160#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
@@ -4076,8 +4073,12 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
4076 Point mouse_pos; 4073 Point mouse_pos;
4077 4074
4078 BLOCK_INPUT; 4075 BLOCK_INPUT;
4076#if TARGET_API_MAC_CARBON
4077 GetGlobalMouse (&mouse_pos);
4078#else
4079 GetMouse (&mouse_pos); 4079 GetMouse (&mouse_pos);
4080 LocalToGlobal (&mouse_pos); 4080 LocalToGlobal (&mouse_pos);
4081#endif
4081 *root_x = mouse_pos.h; 4082 *root_x = mouse_pos.h;
4082 *root_y = mouse_pos.v; 4083 *root_y = mouse_pos.v;
4083 UNBLOCK_INPUT; 4084 UNBLOCK_INPUT;