comparison src/w32fns.c @ 96674:ff312a846b25 before-merge-emacs-app-to-trunk

* w32fns.c (Fx_create_frame): Remove duplicate unwind_protect. (w32_show_hourglass): Rename from show_hourglass. (w32_hide_hourglass): Rename from hide_hourglass. (DEFAULT_HOURGLASS_DELAY): Revert from last change. (Vhourglass_delay): Declare extern. (hourglass_started): Remove. * xdisp.c (Vhourglass_delay): Remove static. (hourglass_started, start_hourglass, cancel_hourglass): Don't include these versions on WINDOWSNT.
author Jason Rumney <jasonr@gnu.org>
date Tue, 15 Jul 2008 15:45:05 +0000
parents b306a69b9d7f
children 840bd675fd85
comparison
equal deleted inserted replaced
96673:5dc035add002 96674:ff312a846b25
305 /* From w32uniscribe.c */ 305 /* From w32uniscribe.c */
306 extern void syms_of_w32uniscribe (); 306 extern void syms_of_w32uniscribe ();
307 extern int uniscribe_available; 307 extern int uniscribe_available;
308 308
309 /* Function prototypes for hourglass support. */ 309 /* Function prototypes for hourglass support. */
310 static void show_hourglass P_ ((struct frame *)); 310 static void w32_show_hourglass P_ ((struct frame *));
311 static void hide_hourglass P_ ((void)); 311 static void w32_hide_hourglass P_ ((void));
312 312
313 313
314 314
315 /* Error if we are not connected to MS-Windows. */ 315 /* Error if we are not connected to MS-Windows. */
316 void 316 void
3478 } 3478 }
3479 else if (wParam == hourglass_timer) 3479 else if (wParam == hourglass_timer)
3480 { 3480 {
3481 KillTimer (hwnd, hourglass_timer); 3481 KillTimer (hwnd, hourglass_timer);
3482 hourglass_timer = 0; 3482 hourglass_timer = 0;
3483 show_hourglass (x_window_to_frame (dpyinfo, hwnd)); 3483 w32_show_hourglass (x_window_to_frame (dpyinfo, hwnd));
3484 } 3484 }
3485 return 0; 3485 return 0;
3486 3486
3487 case WM_NCACTIVATE: 3487 case WM_NCACTIVATE:
3488 /* Windows doesn't send us focus messages when putting up and 3488 /* Windows doesn't send us focus messages when putting up and
4348 f->output_method = output_w32; 4348 f->output_method = output_w32;
4349 f->output_data.w32 = 4349 f->output_data.w32 =
4350 (struct w32_output *) xmalloc (sizeof (struct w32_output)); 4350 (struct w32_output *) xmalloc (sizeof (struct w32_output));
4351 bzero (f->output_data.w32, sizeof (struct w32_output)); 4351 bzero (f->output_data.w32, sizeof (struct w32_output));
4352 FRAME_FONTSET (f) = -1; 4352 FRAME_FONTSET (f) = -1;
4353 record_unwind_protect (unwind_create_frame, frame);
4354 4353
4355 f->icon_name 4354 f->icon_name
4356 = x_get_arg (dpyinfo, parameters, Qicon_name, "iconName", "Title", 4355 = x_get_arg (dpyinfo, parameters, Qicon_name, "iconName", "Title",
4357 RES_TYPE_STRING); 4356 RES_TYPE_STRING);
4358 if (! STRINGP (f->icon_name)) 4357 if (! STRINGP (f->icon_name))
5227 5226
5228 /*********************************************************************** 5227 /***********************************************************************
5229 Busy cursor 5228 Busy cursor
5230 ***********************************************************************/ 5229 ***********************************************************************/
5231 5230
5231 /* Default number of seconds to wait before displaying an hourglass
5232 cursor. Duplicated from xdisp.c, but cannot use the version there
5233 due to lack of atimers on w32. */
5234 #define DEFAULT_HOURGLASS_DELAY 1
5235 extern Lisp_Object Vhourglass_delay;
5236
5232 /* Return non-zero if houglass timer has been started or hourglass is shown. */ 5237 /* Return non-zero if houglass timer has been started or hourglass is shown. */
5233 /* PENDING: if W32 can use atimers (atimer.[hc]) then the common impl in 5238 /* PENDING: if W32 can use atimers (atimer.[hc]) then the common impl in
5234 xdisp.c could be used. */ 5239 xdisp.c could be used. */
5235 5240
5236 int 5241 int
5285 KillTimer (hourglass_hwnd, hourglass_timer); 5290 KillTimer (hourglass_hwnd, hourglass_timer);
5286 hourglass_timer = 0; 5291 hourglass_timer = 0;
5287 } 5292 }
5288 5293
5289 if (hourglass_shown_p) 5294 if (hourglass_shown_p)
5290 hide_hourglass (); 5295 w32_hide_hourglass ();
5291 } 5296 }
5292 5297
5293 5298
5294 /* Timer function of hourglass_timer. 5299 /* Timer function of hourglass_timer.
5295 5300
5296 Display an hourglass cursor. Set the hourglass_p flag in display info 5301 Display an hourglass cursor. Set the hourglass_p flag in display info
5297 to indicate that an hourglass cursor is shown. */ 5302 to indicate that an hourglass cursor is shown. */
5298 5303
5299 static void 5304 static void
5300 show_hourglass (f) 5305 w32_show_hourglass (f)
5301 struct frame *f; 5306 struct frame *f;
5302 { 5307 {
5303 if (!hourglass_shown_p) 5308 if (!hourglass_shown_p)
5304 { 5309 {
5305 f->output_data.w32->hourglass_p = 1; 5310 f->output_data.w32->hourglass_p = 1;
5311 5316
5312 5317
5313 /* Hide the hourglass cursor on all frames, if it is currently shown. */ 5318 /* Hide the hourglass cursor on all frames, if it is currently shown. */
5314 5319
5315 static void 5320 static void
5316 hide_hourglass () 5321 w32_hide_hourglass ()
5317 { 5322 {
5318 if (hourglass_shown_p) 5323 if (hourglass_shown_p)
5319 { 5324 {
5320 struct frame *f = x_window_to_frame (&one_w32_display_info, 5325 struct frame *f = x_window_to_frame (&one_w32_display_info,
5321 hourglass_hwnd); 5326 hourglass_hwnd);