Changeset 4093
- Timestamp:
- 2006年06月10日 09時30分32秒 (2 years ago)
- Files:
-
- trunk/src/ChangeLog.Meadow (modified) (1 diff)
- trunk/src/mw32fns.c (modified) (12 diffs)
- trunk/src/mw32ime.c (modified) (14 diffs)
- trunk/src/mw32reg.c (modified) (2 diffs)
- trunk/src/mw32term.c (modified) (2 diffs)
- trunk/src/mw32term.h (modified) (4 diffs)
- trunk/src/xdisp.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/ChangeLog.Meadow
r4092 r4093 1 2006-06-10 MIYOSHI Masanori <miyoshi@meadowy.org> 2 3 * mw32fns.c: Normalize coding style and remove redundant spaces. 4 5 * mw32fns.c: Ditto. 6 7 * mw32ime.c: Ditto. 8 9 * mw32reg.c: Ditto. 10 11 * mw32term.c: Ditto. 12 13 * mw32term.h: Ditto. 14 15 * xdisp.c: Ditto. 16 1 17 2006-06-10 MIYOSHI Masanori <miyoshi@meadowy.org> 2 18 trunk/src/mw32fns.c
r4088 r4093 55 55 56 56 /* internal functions */ 57 static struct mw32_display_info *mw32_display_info_for_name P_ ((Lisp_Object name)); 58 59 LRESULT CALLBACK mw32_WndProc P_((HWND hwnd, UINT msg, 60 WPARAM wParam, LPARAM lParam)); 57 static struct mw32_display_info *mw32_display_info_for_name P_ ((Lisp_Object)); 58 59 LRESULT CALLBACK mw32_WndProc P_((HWND, UINT, WPARAM , LPARAM)); 61 60 62 61 /* The shape when over mouse-sensitive text. */ … … 325 324 326 325 DEFUN ("mw32-default-color-map", Fmw32_default_color_map, 327 Smw32_default_color_map, 0, 0, 0, doc: /* Return the default color map. */) 326 Smw32_default_color_map, 0, 0, 0, 327 doc: /* Return the default color map. */) 328 328 () 329 329 { … … 2433 2433 { /* Cancelling composition string */ 2434 2434 mw32_ime_cancel_input_function (); 2435 }2435 } 2436 2436 2437 2437 goto dflt; … … 2769 2769 FRAME_MW32_WINDOW (f) = hwnd; 2770 2770 2771 f->output_data.mw32->mainthread_to_frame_handle = CreateEvent (0, TRUE, TRUE, NULL); 2771 f->output_data.mw32->mainthread_to_frame_handle = CreateEvent (0, TRUE, 2772 TRUE, NULL); 2772 2773 2773 2774 validate_x_resource_name (); … … 2871 2872 #endif 2872 2873 2873 name = x_get_arg (dpyinfo, parameters, Qname, "name", "Name", RES_TYPE_STRING); 2874 name = x_get_arg (dpyinfo, parameters, Qname, "name", "Name", 2875 RES_TYPE_STRING); 2874 2876 if (!STRINGP (name) 2875 2877 && ! EQ (name, Qunbound) … … 2882 2884 #if 0 2883 2885 /* See if parent window is specified. */ 2884 parent = x_get_arg (dpyinfo, parameters, Qparent_id, NULL, NULL, RES_TYPE_NUMBER); 2886 parent = x_get_arg (dpyinfo, parameters, Qparent_id, NULL, NULL, 2887 RES_TYPE_NUMBER); 2885 2888 if (EQ (parent, Qunbound)) 2886 2889 parent = Qnil; … … 2896 2899 frame = Qnil; 2897 2900 GCPRO4 (parameters, parent, name, frame); 2898 tem = x_get_arg (dpyinfo, parameters, Qminibuffer, "minibuffer", "Minibuffer",2899 RES_TYPE_SYMBOL);2901 tem = x_get_arg (dpyinfo, parameters, Qminibuffer, "minibuffer", 2902 "Minibuffer", RES_TYPE_SYMBOL); 2900 2903 if (EQ (tem, Qnone) || NILP (tem)) 2901 2904 f = make_frame_without_minibuffer (Qnil, kb, display); … … 3055 3058 Lisp_Object font, fontset; 3056 3059 3057 font = x_get_arg (dpyinfo, parameters, Qfont, "font", "Font", RES_TYPE_STRING); 3060 font = x_get_arg (dpyinfo, parameters, Qfont, "font", "Font", 3061 RES_TYPE_STRING); 3058 3062 if (! STRINGP (font)) 3059 3063 font = build_string ("default"); … … 3095 3099 3096 3100 value = x_get_arg (dpyinfo, parameters, Qinternal_border_width, 3097 "internalBorder", "internalBorder", RES_TYPE_NUMBER);3101 "internalBorder", "internalBorder", RES_TYPE_NUMBER); 3098 3102 if (! EQ (value, Qunbound)) 3099 3103 parameters = Fcons (Fcons (Qinternal_border_width, value), … … 3108 3112 3109 3113 /* Also do the stuff which must be set before the window exists. */ 3110 x_default_parameter (f, parameters, Qforeground_color, build_string ("black"), 3114 x_default_parameter (f, parameters, Qforeground_color, 3115 build_string ("black"), 3111 3116 "foreground", "Foreground", RES_TYPE_STRING); 3112 x_default_parameter (f, parameters, Qbackground_color, build_string ("white"), 3117 x_default_parameter (f, parameters, Qbackground_color, 3118 build_string ("white"), 3113 3119 "background", "Background", RES_TYPE_STRING); 3114 3120 x_default_parameter (f, parameters, Qmouse_color, build_string ("black"), … … 3193 3199 "alpha", "Alpha", RES_TYPE_NUMBER); 3194 3200 3195 /* Dimensions, especially FRAME_LINES (f), must be done via change_frame_size.3196 Change will not be effected unless different from the current3197 FRAME_LINES (f). */3201 /* Dimensions, especially FRAME_LINES (f), must be done via 3202 change_frame_size. Change will not be effected unless different 3203 from the current FRAME_LINES (f). */ 3198 3204 width = FRAME_COLS (f); 3199 3205 height = FRAME_LINES (f); … … 4636 4642 LPTSTR filename_tmp; 4637 4643 4638 filename_tmp = mw32_encode_lispy_string (Vlocale_coding_system, file, &size); 4644 filename_tmp = mw32_encode_lispy_string (Vlocale_coding_system, 4645 file, &size); 4639 4646 memcpy (filename, filename_tmp, size); 4640 4647 filename[size / sizeof (filename[0])] = '\0'; trunk/src/mw32ime.c
r4074 r4093 302 302 if (waiting_on_main_thread) 303 303 choke_keystroke = TRUE; 304 304 305 305 hIMC = (ImmGetContextProc) (hwnd); 306 306 if (!hIMC) return FALSE; … … 325 325 PostMessage (NULL, WM_MULE_IME_REPORT, 326 326 (WPARAM) himestr, (LPARAM) f); 327 } 327 } 328 328 return TRUE; 329 329 } … … 361 361 PostMessage (NULL, WM_MULE_IME_REPORT, 362 362 (WPARAM) himestr, (LPARAM) f); 363 } 363 } 364 364 return TRUE; 365 365 } … … 870 870 orgctrlstate = ctrlstate = (GetKeyState (VK_CONTROL) & 0x80) != 0; 871 871 orgshiftstate = shiftstate = (GetKeyState (VK_SHIFT) & 0x80) != 0; 872 872 873 873 /* str assumed not to contain non-ascii characters. */ 874 874 for (p = str ; *p ; p++) … … 895 895 mw32_send_key_input (vk, sc, 0); 896 896 } 897 897 898 898 mw32_change_shift_state (&ctrlstate, orgctrlstate, 899 899 &shiftstate, orgshiftstate); … … 924 924 { 925 925 waiting_on_main_thread = FALSE; 926 926 927 927 if (input_method_function_string != INVALID_HANDLE_VALUE) 928 928 GlobalFree (input_method_function_string); 929 929 930 930 input_method_function_string = INVALID_HANDLE_VALUE; 931 931 932 932 SetEvent (input_method_function_event); 933 } 933 } 934 934 935 935 Lisp_Object … … 1029 1029 input_method_function_string = INVALID_HANDLE_VALUE; 1030 1030 resultstr = compstr = result = Qnil; 1031 1031 1032 1032 if (hstr != INVALID_HANDLE_VALUE) 1033 1033 { … … 1037 1037 resultstr = make_string (str, strlen (str)); 1038 1038 resultstr = DECODE_SYSTEM (resultstr); 1039 } 1040 1039 } 1040 1041 1041 GlobalUnlock (hstr); 1042 1042 GlobalFree (hstr); … … 1058 1058 compstr = make_string (str, strlen (str)); 1059 1059 compstr = DECODE_SYSTEM (compstr); 1060 } 1061 1060 } 1061 1062 1062 GlobalUnlock (hstr); 1063 1063 GlobalFree (hstr); … … 1214 1214 {IME_CMODE_SYMBOL, "symbol", "nosymbol"}, 1215 1215 {IME_CMODE_SOFTKBD, "softkbd", "nosoftkbd"}, 1216 {IME_CMODE_ROMAN, "roman", "noroman"},1216 {IME_CMODE_ROMAN, "roman", "noroman"}, 1217 1217 {IME_CMODE_NOCONVERSION, "noconversion", "conversion"}, 1218 1218 {IME_CMODE_NATIVE , "native", "nonative"}, … … 1229 1229 {0, NULL} 1230 1230 }; 1231 1231 1232 1232 1233 1233 DEFUN ("imm-get-conversion-status", 1234 Fimm_get_conversion_status, Simm_get_conversion_status, 1234 Fimm_get_conversion_status, Simm_get_conversion_status, 1235 1235 0, 0, 0, doc: /* not documented */) 1236 1236 () … … 1249 1249 ret = Qnil; 1250 1250 used = 0; 1251 1251 1252 1252 if (ImmGetConversionStatusProc 1253 1253 && ImmGetConversionStatusProc (himc, &dwConversion, &dwSentence)) … … 1258 1258 { 1259 1259 used |= cmode_list[i].mask; 1260 1260 1261 1261 if (dwConversion & cmode_list[i].mask) 1262 1262 ret = Fcons (intern (cmode_list[i].posi_symbol), ret); … … 1265 1265 } 1266 1266 } 1267 } 1268 1267 } 1268 1269 1269 (ImmReleaseContextProc) (hwnd, himc); 1270 1270 return ret; trunk/src/mw32reg.c
r4003 r4093 1035 1035 && (NILP (hhword) || hdw == 0)) 1036 1036 || ((dw & mask) == mask /* negative number */ 1037 && (NILP (hhword) || hdw == ~((DWORD)0)))) 1037 && (NILP (hhword) || hdw == ~((DWORD)0)))) 1038 1038 { 1039 1039 return make_number ((long)dw); … … 1044 1044 Fsignal (Qoverflow_error, registry_integer_overflow_data); 1045 1045 } 1046 1046 1047 1047 /* never come here */ 1048 1048 return Qnil; trunk/src/mw32term.c
r4092 r4093 566 566 return; 567 567 } 568 568 569 569 main_thread_hdc_hwnd = FRAME_MW32_WINDOW (f); 570 570 EnterCriticalSection (&(f->output_data.mw32->hdc_critsec)); … … 669 669 hwnd = FRAME_MW32_WINDOW (f); 670 670 } 671 671 672 672 (*pcount)--; 673 673 if (*pcount > 0) trunk/src/mw32term.h
r4069 r4093 54 54 #define MW32_FRAME_CARET_STATE(f) ((f)->output_data.mw32->caret_state) 55 55 /* safe with abandoned frame */ 56 #define MW32_FRAME_CARET_STATE2(f) ((f)->output_data.mw32?(f)->output_data.mw32->caret_state : NO_CARET) 56 #define MW32_FRAME_CARET_STATE2(f) \ 57 ((f)->output_data.mw32?(f)->output_data.mw32->caret_state : NO_CARET) 57 58 #define MW32_FRAME_CARET_BLOCKED(f) ((f)->output_data.mw32->caret_blocked) 58 59 #define MW32_FRAME_CARET_SHOWN(f) (MW32_FRAME_CARET_STATE(f) > TOBESHOWN_CARET) … … 549 550 550 551 #define RELEASE_FRAME_HDC(f) \ 551 if (FRAME_WINDOW_P (f)) \552 if (FRAME_WINDOW_P (f)) \ 552 553 { \ 553 554 int *pcount; \ … … 555 556 if (MW32_MAIN_THREAD_P ()) \ 556 557 { \ 557 phdc = &main_thread_hdc; \558 pcount = &main_thread_hdc_nestlevel; \558 phdc = &main_thread_hdc; \ 559 pcount = &main_thread_hdc_nestlevel; \ 559 560 } \ 560 561 else \ 561 562 { \ 562 phdc = &((f)->output_data.mw32->hdc); \563 pcount = &((f)->output_data.mw32->hdc_nestlevel); \563 phdc = &((f)->output_data.mw32->hdc); \ 564 pcount = &((f)->output_data.mw32->hdc_nestlevel); \ 564 565 } \ 565 566 if (*phdc == INVALID_HANDLE_VALUE) \ 566 abort ();\567 abort (); \ 567 568 else \ 568 569 { \ … … 577 578 signalling. This macro does force release of hdc. */ 578 579 #define CLEANUP_FRAME_HDC(f) \ 579 if (FRAME_WINDOW_P (f)) \580 if (FRAME_WINDOW_P (f)) \ 580 581 { \ 581 582 if (MW32_MAIN_THREAD_P ()) \ 582 583 { \ 583 584 if (main_thread_hdc != INVALID_HANDLE_VALUE) \ 584 { \585 main_thread_hdc_nestlevel = 1; \586 update_end_hook (f); \587 } \585 { \ 586 main_thread_hdc_nestlevel = 1; \ 587 update_end_hook (f); \ 588 } \ 588 589 } \ 589 590 else \ 590 591 { \ 591 592 if ((f)->output_data.mw32->hdc != INVALID_HANDLE_VALUE) \ 592 { \593 { \ 593 594 (f)->output_data.mw32->hdc_nestlevel = 1; \ 594 update_end_hook (f); \595 } \595 update_end_hook (f); \ 596 } \ 596 597 } \ 597 598 } trunk/src/xdisp.c
r4088 r4093 22781 22781 #ifdef MEADOW 22782 22782 if (!MW32_MAIN_THREAD_P ()) 22783 {22784 SuspendThread (main_thread);22785 }22783 { 22784 SuspendThread (main_thread); 22785 } 22786 22786 #endif 22787 22787 /* Make the window's buffer temporarily current for … … 23129 23129 #ifdef MEADOW 23130 23130 if (!MW32_MAIN_THREAD_P ()) 23131 {23132 ResumeThread (main_thread);23133 }23131 { 23132 ResumeThread (main_thread); 23133 } 23134 23134 #endif 23135 23135 }
