Example #1
0
//**********************************************************************
//
// BOOL ImeUINotify()
//
// This handles WM_IME_NOTIFY message.
//
//**********************************************************************
BOOL ImeUINotify( 
    HWND hwnd, 
    WPARAM wParam, 
    LPARAM lParam )
{
    switch (wParam )
    {
        case IMN_OPENCANDIDATE:

            ImeUIOpenCandidate( hwnd, lParam );
            break;

        case IMN_CLOSECANDIDATE:

            ImeUICloseCandidate( hwnd, lParam );
            break;

        case IMN_CHANGECANDIDATE:

            ImeUIChangeCandidate( hwnd, lParam );
            break;

        case IMN_SETOPENSTATUS:

            ImeUISetOpenStatus( hwnd );
            break;

	default:
	    return FALSE;

    }
    
    return TRUE;
}
Example #2
0
BOOL ImeUINotify( HWND hwnd, WPARAM wParam, LPARAM lParam )
{
    switch (wParam )
    {
        case IMN_OPENSTATUSWINDOW:
            ImeUIOpenStatusWindow(hwnd) ;
            break;
        case IMN_CHANGECANDIDATE:
            ImeUIChangeCandidate( hwnd, (DWORD)lParam );
            break;
        case IMN_CLOSECANDIDATE:
            ImeUICloseCandidate( hwnd, (DWORD)lParam );
            break;
        case IMN_OPENCANDIDATE:
            ImeUIOpenCandidate( hwnd, (DWORD)lParam, TRUE);
            break;
        case IMN_SETCONVERSIONMODE:
            ImeUISetConversionMode(hwnd) ;
            // IMN_SETCONVERSIONMODE should be pass to DefWindowProc
            // becuase ImeNotifyHandler in User32 does notify to shell and keyboard.
            return FALSE;
        case IMN_SETOPENSTATUS:
            ImeUISetOpenStatus( hwnd );
            // IMN_SETOPENSTATUS should be pass to DefWindowProc
            // becuase ImeNotifyHandler in User32 does notify to shell and keyboard.
            return FALSE;
        case IMN_GUIDELINE:
            ImeUIGuideLine(hwnd) ;
            break;
        default:
            return FALSE;

    }
    return TRUE;
}
Example #3
0
BOOL
InsertNewConsole(
    HWND   hWnd,
    HANDLE hConsole,
    HWND   hWndConsole
    )
{
    // conime receive ime message from console before 1st console registered.
    // this will happen after restart conime when conime dead by bogus ime's AV or 
    // other problem
    // so this fail safe code is  necessary to protect consrv.
    if (SearchConsole(hConsole) != NULL) {
        return TRUE;
    }

    LockConsoleTable();

    if (!InsertConsole(hWnd, hConsole, hWndConsole)) {
        UnlockConsoleTable();
        return FALSE;
    }

#ifdef DEBUG_MODE
    DisplayInformation(hWnd, hConsole);
#endif

    ImeUISetOpenStatus( hWndConsole );

    UnlockConsoleTable();

    return TRUE;
}
Example #4
0
BOOL
ConsoleSetFocus(
    HWND hWnd,
    HANDLE hConsole,
    HKL hKL
    )
{
    PCONSOLE_TABLE ConTbl;
    HKL OldhKL;

    ConTbl = SearchConsole(hConsole);
    if (ConTbl == NULL) {
        DBGPRINT(("CONIME: Error! Cannot found registed Console\n"));
        return FALSE;
    }

    if ( gfDoNotKillFocus ){
        gfDoNotKillFocus = FALSE;
    }

    OldhKL = ConTbl->hklActive ;
    ConTbl->hklActive = hKL;
    ActivateKeyboardLayout(ConTbl->hklActive, 0);
    ImmAssociateContext(hWnd, ConTbl->hIMC_Current);

    if (OldhKL == 0) {
        GetIMEName( ConTbl );
        ConTbl->ImmGetProperty = ImmGetProperty(ConTbl->hklActive , IGP_PROPERTY);
    }

//v-hirshi Jun.13.1996 #if defined(LATER_DBCS)  // kazum
    ImmSetActiveContextConsoleIME(hWnd, TRUE);
//v-hirshi Jun.13.1996 #endif

    LastConsole = hConsole;

#ifdef DEBUG_MODE
    DisplayInformation(hWnd, hConsole);
#endif

    ImeUISetOpenStatus( hWnd );
    if (ConTbl->lpCompStrMem != NULL)
        ReDisplayCompositionStr( hWnd );

    return TRUE;
}