(self)
Get positions of monitors. It will populate self._monitors.
Get positions of monitors. It will populate self._monitors.
Get positions of monitors . It will populate self . _monitors .
def _monitors_impl(self):
        # type: () -> None
        """ Get positions of monitors. It will populate self._monitors. """

        int_ = int
        user32 = self.user32
        get_system_metrics = user32.GetSystemMetrics

        # All monitors
        self._monitors.append(
            {
                "left": int_(get_system_metrics(76)),  # SM_XVIRTUALSCREEN
                "top": int_(get_system_metrics(77)),  # SM_YVIRTUALSCREEN
                "width": int_(get_system_metrics(78)),  # SM_CXVIRTUALSCREEN
                "height": int_(get_system_metrics(79)),  # SM_CYVIRTUALSCREEN
            }
        )

        # Each monitor
        def _callback(monitor, data, rect, dc_):
            # types: (int, HDC, LPRECT, LPARAM) -> int
            """
            Callback for monitorenumproc() function, it will return
            a RECT with appropriate values.
            """
            # pylint: disable=unused-argument

            rct = rect.contents
            self._monitors.append(
                {
                    "left": int_(rct.left),
                    "top": int_(rct.top),
                    "width": int_(rct.right - rct.left),
                    "height": int_(rct.bottom - rct.top),
                }
            )
            return 1

        callback = MONITORNUMPROC(_callback)
        user32.EnumDisplayMonitors(0, 0, callback, 0)
def _monitors_impl ( self ) : # type: () -> None int_ = int user32 = self . user32 get_system_metrics = user32 . GetSystemMetrics # All monitors self . _monitors . append ( { "left" : int_ ( get_system_metrics ( 76 ) ) , # SM_XVIRTUALSCREEN "top" : int_ ( get_system_metrics ( 77 ) ) , # SM_YVIRTUALSCREEN "width" : int_ ( get_system_metrics ( 78 ) ) , # SM_CXVIRTUALSCREEN "height" : int_ ( get_system_metrics ( 79 ) ) , # SM_CYVIRTUALSCREEN } ) # Each monitor def _callback ( monitor , data , rect , dc_ ) : # types: (int, HDC, LPRECT, LPARAM) -> int """
            Callback for monitorenumproc() function, it will return
            a RECT with appropriate values.
            """ # pylint: disable=unused-argument rct = rect . contents self . _monitors . append ( { "left" : int_ ( rct . left ) , "top" : int_ ( rct . top ) , "width" : int_ ( rct . right - rct . left ) , "height" : int_ ( rct . bottom - rct . top ) , } ) return 1 callback = MONITORNUMPROC ( _callback ) user32 . EnumDisplayMonitors ( 0 , 0 , callback , 0 )