AccNotifyTouchInteraction 함수(oleacc.h)
AT(보조 기술) 애플리케이션이 사용자의 터치 제스처의 결과로 Windows Automation API(예: Microsoft UI 자동화)를 통해 UI와 상호 작용하고 있음을 시스템에 알릴 수 있습니다. 이를 통해 보조 기술은 대상 애플리케이션과 사용자가 터치와 상호 작용하고 있음을 시스템에 알릴 수 있습니다.
구문
HRESULT AccNotifyTouchInteraction(
[in] HWND hwndApp,
[in] HWND hwndTarget,
[in] POINT ptTarget
);
매개 변수
[in] hwndApp
AccNotifyTouchInteraction을 호출하는 AT 프로세스에 속하는 창입니다.
[in] hwndTarget
AT가 대상으로 하는 자동화 요소의 가장 가까운 창입니다.
[in] ptTarget
자동화 요소의 중심점(또는 요소의 경계 사각형에 있는 점)입니다.
반환 값
성공하면 S_OK를 반환합니다.
성공하지 못하면 표준 COM 오류 코드를 반환합니다.
설명
이 함수를 사용하려면 호출 프로세스에 UIAccess 이상의 권한이 있어야 합니다. 호출자에게 필요한 권한이 없으면 AccNotifyTouchInteraction 호출이 실패하고 E_ACCESSDENIED 반환합니다. 자세한 내용은 보조 기술에 대한 보안 고려 사항 및 /MANIFESTUAC(매니페스트에 UAC 정보 포함)를 참조하세요.
AT가 터치 데이터를 사용하는 경우(예: RegisterPointerInputTarget 함수를 사용하는 경우) AT가 Windows Automation API를 통해 상호 작용하는 셸 및 애플리케이션은 사용자가 터치를 통해 상호 작용하고 있음을 인식하지 않습니다. 시스템에서 터치 관련 기능을 사용자에게 노출하려면 AT 가 AccNotifyTouchInteraction 을 사용하여 사용자 터치 입력에 대한 응답으로 상호 작용을 수행하고 있음을 시스템에 알려야 합니다.
예제
이 코드 예제에서는 AccNotifyTouchInteraction 함수를 호출하는 방법을 보여줍니다.
// pTargetElement is the element being interacted with by the user, hwndApp
// represents an HWND owned by the AT.
HRESULT PerformTouchBasedInteraction(IUIAutomationElement *pTargetElement,
HWND hwndApp)
{
HRESULT hr = S_OK;
// Set the focus to the element and then notify the system that the
// interaction is occurring due to a touch gesture. This would also apply
// to pattern-based interactions (such as calls to
// IUIAutomationInvokePattern::Invoke)
hr = pTargetElement->SetFocus();
if (SUCCEEDED(hr))
{
HWND hwndTarget;
POINT ptTarget;
BOOL fGotClickablePoint;
// If the current element does not have a native window handle, an
// alternate method (such as walking up the parent chain) is required
// to get the nearest valid HWND.
hr = pTargetElement->get_CurrentNativeWindowHandle((UIA_HWND *)(&hwndTarget));
if (SUCCEEDED(hr))
{
// If the provider doesn't return a clickable point, an alternate
// method (such as using the bounding rectangle) will be required
// to get the center point of the current element.
hr = pTargetElement->GetClickablePoint(&ptTarget, &fGotClickablePoint);
}
if (SUCCEEDED(hr) && fGotClickablePoint)
{
hr = AccNotifyTouchInteraction(hwndApp, hwndTarget, ptTarget);
}
}
return hr;
}
요구 사항
요구 사항 | 값 |
---|---|
지원되는 최소 클라이언트 | Windows 8 [데스크톱 앱만 해당] |
지원되는 최소 서버 | Windows Server 2012 [데스크톱 앱만 해당] |
대상 플랫폼 | Windows |
헤더 | oleacc.h |
라이브러리 | Oleacc.lib |
DLL | Oleacc.dll |