def update_start(self): h = self.update_control.handle style = win32gui.GetWindowLong(h, win32con.GWL_STYLE) style |= win32con.WS_DISABLED win32gui.SetWindowLong(h, win32con.GWL_STYLE, style) win32gui.SendMessage(h, win32con.WM_ENABLE, 0, 0) win32gui.SetFocus(self.copy_control.handle)
def exitFullscreen(self): self._fullscreen = False self._style = window_styles["regular"] win32gui.SetWindowLong(self._hwnd, win32con.GWL_STYLE, self._style) self._width = PROJECTOR_PIXEL_WIDTH self._height = PROJECTOR_PIXEL_HEIGHT self._onscreen_display = (0, 0, self._width, 30) win32gui.SetWindowPos(self._hwnd, win32con.HWND_TOP, 0, 0, self._width, self._height, win32con.SWP_FRAMECHANGED)
def enterFullscreen(self): self._fullscreen = True self._style = window_styles["fullscreen"] win32gui.SetWindowLong(self._hwnd, win32con.GWL_STYLE, self._style) self._width = win32api.GetSystemMetrics(win32con.SM_CXSCREEN) + 1 self._height = win32api.GetSystemMetrics(win32con.SM_CYSCREEN) + 1 self._onscreen_display = (0, 0, self._width, 30) win32gui.SetWindowPos(self._hwnd, win32con.HWND_TOP, 0, 0, self._width, self._height, win32con.SWP_FRAMECHANGED)
def disable(self): style = win32gui.GetWindowLong(self.handle, win32con.GWL_STYLE) style |= win32con.WS_DISABLED win32gui.SetWindowLong(self.handle, win32con.GWL_STYLE, style) win32gui.SendMessage(self.handle, win32con.WM_ENABLE, 0, 0)
def enable(self): style = win32gui.GetWindowLong(self.handle, win32con.GWL_STYLE) style &= (~win32con.WS_DISABLED) win32gui.SetWindowLong(self.handle, win32con.GWL_STYLE, style) win32gui.SendMessage(self.handle, win32con.WM_ENABLE, 1, 0)
def update_done(self): h = self.update_control.handle style = win32gui.GetWindowLong(h, win32con.GWL_STYLE) style &= (~win32con.WS_DISABLED) win32gui.SetWindowLong(h, win32con.GWL_STYLE, style) win32gui.SendMessage(h, win32con.WM_ENABLE, 1, 0)