import pyautogui
import time

pyautogui.PAUSE = 0.5
pyautogui.FAILSAFE = True


class Desktop:
    def click(self, x, y):
        pyautogui.click(x, y)

    def double_click(self, x, y):
        pyautogui.doubleClick(x, y)

    def right_click(self, x, y):
        pyautogui.rightClick(x, y)

    def type(self, text):
        pyautogui.write(text)

    def press(self, key):
        pyautogui.press(key)

    def hotkey(self, *keys):
        pyautogui.hotkey(*keys)

    def move_to(self, x, y):
        pyautogui.moveTo(x, y)

    def screenshot(self, filename="screenshot.png"):
        pyautogui.screenshot(filename)
        return filename

    def get_screen_size(self):
        return pyautogui.size()
