いらないメソッドの削除
@@ -1689,16 +1689,6 @@ | ||
1689 | 1689 | |
1690 | 1690 | |
1691 | 1691 | /*-------------------------------------------------------------------- |
1692 | - IME位置設定 | |
1693 | - ---------------------------------------------------------------------*/ | |
1694 | -static VALUE Input_IME_setcursor( VALUE obj, VALUE vx, VALUE vy ) | |
1695 | -{ | |
1696 | - SetImeCursor( NUM2INT( vx ), NUM2INT( vy ) ); | |
1697 | - return Qnil; | |
1698 | -} | |
1699 | - | |
1700 | - | |
1701 | -/*-------------------------------------------------------------------- | |
1702 | 1692 | IMEのenable |
1703 | 1693 | ---------------------------------------------------------------------*/ |
1704 | 1694 | static VALUE Input_IME_setenable( VALUE obj, VALUE vflag ) |
@@ -1718,17 +1708,6 @@ | ||
1718 | 1708 | |
1719 | 1709 | |
1720 | 1710 | /*-------------------------------------------------------------------- |
1721 | - IMEのフォント設定 | |
1722 | - ---------------------------------------------------------------------*/ | |
1723 | -static VALUE Input_IME_setfont( VALUE obj, VALUE vfont ) | |
1724 | -{ | |
1725 | - DXRUBY_CHECK_TYPE( Font, vfont ); | |
1726 | - SetImeFont( vfont ); | |
1727 | - return vfont; | |
1728 | -} | |
1729 | - | |
1730 | - | |
1731 | -/*-------------------------------------------------------------------- | |
1732 | 1711 | IMEの状態取得 |
1733 | 1712 | ---------------------------------------------------------------------*/ |
1734 | 1713 | static VALUE Input_IME_getcompositing( VALUE obj ) |
@@ -2415,12 +2394,8 @@ | ||
2415 | 2394 | /* Input::IMEモジュールにメソッド登録 */ |
2416 | 2395 | rb_define_singleton_method( mIME, "get_string" , Input_IME_getstring , 0 ); |
2417 | 2396 | rb_define_singleton_method( mIME, "getString" , Input_IME_getstring , 0 ); |
2418 | - rb_define_singleton_method( mIME, "set_cursor" , Input_IME_setcursor , 2 ); | |
2419 | - rb_define_singleton_method( mIME, "setCursor" , Input_IME_setcursor , 2 ); | |
2420 | 2397 | rb_define_singleton_method( mIME, "enabled?" , Input_IME_getenable , 0 ); |
2421 | 2398 | rb_define_singleton_method( mIME, "enable=" , Input_IME_setenable , 1 ); |
2422 | - rb_define_singleton_method( mIME, "set_font" , Input_IME_setfont , 1 ); | |
2423 | - rb_define_singleton_method( mIME, "setFont" , Input_IME_setfont , 1 ); | |
2424 | 2399 | rb_define_singleton_method( mIME, "compositing?" , Input_IME_getcompositing , 0 ); |
2425 | 2400 | rb_define_singleton_method( mIME, "push_keys", Input_IME_getpushkeys , 0 ); |
2426 | 2401 | rb_define_singleton_method( mIME, "pushKeys" , Input_IME_getpushkeys , 0 ); |
@@ -2427,6 +2402,7 @@ | ||
2427 | 2402 | rb_define_singleton_method( mIME, "release_keys", Input_IME_getreleasekeys , 0 ); |
2428 | 2403 | rb_define_singleton_method( mIME, "releaseKeys" , Input_IME_getreleasekeys , 0 ); |
2429 | 2404 | rb_define_singleton_method( mIME, "get_comp_info" , Input_IME_getcompositioninfo , 0 ); |
2405 | + rb_define_singleton_method( mIME, "getCompInfo" , Input_IME_getcompositioninfo , 0 ); | |
2430 | 2406 | |
2431 | 2407 | rb_define_const( mIME, "ATTR_INPUT" , INT2FIX(ATTR_INPUT) ); |
2432 | 2408 | rb_define_const( mIME, "ATTR_TARGET_CONVERTED" , INT2FIX(ATTR_TARGET_CONVERTED) ); |
@@ -554,22 +554,6 @@ | ||
554 | 554 | SetCursor( LoadCursor( NULL, (LPSTR)lParam )); |
555 | 555 | return 0; |
556 | 556 | |
557 | - case WM_APP + 5: | |
558 | - {/* IMEのカーソル位置設定 */ | |
559 | - COMPOSITIONFORM com = {0}; | |
560 | - HIMC hIMC; | |
561 | - | |
562 | - hIMC = ImmGetContext( g_hWnd ); | |
563 | - | |
564 | - com.dwStyle = CFS_POINT; | |
565 | - com.ptCurrentPos.x = (int)wParam; | |
566 | - com.ptCurrentPos.y = (int)lParam; | |
567 | - ImmSetCompositionWindow( hIMC, &com ); | |
568 | - | |
569 | - ImmReleaseContext( g_hWnd, hIMC ); | |
570 | - return 0; | |
571 | - } | |
572 | - | |
573 | 557 | case WM_APP + 6: |
574 | 558 | /* IMEの有効化/無効化 */ |
575 | 559 | WINNLSEnableIME( g_hWnd, (int)lParam ); |
@@ -579,16 +563,6 @@ | ||
579 | 563 | /* IMEの状態を返す */ |
580 | 564 | return WINNLSGetEnableStatus( g_hWnd ); |
581 | 565 | |
582 | - case WM_APP + 8: | |
583 | - /* IMEのフォント設定 */ | |
584 | - { | |
585 | - HIMC hIMC; | |
586 | - | |
587 | - hIMC = ImmGetContext( g_hWnd ); | |
588 | - ImmSetCompositionFont( hIMC, (LOGFONT*)lParam ); | |
589 | - ImmReleaseContext( g_hWnd, hIMC ); | |
590 | - return 0; | |
591 | - } | |
592 | 566 | case WM_APP + 9: |
593 | 567 | /* IMEの変換中情報取得 */ |
594 | 568 | { |
@@ -1052,11 +1026,6 @@ | ||
1052 | 1026 | SendMessage( g_hWnd, WM_APP + 4, 0, cursorname ); |
1053 | 1027 | } |
1054 | 1028 | |
1055 | -void SetImeCursor( int x, int y ) | |
1056 | -{ | |
1057 | - SendMessage( g_hWnd, WM_APP + 5, x, y ); | |
1058 | -} | |
1059 | - | |
1060 | 1029 | void SetImeEnable( int flag ) |
1061 | 1030 | { |
1062 | 1031 | SendMessage( g_hWnd, WM_APP + 6, 0, flag ); |
@@ -1067,13 +1036,6 @@ | ||
1067 | 1036 | return SendMessage( g_hWnd, WM_APP + 7, 0, 0 ); |
1068 | 1037 | } |
1069 | 1038 | |
1070 | -void SetImeFont( VALUE vfont ) | |
1071 | -{ | |
1072 | - LOGFONT logfont; | |
1073 | - GetObject(DXRUBY_GET_STRUCT( Font, vfont )->hFont, sizeof(LOGFONT), &logfont); | |
1074 | - SendMessage( g_hWnd, WM_APP + 8, 0, (LPARAM)&logfont ); | |
1075 | -} | |
1076 | - | |
1077 | 1039 | int UpdateCompositionString( void ) |
1078 | 1040 | { |
1079 | 1041 | return SendMessage( g_hWnd, WM_APP + 9, 0, 0 ); |
@@ -6,10 +6,8 @@ | ||
6 | 6 | void ShowCursorMessage( void ); |
7 | 7 | void HideCursorMessage( void ); |
8 | 8 | void SetCursorMessage( int cursorname ); |
9 | -void SetImeCursor( int x, int y ); | |
10 | 9 | void SetImeEnable( int flag ); |
11 | 10 | int GetImeEnable( void ); |
12 | -void SetImeFont( VALUE vfont ); | |
13 | 11 | int UpdateCompositionString( void ); |
14 | 12 | |
15 | 13 | enum DXRubyErrorMessage |