コード例 #1
0
ファイル: KeyEventSink.cpp プロジェクト: yathit/zawgyi
void CTextService::_UninitPreservedKey()
{
    ITfKeystrokeMgr *pKeystrokeMgr;

    if (_pThreadMgr->QueryInterface(IID_ITfKeystrokeMgr, (void **)&pKeystrokeMgr) != S_OK)
        return;

    pKeystrokeMgr->UnpreserveKey(GUID_PRESERVEDKEY_BURGLISH, &c_pkeyburglish);
	pKeystrokeMgr->UnpreserveKey(GUID_PRESERVEDKEY_BURMESE, &c_pkeyburmese);

    pKeystrokeMgr->Release();
}
コード例 #2
0
void CTextService::_UninitPreservedKey()
{
    ITfKeystrokeMgr *pKeystrokeMgr;

    if (_pThreadMgr->QueryInterface(IID_ITfKeystrokeMgr, (void **)&pKeystrokeMgr) != S_OK)
        return;

    pKeystrokeMgr->UnpreserveKey(GUID_PRESERVEDKEY_ONOFF, &c_pkeyOnOff0);
    pKeystrokeMgr->UnpreserveKey(GUID_PRESERVEDKEY_ONOFF, &c_pkeyOnOff1);
    pKeystrokeMgr->UnpreserveKey(GUID_PRESERVEDKEY_F6,    &c_pkeyF6);

    pKeystrokeMgr->Release();
}
コード例 #3
0
ファイル: KeyEventSink.cpp プロジェクト: kozo2/tsf-tutcode
void CTextService::_UninitPreservedKey(int onoff)
{
	HRESULT hr;

	if(onoff != 0 && onoff != 1)
	{
		return;
	}

	ITfKeystrokeMgr *pKeystrokeMgr;
	if(_pThreadMgr->QueryInterface(IID_PPV_ARGS(&pKeystrokeMgr)) == S_OK)
	{
		for(int i = 0; i < MAX_PRESERVEDKEY; i++)
		{
			if(preservedkey[onoff][i].uVKey == 0 && preservedkey[onoff][i].uModifiers == 0)
			{
				break;
			}

			hr = pKeystrokeMgr->UnpreserveKey(c_guidPreservedKeyOnOff[onoff], &preservedkey[onoff][i]);
		}

		SafeRelease(&pKeystrokeMgr);
	}
}
コード例 #4
0
ファイル: KeyEventSink.cpp プロジェクト: hkgsherlock/canto
void CTextService::_UninitPreservedKey()
{
	ITfKeystrokeMgr *pKeystrokeMgr;
	if(_pThreadMgr->QueryInterface(IID_PPV_ARGS(&pKeystrokeMgr)) == S_OK)
	{
		for(int i = 0; i < MAX_PRESERVEDKEY; i++)
		{
			if(preservedkey[i].uVKey == 0 && preservedkey[i].uModifiers == 0)
			{
				break;
			}
			pKeystrokeMgr->UnpreserveKey(c_guidPreservedKeyOnOff, &preservedkey[i]);
		}
		SafeRelease(&pKeystrokeMgr);
	}
}
コード例 #5
0
ファイル: TextService.cpp プロジェクト: Java2ByteCode/PIME
void TextService::removePreservedKey(const GUID& guid) {
	vector<PreservedKey>::iterator it;
	for(it = preservedKeys_.begin(); it != preservedKeys_.end(); ++it) {
		PreservedKey& preservedKey = *it;
		if(::IsEqualIID(preservedKey.guid, guid)) {
			if(threadMgr_) { // our text service is activated
				ITfKeystrokeMgr *keystrokeMgr;
				if (threadMgr_->QueryInterface(IID_ITfKeystrokeMgr, (void **)&keystrokeMgr) == S_OK) {
					keystrokeMgr->UnpreserveKey(preservedKey.guid, &preservedKey);
					keystrokeMgr->Release();
				}
			}
			preservedKeys_.erase(it);
			break;
		}
	}
}