Mercurial > hg > xemacs-beta
comparison src/event-msw.c @ 867:804517e16990
[xemacs-hg @ 2002-06-05 09:54:39 by ben]
Textual renaming: text/char names
abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, callint.c, casefiddle.c, casetab.c, charset.h, chartab.c, chartab.h, cmds.c, console-gtk.h, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console-x.h, console.h, data.c, device-msw.c, device-x.c, dialog-msw.c, dired-msw.c, dired.c, doc.c, doprnt.c, editfns.c, eldap.c, emodules.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-unixoid.c, events.c, events.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, font-lock.c, frame-gtk.c, frame-msw.c, frame-x.c, frame.c, glyphs-eimage.c, glyphs-msw.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-x.c, gui-x.h, gui.c, gui.h, hpplay.c, indent.c, insdel.c, insdel.h, intl-win32.c, keymap.c, line-number.c, line-number.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, md5.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-ccl.c, mule-charset.c, mule-coding.c, mule-wnnfns.c, ndir.h, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, procimpl.h, realpath.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, redisplay.h, regex.c, search.c, select-common.h, select-gtk.c, select-x.c, sound.h, symbols.c, syntax.c, syntax.h, sysdep.c, sysdep.h, sysdir.h, sysfile.h, sysproc.h, syspwd.h, systime.h, syswindows.h, termcap.c, tests.c, text.c, text.h, toolbar-common.c, tooltalk.c, ui-gtk.c, unexnt.c, unicode.c, win32.c: Text/char naming rationalization.
[a] distinguish between "charptr" when it refers to operations on
the pointer itself and when it refers to operations on text; and
[b] use consistent naming for everything referring to internal
format, i.e.
Itext == text in internal format
Ibyte == a byte in such text
Ichar == a char as represented in internal character format
thus e.g.
set_charptr_emchar -> set_itext_ichar
The pre and post tags on either side of this change are:
pre-internal-format-textual-renaming
post-internal-format-textual-renaming
See the Internals Manual for details of exactly how this was done,
how to handle the change in your workspace, etc.
author | ben |
---|---|
date | Wed, 05 Jun 2002 09:58:45 +0000 |
parents | b27b70c1252a |
children | 79c6ff3eef26 |
comparison
equal
deleted
inserted
replaced
866:613552a02607 | 867:804517e16990 |
---|---|
1767 | 1767 |
1768 if (!DdeCmpStringHandles (hszTopic, mswindows_dde_topic_system)) | 1768 if (!DdeCmpStringHandles (hszTopic, mswindows_dde_topic_system)) |
1769 { | 1769 { |
1770 DWORD len = DdeGetData (hdata, NULL, 0, 0); | 1770 DWORD len = DdeGetData (hdata, NULL, 0, 0); |
1771 LPBYTE extcmd = (LPBYTE) ALLOCA (len + 1); | 1771 LPBYTE extcmd = (LPBYTE) ALLOCA (len + 1); |
1772 Intbyte *cmd; | 1772 Ibyte *cmd; |
1773 Intbyte *end; | 1773 Ibyte *end; |
1774 struct gcpro gcpro1, gcpro2; | 1774 struct gcpro gcpro1, gcpro2; |
1775 Lisp_Object l_dndlist = Qnil; | 1775 Lisp_Object l_dndlist = Qnil; |
1776 Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); | 1776 Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); |
1777 Lisp_Object frmcons, devcons, concons; | 1777 Lisp_Object frmcons, devcons, concons; |
1778 Lisp_Event *event = XEVENT (emacs_event); | 1778 Lisp_Event *event = XEVENT (emacs_event); |
2359 if (sticky_changed) | 2359 if (sticky_changed) |
2360 SetKeyboardState (keymap_orig); | 2360 SetKeyboardState (keymap_orig); |
2361 } | 2361 } |
2362 else /* Normal keys & modifiers */ | 2362 else /* Normal keys & modifiers */ |
2363 { | 2363 { |
2364 Emchar quit_ch = | 2364 Ichar quit_ch = |
2365 CONSOLE_QUIT_CHAR (XCONSOLE (mswindows_find_console (hwnd))); | 2365 CONSOLE_QUIT_CHAR (XCONSOLE (mswindows_find_console (hwnd))); |
2366 POINT pnt = { LOWORD (GetMessagePos()), HIWORD (GetMessagePos()) }; | 2366 POINT pnt = { LOWORD (GetMessagePos()), HIWORD (GetMessagePos()) }; |
2367 MSG msg, tranmsg; | 2367 MSG msg, tranmsg; |
2368 int potential_accelerator = 0; | 2368 int potential_accelerator = 0; |
2369 int got_accelerator = 0; | 2369 int got_accelerator = 0; |
2424 PM_REMOVE)) | 2424 PM_REMOVE)) |
2425 { | 2425 { |
2426 int mods_with_quit = mods; | 2426 int mods_with_quit = mods; |
2427 int length; | 2427 int length; |
2428 Extbyte extchar[4]; | 2428 Extbyte extchar[4]; |
2429 Intbyte *intchar; | 2429 Ibyte *intchar; |
2430 Emchar ch; | 2430 Ichar ch; |
2431 | 2431 |
2432 if (XEUNICODE_P) | 2432 if (XEUNICODE_P) |
2433 { | 2433 { |
2434 length = unicode_char_to_text (tranmsg.wParam, extchar); | 2434 length = unicode_char_to_text (tranmsg.wParam, extchar); |
2435 TO_INTERNAL_FORMAT (DATA, (extchar, length), | 2435 TO_INTERNAL_FORMAT (DATA, (extchar, length), |
2436 C_STRING_ALLOCA, (intchar), | 2436 C_STRING_ALLOCA, (intchar), |
2437 Qmswindows_unicode); | 2437 Qmswindows_unicode); |
2438 ch = charptr_emchar (intchar); | 2438 ch = itext_ichar (intchar); |
2439 } | 2439 } |
2440 else | 2440 else |
2441 { | 2441 { |
2442 length = ansi_char_to_text (tranmsg.wParam, extchar); | 2442 length = ansi_char_to_text (tranmsg.wParam, extchar); |
2443 intchar = (convert_multibyte_to_internal_malloc | 2443 intchar = (convert_multibyte_to_internal_malloc |
2445 mswindows_locale_to_code_page | 2445 mswindows_locale_to_code_page |
2446 /* See intl-win32.c for an explanation of | 2446 /* See intl-win32.c for an explanation of |
2447 the following */ | 2447 the following */ |
2448 ((LCID) GetKeyboardLayout (0) & 0xFFFF), | 2448 ((LCID) GetKeyboardLayout (0) & 0xFFFF), |
2449 NULL)); | 2449 NULL)); |
2450 ch = charptr_emchar (intchar); | 2450 ch = itext_ichar (intchar); |
2451 xfree (intchar); | 2451 xfree (intchar); |
2452 } | 2452 } |
2453 | 2453 |
2454 #ifdef DEBUG_XEMACS | 2454 #ifdef DEBUG_XEMACS |
2455 if (debug_mswindows_events) | 2455 if (debug_mswindows_events) |
2563 bit 0 is set, a menu is | 2563 bit 0 is set, a menu is |
2564 active???" */ | 2564 active???" */ |
2565 (HKL) lcid); | 2565 (HKL) lcid); |
2566 if (tounret > 0) | 2566 if (tounret > 0) |
2567 { | 2567 { |
2568 Intbyte *intchar; | 2568 Ibyte *intchar; |
2569 | 2569 |
2570 TO_INTERNAL_FORMAT | 2570 TO_INTERNAL_FORMAT |
2571 (DATA, | 2571 (DATA, |
2572 (received_keys + (tounret - 1) * 2, 2), | 2572 (received_keys + (tounret - 1) * 2, 2), |
2573 C_STRING_ALLOCA, intchar, | 2573 C_STRING_ALLOCA, intchar, |
2574 Qmswindows_unicode); | 2574 Qmswindows_unicode); |
2575 XEVENT (lastev)->event.key.alt_keychars[i] = | 2575 XEVENT (lastev)->event.key.alt_keychars[i] = |
2576 charptr_emchar (intchar); | 2576 itext_ichar (intchar); |
2577 } | 2577 } |
2578 } | 2578 } |
2579 else | 2579 else |
2580 { | 2580 { |
2581 WORD received_keys[32]; | 2581 WORD received_keys[32]; |
2592 documentation on what format the | 2592 documentation on what format the |
2593 return value is in. I'm assuming | 2593 return value is in. I'm assuming |
2594 it's like WM_IME_CHAR: DBCS chars | 2594 it's like WM_IME_CHAR: DBCS chars |
2595 have the lead byte in bits 8-15 of | 2595 have the lead byte in bits 8-15 of |
2596 the short. */ | 2596 the short. */ |
2597 Intbyte *intchar; | 2597 Ibyte *intchar; |
2598 Extbyte mbstuff[2]; | 2598 Extbyte mbstuff[2]; |
2599 Bytecount mblength = 0; | 2599 Bytecount mblength = 0; |
2600 WORD thechar = received_keys[tounret - 1]; | 2600 WORD thechar = received_keys[tounret - 1]; |
2601 | 2601 |
2602 mbstuff[mblength++] = | 2602 mbstuff[mblength++] = |
2609 (mbstuff, mblength, | 2609 (mbstuff, mblength, |
2610 mswindows_locale_to_code_page (lcid), | 2610 mswindows_locale_to_code_page (lcid), |
2611 NULL); | 2611 NULL); |
2612 | 2612 |
2613 XEVENT (lastev)->event.key.alt_keychars[i] = | 2613 XEVENT (lastev)->event.key.alt_keychars[i] = |
2614 charptr_emchar (intchar); | 2614 itext_ichar (intchar); |
2615 xfree (intchar); | 2615 xfree (intchar); |
2616 } | 2616 } |
2617 } | 2617 } |
2618 } | 2618 } |
2619 else | 2619 else |
2620 { | 2620 { |
2621 Emchar altch; | 2621 Ichar altch; |
2622 | 2622 |
2623 if (virtual_key >= 'A' && virtual_key <= 'Z') | 2623 if (virtual_key >= 'A' && virtual_key <= 'Z') |
2624 altch = | 2624 altch = |
2625 virtual_key + (mods_with_shift & XEMACS_MOD_SHIFT ? | 2625 virtual_key + (mods_with_shift & XEMACS_MOD_SHIFT ? |
2626 'a' - 'A' : 0); | 2626 'a' - 'A' : 0); |
3352 event->event.misc.function = Qdragdrop_drop_dispatch; | 3352 event->event.misc.function = Qdragdrop_drop_dispatch; |
3353 | 3353 |
3354 filecount = qxeDragQueryFile ((HDROP) wParam, 0xffffffff, NULL, 0); | 3354 filecount = qxeDragQueryFile ((HDROP) wParam, 0xffffffff, NULL, 0); |
3355 for (i = 0; i < filecount; i++) | 3355 for (i = 0; i < filecount; i++) |
3356 { | 3356 { |
3357 Intbyte *fname; | 3357 Ibyte *fname; |
3358 Extbyte *fname_ext; | 3358 Extbyte *fname_ext; |
3359 Bytecount fnamelen; | 3359 Bytecount fnamelen; |
3360 Charcount len = qxeDragQueryFile ((HDROP) wParam, i, NULL, 0); | 3360 Charcount len = qxeDragQueryFile ((HDROP) wParam, i, NULL, 0); |
3361 /* The URLs that we make here aren't correct according to section | 3361 /* The URLs that we make here aren't correct according to section |
3362 * 3.10 of rfc1738 because they're missing the //<host>/ part and | 3362 * 3.10 of rfc1738 because they're missing the //<host>/ part and |
3543 if (lParam & GCS_RESULTSTR) | 3543 if (lParam & GCS_RESULTSTR) |
3544 { | 3544 { |
3545 HIMC imc = ImmGetContext (hwnd); | 3545 HIMC imc = ImmGetContext (hwnd); |
3546 Extbyte *result; | 3546 Extbyte *result; |
3547 Bytecount len; | 3547 Bytecount len; |
3548 Intbyte *resultint, *endptr; | 3548 Ibyte *resultint, *endptr; |
3549 Bytecount lenint; | 3549 Bytecount lenint; |
3550 int speccount; | 3550 int speccount; |
3551 | 3551 |
3552 if (!imc) | 3552 if (!imc) |
3553 break; | 3553 break; |
3569 | 3569 |
3570 endptr = resultint + lenint; | 3570 endptr = resultint + lenint; |
3571 | 3571 |
3572 while (resultint < endptr) | 3572 while (resultint < endptr) |
3573 { | 3573 { |
3574 Emchar ch = charptr_emchar (resultint); | 3574 Ichar ch = itext_ichar (resultint); |
3575 if (ch == ' ') | 3575 if (ch == ' ') |
3576 mswindows_enqueue_keypress_event (hwnd, QKspace, 0); | 3576 mswindows_enqueue_keypress_event (hwnd, QKspace, 0); |
3577 else | 3577 else |
3578 mswindows_enqueue_keypress_event (hwnd, make_char (ch), 0); | 3578 mswindows_enqueue_keypress_event (hwnd, make_char (ch), 0); |
3579 INC_CHARPTR (resultint); | 3579 INC_IBYTEPTR (resultint); |
3580 } | 3580 } |
3581 | 3581 |
3582 unbind_to (speccount); | 3582 unbind_to (speccount); |
3583 } | 3583 } |
3584 goto defproc; | 3584 goto defproc; |