コード例 #1
0
STDAPI CTextService::Deactivate()
{
	if(_pThreadMgr == nullptr)
	{
		return S_OK;
	}

	_SaveUserDic();

	_EndCandidateList();

	_EndInputModeWindow();

	_UninitFunctionProvider();

	_UninitPreservedKey(0);
	_UninitPreservedKey(1);

	_UninitKeyEventSink();

	_UninitLanguageBar();

	_InitTextEditSink(nullptr);

	_UninitCompartmentEventSink();

	_UninitThreadFocusSink();

	_UninitThreadMgrEventSink();

	_UninitD2D();

	SafeRelease(&_pThreadMgr);

	_ClientId = TF_CLIENTID_NULL;

	return S_OK;
}
コード例 #2
0
STDAPI CTextService::Deactivate()
{
    // delete the candidate list object if it exists.
    if (_pCandidateList != NULL)
    {
        delete _pCandidateList;
        _pCandidateList = NULL;
    }

    //
    // Unadvise TextEditSink if it is advised.
    //
    _InitTextEditSink(NULL);

    //
    // Uninitialize ThreadMgrEventSink.
    //
    _UninitThreadMgrEventSink();

    //
    // Uninitialize Language Bar.
    //
    _UninitLanguageBar();

    //
    // Uninitialize KeyEventSink
    //
    _UninitKeyEventSink();

    //
    // Uninitialize PreservedKeys
    //
    _UninitPreservedKey();

    // we MUST release all refs to _pThreadMgr in Deactivate
    if (_pThreadMgr != NULL)
    {
        _pThreadMgr->Release();
        _pThreadMgr = NULL;
    }

    _tfClientId = TF_CLIENTID_NULL;

    return S_OK;
}
コード例 #3
0
ファイル: TextService.cpp プロジェクト: deton/tsf-vim
STDAPI CTextService::Deactivate()
{
	_UninitFunctionProvider();

	_UninitPreservedKey();

	_UninitKeyEventSink();

	_UninitLanguageBar();

	_UninitCompartmentEventSink();

	_UninitThreadMgrEventSink();

	if(_pThreadMgr != NULL)
	{
		_pThreadMgr->Release();
		_pThreadMgr = NULL;
	}

	_ClientId = TF_CLIENTID_NULL;

	return S_OK;
}