Mercurial > emacs
comparison src/macfns.c @ 50220:e3d56226cb7f
(x_set_mouse_color): Setup hand_cursor instead of cross_cursor.
(x_set_cursor_color): Use x_display_and_set_cursor instead of x_display_cursor.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Fri, 21 Mar 2003 13:49:48 +0000 |
parents | a62497b91c74 |
children | bf4734e2fa2c |
comparison
equal
deleted
inserted
replaced
50219:cfdfcc694c5a | 50220:e3d56226cb7f |
---|---|
245 extern int mac_initialized; | 245 extern int mac_initialized; |
246 | 246 |
247 /* Functions in macterm.c. */ | 247 /* Functions in macterm.c. */ |
248 extern void x_set_offset (struct frame *, int, int, int); | 248 extern void x_set_offset (struct frame *, int, int, int); |
249 extern void x_wm_set_icon_position (struct frame *, int, int); | 249 extern void x_wm_set_icon_position (struct frame *, int, int); |
250 extern void x_display_cursor (struct window *, int, int, int, int, int); | |
251 extern void x_set_window_size (struct frame *, int, int, int); | 250 extern void x_set_window_size (struct frame *, int, int, int); |
252 extern void x_make_frame_visible (struct frame *); | 251 extern void x_make_frame_visible (struct frame *); |
253 extern struct mac_display_info *mac_term_init (Lisp_Object, char *, char *); | 252 extern struct mac_display_info *mac_term_init (Lisp_Object, char *, char *); |
254 extern struct font_info *x_get_font_info (FRAME_PTR, int); | 253 extern struct font_info *x_get_font_info (FRAME_PTR, int); |
255 extern struct font_info *x_load_font (struct frame *, char *, int); | 254 extern struct font_info *x_load_font (struct frame *, char *, int); |
2160 void | 2159 void |
2161 x_set_mouse_color (f, arg, oldval) | 2160 x_set_mouse_color (f, arg, oldval) |
2162 struct frame *f; | 2161 struct frame *f; |
2163 Lisp_Object arg, oldval; | 2162 Lisp_Object arg, oldval; |
2164 { | 2163 { |
2165 Cursor cursor, nontext_cursor, mode_cursor, cross_cursor; | 2164 Cursor cursor, nontext_cursor, mode_cursor, hand_cursor; |
2166 int count; | 2165 int count; |
2167 int mask_color; | 2166 int mask_color; |
2168 | 2167 |
2169 if (!EQ (Qnil, arg)) | 2168 if (!EQ (Qnil, arg)) |
2170 f->output_data.mac->mouse_pixel | 2169 f->output_data.mac->mouse_pixel |
2223 x_check_errors (FRAME_W32_DISPLAY (f), "bad modeline pointer cursor: %s"); | 2222 x_check_errors (FRAME_W32_DISPLAY (f), "bad modeline pointer cursor: %s"); |
2224 | 2223 |
2225 if (!EQ (Qnil, Vx_sensitive_text_pointer_shape)) | 2224 if (!EQ (Qnil, Vx_sensitive_text_pointer_shape)) |
2226 { | 2225 { |
2227 CHECK_NUMBER (Vx_sensitive_text_pointer_shape); | 2226 CHECK_NUMBER (Vx_sensitive_text_pointer_shape); |
2228 cross_cursor | 2227 hand_cursor |
2229 = XCreateFontCursor (FRAME_W32_DISPLAY (f), | 2228 = XCreateFontCursor (FRAME_W32_DISPLAY (f), |
2230 XINT (Vx_sensitive_text_pointer_shape)); | 2229 XINT (Vx_sensitive_text_pointer_shape)); |
2231 } | 2230 } |
2232 else | 2231 else |
2233 cross_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_crosshair); | 2232 hand_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_crosshair); |
2234 | 2233 |
2235 if (!NILP (Vx_window_horizontal_drag_shape)) | 2234 if (!NILP (Vx_window_horizontal_drag_shape)) |
2236 { | 2235 { |
2237 CHECK_NUMBER (Vx_window_horizontal_drag_shape); | 2236 CHECK_NUMBER (Vx_window_horizontal_drag_shape); |
2238 horizontal_drag_cursor | 2237 horizontal_drag_cursor |
2264 &fore_color, &back_color); | 2263 &fore_color, &back_color); |
2265 XRecolorCursor (FRAME_W32_DISPLAY (f), nontext_cursor, | 2264 XRecolorCursor (FRAME_W32_DISPLAY (f), nontext_cursor, |
2266 &fore_color, &back_color); | 2265 &fore_color, &back_color); |
2267 XRecolorCursor (FRAME_W32_DISPLAY (f), mode_cursor, | 2266 XRecolorCursor (FRAME_W32_DISPLAY (f), mode_cursor, |
2268 &fore_color, &back_color); | 2267 &fore_color, &back_color); |
2269 XRecolorCursor (FRAME_W32_DISPLAY (f), cross_cursor, | 2268 XRecolorCursor (FRAME_W32_DISPLAY (f), hand_cursor, |
2270 &fore_color, &back_color); | 2269 &fore_color, &back_color); |
2271 XRecolorCursor (FRAME_W32_DISPLAY (f), hourglass_cursor, | 2270 XRecolorCursor (FRAME_W32_DISPLAY (f), hourglass_cursor, |
2272 &fore_color, &back_color); | 2271 &fore_color, &back_color); |
2273 } | 2272 } |
2274 | 2273 |
2292 if (mode_cursor != f->output_data.w32->modeline_cursor | 2291 if (mode_cursor != f->output_data.w32->modeline_cursor |
2293 && f->output_data.w32->modeline_cursor != 0) | 2292 && f->output_data.w32->modeline_cursor != 0) |
2294 XFreeCursor (FRAME_W32_DISPLAY (f), f->output_data.w32->modeline_cursor); | 2293 XFreeCursor (FRAME_W32_DISPLAY (f), f->output_data.w32->modeline_cursor); |
2295 f->output_data.w32->modeline_cursor = mode_cursor; | 2294 f->output_data.w32->modeline_cursor = mode_cursor; |
2296 | 2295 |
2297 if (cross_cursor != f->output_data.w32->cross_cursor | 2296 if (hand_cursor != f->output_data.w32->hand_cursor |
2298 && f->output_data.w32->cross_cursor != 0) | 2297 && f->output_data.w32->hand_cursor != 0) |
2299 XFreeCursor (FRAME_W32_DISPLAY (f), f->output_data.w32->cross_cursor); | 2298 XFreeCursor (FRAME_W32_DISPLAY (f), f->output_data.w32->hand_cursor); |
2300 f->output_data.w32->cross_cursor = cross_cursor; | 2299 f->output_data.w32->hand_cursor = hand_cursor; |
2301 | 2300 |
2302 XFlush (FRAME_W32_DISPLAY (f)); | 2301 XFlush (FRAME_W32_DISPLAY (f)); |
2303 UNBLOCK_INPUT; | 2302 UNBLOCK_INPUT; |
2304 | 2303 |
2305 update_face_from_frame_parameter (f, Qmouse_color, arg); | 2304 update_face_from_frame_parameter (f, Qmouse_color, arg); |
2332 #if 0 /* MAC_TODO: cannot figure out what to do (wrong number of params) */ | 2331 #if 0 /* MAC_TODO: cannot figure out what to do (wrong number of params) */ |
2333 if (FRAME_MAC_WINDOW (f) != 0) | 2332 if (FRAME_MAC_WINDOW (f) != 0) |
2334 { | 2333 { |
2335 if (FRAME_VISIBLE_P (f)) | 2334 if (FRAME_VISIBLE_P (f)) |
2336 { | 2335 { |
2337 x_display_cursor (f, 0); | 2336 BLOCK_INPUT; |
2338 x_display_cursor (f, 1); | 2337 display_and_set_cursor (f, 0); |
2338 display_and_set_cursor (f, 1); | |
2339 UNBLOCK_INPUT; | |
2339 } | 2340 } |
2340 } | 2341 } |
2341 #endif | 2342 #endif |
2342 | 2343 |
2343 update_face_from_frame_parameter (f, Qcursor_color, arg); | 2344 update_face_from_frame_parameter (f, Qcursor_color, arg); |