mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
pywin32 stubs update (#9040)
boolean methods win32gui_struct MonitorFromRect, FindWindow, FindWindowEx, GetWindowPlacement, GetMenuItemRect
This commit is contained in:
@@ -42,7 +42,6 @@ win32.lib.verstamp
|
||||
# Demos, tests and debugging
|
||||
win32.lib.pywin32_testutil
|
||||
win32.lib.rasutil
|
||||
win32.lib.win32gui_struct
|
||||
win32com.demos.*
|
||||
win32com.servers.test_pycomtest
|
||||
win32com.test.*
|
||||
|
||||
@@ -63,7 +63,7 @@ def GetRunningObjectTable(reserved: int = ...) -> _win32typing.PyIRunningObjectT
|
||||
def GetScodeString(scode) -> str: ...
|
||||
def GetScodeRangeString(scode) -> str: ...
|
||||
def GetSeverityString(scode) -> str: ...
|
||||
def IsGatewayRegistered(iid: _win32typing.PyIID) -> bool: ...
|
||||
def IsGatewayRegistered(__iid: _win32typing.PyIID | None) -> int: ...
|
||||
def LoadRegTypeLib(iid: _win32typing.PyIID, versionMajor, versionMinor, lcid) -> _win32typing.PyITypeLib: ...
|
||||
def LoadTypeLib(libFileName: str) -> _win32typing.PyITypeLib: ...
|
||||
def MakePyFactory(iid: _win32typing.PyIID) -> _win32typing.PyIClassFactory: ...
|
||||
|
||||
@@ -110,9 +110,9 @@ def GetThread() -> _win32typing.PyCWinApp: ...
|
||||
def GetType(): ...
|
||||
def InitRichEdit() -> str: ...
|
||||
def InstallCallbackCaller(): ...
|
||||
def IsDebug() -> bool: ...
|
||||
def IsWin32s() -> bool: ...
|
||||
def IsObject(o) -> bool: ...
|
||||
def IsDebug() -> int: ...
|
||||
def IsWin32s() -> int: ...
|
||||
def IsObject(__o: object) -> bool: ...
|
||||
def LoadDialogResource(idRes, dll: _win32typing.PyDLL | None = ...): ...
|
||||
def LoadLibrary(fileName: str) -> _win32typing.PyDLL: ...
|
||||
def LoadMenu(_id, dll: _win32typing.PyDLL | None = ...) -> _win32typing.PyCMenu: ...
|
||||
|
||||
192
stubs/pywin32/win32/lib/win32gui_struct.pyi
Normal file
192
stubs/pywin32/win32/lib/win32gui_struct.pyi
Normal file
@@ -0,0 +1,192 @@
|
||||
from _typeshed import Incomplete
|
||||
from array import array
|
||||
|
||||
is64bit: bool
|
||||
|
||||
def UnpackWMNOTIFY(lparam) -> tuple[Incomplete, ...]: ...
|
||||
def UnpackNMITEMACTIVATE(lparam) -> tuple[Incomplete, ...]: ...
|
||||
def PackMENUITEMINFO(
|
||||
fType: Incomplete | None = ...,
|
||||
fState: Incomplete | None = ...,
|
||||
wID: Incomplete | None = ...,
|
||||
hSubMenu: Incomplete | None = ...,
|
||||
hbmpChecked: Incomplete | None = ...,
|
||||
hbmpUnchecked: Incomplete | None = ...,
|
||||
dwItemData: Incomplete | None = ...,
|
||||
text: Incomplete | None = ...,
|
||||
hbmpItem: Incomplete | None = ...,
|
||||
dwTypeData: Incomplete | None = ...,
|
||||
) -> tuple[array[int], list[Incomplete]]: ...
|
||||
def UnpackMENUITEMINFO(
|
||||
s,
|
||||
) -> tuple[
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
str | None,
|
||||
Incomplete | None,
|
||||
]: ...
|
||||
def EmptyMENUITEMINFO(mask: Incomplete | None = ..., text_buf_size: int = ...) -> tuple[array[int], list[Incomplete]]: ...
|
||||
def PackMENUINFO(
|
||||
dwStyle: Incomplete | None = ...,
|
||||
cyMax: Incomplete | None = ...,
|
||||
hbrBack: Incomplete | None = ...,
|
||||
dwContextHelpID: Incomplete | None = ...,
|
||||
dwMenuData: Incomplete | None = ...,
|
||||
fMask: int = ...,
|
||||
) -> array[int]: ...
|
||||
def UnpackMENUINFO(s) -> tuple[Incomplete | None, Incomplete | None, Incomplete | None, Incomplete | None, Incomplete | None]: ...
|
||||
def EmptyMENUINFO(mask: Incomplete | None = ...) -> array[int]: ...
|
||||
def PackTVINSERTSTRUCT(parent, insertAfter, tvitem) -> tuple[bytes, list[Incomplete]]: ...
|
||||
def PackTVITEM(hitem, state, stateMask, text, image, selimage, citems, param) -> tuple[array[int], list[Incomplete]]: ...
|
||||
def EmptyTVITEM(hitem, mask: Incomplete | None = ..., text_buf_size: int = ...) -> tuple[array[int], list[Incomplete]]: ...
|
||||
def UnpackTVITEM(
|
||||
buffer,
|
||||
) -> tuple[
|
||||
Incomplete,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
]: ...
|
||||
def UnpackTVNOTIFY(
|
||||
lparam,
|
||||
) -> tuple[
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
tuple[
|
||||
Incomplete,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
],
|
||||
tuple[
|
||||
Incomplete,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
],
|
||||
]: ...
|
||||
def UnpackTVDISPINFO(
|
||||
lparam,
|
||||
) -> tuple[
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
tuple[
|
||||
Incomplete,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
],
|
||||
]: ...
|
||||
def PackLVITEM(
|
||||
item: Incomplete | None = ...,
|
||||
subItem: Incomplete | None = ...,
|
||||
state: Incomplete | None = ...,
|
||||
stateMask: Incomplete | None = ...,
|
||||
text: Incomplete | None = ...,
|
||||
image: Incomplete | None = ...,
|
||||
param: Incomplete | None = ...,
|
||||
indent: Incomplete | None = ...,
|
||||
) -> tuple[array[int], list[Incomplete]]: ...
|
||||
def UnpackLVITEM(
|
||||
buffer,
|
||||
) -> tuple[
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
]: ...
|
||||
def UnpackLVDISPINFO(
|
||||
lparam,
|
||||
) -> tuple[
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
tuple[
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
Incomplete | None,
|
||||
],
|
||||
]: ...
|
||||
def UnpackLVNOTIFY(
|
||||
lparam,
|
||||
) -> tuple[
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
Incomplete,
|
||||
tuple[Incomplete, Incomplete],
|
||||
Incomplete,
|
||||
]: ...
|
||||
def EmptyLVITEM(
|
||||
item, subitem, mask: Incomplete | None = ..., text_buf_size: int = ...
|
||||
) -> tuple[array[int], list[Incomplete]]: ...
|
||||
def PackLVCOLUMN(
|
||||
fmt: Incomplete | None = ...,
|
||||
cx: Incomplete | None = ...,
|
||||
text: Incomplete | None = ...,
|
||||
subItem: Incomplete | None = ...,
|
||||
image: Incomplete | None = ...,
|
||||
order: Incomplete | None = ...,
|
||||
) -> tuple[array[int], list[Incomplete]]: ...
|
||||
def UnpackLVCOLUMN(
|
||||
lparam,
|
||||
) -> tuple[Incomplete | None, Incomplete | None, Incomplete | None, Incomplete | None, Incomplete | None, Incomplete | None]: ...
|
||||
def EmptyLVCOLUMN(mask: Incomplete | None = ..., text_buf_size: int = ...) -> tuple[array[int], list[Incomplete]]: ...
|
||||
def PackLVHITTEST(pt) -> tuple[array[int], None]: ...
|
||||
def UnpackLVHITTEST(buf) -> tuple[tuple[Incomplete, Incomplete], Incomplete, Incomplete, Incomplete]: ...
|
||||
def PackHDITEM(
|
||||
cxy: Incomplete | None = ...,
|
||||
text: Incomplete | None = ...,
|
||||
hbm: Incomplete | None = ...,
|
||||
fmt: Incomplete | None = ...,
|
||||
param: Incomplete | None = ...,
|
||||
image: Incomplete | None = ...,
|
||||
order: Incomplete | None = ...,
|
||||
) -> tuple[array[int], list[Incomplete]]: ...
|
||||
def PackDEV_BROADCAST(devicetype, rest_fmt, rest_data, extra_data=...) -> bytes: ...
|
||||
def PackDEV_BROADCAST_HANDLE(handle, hdevnotify: int = ..., guid=..., name_offset: int = ..., data=...) -> bytes: ...
|
||||
def PackDEV_BROADCAST_VOLUME(unitmask, flags) -> bytes: ...
|
||||
def PackDEV_BROADCAST_DEVICEINTERFACE(classguid, name: str = ...) -> bytes: ...
|
||||
|
||||
class DEV_BROADCAST_INFO:
|
||||
devicetype: Incomplete
|
||||
def __init__(self, devicetype, **kw) -> None: ...
|
||||
|
||||
def UnpackDEV_BROADCAST(lparam) -> DEV_BROADCAST_INFO | None: ...
|
||||
@@ -8,11 +8,11 @@ def DrawThemeText(
|
||||
) -> None: ...
|
||||
def GetThemeBackgroundContentRect(hTheme: _win32typing.PyHTHEME, hdc, iPartId, iStateId, pBoundingRect): ...
|
||||
def GetThemeBackgroundExtent(hTheme: _win32typing.PyHTHEME, hdc, iPartId, iStateId, pContentRect): ...
|
||||
def IsThemeActive() -> bool: ...
|
||||
def IsAppThemed() -> bool: ...
|
||||
def IsThemeActive() -> int: ...
|
||||
def IsAppThemed() -> int: ...
|
||||
def GetWindowTheme(hwnd: int) -> _win32typing.PyHTHEME: ...
|
||||
def EnableThemeDialogTexture(hdlg, dwFlags) -> None: ...
|
||||
def IsThemeDialogTextureEnabled(hdlg) -> bool: ...
|
||||
def IsThemeDialogTextureEnabled(__hdlg: int | None) -> bool: ...
|
||||
def GetThemeAppProperties(): ...
|
||||
def EnableTheming(fEnable) -> None: ...
|
||||
def SetWindowTheme(hwnd: int, pszSubAppName: str, pszSubIdlist: str) -> None: ...
|
||||
|
||||
@@ -124,7 +124,7 @@ def LoadString(handle: int, stringId, numChars: int = ...) -> str: ...
|
||||
def MessageBeep(arg): ...
|
||||
def MessageBox(hwnd: int, message: str, title: str, arg, arg1): ...
|
||||
def MonitorFromPoint(pt: tuple[Incomplete, Incomplete], Flags: int = ...) -> int: ...
|
||||
def MonitorFromRect(rc: _win32typing.PyRECT, Flags: int = ...) -> int: ...
|
||||
def MonitorFromRect(__rc: _win32typing.PyRECT | tuple[int, int, int, int], __Flags: int = ...) -> int: ...
|
||||
def MonitorFromWindow(hwnd: int, Flags: int = ...) -> int: ...
|
||||
def MoveFile(srcName: str, destName: str) -> None: ...
|
||||
def MoveFileEx(srcName: str, destName: str, flag) -> None: ...
|
||||
|
||||
@@ -14,7 +14,7 @@ def GetClipboardViewer(): ...
|
||||
def GetGlobalMemory(hglobal: int) -> str: ...
|
||||
def GetOpenClipboardWindow(): ...
|
||||
def GetPriorityClipboardFormat(formats): ...
|
||||
def IsClipboardFormatAvailable(_format) -> bool: ...
|
||||
def IsClipboardFormatAvailable(__format: int) -> int: ...
|
||||
def OpenClipboard(hWnd: int | None = ...): ...
|
||||
def RegisterClipboardFormat(name: str): ...
|
||||
def SetClipboardData(_format, hMem): ...
|
||||
|
||||
@@ -61,7 +61,7 @@ def CreateAcceleratorTable(accels: tuple[tuple[Incomplete, Incomplete, Incomplet
|
||||
def LoadMenu(hinstance, resource_id: str): ...
|
||||
def DestroyMenu() -> None: ...
|
||||
def SetMenu(hwnd: int, hmenu) -> None: ...
|
||||
def GetMenu() -> None: ...
|
||||
def GetMenu(__hwnd: int) -> int: ...
|
||||
def LoadIcon(hinstance, resource_id: str): ...
|
||||
def CopyIcon(hicon): ...
|
||||
def DrawIcon(hDC, X, Y, hicon) -> None: ...
|
||||
@@ -101,8 +101,10 @@ def MessageBeep(_type) -> None: ...
|
||||
def CreateWindow(className: str, windowTitle: str, style, x, y, width, height, parent, menu, hinstance, reserved): ...
|
||||
def DestroyWindow(hwnd: int) -> None: ...
|
||||
def EnableWindow(hWnd: int, bEnable): ...
|
||||
def FindWindow(ClassName: _win32typing.PyResourceId | None, WindowName: str) -> int: ...
|
||||
def FindWindowEx(Parent: int, ChildAfter: int, ClassName: _win32typing.PyResourceId, WindowName: str) -> int: ...
|
||||
def FindWindow(__ClassName: _win32typing.PyResourceId | str | None, __WindowName: str | None) -> int: ...
|
||||
def FindWindowEx(
|
||||
__Parent: int | None, __ChildAfter: int | None, __ClassName: _win32typing.PyResourceId | str, __WindowName: str
|
||||
) -> int: ...
|
||||
def DragAcceptFiles(hwnd: int, fAccept) -> None: ...
|
||||
def DragDetect(hwnd: int, point: tuple[Incomplete, Incomplete]) -> None: ...
|
||||
def SetDoubleClickTime(newVal) -> None: ...
|
||||
@@ -112,8 +114,8 @@ def SetCaretPos(x, y) -> None: ...
|
||||
def GetCaretPos() -> tuple[Incomplete, Incomplete]: ...
|
||||
def ShowCaret(hWnd: int) -> None: ...
|
||||
def ShowWindow(hWnd: int, cmdShow): ...
|
||||
def IsWindowVisible(hwnd: int) -> bool: ...
|
||||
def IsWindowEnabled(hwnd: int) -> bool: ...
|
||||
def IsWindowVisible(__hwnd: int | None) -> int: ...
|
||||
def IsWindowEnabled(__hwnd: int | None) -> int: ...
|
||||
def SetFocus(hwnd: int) -> None: ...
|
||||
def GetFocus() -> None: ...
|
||||
def UpdateWindow(hwnd: int) -> None: ...
|
||||
@@ -137,7 +139,7 @@ def GetStockObject(Object) -> int: ...
|
||||
def PostQuitMessage(rc) -> None: ...
|
||||
def WaitMessage() -> None: ...
|
||||
def SetWindowPos(hWnd: int, InsertAfter: int, X, Y, cx, cy, Flags) -> None: ...
|
||||
def GetWindowPlacement(): ...
|
||||
def GetWindowPlacement(__hwnd: int) -> tuple[int, int, tuple[int, int], tuple[int, int], tuple[int, int, int, int]]: ...
|
||||
def SetWindowPlacement(hWnd: int, placement) -> None: ...
|
||||
def RegisterClass(wndClass: _win32typing.PyWNDCLASS): ...
|
||||
def UnregisterClass(atom: _win32typing.PyResourceId, hinst: int) -> None: ...
|
||||
@@ -200,7 +202,9 @@ def InsertMenuItem(hMenu, uItem, fByPosition, menuItem) -> None: ...
|
||||
def SetMenuItemInfo(hMenu, uItem, fByPosition, menuItem) -> None: ...
|
||||
def GetMenuItemInfo(hMenu, uItem, fByPosition, menuItem) -> None: ...
|
||||
def GetMenuItemCount(hMenu): ...
|
||||
def GetMenuItemRect(hWnd: int, hMenu, uItem) -> tuple[int, int, int, int]: ...
|
||||
|
||||
# Actually returns a list of int|tuple, but lists don't support positional types
|
||||
def GetMenuItemRect(__hWnd: int | None, __hMenu: int | None, __uItem: int) -> tuple[int, tuple[int, int, int, int]]: ...
|
||||
def GetMenuState(hMenu, uID, flags): ...
|
||||
def SetMenuDefaultItem(hMenu, uItem, fByPos) -> None: ...
|
||||
def GetMenuDefaultItem(hMenu, fByPos, flags): ...
|
||||
@@ -322,9 +326,9 @@ def GetCursorPos() -> tuple[Incomplete, Incomplete]: ...
|
||||
def GetDesktopWindow(): ...
|
||||
def GetWindow(hWnd: int, uCmd): ...
|
||||
def GetWindowDC(hWnd: int) -> int: ...
|
||||
def IsIconic(hWnd: int) -> bool: ...
|
||||
def IsWindow(hWnd: int) -> bool: ...
|
||||
def IsChild(hWndParent: int, hWnd: int) -> bool: ...
|
||||
def IsIconic(__hWnd: int) -> int: ...
|
||||
def IsWindow(__hWnd: int) -> int: ...
|
||||
def IsChild(__hWndParent: int, hWnd: int) -> int: ...
|
||||
def ReleaseCapture() -> None: ...
|
||||
def GetCapture(): ...
|
||||
def SetCapture() -> None: ...
|
||||
|
||||
@@ -6,7 +6,7 @@ def CreateJobObject(jobAttributes: _win32typing.PySECURITY_ATTRIBUTES, name) ->
|
||||
def OpenJobObject(desiredAccess, inheritHandles, name) -> None: ...
|
||||
def TerminateJobObject(hJob: int, exitCode) -> None: ...
|
||||
def UserHandleGrantAccess(hUserHandle: int, hJob: int, grant) -> None: ...
|
||||
def IsProcessInJob(hProcess: int, hJob: int) -> bool: ...
|
||||
def IsProcessInJob(__hProcess: int, __hJob: int): ...
|
||||
def QueryInformationJobObject(Job: int, JobObjectInfoClass): ...
|
||||
def SetInformationJobObject(Job: int, JobObjectInfoClass, JobObjectInfo) -> None: ...
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ def SetProcessWorkingSetSize(hProcess: int, MinimumWorkingSetSize, MaximumWorkin
|
||||
def GetProcessShutdownParameters() -> tuple[Incomplete, Incomplete]: ...
|
||||
def SetProcessShutdownParameters(Level, Flags) -> None: ...
|
||||
def GetGuiResources(Process: int, Flags): ...
|
||||
def IsWow64Process(Process: int | None = ...) -> bool: ...
|
||||
def IsWow64Process(__Process: int | None = ...) -> bool: ...
|
||||
def ReadProcessMemory(*args, **kwargs): ... # incomplete
|
||||
def VirtualAllocEx(*args, **kwargs): ... # incomplete
|
||||
def VirtualFreeEx(*args, **kwargs): ... # incomplete
|
||||
|
||||
@@ -14,7 +14,7 @@ def GetEntryDialParams(
|
||||
) -> tuple[Incomplete, Incomplete, Incomplete, Incomplete, Incomplete, Incomplete, Incomplete]: ...
|
||||
def GetErrorString(error) -> str: ... # noqa: F811
|
||||
def HangUp(hras) -> None: ...
|
||||
def IsHandleValid(hras) -> bool: ...
|
||||
def IsHandleValid(__hras: int | None) -> bool: ...
|
||||
def SetEntryDialParams(fileName: str, RasDialParams, bSavePassword) -> None: ...
|
||||
def RASDIALEXTENSIONS(*args, **kwargs): ... # incomplete
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def SECURITY_DESCRIPTOR() -> _win32typing.PySECURITY_DESCRIPTOR: ...
|
||||
def ImpersonateNamedPipeClient(handle) -> None: ...
|
||||
def ImpersonateLoggedOnUser(handle: int) -> None: ...
|
||||
def ImpersonateAnonymousToken(ThreadHandle: int) -> None: ...
|
||||
def IsTokenRestricted(TokenHandle: int) -> bool: ...
|
||||
def IsTokenRestricted(__TokenHandle: int | None) -> bool: ...
|
||||
def RevertToSelf() -> None: ...
|
||||
def LogonUser(Username: str, Domain: str, Password: str, LogonType, LogonProvider) -> int: ...
|
||||
def LogonUserEx(
|
||||
|
||||
1
stubs/pywin32/win32gui_struct.pyi
Normal file
1
stubs/pywin32/win32gui_struct.pyi
Normal file
@@ -0,0 +1 @@
|
||||
from win32.lib.win32gui_struct import *
|
||||
Reference in New Issue
Block a user