def OnSetCursor(self, wnd, hit, message): if hit == 1: # HTCLIENT cursor = self._cursor if cursor: gui.SetCursor(cursor._win_cursor) return self._win.OnSetCursor(wnd._win, hit, message)
def SetWaitCursor(wait): import win32gui, win32con if wait: hCursor = win32gui.LoadCursor(0, win32con.IDC_WAIT) else: hCursor = win32gui.LoadCursor(0, 0) win32gui.SetCursor(hCursor)
def input(self, hwnd, text): """ :param hwnd: the handle handle fof the windows :param text: :return: """ time.sleep(0.01) win32gui.SetCursor(hwnd) ret = win32gui.SendMessage(hwnd, win32con.WM_SETTEXT, 0, text) return ret
def OnEnd(self, hwnd, message, wparam, lparam): global endx, endy endx, endy = win32gui.GetCursorPos() win32gui.SetCursor(win32gui.LoadCursor(0, win32con.IDC_WAIT)) url = Finish() if url: if CONF['copy_link']: set_clipboard(url) if CONF['open_browser'] and not CONF['local_only']: webbrowser.open(url) self.CloseWindow() return True
def __del__(self): win32gui.SetCursor(self._hCursor)
def __init__(self): self._hCursor = win32gui.SetCursor( win32gui.LoadCursor(0, win32con.IDC_WAIT))
def reset_cursor(self, *args): if platform == 'win': import win32gui win32gui.SetCursor(self.cursor)