зеркало из https://github.com/mozilla/pjs.git
[OS/2] Bug 430163: Implement GetToggledKeyState, r=pweilbacher
This commit is contained in:
Родитель
0800b2905e
Коммит
f425574373
|
@ -3448,6 +3448,33 @@ void nsWindow::RemoveFromStyle( ULONG style)
|
|||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
NS_IMETHODIMP nsWindow::GetToggledKeyState(PRUint32 aKeyCode, PRBool* aLEDState)
|
||||
{
|
||||
PRUint32 vkey;
|
||||
|
||||
NS_ENSURE_ARG_POINTER(aLEDState);
|
||||
|
||||
switch (aKeyCode) {
|
||||
case NS_VK_CAPS_LOCK:
|
||||
vkey = VK_CAPSLOCK;
|
||||
break;
|
||||
case NS_VK_NUM_LOCK:
|
||||
vkey = VK_NUMLOCK;
|
||||
break;
|
||||
case NS_VK_SCROLL_LOCK:
|
||||
vkey = VK_SCRLLOCK;
|
||||
break;
|
||||
default:
|
||||
*aLEDState = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*aLEDState = (::WinGetKeyState(HWND_DESKTOP, vkey) & 1) != 0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Drag & Drop - Target methods
|
||||
// --------------------------------------------------------------------------
|
||||
|
|
|
@ -173,6 +173,7 @@ class nsWindow : public nsBaseWidget,
|
|||
NS_IMETHOD Invalidate( const nsIntRect & aRect, PRBool aIsSynchronous);
|
||||
NS_IMETHOD Update();
|
||||
NS_IMETHOD Scroll( PRInt32 aDx, PRInt32 aDy, nsIntRect *aClipRect);
|
||||
NS_IMETHOD GetToggledKeyState(PRUint32 aKeyCode, PRBool* aLEDState);
|
||||
|
||||
// Get a HWND or a HPS.
|
||||
virtual void *GetNativeData( PRUint32 aDataType);
|
||||
|
|
Загрузка…
Ссылка в новой задаче