MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / mouse_location

Method mouse_location

PySimpleGUI/PySimpleGUI.py:11967–11978  ·  view source on GitHub ↗

Return the (x,y) location of the mouse relative to the entire screen. It's the same location that you would use to create a window, popup, etc. :return: The location of the mouse pointer :rtype: (int, int)

(self)

Source from the content-addressed store, hash-verified

11965 print('Transparent color not supported on this platform (windows only)')
11966
11967 def mouse_location(self):
11968 """
11969 Return the (x,y) location of the mouse relative to the entire screen. It's the same location that
11970 you would use to create a window, popup, etc.
11971
11972 :return: The location of the mouse pointer
11973 :rtype: (int, int)
11974 """
11975 if not self._is_window_created('tried Window.mouse_location'):
11976 return (0, 0)
11977
11978 return (self.TKroot.winfo_pointerx(), self.TKroot.winfo_pointery())
11979
11980 def grab_any_where_on(self):
11981 """

Callers 1

Calls 1

_is_window_createdMethod · 0.95

Tested by

no test coverage detected