massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / _winapi.pyi
1 import sys
2 from typing import Any, NoReturn, Sequence, overload
3 from typing_extensions import Literal, final
4
5 CREATE_NEW_CONSOLE: int
6 CREATE_NEW_PROCESS_GROUP: int
7 DUPLICATE_CLOSE_SOURCE: int
8 DUPLICATE_SAME_ACCESS: int
9 ERROR_ALREADY_EXISTS: int
10 ERROR_BROKEN_PIPE: int
11 ERROR_IO_PENDING: int
12 ERROR_MORE_DATA: int
13 ERROR_NETNAME_DELETED: int
14 ERROR_NO_DATA: int
15 ERROR_NO_SYSTEM_RESOURCES: int
16 ERROR_OPERATION_ABORTED: int
17 ERROR_PIPE_BUSY: int
18 ERROR_PIPE_CONNECTED: int
19 ERROR_SEM_TIMEOUT: int
20 FILE_FLAG_FIRST_PIPE_INSTANCE: int
21 FILE_FLAG_OVERLAPPED: int
22 FILE_GENERIC_READ: int
23 FILE_GENERIC_WRITE: int
24 GENERIC_READ: int
25 GENERIC_WRITE: int
26 INFINITE: int
27 NMPWAIT_WAIT_FOREVER: int
28 NULL: int
29 OPEN_EXISTING: int
30 PIPE_ACCESS_DUPLEX: int
31 PIPE_ACCESS_INBOUND: int
32 PIPE_READMODE_MESSAGE: int
33 PIPE_TYPE_MESSAGE: int
34 PIPE_UNLIMITED_INSTANCES: int
35 PIPE_WAIT: int
36 PROCESS_ALL_ACCESS: int
37 PROCESS_DUP_HANDLE: int
38 STARTF_USESHOWWINDOW: int
39 STARTF_USESTDHANDLES: int
40 STD_ERROR_HANDLE: int
41 STD_INPUT_HANDLE: int
42 STD_OUTPUT_HANDLE: int
43 STILL_ACTIVE: int
44 SW_HIDE: int
45 WAIT_ABANDONED_0: int
46 WAIT_OBJECT_0: int
47 WAIT_TIMEOUT: int
48
49 def CloseHandle(__handle: int) -> None: ...
50 @overload
51 def ConnectNamedPipe(handle: int, overlapped: Literal[True]) -> Overlapped: ...
52 @overload
53 def ConnectNamedPipe(handle: int, overlapped: Literal[False] = ...) -> None: ...
54 @overload
55 def ConnectNamedPipe(handle: int, overlapped: bool) -> Overlapped | None: ...
56 def CreateFile(
57     __file_name: str,
58     __desired_access: int,
59     __share_mode: int,
60     __security_attributes: int,
61     __creation_disposition: int,
62     __flags_and_attributes: int,
63     __template_file: int,
64 ) -> int: ...
65 def CreateJunction(__src_path: str, __dst_path: str) -> None: ...
66 def CreateNamedPipe(
67     __name: str,
68     __open_mode: int,
69     __pipe_mode: int,
70     __max_instances: int,
71     __out_buffer_size: int,
72     __in_buffer_size: int,
73     __default_timeout: int,
74     __security_attributes: int,
75 ) -> int: ...
76 def CreatePipe(__pipe_attrs: Any, __size: int) -> tuple[int, int]: ...
77 def CreateProcess(
78     __application_name: str | None,
79     __command_line: str | None,
80     __proc_attrs: Any,
81     __thread_attrs: Any,
82     __inherit_handles: bool,
83     __creation_flags: int,
84     __env_mapping: dict[str, str],
85     __current_directory: str | None,
86     __startup_info: Any,
87 ) -> tuple[int, int, int, int]: ...
88 def DuplicateHandle(
89     __source_process_handle: int,
90     __source_handle: int,
91     __target_process_handle: int,
92     __desired_access: int,
93     __inherit_handle: bool,
94     __options: int = ...,
95 ) -> int: ...
96 def ExitProcess(__ExitCode: int) -> NoReturn: ...
97
98 if sys.version_info >= (3, 7):
99     def GetACP() -> int: ...
100     def GetFileType(handle: int) -> int: ...
101
102 def GetCurrentProcess() -> int: ...
103 def GetExitCodeProcess(__process: int) -> int: ...
104 def GetLastError() -> int: ...
105 def GetModuleFileName(__module_handle: int) -> str: ...
106 def GetStdHandle(__std_handle: int) -> int: ...
107 def GetVersion() -> int: ...
108 def OpenProcess(__desired_access: int, __inherit_handle: bool, __process_id: int) -> int: ...
109 def PeekNamedPipe(__handle: int, __size: int = ...) -> tuple[int, int] | tuple[bytes, int, int]: ...
110 @overload
111 def ReadFile(handle: int, size: int, overlapped: Literal[True]) -> tuple[Overlapped, int]: ...
112 @overload
113 def ReadFile(handle: int, size: int, overlapped: Literal[False] = ...) -> tuple[bytes, int]: ...
114 @overload
115 def ReadFile(handle: int, size: int, overlapped: int | bool) -> tuple[Any, int]: ...
116 def SetNamedPipeHandleState(
117     __named_pipe: int, __mode: int | None, __max_collection_count: int | None, __collect_data_timeout: int | None
118 ) -> None: ...
119 def TerminateProcess(__handle: int, __exit_code: int) -> None: ...
120 def WaitForMultipleObjects(__handle_seq: Sequence[int], __wait_flag: bool, __milliseconds: int = ...) -> int: ...
121 def WaitForSingleObject(__handle: int, __milliseconds: int) -> int: ...
122 def WaitNamedPipe(__name: str, __timeout: int) -> None: ...
123 @overload
124 def WriteFile(handle: int, buffer: bytes, overlapped: Literal[True]) -> tuple[Overlapped, int]: ...
125 @overload
126 def WriteFile(handle: int, buffer: bytes, overlapped: Literal[False] = ...) -> tuple[int, int]: ...
127 @overload
128 def WriteFile(handle: int, buffer: bytes, overlapped: int | bool) -> tuple[Any, int]: ...
129 @final
130 class Overlapped:
131     event: int
132     def GetOverlappedResult(self, __wait: bool) -> tuple[int, int]: ...
133     def cancel(self) -> None: ...
134     def getbuffer(self) -> bytes | None: ...