Rev 4260 | Rev 6695 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3478 | 0CodErr | 1 | ; Run with OpenDialog ; |
2 | |||
4260 | 0CodErr | 3 | |
4 | |||
3478 | 0CodErr | 5 | org 0 |
6 | use32 |
||
7 | |||
8 | STACK_SIZE equ 256 |
||
9 | REDRAW_EVENT equ 1 |
||
10 | KEY_EVENT equ 2 |
||
11 | BUTTON_EVENT equ 3 |
||
12 | MOUSE_EVENT equ 6 |
||
3634 | fedesco | 13 | |
3478 | 0CodErr | 14 | BUTTON_RUN equ 10 |
15 | BUTTON_BROWSE equ 20 |
||
16 | |||
17 | MENUET01 db 'MENUET01' |
||
18 | version dd 1 |
||
19 | program.start dd start_ |
||
20 | program.end dd end_ |
||
21 | program.memory dd end_ + STACK_SIZE |
||
22 | program.stack dd end_ + STACK_SIZE |
||
23 | program.params dd 0 |
||
24 | program.path dd 0 |
||
25 | |||
3634 | fedesco | 26 | include 'lang.inc' |
27 | |||
28 | ; ======================================================================= ; |
||
3478 | 0CodErr | 29 | start_: |
30 | ; set.event |
||
31 | mov eax, 40 |
||
32 | mov ebx, 39 |
||
33 | int 64 |
||
34 | |||
35 | push sz_box_lib |
||
36 | call load.library |
||
37 | mov [box_lib], eax |
||
38 | |||
39 | push dword[box_lib] |
||
40 | push sz_edit_box |
||
41 | call getprocaddress |
||
42 | mov [edit_box_draw], eax |
||
43 | |||
44 | push dword[box_lib] |
||
45 | push sz_edit_box_key |
||
46 | call getprocaddress |
||
47 | mov [edit_box_key], eax |
||
48 | |||
49 | push dword[box_lib] |
||
50 | push sz_edit_box_mouse |
||
51 | call getprocaddress |
||
52 | mov [edit_box_mouse], eax |
||
53 | |||
54 | push dword[box_lib] |
||
55 | push sz_edit_box_set_text |
||
56 | call getprocaddress |
||
57 | mov [edit_box_set_text], eax |
||
58 | |||
59 | push sz_proc_lib |
||
60 | call load.library |
||
61 | mov [proc_lib], eax |
||
62 | |||
63 | push dword[proc_lib] |
||
64 | push sz_OpenDialog_init |
||
65 | call getprocaddress |
||
66 | mov [opendialog_init], eax |
||
67 | |||
68 | push dword[proc_lib] |
||
69 | push sz_OpenDialog_start |
||
70 | call getprocaddress |
||
71 | mov [opendialog_start], eax |
||
72 | |||
3634 | fedesco | 73 | |
3478 | 0CodErr | 74 | ; memory.allocate: |
75 | mov eax, 68 |
||
76 | mov ebx, 12 |
||
77 | mov ecx, 4096 + 4096 + 4096 |
||
78 | int 64 |
||
79 | |||
80 | mov [od.procinfo], eax |
||
3634 | fedesco | 81 | |
3478 | 0CodErr | 82 | add eax, 1024 |
3634 | fedesco | 83 | mov [od.filename_area], eax |
84 | |||
4260 | 0CodErr | 85 | add eax, 4096 - 1024 |
3478 | 0CodErr | 86 | mov [od.opendir_path], eax |
3634 | fedesco | 87 | |
4260 | 0CodErr | 88 | add eax, 4096 |
3478 | 0CodErr | 89 | mov [od.openfile_path], eax |
90 | |||
91 | push od |
||
92 | call [opendialog_init] |
||
93 | |||
94 | |||
95 | ; get.screen.size |
||
96 | mov eax, 61 |
||
97 | mov ebx, 1 |
||
98 | int 64 |
||
99 | |||
100 | mov [screen], eax |
||
101 | movzx eax, word[screen.width] |
||
102 | shr eax, 3 |
||
103 | lea eax, [eax*2 + eax] |
||
104 | add eax, 72 |
||
105 | mov [window.width], eax |
||
106 | |||
107 | ; skin.height |
||
108 | mov eax, 48 |
||
109 | mov ebx, 4 |
||
3634 | fedesco | 110 | int 64 |
3478 | 0CodErr | 111 | |
112 | add eax, 64 |
||
113 | mov [window.height], eax |
||
114 | |||
115 | movzx eax, word[screen.width] |
||
116 | sub eax, [window.width] |
||
117 | shr eax, 1 |
||
118 | mov [window.left], eax |
||
119 | |||
120 | movzx eax, word[screen.height] |
||
121 | sub eax, [window.height] |
||
122 | sub eax, 24 |
||
123 | mov [window.top], eax |
||
124 | |||
125 | mov eax, [window.width] |
||
126 | sub eax, 20 |
||
127 | mov [edit1.width], eax |
||
128 | |||
129 | mov eax, [od.openfile_path] |
||
130 | mov [edit1.text], eax |
||
3634 | fedesco | 131 | |
132 | |||
3478 | 0CodErr | 133 | call on_redraw |
3634 | fedesco | 134 | ; ----------------------- ; |
3478 | 0CodErr | 135 | .loop: |
136 | ; wait.event |
||
137 | mov eax, 10 |
||
138 | int 64 |
||
139 | cmp eax, REDRAW_EVENT |
||
140 | jne .check_key |
||
141 | call on_redraw |
||
142 | jmp .loop |
||
3634 | fedesco | 143 | ; ----------------------- ; |
3478 | 0CodErr | 144 | .check_key: |
145 | cmp eax, KEY_EVENT |
||
146 | jne .check_button |
||
147 | mov eax, 2 |
||
148 | int 64 |
||
149 | cmp ah, 13 |
||
150 | jne .no_key_enter |
||
151 | call on_button_run |
||
152 | jmp .loop |
||
3634 | fedesco | 153 | ; ----------------------- ; |
3478 | 0CodErr | 154 | .no_key_enter: |
4260 | 0CodErr | 155 | cmp ah, 185 |
156 | jne .no_key_insert |
||
157 | call on_button_browse |
||
158 | jmp .loop |
||
159 | .no_key_insert: |
||
3478 | 0CodErr | 160 | push edit1 |
161 | call [edit_box_key] |
||
162 | jmp .loop |
||
3634 | fedesco | 163 | ; ----------------------- ; |
3478 | 0CodErr | 164 | .check_button: |
165 | cmp eax, BUTTON_EVENT |
||
166 | jne .check_mouse |
||
167 | ; get.button.number |
||
168 | mov eax, 17 |
||
169 | int 64 |
||
170 | cmp ah, 1 |
||
171 | jne .check_button_run |
||
172 | ; program.terminate |
||
173 | or eax, -1 |
||
174 | int 64 |
||
3634 | fedesco | 175 | ; ----------------------- ; |
3478 | 0CodErr | 176 | .check_button_run: |
177 | cmp ah, BUTTON_RUN |
||
178 | jne .check_button_browse |
||
179 | call on_button_run |
||
180 | jmp .loop |
||
3634 | fedesco | 181 | ; ----------------------- ; |
3478 | 0CodErr | 182 | .check_button_browse: |
183 | cmp ah, BUTTON_BROWSE |
||
184 | jne .loop |
||
185 | call on_button_browse |
||
186 | jmp .loop |
||
3634 | fedesco | 187 | ; ----------------------- ; |
3478 | 0CodErr | 188 | .check_mouse: |
189 | cmp eax, MOUSE_EVENT |
||
190 | jne .loop |
||
191 | push edit1 |
||
192 | call [edit_box_mouse] |
||
193 | jmp .loop |
||
194 | |||
195 | |||
3634 | fedesco | 196 | ; ======================================================================= ; |
3478 | 0CodErr | 197 | on_button_run: |
198 | push dword[edit1.text] |
||
199 | call extractrunpathandparams |
||
200 | |||
201 | ;file.run: |
||
202 | mov eax, 70 |
||
203 | mov ebx, file_info |
||
204 | int 64 |
||
3634 | fedesco | 205 | |
3478 | 0CodErr | 206 | mov dl, byte[lastendpath] |
207 | mov ecx, [ptrlastendpath] |
||
3634 | fedesco | 208 | mov [ecx], dl |
3478 | 0CodErr | 209 | |
210 | test eax, eax |
||
211 | jnge .error |
||
212 | mov [runresult], dword sz_Program_run_successfully |
||
213 | jmp .exit |
||
3634 | fedesco | 214 | |
3478 | 0CodErr | 215 | .error: |
3634 | fedesco | 216 | ; ----------------------- ; |
217 | .5: |
||
3478 | 0CodErr | 218 | cmp al, -5 |
219 | jne .31 |
||
220 | mov [runresult], dword sz_File_not_found |
||
221 | jmp .exit |
||
3634 | fedesco | 222 | ; ----------------------- ; |
223 | .31: |
||
3478 | 0CodErr | 224 | cmp al, -31 |
225 | jne .32 |
||
226 | mov [runresult], dword sz_File_is_not_executable |
||
227 | jmp .exit |
||
3634 | fedesco | 228 | ; ----------------------- ; |
229 | .32: |
||
3478 | 0CodErr | 230 | cmp al, -32 |
231 | jne .10 |
||
232 | mov [runresult], dword sz_Too_many_processes |
||
233 | jmp .exit |
||
3634 | fedesco | 234 | ; ----------------------- ; |
235 | .10: |
||
3478 | 0CodErr | 236 | cmp al, -10 |
237 | jne .30 |
||
238 | mov [runresult], dword sz_Access_denied |
||
239 | jmp .exit |
||
3634 | fedesco | 240 | ; ----------------------- ; |
241 | .30: |
||
3478 | 0CodErr | 242 | cmp al, -30 |
243 | jne .unknown |
||
244 | mov [runresult], dword sz_Out_of_memory |
||
3634 | fedesco | 245 | jmp .exit |
246 | ; ----------------------- ; |
||
3478 | 0CodErr | 247 | .unknown: |
3634 | fedesco | 248 | mov [runresult], dword sz_Unknown_error |
249 | ; ----------------------- ; |
||
3478 | 0CodErr | 250 | .exit: |
251 | call on_redraw |
||
3634 | fedesco | 252 | ret |
3478 | 0CodErr | 253 | |
3634 | fedesco | 254 | ; ======================================================================= ; |
3478 | 0CodErr | 255 | on_button_browse: |
256 | push od |
||
257 | call [opendialog_start] |
||
258 | |||
3634 | fedesco | 259 | mov eax, [od.status] |
3478 | 0CodErr | 260 | test eax, eax |
261 | je .exit |
||
262 | |||
263 | ;======== if space exist in filepath, then quote filepath |
||
264 | mov eax, [od.openfile_path] |
||
3634 | fedesco | 265 | ; ----------------------- ; |
3478 | 0CodErr | 266 | .check_space: |
267 | cmp [eax], byte 0 |
||
268 | je .no_space |
||
269 | cmp [eax], byte 32 ;space |
||
270 | je .space |
||
271 | inc eax |
||
272 | jmp .check_space |
||
273 | .space: |
||
3634 | fedesco | 274 | ; ----------------------- ; |
3478 | 0CodErr | 275 | .find_end_zero: |
276 | inc eax |
||
277 | cmp [eax], byte 0 |
||
278 | jne .find_end_zero |
||
279 | mov [eax + 2], byte 0 |
||
280 | mov [eax + 1], byte 34 ; quote |
||
3634 | fedesco | 281 | ; ----------------------- ; |
3478 | 0CodErr | 282 | .shift_path: |
283 | dec eax |
||
284 | |||
285 | mov dl, byte [eax ] |
||
286 | mov [eax + 1], dl |
||
287 | |||
288 | cmp eax, [od.openfile_path] |
||
289 | jne .shift_path |
||
290 | mov [eax ], byte 34 ; quote |
||
291 | |||
292 | .no_space: |
||
293 | ;================================= |
||
294 | |||
295 | push dword[od.openfile_path] |
||
296 | push edit1 |
||
297 | call [edit_box_set_text] |
||
3634 | fedesco | 298 | ; ----------------------- ; |
3478 | 0CodErr | 299 | .exit: |
300 | ret |
||
301 | |||
302 | |||
3634 | fedesco | 303 | ; ======================================================================= ; |
3478 | 0CodErr | 304 | on_redraw: |
305 | ; redraw.start |
||
306 | mov eax, 12 |
||
307 | mov ebx, 1 |
||
308 | int 64 |
||
309 | ; get.standart.colors |
||
310 | mov eax, 48 |
||
311 | mov ebx, 3 |
||
312 | mov ecx, sc |
||
313 | mov edx, 40 |
||
3634 | fedesco | 314 | int 64 |
3478 | 0CodErr | 315 | |
316 | mov eax, [sc.work_graph] |
||
317 | mov [edit1.shift_color], eax |
||
318 | |||
319 | mov eax, [sc.work_graph] |
||
3634 | fedesco | 320 | mov [edit1.focus_border_color], eax |
3478 | 0CodErr | 321 | |
322 | mov eax, [sc.frames] |
||
323 | mov [edit1.blur_border_color], eax |
||
324 | |||
325 | mov eax, [sc.work_text] |
||
3634 | fedesco | 326 | mov [edit1.text_color], eax |
3478 | 0CodErr | 327 | |
328 | ; draw.window |
||
329 | xor eax, eax |
||
330 | mov ebx, [window.left] |
||
331 | shl ebx, 16 |
||
332 | add ebx, [window.width] |
||
333 | mov ecx, [window.top] |
||
334 | shl ecx, 16 |
||
335 | add ecx, [window.height] |
||
336 | mov edx, [sc.work] |
||
337 | or edx, 34000000h |
||
338 | mov edi, sz_run |
||
339 | int 64 |
||
3634 | fedesco | 340 | |
3478 | 0CodErr | 341 | mov eax, [window.width] |
342 | sub eax, 318 |
||
343 | shr eax, 1 |
||
344 | sub eax, 5 |
||
345 | push eax |
||
346 | push 5 |
||
347 | push sz_Type_name_of_program |
||
348 | push dword [sc.work_text] |
||
349 | call draw.text |
||
3634 | fedesco | 350 | |
351 | ; ====================| browse button |==================== |
||
3478 | 0CodErr | 352 | push 20 |
353 | push 5 |
||
354 | push 38 |
||
355 | push 42 |
||
356 | push 17 |
||
357 | call draw.button |
||
358 | |||
359 | push 3 |
||
360 | push 42 |
||
361 | push sz_browse |
||
362 | push dword [sc.work_button_text] |
||
363 | call draw.text |
||
364 | |||
3634 | fedesco | 365 | ; ====================| run button |==================== |
3478 | 0CodErr | 366 | push 10 |
367 | mov eax, [window.width] |
||
368 | sub eax, 57 |
||
369 | push eax |
||
370 | push 38 |
||
371 | push 42 |
||
372 | push 17 |
||
373 | call draw.button |
||
374 | |||
375 | mov eax, [window.width] |
||
376 | sub eax, 56 |
||
377 | push eax |
||
378 | push 42 |
||
379 | push sz_run |
||
380 | push dword [sc.work_button_text] |
||
381 | call draw.text |
||
3634 | fedesco | 382 | ; ===================================================== |
383 | |||
3478 | 0CodErr | 384 | mov eax, 57 |
385 | push eax |
||
386 | mov eax, [window.height] |
||
387 | sub eax, 44 |
||
388 | push eax |
||
389 | push dword[runresult] |
||
390 | push dword [sc.work_text] |
||
391 | call draw.text |
||
392 | |||
393 | push edit1 |
||
394 | call [edit_box_draw] |
||
3634 | fedesco | 395 | |
3478 | 0CodErr | 396 | ; redraw.finish |
397 | mov eax, 12 |
||
398 | mov ebx, 2 |
||
399 | int 64 |
||
400 | |||
401 | ret |
||
402 | |||
403 | |||
3634 | fedesco | 404 | ; ======================================================================= ; |
3478 | 0CodErr | 405 | extractrunpathandparams: |
406 | xor ecx, ecx |
||
407 | |||
408 | mov eax, [esp + 4] |
||
409 | mov [runpath], eax |
||
410 | |||
3634 | fedesco | 411 | movzx eax, byte [eax] |
3478 | 0CodErr | 412 | cmp eax, 34 |
413 | jne .start_without_quote |
||
414 | |||
415 | inc ecx |
||
3634 | fedesco | 416 | ; ----------------------- ; |
3478 | 0CodErr | 417 | .loop1: |
3634 | fedesco | 418 | mov eax, [runpath] |
419 | movzx eax, byte [eax + ecx] |
||
3478 | 0CodErr | 420 | cmp eax, 34 |
421 | jne .not_quote |
||
422 | |||
423 | mov eax, [runpath] |
||
424 | mov [eax + ecx], byte 0 |
||
425 | |||
426 | mov eax, [runpath] |
||
427 | add eax, ecx |
||
428 | mov [ptrlastendpath], eax |
||
429 | mov [lastendpath], byte 34 |
||
430 | inc ecx |
||
3634 | fedesco | 431 | ; ----------------------- ; |
432 | .skip_space1: |
||
3478 | 0CodErr | 433 | mov eax, [runpath] |
3634 | fedesco | 434 | movzx eax, byte [eax + ecx] |
3478 | 0CodErr | 435 | cmp al, 32 |
436 | jne .skipped1 |
||
437 | inc ecx |
||
438 | jmp .skip_space1 |
||
3634 | fedesco | 439 | ; ----------------------- ; |
3478 | 0CodErr | 440 | .skipped1: |
441 | mov eax, [runpath] |
||
442 | add eax, ecx |
||
443 | mov [runparams], eax |
||
444 | inc dword [runpath] |
||
3634 | fedesco | 445 | jmp .exit |
446 | ; ----------------------- ; |
||
447 | .not_quote: |
||
3478 | 0CodErr | 448 | mov eax, [runpath] |
3634 | fedesco | 449 | movzx eax, byte [eax + ecx] |
3478 | 0CodErr | 450 | |
451 | test eax, eax |
||
452 | jne .not_zero1 |
||
453 | mov eax, [runpath] |
||
454 | add eax, ecx |
||
455 | mov [runparams], eax |
||
456 | mov eax, [runpath] |
||
457 | add eax, ecx |
||
458 | mov [ptrlastendpath], eax |
||
459 | mov [lastendpath], byte 0 |
||
3634 | fedesco | 460 | jmp .exit |
461 | ; ----------------------- ; |
||
462 | .not_zero1: |
||
3478 | 0CodErr | 463 | inc ecx |
464 | jmp .loop1 |
||
3634 | fedesco | 465 | ; ----------------------- ; |
3478 | 0CodErr | 466 | .start_without_quote: |
3634 | fedesco | 467 | ; ----------------------- ; |
468 | .loop2: |
||
3478 | 0CodErr | 469 | mov eax, [runpath] |
3634 | fedesco | 470 | movzx eax, byte [eax + ecx] |
3478 | 0CodErr | 471 | cmp eax, 32 |
472 | jne .not_space |
||
473 | |||
474 | mov eax, [runpath] |
||
475 | mov [eax + ecx], byte 0 |
||
476 | |||
477 | mov eax, [runpath] |
||
478 | add eax, ecx |
||
479 | mov [ptrlastendpath], eax |
||
480 | mov [lastendpath], byte 32 |
||
481 | inc ecx |
||
3634 | fedesco | 482 | ; ----------------------- ; |
483 | .skip_space2: |
||
3478 | 0CodErr | 484 | mov eax, [runpath] |
3634 | fedesco | 485 | movzx eax, byte [eax + ecx] |
3478 | 0CodErr | 486 | cmp al, 32 |
487 | jne .skipped2 |
||
488 | inc ecx |
||
489 | jmp .skip_space2 |
||
3634 | fedesco | 490 | ; ----------------------- ; |
491 | .skipped2: |
||
3478 | 0CodErr | 492 | mov eax, [runpath] |
493 | add eax, ecx |
||
494 | mov [runparams], eax |
||
3634 | fedesco | 495 | jmp .exit |
496 | ; ----------------------- ; |
||
497 | .not_space: |
||
3478 | 0CodErr | 498 | mov eax, [runpath] |
3634 | fedesco | 499 | movzx eax, byte [eax + ecx] |
3478 | 0CodErr | 500 | |
501 | test eax, eax |
||
502 | jne .not_zero2 |
||
503 | mov eax, [runpath] |
||
504 | add eax, ecx |
||
505 | mov [runparams], eax |
||
506 | mov eax, [runpath] |
||
507 | add eax, ecx |
||
508 | mov [ptrlastendpath], eax |
||
509 | mov [lastendpath], byte 0 |
||
3634 | fedesco | 510 | jmp .exit |
511 | ; ----------------------- ; |
||
512 | .not_zero2: |
||
3478 | 0CodErr | 513 | inc ecx |
514 | jmp .loop2 |
||
3634 | fedesco | 515 | ; ----------------------- ; |
3478 | 0CodErr | 516 | .exit: |
517 | ret 4 |
||
518 | |||
3634 | fedesco | 519 | ; ======================================================================= ; |
3478 | 0CodErr | 520 | draw.button: |
521 | mov eax, 8 |
||
522 | mov ebx, [esp + 16] |
||
523 | shl ebx, 16 |
||
524 | add ebx, [esp + 8] |
||
525 | mov ecx, [esp + 12] |
||
526 | shl ecx, 16 |
||
527 | add ecx, [esp + 4] |
||
528 | mov edx, [esp + 20] |
||
529 | mov esi, [sc.work_button] |
||
530 | int 64 |
||
531 | ret 20 |
||
3634 | fedesco | 532 | ; ======================================================================= ; |
3478 | 0CodErr | 533 | draw.text: |
534 | mov eax, 4 |
||
535 | mov ebx, [esp + 16] |
||
536 | shl ebx, 16 |
||
537 | add ebx, [esp + 12] |
||
538 | mov ecx, 2147483648 |
||
539 | or ecx, [esp + 4] |
||
540 | mov edx, [esp + 8] |
||
541 | int 64 |
||
542 | ret 16 |
||
3634 | fedesco | 543 | ; ======================================================================= ; |
3478 | 0CodErr | 544 | load.library: |
545 | mov eax, 68 |
||
546 | mov ebx, 19 |
||
547 | mov ecx, [esp + 4] |
||
548 | int 64 |
||
549 | ret 4 |
||
3634 | fedesco | 550 | ; ======================================================================= ; |
3478 | 0CodErr | 551 | getprocaddress: |
552 | mov edx, [esp + 8] ; hlib |
||
553 | xor eax, eax |
||
554 | test edx, edx ; If hlib = 0 then goto .end |
||
555 | jz .end |
||
556 | ; ----------------------- ; |
||
3634 | fedesco | 557 | .next: |
3478 | 0CodErr | 558 | cmp [edx], dword 0 ; If end of export table then goto .end |
559 | jz .end |
||
560 | |||
561 | xor eax, eax |
||
562 | mov esi, [edx] |
||
563 | mov edi, [esp + 4] ; name |
||
564 | ; ----------------------- ; |
||
3634 | fedesco | 565 | .next_: |
3478 | 0CodErr | 566 | lodsb |
567 | scasb |
||
568 | jne .fail |
||
569 | or al, al |
||
570 | jnz .next_ |
||
571 | jmp .ok |
||
572 | ; ----------------------- ; |
||
3634 | fedesco | 573 | .fail: |
3478 | 0CodErr | 574 | add edx, 8 |
575 | jmp .next |
||
576 | ; ----------------------- ; |
||
577 | .ok: ; return address |
||
578 | mov eax, [edx + 4] |
||
579 | ; ----------------------- ; |
||
3634 | fedesco | 580 | .end: |
3478 | 0CodErr | 581 | ret 8 |
582 | |||
583 | |||
3634 | fedesco | 584 | |
3478 | 0CodErr | 585 | file_info: |
586 | dd 7 |
||
587 | dd 0 |
||
588 | runparams: |
||
589 | dd 0 |
||
590 | dd 0 |
||
591 | dd 0 |
||
592 | db 0 |
||
3634 | fedesco | 593 | runpath: |
594 | dd 0 |
||
595 | |||
596 | |||
3478 | 0CodErr | 597 | screen: |
598 | .height dw 0 |
||
599 | .width dw 0 |
||
3634 | fedesco | 600 | |
3478 | 0CodErr | 601 | window: |
602 | .left dd 0 |
||
603 | .top dd 0 |
||
604 | .width dd 0 |
||
605 | .height dd 0 |
||
3634 | fedesco | 606 | |
3478 | 0CodErr | 607 | box_lib dd 0 |
608 | |||
609 | edit1: |
||
610 | .width dd 0 |
||
611 | .left dd 5 |
||
612 | .top dd 19 |
||
613 | .color dd 0ffffffffh |
||
614 | .shift_color dd 0 |
||
615 | .focus_border_color dd 0 |
||
616 | .blur_border_color dd 0 |
||
617 | .text_color dd 0 |
||
618 | .max dd 4096 |
||
619 | .text dd 0 |
||
620 | .mouse_variable dd 0 |
||
4260 | 0CodErr | 621 | .flags dd 0x4002 ; always focus |
3478 | 0CodErr | 622 | .size dd 0 |
623 | .pos dd 0 |
||
624 | .offset dd 0 |
||
625 | .cl_curs_x dd 0 |
||
626 | .cl_curs_y dd 0 |
||
627 | .shift dd 0 |
||
628 | .shift_old dd 0 |
||
3634 | fedesco | 629 | |
3478 | 0CodErr | 630 | edit_box_draw dd 0 |
631 | edit_box_key dd 0 |
||
632 | edit_box_mouse dd 0 |
||
633 | edit_box_set_text dd 0 |
||
3634 | fedesco | 634 | |
635 | sc: |
||
3478 | 0CodErr | 636 | .frames dd 0 |
637 | .grab dd 0 |
||
6196 | leency | 638 | .work_3d_dark dd 0 |
639 | .work_3d_light dd 0 |
||
3478 | 0CodErr | 640 | .grab_text dd 0 |
641 | .work dd 0 |
||
642 | .work_button dd 0 |
||
643 | .work_button_text dd 0 |
||
644 | .work_text dd 0 |
||
645 | .work_graph dd 0 |
||
3634 | fedesco | 646 | |
3478 | 0CodErr | 647 | proc_lib dd 0 |
3634 | fedesco | 648 | |
649 | od: |
||
3478 | 0CodErr | 650 | .mode dd 0 |
651 | .procinfo dd 0 |
||
652 | .com_area_name dd sz_FFFFFFFF_open_dialog |
||
653 | .com_area dd 0 |
||
654 | .opendir_path dd 0 |
||
655 | .dir_default_path dd sz_SYS |
||
656 | .start_path dd sz_opendial_path |
||
657 | .draw_window dd on_redraw |
||
658 | .status dd 0 |
||
659 | .openfile_path dd 0 |
||
660 | .filename_area dd 0 |
||
661 | .filter_area dd filefilter |
||
662 | .x_size dw 414 |
||
663 | .x_start dw 0 |
||
664 | .y_size dw 414 |
||
665 | .y_start dw 0 |
||
3634 | fedesco | 666 | |
3478 | 0CodErr | 667 | opendialog_init dd 0 |
668 | opendialog_start dd 0 |
||
669 | |||
670 | filefilter dd 0 |
||
671 | runresult dd sz_empty |
||
672 | |||
673 | lastendpath db 0 |
||
3634 | fedesco | 674 | ptrlastendpath dd 0 |
675 | |||
3478 | 0CodErr | 676 | sz_empty db 0 |
677 | |||
678 | sz_box_lib db "/sys/lib/box_lib.obj",0 |
||
679 | sz_edit_box db "edit_box",0 |
||
680 | sz_edit_box_key db "edit_box_key",0 |
||
681 | sz_edit_box_mouse db "edit_box_mouse",0 |
||
682 | sz_edit_box_set_text db "edit_box_set_text",0 |
||
683 | |||
684 | sz_proc_lib db "/sys/lib/proc_lib.obj",0 |
||
685 | sz_OpenDialog_init db "OpenDialog_init",0 |
||
686 | sz_OpenDialog_start db "OpenDialog_start",0 |
||
687 | sz_FFFFFFFF_open_dialog db "FFFFFFFF_open_dialog",0 |
||
688 | sz_SYS db "/sys",0 |
||
689 | sz_opendial_path db "/sys/File managers/opendial",0 |
||
690 | |||
3634 | fedesco | 691 | if lang eq it |
692 | sz_Program_run_successfully db "Programma eseguito correttamente",0 |
||
693 | sz_File_not_found db "File non trovato",0 |
||
694 | sz_File_is_not_executable db "File non eseguibile",0 |
||
695 | sz_Too_many_processes db "Troppi processi",0 |
||
696 | sz_Access_denied db "Accesso negato",0 |
||
697 | sz_Out_of_memory db "Out of memory",0 |
||
698 | sz_Unknown_error db "Errore sconosciuto",0 |
||
3478 | 0CodErr | 699 | |
3634 | fedesco | 700 | sz_Type_name_of_program db "Digita il nome del programma per eseguirlo",0 |
3478 | 0CodErr | 701 | |
3634 | fedesco | 702 | sz_run db "Esegui ",0 |
703 | sz_browse db " Naviga",0 |
||
3478 | 0CodErr | 704 | |
3634 | fedesco | 705 | else |
706 | sz_Program_run_successfully db "Program run successfully",0 |
||
707 | sz_File_not_found db "File not found",0 |
||
708 | sz_File_is_not_executable db "File is not executable",0 |
||
709 | sz_Too_many_processes db "Too many processes",0 |
||
710 | sz_Access_denied db "Access denied",0 |
||
711 | sz_Out_of_memory db "Out of memory",0 |
||
712 | sz_Unknown_error db "Unknown error",0 |
||
713 | |||
714 | sz_Type_name_of_program db "Type name of program, and Kolibri will run it for you",0 |
||
715 | |||
716 | sz_run db " Run ",0 |
||
717 | sz_browse db " Browse ",0 |
||
718 | end if |
||
719 | ; ======================================================================= ; |
||
3478 | 0CodErr | 720 | end_: |
721 |