Mercurial > hg > xemacs-beta
comparison src/msw-proc.c @ 221:6c0ae1f9357f r20-4b9
Import from CVS: tag r20-4b9
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:10:02 +0200 |
parents | 262b8bb4a523 |
children | 2c611d1463a6 |
comparison
equal
deleted
inserted
replaced
220:04f4bca7b601 | 221:6c0ae1f9357f |
---|---|
203 { | 203 { |
204 /* Note: Remember to initialise these before use */ | 204 /* Note: Remember to initialise these before use */ |
205 Lisp_Object emacs_event; | 205 Lisp_Object emacs_event; |
206 struct Lisp_Event *event; | 206 struct Lisp_Event *event; |
207 | 207 |
208 static sizing = 0; | |
208 MSG msg = { hwnd, message, wParam, lParam, 0, {0,0} }; | 209 MSG msg = { hwnd, message, wParam, lParam, 0, {0,0} }; |
209 msg.time = GetMessageTime(); | 210 msg.time = GetMessageTime(); |
210 | 211 |
211 #ifdef DEBUG_MESSAGES | 212 #ifdef DEBUG_MESSAGES |
212 stderr_out("Message %04x, wParam=%04x, lParam=%08lx\n", message, wParam, lParam); | 213 stderr_out("Message %04x, wParam=%04x, lParam=%08lx\n", message, wParam, lParam); |
314 LeaveCriticalSection (&mswindows_dispatch_crit); | 315 LeaveCriticalSection (&mswindows_dispatch_crit); |
315 } | 316 } |
316 break; | 317 break; |
317 | 318 |
318 case WM_MOUSEMOVE: | 319 case WM_MOUSEMOVE: |
320 /* Optimization: don't report mouse movement while size is changind */ | |
321 if (!sizing) | |
319 { | 322 { |
320 short x, y; | 323 short x, y; |
321 | 324 |
322 EnterCriticalSection (&mswindows_dispatch_crit); | 325 EnterCriticalSection (&mswindows_dispatch_crit); |
323 emacs_event = Fmake_event (Qnil, Qnil); | 326 emacs_event = Fmake_event (Qnil, Qnil); |
441 wp->cy = pixheight; | 444 wp->cy = pixheight; |
442 } | 445 } |
443 } | 446 } |
444 break; | 447 break; |
445 | 448 |
449 case WM_ENTERSIZEMOVE: | |
450 case WM_EXITSIZEMOVE: | |
451 sizing = (message == WM_ENTERSIZEMOVE); | |
452 goto defproc; | |
453 | |
446 defproc: | 454 defproc: |
447 default: | 455 default: |
448 return DefWindowProc (hwnd, message, wParam, lParam); | 456 return DefWindowProc (hwnd, message, wParam, lParam); |
449 } | 457 } |
450 return (0); | 458 return (0); |
494 top = Fplist_get (*props, Qtop, Qnil); | 502 top = Fplist_get (*props, Qtop, Qnil); |
495 left = Fplist_get (*props, Qleft, Qnil); | 503 left = Fplist_get (*props, Qleft, Qnil); |
496 | 504 |
497 style = (NILP(popup)) ? MSWINDOWS_FRAME_STYLE : MSWINDOWS_POPUP_STYLE; | 505 style = (NILP(popup)) ? MSWINDOWS_FRAME_STYLE : MSWINDOWS_POPUP_STYLE; |
498 | 506 |
499 rect.left = INTP(left) ? XINT(left) : 0; | 507 FRAME_WIDTH (f) = INTP(width) ? XINT(width) : 80; |
500 rect.top = INTP(top) ? XINT(top) : 0; | 508 FRAME_HEIGHT (f) = INTP(height) ? XINT(height) : 30; |
501 char_to_pixel_size (f, INTP(width) ? XINT(width) : 80, | 509 char_to_pixel_size (f, FRAME_WIDTH(f), FRAME_HEIGHT (f), |
502 INTP(height) ? XINT(height) : 24, | 510 &FRAME_PIXWIDTH (f), &FRAME_PIXHEIGHT (f)); |
503 &rect.right, &rect.bottom); | 511 |
512 rect.left = rect.top = 0; | |
513 rect.right = FRAME_PIXWIDTH (f); | |
514 rect.bottom = FRAME_PIXHEIGHT (f); | |
504 #ifdef HAVE_MENUBARS | 515 #ifdef HAVE_MENUBARS |
505 AdjustWindowRect(&rect, style, TRUE); | 516 AdjustWindowRect(&rect, style, TRUE); |
506 #else | 517 #else |
507 AdjustWindowRect(&rect, style, FALSE); | 518 AdjustWindowRect(&rect, style, FALSE); |
508 #endif | 519 #endif |
603 #if 0 /* XXX What are these supposed to do? */ | 614 #if 0 /* XXX What are these supposed to do? */ |
604 case VK_LWIN return KEYSYM (""); | 615 case VK_LWIN return KEYSYM (""); |
605 case VK_RWIN return KEYSYM (""); | 616 case VK_RWIN return KEYSYM (""); |
606 #endif | 617 #endif |
607 case VK_APPS: return KEYSYM ("menu"); | 618 case VK_APPS: return KEYSYM ("menu"); |
608 case VK_F1: return KEYSYM ("F1"); | 619 case VK_F1: return KEYSYM ("f1"); |
609 case VK_F2: return KEYSYM ("F2"); | 620 case VK_F2: return KEYSYM ("f2"); |
610 case VK_F3: return KEYSYM ("F3"); | 621 case VK_F3: return KEYSYM ("f3"); |
611 case VK_F4: return KEYSYM ("F4"); | 622 case VK_F4: return KEYSYM ("f4"); |
612 case VK_F5: return KEYSYM ("F5"); | 623 case VK_F5: return KEYSYM ("f5"); |
613 case VK_F6: return KEYSYM ("F6"); | 624 case VK_F6: return KEYSYM ("f6"); |
614 case VK_F7: return KEYSYM ("F7"); | 625 case VK_F7: return KEYSYM ("f7"); |
615 case VK_F8: return KEYSYM ("F8"); | 626 case VK_F8: return KEYSYM ("f8"); |
616 case VK_F9: return KEYSYM ("F9"); | 627 case VK_F9: return KEYSYM ("f9"); |
617 case VK_F10: return KEYSYM ("F10"); | 628 case VK_F10: return KEYSYM ("f10"); |
618 case VK_F11: return KEYSYM ("F11"); | 629 case VK_F11: return KEYSYM ("f11"); |
619 case VK_F12: return KEYSYM ("F12"); | 630 case VK_F12: return KEYSYM ("f12"); |
620 case VK_F13: return KEYSYM ("F13"); | 631 case VK_F13: return KEYSYM ("f13"); |
621 case VK_F14: return KEYSYM ("F14"); | 632 case VK_F14: return KEYSYM ("f14"); |
622 case VK_F15: return KEYSYM ("F15"); | 633 case VK_F15: return KEYSYM ("f15"); |
623 case VK_F16: return KEYSYM ("F16"); | 634 case VK_F16: return KEYSYM ("f16"); |
624 case VK_F17: return KEYSYM ("F17"); | 635 case VK_F17: return KEYSYM ("f17"); |
625 case VK_F18: return KEYSYM ("F18"); | 636 case VK_F18: return KEYSYM ("f18"); |
626 case VK_F19: return KEYSYM ("F19"); | 637 case VK_F19: return KEYSYM ("f19"); |
627 case VK_F20: return KEYSYM ("F20"); | 638 case VK_F20: return KEYSYM ("f20"); |
628 case VK_F21: return KEYSYM ("F21"); | 639 case VK_F21: return KEYSYM ("f21"); |
629 case VK_F22: return KEYSYM ("F22"); | 640 case VK_F22: return KEYSYM ("f22"); |
630 case VK_F23: return KEYSYM ("F23"); | 641 case VK_F23: return KEYSYM ("f23"); |
631 case VK_F24: return KEYSYM ("F24"); | 642 case VK_F24: return KEYSYM ("f24"); |
632 default: | 643 default: |
633 /* Special handling for Ctrl-'@' because '@' lives shifted on varying | 644 /* Special handling for Ctrl-'@' because '@' lives shifted on varying |
634 * virtual keys and because Windows doesn't report Ctrl-@ as a WM_CHAR */ | 645 * virtual keys and because Windows doesn't report Ctrl-@ as a WM_CHAR */ |
635 if (((mods & (MOD_SHIFT|MOD_CONTROL)) == (MOD_SHIFT|MOD_CONTROL)) && | 646 if (((mods & (MOD_SHIFT|MOD_CONTROL)) == (MOD_SHIFT|MOD_CONTROL)) && |
636 (mswindows_key == virtual_at_key)) | 647 (mswindows_key == virtual_at_key)) |