Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions stubs/pywin32/_win32typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,9 @@ class PyHANDLE: # type: ignore[type-var]
def Close(self) -> None: ...
def close(self) -> None: ...
def Detach(self) -> Self: ...
def __bool__(self) -> bool: ...
def __int__(self) -> int: ...
# PyHANDLE sets a lot more dunder methods, only to make them all raise with `TypeError: bad operand type`

@final
class PyHDESK:
Expand Down Expand Up @@ -5279,7 +5281,7 @@ class PyCDocTemplate:
) -> None: ...
def SetContainerInfo(self, _id, /) -> None: ...
def SetDocStrings(self, docStrings: str, /) -> None: ...
def OpenDocumentFile(self, filename: str, bMakeVisible: int = ..., /) -> None: ...
def OpenDocumentFile(self, filename: str, bMakeVisible: int = ..., /) -> PyCDocument | None: ...

class PyCDockContext:
@property
Expand Down Expand Up @@ -6009,7 +6011,7 @@ class PyCWinApp:
def LoadOEMCursor(self, cursorId, /): ...
def LoadIcon(self, idResource: int, /) -> int: ...
def LoadStandardIcon(self, resourceName: PyResourceId, /): ...
def OpenDocumentFile(self, fileName: str, /) -> None: ...
def OpenDocumentFile(self, fileName: str, /) -> PyCDocument | None: ...
def OnFileNew(self) -> None: ...
def OnFileOpen(self) -> None: ...
def RemoveDocTemplate(self, template: PyCDocTemplate | DocTemplate, /) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/pywin32/pythonwin/win32ui.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def FullPath(path: str, /) -> str: ...
def GetActiveWindow() -> _win32typing.PyCWnd: ...
def GetApp() -> _win32typing.PyCWinApp: ...
def GetAppName(): ...
def GetAppRegistryKey() -> None: ...
def GetAppRegistryKey() -> _win32typing.PyHKEY: ...
def GetBytes(address, size, /) -> str: ...
def GetCommandLine() -> str: ...
def GetDeviceCaps(hdc, index, /): ...
Expand Down
7 changes: 6 additions & 1 deletion stubs/pywin32/win32/win32api.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ def CloseHandle(handle: int, /) -> None: ...
def CopyFile(src, dest: str, bFailOnExist: int = ..., /) -> None: ...
def DebugBreak() -> None: ...
def DeleteFile(fileName: str, /) -> None: ...
def DragQueryFile(hDrop, fileNum: int = ..., /) -> str: ...

@overload
def DragQueryFile(hDrop, fileNum: Literal[-1] = -1, /) -> int: ... # type: ignore[overload-overlap]
@overload
def DragQueryFile(hDrop, fileNum: int, /) -> str: ...

def DragFinish(hDrop, /) -> None: ...
def DuplicateHandle(
hSourceProcess: int, hSource: int, hTargetProcessHandle: int, desiredAccess: int, bInheritHandle: int, options: int, /
Expand Down
2 changes: 1 addition & 1 deletion stubs/pywin32/win32/win32event.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def CreateEvent(
Name: str | None,
/,
) -> int: ...
def CreateMutex(MutexAttributes: _win32typing.PySECURITY_ATTRIBUTES, InitialOwner, Name: str, /) -> int: ...
def CreateMutex(MutexAttributes: _win32typing.PySECURITY_ATTRIBUTES, InitialOwner, Name: str, /) -> _win32typing.PyHANDLE: ...
def CreateSemaphore(
SemaphoreAttributes: _win32typing.PySECURITY_ATTRIBUTES, InitialCount, MaximumCount, SemaphoreName, /
) -> int: ...
Expand Down
4 changes: 4 additions & 0 deletions stubs/pywin32/win32/win32gui.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ def IsChild(hWndParent: int, hWnd: int, /) -> int: ...
def ReleaseCapture() -> None: ...
def GetCapture(): ...
def SetCapture() -> None: ...

# Exists and is documented as a wrapper around TrackMouseEvent
# See https://learn.microsoft.com/en-us/windows/win32/api/commctrl/nf-commctrl-_trackmouseevent
def _TrackMouseEvent(tme: tuple[int, int, int], /) -> _win32typing.TRACKMOUSEEVENT: ...
Comment on lines +410 to +412
Copy link
Copy Markdown
Collaborator Author

@Avasam Avasam Dec 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def ReleaseDC(hWnd: int | _win32typing.PyHANDLE | None, hDC: int | _win32typing.PyHANDLE | None, /) -> Literal[0, 1]: ...
def CreateCaret(hWnd: int, hBitmap: _win32typing.PyGdiHANDLE, nWidth, nHeight, /) -> None: ...
def DestroyCaret() -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/pywin32/win32/win32pdh.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def OpenQuery(DataSource: Incomplete | None = ..., userData: int = ..., /): ...
def CloseQuery(handle, /) -> None: ...
def MakeCounterPath(
elements: tuple[Incomplete, Incomplete, Incomplete, Incomplete, Incomplete, Incomplete], flags=..., /
) -> None: ...
) -> str: ...
def GetCounterInfo(handle, bRetrieveExplainText, /) -> None: ...
def GetFormattedCounterValue(handle, _format, /) -> tuple[Incomplete, Incomplete]: ...
def CollectQueryData(hQuery, /) -> None: ...
Expand Down
15 changes: 12 additions & 3 deletions stubs/pywin32/win32comext/shell/shell.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from _typeshed import Incomplete
from typing import TypeAlias
from typing import Literal, TypeAlias, overload

import _win32typing
from win32.lib.pywintypes import com_error
Expand All @@ -8,8 +8,17 @@ error: TypeAlias = com_error # noqa: Y042

def AssocCreate() -> _win32typing.PyIQueryAssociations: ...
def AssocCreateForClasses() -> _win32typing.PyIUnknown: ...
def DragQueryFile(hglobal: int, index, /) -> str: ...
def DragQueryFileW(hglobal: int, index, /) -> str: ...

@overload
def DragQueryFile(hglobal: int | _win32typing.PyHANDLE | None, index: Literal[-1] = -1, /) -> int: ... # type: ignore[overload-overlap]
@overload
def DragQueryFile(hglobal: int | _win32typing.PyHANDLE | None, index: int, /) -> str: ...

@overload
def DragQueryFileW(hglobal: int | _win32typing.PyHANDLE | None, index: Literal[-1] = -1, /) -> int: ... # type: ignore[overload-overlap]
@overload
def DragQueryFileW(hglobal: int | _win32typing.PyHANDLE | None, index: int, /) -> str: ...

def DragQueryPoint(hglobal: int, /) -> tuple[Incomplete, Incomplete, Incomplete]: ...
def IsUserAnAdmin() -> bool: ...
def SHCreateDataObject(
Expand Down
Loading