def stop(self): from kivy.input.providers.wm_common import \ SetWindowLong_WndProc_wrapper if self.hwnd is None: return self.new_windProc = SetWindowLong_WndProc_wrapper( self.hwnd, self.old_windProc) self.hwnd = self.new_windProc = self.old_windProc = None
def start(self): from kivy.input.providers.wm_common import WNDPROC, \ SetWindowLong_WndProc_wrapper from ctypes import windll self.hwnd = windll.user32.GetActiveWindow() # inject our own handler to handle messages before window manager self.new_windProc = WNDPROC(self._wnd_proc) self.old_windProc = SetWindowLong_WndProc_wrapper( self.hwnd, self.new_windProc)
def start(self): self.uid = 0 self.pen = None self.pen_status = None self.pen_events = deque() self.hwnd = windll.user32.GetActiveWindow() # inject our own wndProc to handle messages # before window manager does self.new_windProc = WNDPROC(self._pen_wndProc) self.old_windProc = SetWindowLong_WndProc_wrapper( self.hwnd, self.new_windProc)
def start(self): global Window if not Window: from kivy.core.window import Window self.touch_events = deque() self.touches = {} self.uid = 0 # get window handle, and register to receive WM_TOUCH messages self.hwnd = windll.user32.GetActiveWindow() windll.user32.RegisterTouchWindow(self.hwnd, 1) # inject our own wndProc to handle messages # before window manager does self.new_windProc = WNDPROC(self._touch_wndProc) self.old_windProc = SetWindowLong_WndProc_wrapper( self.hwnd, self.new_windProc)
def stop(self): self.pen = None SetWindowLong_WndProc_wrapper(self.hwnd, self.old_windProc)
def stop(self): windll.user32.UnregisterTouchWindow(self.hwnd) self.new_windProc = SetWindowLong_WndProc_wrapper( self.hwnd, self.old_windProc)