Mercurial > hg > xemacs-beta
comparison src/event-msw.c @ 593:5fd7ba8b56e7
[xemacs-hg @ 2001-05-31 12:45:27 by ben]
xemacs-faq.texi: Major rewrite.
Update all MS Windows info to current.
Redo section 6.1 almost completely.
Incorporate sections 1 and 2 of Hrvoje's FAQ.
etags.el: Fix infloop when going up to the root.
s\cygwin32.h: Don't unilaterally include ntplay, but only when we're compiling
with native sound (look in configure now).
event-msw.c: Fix yet more problems with C-g handling.
Implement debug-mswindows-events.
event-stream.c, events.h, signal.c, sysdep.h:
Rearrange the signal-handling code to eliminate the former
spaghetti logic paths in it. Document clearly what
"low-level" and "high-level" timeouts are. Rename some
functions with unclear names (e.g. "...alarm...") to names
that reflect what they actually do (e.g. "...async_timeout...").
Fix numerous bugs discovered in the process.
console-x.h, event-Xt.c, event-msw.c, frame-x.c:
Hopefully make XEmacs properly maintain the "iconified"
state on frames at all times. This should fix the "can't
delete a frame with C-x 5 0 when there's another iconified
frame out there" bug.
Put a notice in of further changes that should probably
be made to clean up the frame-visibility support.
(especially directed at Jan Vroonhof)
lisp.h, miscplay.c:
Rename SBufbyte to CBufbyte to avoid a misleading name.
Eliminate UChar, which is not used anywhere and contributes
no semantic info. Add a comment about the documentation-only
properties of the char/unsigned char typedefs. Add
SChar_Binary as an explicitly `signed' version of Char_Binary
and put back the `signed' declarations in miscplay.c.
alloc.c:
Use char typedefs.
console-msw.c, device-msw.c, dialog-msw.c, editfns.c, fileio.c, glyphs-eimage.c, menubar-msw.c, ntplay.c, objects-msw.c, realpath.c, redisplay-msw.c, select-msw.c, syswindows.h, win32.c:
Eliminate numerous C++ errors.
frame-msw.c:
Eliminate numerous C++ errors and Mule-ize.
glyphs-msw.c:
Eliminate numerous C++ errors and use char typedefs.
configure.in:
Fix problems detecting both native and Linux sound on Cygwin
when compiled with --with-msw=no.
Rearrange file-coding handling a bit to avoid warning when
compiling with Mule.
configure.in, configure.usage, INSTALL:
Document XEMACS_CC and corresponding compiler option --xemacs-compiler.
Explain how to build xemacs using a C++ compiler.
author | ben |
---|---|
date | Thu, 31 May 2001 12:45:41 +0000 |
parents | ed8e2ee8d29d |
children | fa3b8eb89cb2 |
comparison
equal
deleted
inserted
replaced
592:4f6ba8f1fb3d | 593:5fd7ba8b56e7 |
---|---|
149 Fixnum mswindows_mouse_button_max_skew_y; | 149 Fixnum mswindows_mouse_button_max_skew_y; |
150 Fixnum mswindows_mouse_button_tolerance; | 150 Fixnum mswindows_mouse_button_tolerance; |
151 | 151 |
152 #ifdef DEBUG_XEMACS | 152 #ifdef DEBUG_XEMACS |
153 Fixnum debug_mswindows_events; | 153 Fixnum debug_mswindows_events; |
154 | |
155 static void debug_output_mswin_message (HWND hwnd, UINT message_, | |
156 WPARAM wParam, LPARAM lParam); | |
154 #endif | 157 #endif |
155 | 158 |
156 /* This is the event signaled by the event pump. | 159 /* This is the event signaled by the event pump. |
157 See mswindows_pump_outstanding_events for comments */ | 160 See mswindows_pump_outstanding_events for comments */ |
158 static Lisp_Object mswindows_error_caught_in_modal_loop; | 161 static Lisp_Object mswindows_error_caught_in_modal_loop; |
1045 &mswindows_u_dispatch_event_queue, | 1048 &mswindows_u_dispatch_event_queue, |
1046 NILP(mswindows_u_dispatch_event_queue) ? | 1049 NILP(mswindows_u_dispatch_event_queue) ? |
1047 &mswindows_s_dispatch_event_queue_tail : | 1050 &mswindows_s_dispatch_event_queue_tail : |
1048 &mswindows_u_dispatch_event_queue_tail); | 1051 &mswindows_u_dispatch_event_queue_tail); |
1049 | 1052 |
1050 sevt = XEVENT(event); | 1053 sevt = XEVENT (event); |
1051 if (sevt->event_type == key_press_event | 1054 if (sevt->event_type == key_press_event |
1052 && (sevt->event.key.modifiers & FAKE_MOD_QUIT)) | 1055 && (sevt->event.key.modifiers & FAKE_MOD_QUIT)) |
1053 { | 1056 sevt->event.key.modifiers &= |
1054 sevt->event.key.modifiers &= | 1057 ~(FAKE_MOD_QUIT | FAKE_MOD_QUIT_CRITICAL); |
1055 ~(FAKE_MOD_QUIT | FAKE_MOD_QUIT_CRITICAL); | |
1056 --mswindows_quit_chars_count; | |
1057 } | |
1058 | 1058 |
1059 return event; | 1059 return event; |
1060 } | 1060 } |
1061 | 1061 |
1062 /* | 1062 /* |
2062 struct mswindows_frame* msframe; | 2062 struct mswindows_frame* msframe; |
2063 | 2063 |
2064 /* Not perfect but avoids crashes. There is potential for wierd | 2064 /* Not perfect but avoids crashes. There is potential for wierd |
2065 behavior here. */ | 2065 behavior here. */ |
2066 if (gc_in_progress) | 2066 if (gc_in_progress) |
2067 goto defproc; | 2067 { |
2068 stderr_out ("Window procedure called during GC???????\n"); | |
2069 goto defproc; | |
2070 } | |
2071 | |
2072 #ifdef DEBUG_XEMACS | |
2073 if (debug_mswindows_events) | |
2074 debug_output_mswin_message (hwnd, message_, wParam, lParam); | |
2075 #endif /* DEBUG_XEMACS */ | |
2068 | 2076 |
2069 assert (!GetWindowLong (hwnd, GWL_USERDATA)); | 2077 assert (!GetWindowLong (hwnd, GWL_USERDATA)); |
2070 switch (message_) | 2078 switch (message_) |
2071 { | 2079 { |
2072 case WM_DESTROYCLIPBOARD: | 2080 case WM_DESTROYCLIPBOARD: |
2098 { | 2106 { |
2099 BYTE keymap[256]; | 2107 BYTE keymap[256]; |
2100 int should_set_keymap = 0; | 2108 int should_set_keymap = 0; |
2101 | 2109 |
2102 #ifdef DEBUG_XEMACS | 2110 #ifdef DEBUG_XEMACS |
2103 if (debug_mswindows_events) | 2111 if (debug_mswindows_events > 2) |
2104 { | 2112 output_alt_keyboard_state (); |
2105 stderr_out ("%s wparam=%d lparam=%d\n", | |
2106 message_ == WM_KEYUP ? "WM_KEYUP" : "WM_SYSKEYUP", | |
2107 wParam, (int)lParam); | |
2108 output_alt_keyboard_state (); | |
2109 } | |
2110 #endif /* DEBUG_XEMACS */ | 2113 #endif /* DEBUG_XEMACS */ |
2111 | 2114 |
2112 mswindows_handle_sticky_modifiers (wParam, lParam, 0, 1); | 2115 mswindows_handle_sticky_modifiers (wParam, lParam, 0, 1); |
2113 if (wParam == VK_CONTROL) | 2116 if (wParam == VK_CONTROL) |
2114 { | 2117 { |
2155 int extendedp = lParam & 0x1000000; | 2158 int extendedp = lParam & 0x1000000; |
2156 Lisp_Object keysym; | 2159 Lisp_Object keysym; |
2157 int sticky_changed; | 2160 int sticky_changed; |
2158 | 2161 |
2159 #ifdef DEBUG_XEMACS | 2162 #ifdef DEBUG_XEMACS |
2160 if (debug_mswindows_events) | 2163 if (debug_mswindows_events > 2) |
2161 { | 2164 output_alt_keyboard_state (); |
2162 stderr_out ("%s wparam=%d lparam=%d\n", | |
2163 message_ == WM_KEYDOWN ? "WM_KEYDOWN" : "WM_SYSKEYDOWN", | |
2164 wParam, (int)lParam); | |
2165 output_alt_keyboard_state (); | |
2166 } | |
2167 #endif /* DEBUG_XEMACS */ | 2165 #endif /* DEBUG_XEMACS */ |
2168 | 2166 |
2169 GetKeyboardState (keymap_orig); | 2167 GetKeyboardState (keymap_orig); |
2170 frame = XFRAME (mswindows_find_frame (hwnd)); | 2168 frame = XFRAME (mswindows_find_frame (hwnd)); |
2171 if ((sticky_changed = | 2169 if ((sticky_changed = |
2256 PM_REMOVE)) | 2254 PM_REMOVE)) |
2257 { | 2255 { |
2258 int mods_with_quit = mods; | 2256 int mods_with_quit = mods; |
2259 WPARAM ch = tranmsg.wParam; | 2257 WPARAM ch = tranmsg.wParam; |
2260 | 2258 |
2259 #ifdef DEBUG_XEMACS | |
2260 if (debug_mswindows_events) | |
2261 { | |
2262 stderr_out ("-> "); | |
2263 debug_output_mswin_message (tranmsg.hwnd, tranmsg.message, | |
2264 tranmsg.wParam, | |
2265 tranmsg.lParam); | |
2266 } | |
2267 #endif /* DEBUG_XEMACS */ | |
2268 | |
2261 /* If a quit char with no modifiers other than control and | 2269 /* If a quit char with no modifiers other than control and |
2262 shift, then mark it with a fake modifier, which is removed | 2270 shift, then mark it with a fake modifier, which is removed |
2263 upon dequeueing the event */ | 2271 upon dequeueing the event */ |
2264 /* !!#### Fix this in my mule ws -- replace current_buffer | 2272 /* !!#### Fix this in my mule ws -- replace current_buffer |
2265 with 0 */ | 2273 with 0 */ |
2274 == 0)) | 2282 == 0)) |
2275 { | 2283 { |
2276 mods_with_quit |= FAKE_MOD_QUIT; | 2284 mods_with_quit |= FAKE_MOD_QUIT; |
2277 if (mods_with_shift & XEMACS_MOD_SHIFT) | 2285 if (mods_with_shift & XEMACS_MOD_SHIFT) |
2278 mods_with_quit |= FAKE_MOD_QUIT_CRITICAL; | 2286 mods_with_quit |= FAKE_MOD_QUIT_CRITICAL; |
2279 ++mswindows_quit_chars_count; | 2287 mswindows_quit_chars_count++; |
2280 } | 2288 } |
2281 else if (potential_accelerator && !got_accelerator && | 2289 else if (potential_accelerator && !got_accelerator && |
2282 mswindows_char_is_accelerator (frame, ch)) | 2290 mswindows_char_is_accelerator (frame, ch)) |
2283 { | 2291 { |
2284 got_accelerator = 1; | 2292 got_accelerator = 1; |
2604 messages directly to the windows procedure when doing solid drags | 2612 messages directly to the windows procedure when doing solid drags |
2605 and the message queue doesn't get processed. */ | 2613 and the message queue doesn't get processed. */ |
2606 mswindows_handle_paint (XFRAME (mswindows_find_frame (hwnd))); | 2614 mswindows_handle_paint (XFRAME (mswindows_find_frame (hwnd))); |
2607 break; | 2615 break; |
2608 | 2616 |
2617 case WM_WINDOWPOSCHANGED: | |
2618 /* This is sent before WM_SIZE; in fact, the processing of this | |
2619 by DefWindowProc() sends WM_SIZE. But WM_SIZE is not sent when | |
2620 a window is hidden (make-frame-invisible), so we need to process | |
2621 this and update the state flags. */ | |
2622 { | |
2623 fobj = mswindows_find_frame (hwnd); | |
2624 frame = XFRAME (fobj); | |
2625 if (IsIconic (hwnd)) | |
2626 { | |
2627 FRAME_VISIBLE_P (frame) = 0; | |
2628 FRAME_ICONIFIED_P (frame) = 1; | |
2629 } | |
2630 else if (IsWindowVisible (hwnd)) | |
2631 { | |
2632 FRAME_VISIBLE_P (frame) = 1; | |
2633 FRAME_ICONIFIED_P (frame) = 0; | |
2634 } | |
2635 else | |
2636 { | |
2637 FRAME_VISIBLE_P (frame) = 0; | |
2638 FRAME_ICONIFIED_P (frame) = 0; | |
2639 } | |
2640 | |
2641 return DefWindowProc (hwnd, message_, wParam, lParam); | |
2642 } | |
2643 | |
2609 case WM_SIZE: | 2644 case WM_SIZE: |
2610 /* We only care about this message if our size has really changed */ | 2645 /* We only care about this message if our size has really changed */ |
2611 if (wParam==SIZE_RESTORED || wParam==SIZE_MAXIMIZED || wParam==SIZE_MINIMIZED) | 2646 if (wParam==SIZE_RESTORED || wParam==SIZE_MAXIMIZED || wParam==SIZE_MINIMIZED) |
2612 { | 2647 { |
2613 RECT rect; | 2648 RECT rect; |
2622 magic events to run these hooks instead - kkm */ | 2657 magic events to run these hooks instead - kkm */ |
2623 | 2658 |
2624 if (wParam==SIZE_MINIMIZED) | 2659 if (wParam==SIZE_MINIMIZED) |
2625 { | 2660 { |
2626 /* Iconified */ | 2661 /* Iconified */ |
2627 FRAME_VISIBLE_P (frame) = 0; | |
2628 mswindows_enqueue_magic_event (hwnd, XM_UNMAPFRAME); | 2662 mswindows_enqueue_magic_event (hwnd, XM_UNMAPFRAME); |
2629 } | 2663 } |
2630 else | 2664 else |
2631 { | 2665 { |
2632 GetClientRect(hwnd, &rect); | 2666 GetClientRect(hwnd, &rect); |
2658 } | 2692 } |
2659 else | 2693 else |
2660 { | 2694 { |
2661 if (!msframe->sizing && !FRAME_VISIBLE_P (frame)) | 2695 if (!msframe->sizing && !FRAME_VISIBLE_P (frame)) |
2662 mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); | 2696 mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); |
2663 FRAME_VISIBLE_P (frame) = 1; | |
2664 | 2697 |
2665 if (!msframe->sizing || mswindows_dynamic_frame_resize) | 2698 if (!msframe->sizing || mswindows_dynamic_frame_resize) |
2666 redisplay (); | 2699 redisplay (); |
2667 } | 2700 } |
2668 } | 2701 } |
3473 /* Quit cannot happen in modal loop: all program | 3506 /* Quit cannot happen in modal loop: all program |
3474 input is dedicated to Windows. */ | 3507 input is dedicated to Windows. */ |
3475 if (mswindows_in_modal_loop) | 3508 if (mswindows_in_modal_loop) |
3476 return; | 3509 return; |
3477 | 3510 |
3511 mswindows_quit_chars_count = 0; | |
3478 /* Drain windows queue. This sets up number of quit characters in | 3512 /* Drain windows queue. This sets up number of quit characters in |
3479 the queue. */ | 3513 the queue. */ |
3480 mswindows_drain_windows_queue (); | 3514 mswindows_drain_windows_queue (); |
3481 | 3515 |
3482 if (mswindows_quit_chars_count > 0) | 3516 if (mswindows_quit_chars_count > 0) |
3487 int critical_p = 0; | 3521 int critical_p = 0; |
3488 | 3522 |
3489 match_against.event_type = key_press_event; | 3523 match_against.event_type = key_press_event; |
3490 match_against.event.key.modifiers = FAKE_MOD_QUIT; | 3524 match_against.event.key.modifiers = FAKE_MOD_QUIT; |
3491 | 3525 |
3492 while (mswindows_quit_chars_count-- > 0) | 3526 while (mswindows_quit_chars_count > 0) |
3493 { | 3527 { |
3494 emacs_event = mswindows_cancel_dispatch_event (&match_against); | 3528 emacs_event = mswindows_cancel_dispatch_event (&match_against); |
3495 assert (!NILP (emacs_event)); | 3529 assert (!NILP (emacs_event)); |
3496 | 3530 |
3497 if (XEVENT (emacs_event)->event.key.modifiers & | 3531 if (XEVENT (emacs_event)->event.key.modifiers & |
3498 FAKE_MOD_QUIT_CRITICAL) | 3532 FAKE_MOD_QUIT_CRITICAL) |
3499 critical_p = 1; | 3533 critical_p = 1; |
3500 | 3534 |
3501 Fdeallocate_event (emacs_event); | 3535 Fdeallocate_event (emacs_event); |
3536 mswindows_quit_chars_count--; | |
3502 } | 3537 } |
3503 | 3538 |
3504 Vquit_flag = critical_p ? Qcritical : Qt; | 3539 Vquit_flag = critical_p ? Qcritical : Qt; |
3505 } | 3540 } |
3506 } | 3541 } |
3631 | 3666 |
3632 /* #### More checks here */ | 3667 /* #### More checks here */ |
3633 #endif | 3668 #endif |
3634 } | 3669 } |
3635 #endif | 3670 #endif |
3671 | |
3672 #ifdef DEBUG_XEMACS | |
3673 | |
3674 struct mswin_message_debug | |
3675 { | |
3676 int mess; | |
3677 char *string; | |
3678 }; | |
3679 | |
3680 #define FROB(val) { val, #val, }, | |
3681 | |
3682 struct mswin_message_debug debug_mswin_messages[] = | |
3683 { | |
3684 FROB (WM_NULL) | |
3685 FROB (WM_CREATE) | |
3686 FROB (WM_DESTROY) | |
3687 FROB (WM_MOVE) | |
3688 FROB (WM_SIZE) | |
3689 | |
3690 FROB (WM_ACTIVATE) | |
3691 | |
3692 FROB (WM_SETFOCUS) | |
3693 FROB (WM_KILLFOCUS) | |
3694 FROB (WM_ENABLE) | |
3695 FROB (WM_SETREDRAW) | |
3696 FROB (WM_SETTEXT) | |
3697 FROB (WM_GETTEXT) | |
3698 FROB (WM_GETTEXTLENGTH) | |
3699 FROB (WM_PAINT) | |
3700 FROB (WM_CLOSE) | |
3701 FROB (WM_QUERYENDSESSION) | |
3702 FROB (WM_QUIT) | |
3703 FROB (WM_QUERYOPEN) | |
3704 FROB (WM_ERASEBKGND) | |
3705 FROB (WM_SYSCOLORCHANGE) | |
3706 FROB (WM_ENDSESSION) | |
3707 FROB (WM_SHOWWINDOW) | |
3708 FROB (WM_WININICHANGE) | |
3709 #if(WINVER >= 0x0400) | |
3710 FROB (WM_SETTINGCHANGE) | |
3711 #endif /* WINVER >= 0x0400 */ | |
3712 | |
3713 FROB (WM_DEVMODECHANGE) | |
3714 FROB (WM_ACTIVATEAPP) | |
3715 FROB (WM_FONTCHANGE) | |
3716 FROB (WM_TIMECHANGE) | |
3717 FROB (WM_CANCELMODE) | |
3718 FROB (WM_SETCURSOR) | |
3719 FROB (WM_MOUSEACTIVATE) | |
3720 FROB (WM_CHILDACTIVATE) | |
3721 FROB (WM_QUEUESYNC) | |
3722 | |
3723 FROB (WM_GETMINMAXINFO) | |
3724 | |
3725 FROB (WM_PAINTICON) | |
3726 FROB (WM_ICONERASEBKGND) | |
3727 FROB (WM_NEXTDLGCTL) | |
3728 FROB (WM_SPOOLERSTATUS) | |
3729 FROB (WM_DRAWITEM) | |
3730 FROB (WM_MEASUREITEM) | |
3731 FROB (WM_DELETEITEM) | |
3732 FROB (WM_VKEYTOITEM) | |
3733 FROB (WM_CHARTOITEM) | |
3734 FROB (WM_SETFONT) | |
3735 FROB (WM_GETFONT) | |
3736 FROB (WM_SETHOTKEY) | |
3737 FROB (WM_GETHOTKEY) | |
3738 FROB (WM_QUERYDRAGICON) | |
3739 FROB (WM_COMPAREITEM) | |
3740 #if(WINVER >= 0x0500) | |
3741 FROB (WM_GETOBJECT) | |
3742 #endif /* WINVER >= 0x0500 */ | |
3743 FROB (WM_COMPACTING) | |
3744 FROB (WM_COMMNOTIFY) | |
3745 FROB (WM_WINDOWPOSCHANGING) | |
3746 FROB (WM_WINDOWPOSCHANGED) | |
3747 | |
3748 FROB (WM_POWER) | |
3749 | |
3750 FROB (WM_COPYDATA) | |
3751 FROB (WM_CANCELJOURNAL) | |
3752 | |
3753 #if(WINVER >= 0x0400) | |
3754 FROB (WM_NOTIFY) | |
3755 FROB (WM_INPUTLANGCHANGEREQUEST) | |
3756 FROB (WM_INPUTLANGCHANGE) | |
3757 FROB (WM_TCARD) | |
3758 FROB (WM_HELP) | |
3759 FROB (WM_USERCHANGED) | |
3760 FROB (WM_NOTIFYFORMAT) | |
3761 | |
3762 FROB (WM_CONTEXTMENU) | |
3763 FROB (WM_STYLECHANGING) | |
3764 FROB (WM_STYLECHANGED) | |
3765 FROB (WM_DISPLAYCHANGE) | |
3766 FROB (WM_GETICON) | |
3767 FROB (WM_SETICON) | |
3768 #endif /* WINVER >= 0x0400 */ | |
3769 | |
3770 FROB (WM_NCCREATE) | |
3771 FROB (WM_NCDESTROY) | |
3772 FROB (WM_NCCALCSIZE) | |
3773 FROB (WM_NCHITTEST) | |
3774 FROB (WM_NCPAINT) | |
3775 FROB (WM_NCACTIVATE) | |
3776 FROB (WM_GETDLGCODE) | |
3777 FROB (WM_SYNCPAINT) | |
3778 FROB (WM_NCMOUSEMOVE) | |
3779 FROB (WM_NCLBUTTONDOWN) | |
3780 FROB (WM_NCLBUTTONUP) | |
3781 FROB (WM_NCLBUTTONDBLCLK) | |
3782 FROB (WM_NCRBUTTONDOWN) | |
3783 FROB (WM_NCRBUTTONUP) | |
3784 FROB (WM_NCRBUTTONDBLCLK) | |
3785 FROB (WM_NCMBUTTONDOWN) | |
3786 FROB (WM_NCMBUTTONUP) | |
3787 FROB (WM_NCMBUTTONDBLCLK) | |
3788 | |
3789 /* FROB (WM_KEYFIRST) */ | |
3790 FROB (WM_KEYDOWN) | |
3791 FROB (WM_KEYUP) | |
3792 FROB (WM_CHAR) | |
3793 FROB (WM_DEADCHAR) | |
3794 FROB (WM_SYSKEYDOWN) | |
3795 FROB (WM_SYSKEYUP) | |
3796 FROB (WM_SYSCHAR) | |
3797 FROB (WM_SYSDEADCHAR) | |
3798 FROB (WM_KEYLAST) | |
3799 | |
3800 #if(WINVER >= 0x0400) | |
3801 FROB (WM_IME_STARTCOMPOSITION) | |
3802 FROB (WM_IME_ENDCOMPOSITION) | |
3803 FROB (WM_IME_COMPOSITION) | |
3804 FROB (WM_IME_KEYLAST) | |
3805 #endif /* WINVER >= 0x0400 */ | |
3806 | |
3807 FROB (WM_INITDIALOG) | |
3808 FROB (WM_COMMAND) | |
3809 FROB (WM_SYSCOMMAND) | |
3810 FROB (WM_TIMER) | |
3811 FROB (WM_HSCROLL) | |
3812 FROB (WM_VSCROLL) | |
3813 FROB (WM_INITMENU) | |
3814 FROB (WM_INITMENUPOPUP) | |
3815 FROB (WM_MENUSELECT) | |
3816 FROB (WM_MENUCHAR) | |
3817 FROB (WM_ENTERIDLE) | |
3818 #if(WINVER >= 0x0500) | |
3819 FROB (WM_MENURBUTTONUP) | |
3820 FROB (WM_MENUDRAG) | |
3821 FROB (WM_MENUGETOBJECT) | |
3822 FROB (WM_UNINITMENUPOPUP) | |
3823 FROB (WM_MENUCOMMAND) | |
3824 #endif /* WINVER >= 0x0500 */ | |
3825 | |
3826 | |
3827 FROB (WM_CTLCOLORMSGBOX) | |
3828 FROB (WM_CTLCOLOREDIT) | |
3829 FROB (WM_CTLCOLORLISTBOX) | |
3830 FROB (WM_CTLCOLORBTN) | |
3831 FROB (WM_CTLCOLORDLG) | |
3832 FROB (WM_CTLCOLORSCROLLBAR) | |
3833 FROB (WM_CTLCOLORSTATIC) | |
3834 | |
3835 | |
3836 /* FROB (WM_MOUSEFIRST) */ | |
3837 FROB (WM_MOUSEMOVE) | |
3838 FROB (WM_LBUTTONDOWN) | |
3839 FROB (WM_LBUTTONUP) | |
3840 FROB (WM_LBUTTONDBLCLK) | |
3841 FROB (WM_RBUTTONDOWN) | |
3842 FROB (WM_RBUTTONUP) | |
3843 FROB (WM_RBUTTONDBLCLK) | |
3844 FROB (WM_MBUTTONDOWN) | |
3845 FROB (WM_MBUTTONUP) | |
3846 FROB (WM_MBUTTONDBLCLK) | |
3847 | |
3848 #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) | |
3849 FROB (WM_MOUSEWHEEL) | |
3850 FROB (WM_MOUSELAST) | |
3851 #else | |
3852 FROB (WM_MOUSELAST) | |
3853 #endif /* if (_WIN32_WINNT < 0x0400) */ | |
3854 | |
3855 FROB (WM_PARENTNOTIFY) | |
3856 FROB (WM_ENTERMENULOOP) | |
3857 FROB (WM_EXITMENULOOP) | |
3858 | |
3859 #if(WINVER >= 0x0400) | |
3860 FROB (WM_NEXTMENU) | |
3861 | |
3862 FROB (WM_SIZING) | |
3863 FROB (WM_CAPTURECHANGED) | |
3864 FROB (WM_MOVING) | |
3865 FROB (WM_POWERBROADCAST) | |
3866 | |
3867 FROB (WM_DEVICECHANGE) | |
3868 | |
3869 #endif /* WINVER >= 0x0400 */ | |
3870 | |
3871 FROB (WM_MDICREATE) | |
3872 FROB (WM_MDIDESTROY) | |
3873 FROB (WM_MDIACTIVATE) | |
3874 FROB (WM_MDIRESTORE) | |
3875 FROB (WM_MDINEXT) | |
3876 FROB (WM_MDIMAXIMIZE) | |
3877 FROB (WM_MDITILE) | |
3878 FROB (WM_MDICASCADE) | |
3879 FROB (WM_MDIICONARRANGE) | |
3880 FROB (WM_MDIGETACTIVE) | |
3881 | |
3882 | |
3883 FROB (WM_MDISETMENU) | |
3884 FROB (WM_ENTERSIZEMOVE) | |
3885 FROB (WM_EXITSIZEMOVE) | |
3886 FROB (WM_DROPFILES) | |
3887 FROB (WM_MDIREFRESHMENU) | |
3888 | |
3889 | |
3890 #if(WINVER >= 0x0400) | |
3891 FROB (WM_IME_SETCONTEXT) | |
3892 FROB (WM_IME_NOTIFY) | |
3893 FROB (WM_IME_CONTROL) | |
3894 FROB (WM_IME_COMPOSITIONFULL) | |
3895 FROB (WM_IME_SELECT) | |
3896 FROB (WM_IME_CHAR) | |
3897 #endif /* WINVER >= 0x0400 */ | |
3898 #if(WINVER >= 0x0500) | |
3899 FROB (WM_IME_REQUEST) | |
3900 #endif /* WINVER >= 0x0500 */ | |
3901 #if(WINVER >= 0x0400) | |
3902 FROB (WM_IME_KEYDOWN) | |
3903 FROB (WM_IME_KEYUP) | |
3904 #endif /* WINVER >= 0x0400 */ | |
3905 | |
3906 | |
3907 #if(_WIN32_WINNT >= 0x0400) | |
3908 FROB (WM_MOUSEHOVER) | |
3909 FROB (WM_MOUSELEAVE) | |
3910 #endif /* _WIN32_WINNT >= 0x0400 */ | |
3911 | |
3912 FROB (WM_CUT) | |
3913 FROB (WM_COPY) | |
3914 FROB (WM_PASTE) | |
3915 FROB (WM_CLEAR) | |
3916 FROB (WM_UNDO) | |
3917 FROB (WM_RENDERFORMAT) | |
3918 FROB (WM_RENDERALLFORMATS) | |
3919 FROB (WM_DESTROYCLIPBOARD) | |
3920 FROB (WM_DRAWCLIPBOARD) | |
3921 FROB (WM_PAINTCLIPBOARD) | |
3922 FROB (WM_VSCROLLCLIPBOARD) | |
3923 FROB (WM_SIZECLIPBOARD) | |
3924 FROB (WM_ASKCBFORMATNAME) | |
3925 FROB (WM_CHANGECBCHAIN) | |
3926 FROB (WM_HSCROLLCLIPBOARD) | |
3927 FROB (WM_QUERYNEWPALETTE) | |
3928 FROB (WM_PALETTEISCHANGING) | |
3929 FROB (WM_PALETTECHANGED) | |
3930 FROB (WM_HOTKEY) | |
3931 | |
3932 #if(WINVER >= 0x0400) | |
3933 FROB (WM_PRINT) | |
3934 FROB (WM_PRINTCLIENT) | |
3935 | |
3936 FROB (WM_HANDHELDFIRST) | |
3937 FROB (WM_HANDHELDLAST) | |
3938 | |
3939 FROB (WM_AFXFIRST) | |
3940 FROB (WM_AFXLAST) | |
3941 #endif /* WINVER >= 0x0400 */ | |
3942 | |
3943 FROB (WM_PENWINFIRST) | |
3944 FROB (WM_PENWINLAST) | |
3945 }; | |
3946 | |
3947 #undef FROB | |
3948 | |
3949 static void | |
3950 debug_output_mswin_message (HWND hwnd, UINT message_, WPARAM wParam, | |
3951 LPARAM lParam) | |
3952 { | |
3953 Lisp_Object frame = mswindows_find_frame (hwnd); | |
3954 int i; | |
3955 char *str = 0; | |
3956 /* struct mswin_message_debug *i_hate_cranking_out_code_like_this; */ | |
3957 | |
3958 for (i = 0; i < countof (debug_mswin_messages); i++) | |
3959 { | |
3960 if (debug_mswin_messages[i].mess == message_) | |
3961 { | |
3962 str = debug_mswin_messages[i].string; | |
3963 break; | |
3964 } | |
3965 } | |
3966 | |
3967 if (str) | |
3968 stderr_out ("%s", str); | |
3969 else | |
3970 stderr_out ("%x", message_); | |
3971 | |
3972 if (debug_mswindows_events > 1) | |
3973 { | |
3974 stderr_out (" wparam=%d lparam=%d hwnd=%x frame: ", | |
3975 wParam, (int) lParam, (unsigned int) hwnd); | |
3976 debug_print (frame); | |
3977 } | |
3978 else | |
3979 stderr_out ("\n"); | |
3980 } | |
3981 | |
3982 #endif /* DEBUG_XEMACS */ | |
3636 | 3983 |
3637 /************************************************************************/ | 3984 /************************************************************************/ |
3638 /* initialization */ | 3985 /* initialization */ |
3639 /************************************************************************/ | 3986 /************************************************************************/ |
3640 | 3987 |
3691 staticpro (&mswindows_error_caught_in_modal_loop); | 4038 staticpro (&mswindows_error_caught_in_modal_loop); |
3692 | 4039 |
3693 | 4040 |
3694 #ifdef DEBUG_XEMACS | 4041 #ifdef DEBUG_XEMACS |
3695 DEFVAR_INT ("debug-mswindows-events", &debug_mswindows_events /* | 4042 DEFVAR_INT ("debug-mswindows-events", &debug_mswindows_events /* |
3696 If non-zero, display debug information about Windows events that XEmacs sees. | 4043 If non-zero, display debug information about Windows messages that XEmacs sees. |
3697 Information is displayed in a console window. Currently defined values are: | 4044 Information is displayed in a console window. Currently defined values are: |
3698 | 4045 |
3699 1 == non-verbose output | 4046 1 == non-verbose output (just the message name) |
3700 2 == verbose output | 4047 2 == verbose output (all parameters) |
3701 | 4048 3 == even more verbose output (extra debugging info) |
3702 #### Unfortunately, not yet implemented. | |
3703 */ ); | 4049 */ ); |
3704 debug_mswindows_events = 0; | 4050 debug_mswindows_events = 0; |
3705 #endif | 4051 #endif |
3706 | 4052 |
3707 DEFVAR_BOOL ("mswindows-alt-by-itself-activates-menu", | 4053 DEFVAR_BOOL ("mswindows-alt-by-itself-activates-menu", |