Update win_api_defs.py
No use of having `ctypes.*` when the library is already imported above.
@@ -183,7 +183,7 @@ LoadIconW.argtypes = [HINSTANCE, LPCWSTR]
LoadIconW.restype = HICON
-class SYSTEM_POWER_STATUS(ctypes.Structure):
+class SYSTEM_POWER_STATUS(Structure):
_fields_ = [
('ACLineStatus', BYTE),
('BatteryFlag', BYTE),
@@ -193,8 +193,8 @@ class SYSTEM_POWER_STATUS(ctypes.Structure):
('BatteryFullLifeTime', DWORD),
]
-SystemPowerStatusP = ctypes.POINTER(SYSTEM_POWER_STATUS)
+SystemPowerStatusP = POINTER(SYSTEM_POWER_STATUS)
-GetSystemPowerStatus = ctypes.windll.kernel32.GetSystemPowerStatus
+GetSystemPowerStatus = windll.kernel32.GetSystemPowerStatus
GetSystemPowerStatus.argtypes = [SystemPowerStatusP]
GetSystemPowerStatus.restype = BOOL
