def __init__(self, windowName=None): """Constructor. @raise WindowsError: If an error occurs. """ if not isinstance(self.className, unicode): raise ValueError("className attribute must be a unicode string") if windowName and not isinstance(windowName, unicode): raise ValueError("windowName must be a unicode string") self._wClass = WNDCLASSEXW( cbSize=ctypes.sizeof(WNDCLASSEXW), lpfnWndProc=CustomWindow._rawWindowProc, hInstance=appInstance, lpszClassName=self.className, ) res = self._classAtom = ctypes.windll.user32.RegisterClassExW( ctypes.byref(self._wClass)) if res == 0: raise ctypes.WinError() res = ctypes.windll.user32.CreateWindowExW( 0, self._classAtom, windowName or self.className, 0, 0, 0, 0, 0, None, None, appInstance, None) if res == 0: raise ctypes.WinError() #: The handle to the created window. #: @type: int self.handle = res self._hwndsToInstances[res] = self
def _get__wClass(cls): return WNDCLASSEXW( cbSize=ctypes.sizeof(WNDCLASSEXW), lpfnWndProc=cls._rawWindowProc, hInstance=appInstance, lpszClassName=cls.className, )
elif wParam==FB_EXT_KEY: keyBits=lParam>>4 extendedKeysDown=keyBits extendedKeysPressed|=keyBits if keysDown==0 and extendedKeysDown==0 and (keysPressed!=0 or extendedKeysPressed!=0): gesture=KeyGesture(keysPressed,extendedKeysPressed) keysPressed=extendedKeysPressed=0 try: inputCore.manager.executeGesture(gesture) except inputCore.NoInputGestureAction: pass return 0 else: return windll.user32.DefWindowProcW(hwnd,msg,wParam,lParam) nvdaFsBrlWndCls=WNDCLASSEXW() nvdaFsBrlWndCls.cbSize=sizeof(nvdaFsBrlWndCls) nvdaFsBrlWndCls.lpfnWndProc=nvdaFsBrlWndProc nvdaFsBrlWndCls.hInstance=appInstance nvdaFsBrlWndCls.lpszClassName=u"nvdaFsBrlWndCls" class BrailleDisplayDriver(braille.BrailleDisplayDriver,ScriptableObject): name="freedomScientific" # Translators: Names of braille displays. description=_("Freedom Scientific Focus/PAC Mate series") @classmethod def check(cls): return bool(fsbLib)