Ejemplo n.º 1
0
 def get_screens(self):
     screens = []
     def enum_proc(hMonitor, hdcMonitor, lprcMonitor, dwData):
         r = lprcMonitor.contents
         width = r.right - r.left
         height = r.bottom - r.top
         screens.append(
             Win32Screen(self, hMonitor, r.left, r.top, width, height))
         return True
     enum_proc_ptr = MONITORENUMPROC(enum_proc)
     _user32.EnumDisplayMonitors(None, None, enum_proc_ptr, 0)
     return screens
Ejemplo n.º 2
0
 def get_screens(self):
     screens = []
     def enum_proc(hMonitor, hdcMonitor, lprcMonitor, dwData):
         r = lprcMonitor.contents
         width = r.right - r.left
         height = r.bottom - r.top
         screens.append(
             Win32Screen(self, hMonitor, r.left, r.top, width, height))
         return True
     enum_proc_type = WINFUNCTYPE(BOOL, HMONITOR, HDC, POINTER(RECT), LPARAM)
     enum_proc_ptr = enum_proc_type(enum_proc)
     _user32.EnumDisplayMonitors(NULL, NULL, enum_proc_ptr, 0)
     return screens