forked from RDashINC/win32std
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwin32std.stub.php
More file actions
257 lines (243 loc) · 6.12 KB
/
win32std.stub.php
File metadata and controls
257 lines (243 loc) · 6.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<?php
const RT_CURSOR = "#1";
const RT_BITMAP = "#2";
const RT_ICON = "#3";
const RT_MENU = "#4";
const RT_DIALOG = "#5";
const RT_STRING = "#6";
const RT_FONTDIR = "#7";
const RT_FONT = "#8";
const RT_ACCELERATOR = "#9";
const RT_RCDATA = "#10";
const RT_MESSAGETABLE = "#11";
const RT_GROUP_CURSOR = "#12";
const RT_GROUP_ICON = "#14";
const RT_VERSION = "#16";
const RT_DLGINCLUDE = "#17";
const RT_PLUGPLAY = "#19";
const RT_VXD = "#20";
const RT_ANICURSOR = "#21";
const RT_ANIICON = "#22";
const RT_HTML = "#23";
const RT_NOT_DOCUMENTED = "#241";
const MB_IDABORT = 3;
const MB_IDCANCEL = 2;
const MB_IDNO = 7;
const MB_IDOK = 1;
const MB_IDYES = 6;
const MB_IDIGNORE = 5;
const MB_IDRETRY = 4;
const MB_OK = 0;
const MB_OKCANCEL = 1;
const MB_ABORTRETRYIGNORE = 2;
const MB_YESNOCANCEL = 3;
const MB_YESNO = 4;
const MB_RETRYCANCEL = 5;
const MB_CANCELTRYCONTINUE = 6;
const MB_ICONHAND = 16;
const MB_ICONQUESTION = 32;
const MB_ICONEXCLAMATION = 48;
const MB_ICONASTERISK = 64;
const MB_USERICON = 128;
const MB_ICONWARNING = 48;
const MB_ICONERROR = 16;
const MB_ICONINFORMATION = 64;
const MB_ICONSTOP = 16;
const MB_DEFBUTTON1 = 0;
const MB_DEFBUTTON2 = 256;
const MB_DEFBUTTON3 = 512;
const MB_DEFBUTTON4 = 768;
/**
* Get a resource.
* lang is experimental: 0 is neutral, 1 is user default, 2 is system default (see winnt.h LANG_* & SUBLANG_*).
*
* @param $res_rc
* @param string $type
* @param string $name
* @param int|null $lang
* @return string|false
*/
function res_get($res_rc, string $type, string $name, ?int $lang = 0) : string|false{}
/**
* return the resource list for a given type
* @param $res_rc
* @param string $type
* @return array|false
*/
function res_list($res_rc, string $type) : array|false{}
/**
* return the resource type list for a given module
* as_string specify if known type should be translated to string (but such string can't be used in res_get)
*
* Constants for resource types
* RT_CURSOR="#1"
* RT_BITMAP="#2"
* RT_ICON="#3"
* RT_MENU="#4"
* RT_DIALOG="#5"
* RT_STRING="#6"
* RT_FONTDIR="#7"
* RT_FONT="#8"
* RT_ACCELERATOR="#9"
* RT_RCDATA="#10"
* RT_MESSAGETABLE="#11"
* RT_GROUP_CURSOR="#12"
* RT_GROUP_ICON="#14"
* RT_VERSION="#16"
* RT_DLGINCLUDE="#17"
* RT_PLUGPLAY="#19"
* RT_VXD="#20"
* RT_ANICURSOR="#21"
* RT_ANIICON="#22"
* RT_HTML="#23"
*
* @param $res_rc
* @param bool|null $as_string
* @return array|false
*/
function res_list_type($res_rc, bool $as_string = true) : array|false{}
/**
* Return a (PHP)resource that identify the (WIN)resource module handle.
* A module is either a dll file or an exe file.
* @param string $module
* @return resource|false
*/
function res_open(string $module) : mixed{}
/**
* Close a module handle
*
* @param $res_rc
* @return bool
*/
function res_close($res_rc) : bool{}
/**
* Add or modify a resource in 'file' (dll or exe)
* lang is experimental: 0 is neutral, 1 is user default, 2 is system default (see winnt.h LANG_* & SUBLANG_*).
* Fail if the file is in use.
*
* @param $module
* @param string $type
* @param string $name
* @param string|null $data
* @param int|null $lang
* @return bool
*/
function res_set(string $module, string $type, string $name, ?string $data, ?int $lang = 0) : bool{}
/**
* Check if resource exists in a module opened with res_open
* lang is experimental: 0 is neutral, 1 is user default, 2 is system default (see winnt.h LANG_* & SUBLANG_*).
*
* @param $res_rc
* @param string $type
* @param string $name
* @param int|null $lang
* @return bool
*/
function res_exists($res_rc, string $type, string $name, ?int $lang = 0) : bool{}
/**
* file may be either NULL to stop playback or a file name to start it
* loop can be set to loop playback (default to false)
* module may be opened by res_open a file must represent the resource id (NOT IMPL)
*
* @param string $file
* @param bool $loop
* @return bool
*/
function win_play_wav(string $file, bool $loop) : bool{}
/**
* plays the system sound used by default for pre-defined events:
* '*': System Asterisk
* '!': System Exclamation
* 'H': System Hand
* '?': System Question
* '1': System Default
* '0': Standard beep using the computer speaker
*
* @param string $str
* @return bool
*/
function win_beep(string $str) : bool{}
/**
* Prompt a typical Win32 message box.
* Use the Messages Box Constants to modify the appearance of the message box
*
* Message box type constants:
* MB_OK
* MB_OKCANCEL
* MB_RETRYCANCEL
* MB_YESNO
* MB_YESNOCANCEL
*
* Message box type constants:
* MB_OK
* MB_OKCANCEL
* MB_RETRYCANCEL
* MB_YESNO
* MB_YESNOCANCEL
*
*
* Message box icon constants
* MB_ICONEXCLAMATION
* MB_ICONWARNING
* MB_ICONINFORMATION
* MB_ICONASTERISK
* MB_ICONQUESTION
* MB_ICONSTOP
* MB_ICONERROR
* MB_ICONHAND
*
*
* Message box default button constants
* MB_DEFBUTTON1
* MB_DEFBUTTON2
* MB_DEFBUTTON3
* MB_DEFBUTTON4
*
*
* Message box return constants
* MB_IDABORT
* MB_IDCANCEL
* MB_IDNO
* MB_IDOK
* MB_IDYES
* MB_IDIGNORE
* MB_IDRETRY
*
* @param string $text
* @param int|null $type
* @param string|null $caption
* @return false
*/
function win_message_box(string $text, ?int $type, ?string $caption) : false{}
/**
* Create a MS link file (.lnk)
* Don't forget the .lnk at the end of link_file !
*
* @param string $file
* @param string $link
* @param string|null $args
* @param string|null $descr
* @param string|null $workingdir
* @return bool
*/
function win_create_link(string $file, string $link, ?string $args, ?string $descr, ?string $workingdir) : bool{}
/**
* Prompt a "browse for folder" message box
*
* @param string|null $dir
* @param string|null $caption
* @return false|null
*/
function win_browse_folder(?string $dir, ?string $caption) : ?false{}
/**
* open or save dialog box, starting path, default filename, default extension, filter in MS format
* Filter example: "HTML File\0*.htm;*.html\0INI file\0*.ini\0All files\0*.*\0\0"
*
* @param int|null $open
* @param string|null $path
* @param string|null $file
* @param string|null $ext
* @param null $zfilter
* @return string|null
*/
function win_browse_file(?int $open, ?string $path, ?string $file, ?string $ext, null $zfilter) : ?string{}