Rev 5476 | Rev 5889 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5476 | Rev 5868 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | dd 1, @entry, @end, @memory, @stack, @params, 0 |
4 | dd 1, @entry, @end, @memory, @stack, @params, 0 |
Line 5... | Line 5... | ||
5 | 5 | ||
6 | include "../../macros.inc" |
6 | include "../../macros.inc" |
7 | include "../../proc32.inc" |
7 | include "../../proc32.inc" |
- | 8 | include "../../dll.inc" |
|
Line 8... | Line 9... | ||
8 | include "../../dll.inc" |
9 | ; include "../../debug.inc" |
9 | 10 | ||
10 | macro cmpe a, b, c { |
11 | macro cmpe a, b, c { |
Line 32... | Line 33... | ||
32 | 33 | ||
Line 33... | Line 34... | ||
33 | ;===================================================================== |
34 | ;===================================================================== |
Line -... | Line 35... | ||
- | 35 | ||
- | 36 | @entry: |
|
- | 37 | ||
- | 38 | ;; GET PID OF ACTIVE |
|
- | 39 | ||
- | 40 | mcall 18, 7 |
|
- | 41 | ||
- | 42 | mov ecx, eax |
|
- | 43 | mcall 9, buffer |
|
- | 44 | ||
- | 45 | m2m dword[prev_pid], dword[buffer + 30] |
|
- | 46 | ||
- | 47 | ;; ALWAYS TOP |
|
34 | 48 | ||
- | 49 | mcall 18, 25, 2, -1, 1 |
|
35 | @entry: |
50 | |
36 | 51 | ;; CHECK FOR PARAMS |
|
37 | ;; CHECK FOR PARAMS |
52 | |
38 | cmpne [@params], byte 0, parse |
53 | cmpne [@params], byte 0, parse |
39 | mov eax, @params |
54 | mov eax, @params |
Line 119... | Line 134... | ||
119 | @@: |
134 | @@: |
Line 120... | Line 135... | ||
120 | 135 | ||
Line 121... | Line 136... | ||
121 | ;; PARAMS |
136 | ;; PARAMS |
- | 137 | ||
- | 138 | .params: |
|
122 | 139 | mov dl, [eax] |
|
123 | .params: |
140 | |
124 | cmpe [eax], byte 0, .params.end |
141 | cmpe dl, 0, .params.end |
- | 142 | cmpe dl, "d", .set_atcl |
|
125 | cmpe [eax], byte "d", .set_atcl |
143 | cmpe dl, "t", .set_title |
126 | cmpe [eax], byte "t", .set_title |
144 | |
127 | mov ebx, 1 |
145 | mov ebx, 1 |
128 | cmpe [eax], byte "A", .set_icon |
- | |
129 | inc ebx |
- | |
130 | cmpe [eax], byte "E", .set_icon |
- | |
131 | inc ebx |
- | |
132 | cmpe [eax], byte "W", .set_icon |
- | |
133 | inc ebx |
- | |
134 | cmpe [eax], byte "O", .set_icon |
- | |
135 | inc ebx |
- | |
136 | cmpe [eax], byte "N", .set_icon |
- | |
137 | inc ebx |
- | |
138 | cmpe [eax], byte "I", .set_icon |
- | |
139 | inc ebx |
- | |
140 | cmpe [eax], byte "F", .set_icon |
- | |
141 | inc ebx |
- | |
142 | cmpe [eax], byte "C", .set_icon |
- | |
143 | inc ebx |
- | |
144 | cmpe [eax], byte "M", .set_icon |
146 | mov ecx, sz_icons |
145 | inc ebx |
147 | @@: |
- | 148 | cmpe dl, [ecx], .set_icon |
|
146 | cmpe [eax], byte "D", .set_icon |
149 | inc ebx |
Line 147... | Line 150... | ||
147 | inc ebx |
150 | inc ecx |
Line 148... | Line 151... | ||
148 | cmpe [eax], byte "S", .set_icon |
151 | cmpne [ecx], byte 0, @b |
149 | 152 | ||
Line 315... | Line 318... | ||
315 | mov [timer.step], dword 0 |
318 | mov [timer.step], dword 0 |
316 | @@: |
319 | @@: |
Line 317... | Line 320... | ||
317 | 320 | ||
Line -... | Line 321... | ||
- | 321 | ;---------------------------- |
|
- | 322 | ||
- | 323 | call init_window |
|
- | 324 | ||
- | 325 | mcall 18, 21, [prev_pid] |
|
- | 326 | mov ecx, eax |
|
- | 327 | mcall 18, 3 |
|
- | 328 | ||
- | 329 | jmp redraw |
|
- | 330 | ||
318 | ;---------------------------- |
331 | ;---------------------------- |
319 | 332 | ||
320 | update: |
333 | update: |
321 | mcall 23, 10 |
334 | mcall 23, 10 |
322 | cmpe al, EV_REDRAW, redraw |
335 | cmpe al, EV_REDRAW, redraw |
Line 358... | Line 371... | ||
358 | jmp update |
371 | jmp update |
Line 359... | Line 372... | ||
359 | 372 | ||
Line 360... | Line 373... | ||
360 | ;---------------------------- |
373 | ;---------------------------- |
361 | - | ||
362 | draw_window: |
- | |
363 | dec dword [window.width] |
- | |
364 | dec dword [window.height] |
374 | |
365 | mcall 0, <[window.x], [window.width]>, <[window.y], [window.height]>, 0x61000000 |
- | |
Line 366... | Line 375... | ||
366 | inc dword [window.width] |
375 | draw_window: |
367 | inc dword [window.height] |
376 | call init_window |
368 | 377 | ||
369 | and ebx, 0xFFFF |
378 | and ebx, 0xFFFF |
370 | and ecx, 0xFFFF |
379 | and ecx, 0xFFFF |
Line 371... | Line 380... | ||
371 | inc ebx |
380 | inc ebx |
372 | inc ecx |
381 | inc ecx |
373 | mcall 8, , , 0x61000001 |
382 | mcall 8, , , 0x61000001 |
- | 383 | ||
374 | 384 | mov eax, 13 |
|
375 | mov eax, 13 |
385 | mov ebx, [window.width] |
376 | mov ebx, [window.width] |
386 | mov edx, 0x222222 |
377 | mov edx, 0x222222 |
387 | |
378 | cmpe [first_draw], byte 1, .draw_full |
388 | cmpe [first_draw], byte 1, .draw_full |
Line 385... | Line 395... | ||
385 | sub esi, LINEH |
395 | sub esi, LINEH |
386 | push eax ebx |
396 | push eax ebx |
387 | mcall 5, 1 |
397 | mcall 5, 1 |
388 | pop ebx eax |
398 | pop ebx eax |
389 | cmpne esi, 0, @b |
399 | cmpne esi, 0, @b |
- | 400 | ||
390 | .draw_full: |
401 | .draw_full: |
391 | mcall |
402 | mcall |
Line 392... | Line 403... | ||
392 | 403 | ||
Line 544... | Line 555... | ||
544 | sub ebx, 0x00010000 |
555 | sub ebx, 0x00010000 |
545 | mcall |
556 | mcall |
546 | @@: |
557 | @@: |
Line 547... | Line 558... | ||
547 | 558 | ||
- | 559 | ret |
|
- | 560 | ||
- | 561 | ;---------------------------- |
|
- | 562 | ||
- | 563 | init_window: |
|
- | 564 | dec dword [window.width] |
|
- | 565 | dec dword [window.height] |
|
- | 566 | mcall 0, <[window.x], [window.width]>, <[window.y], [window.height]>, 0x61000000 |
|
- | 567 | inc dword [window.width] |
|
- | 568 | inc dword [window.height] |
|
- | 569 | ||
- | 570 | ret |
|
548 | ret |
571 | |
Line 549... | Line 572... | ||
549 | ;---------------------------- |
572 | ;---------------------------- |
550 | 573 | ||
551 | @imports: |
574 | @imports: |
Line 555... | Line 578... | ||
555 | img.decode, "img_decode", \ |
578 | img.decode, "img_decode", \ |
556 | img.destroy, "img_destroy" |
579 | img.destroy, "img_destroy" |
Line 557... | Line 580... | ||
557 | 580 | ||
Line -... | Line 581... | ||
- | 581 | ;---------------------------- |
|
558 | ;---------------------------- |
582 | |
559 | 583 | sz_icons db "AEWONIFCMDS", 0 |
|
560 | sz_ifile db "/sys/notify3.png", 0 |
584 | sz_ifile db "/sys/notify3.png", 0 |
561 | sz_shname db "notify-mem-v01", 0 |
585 | sz_shname db "notify-mem-v01", 0 |
562 | sz_std db "'NOTIFY 3\n", \ |
586 | sz_std db "'NOTIFY 3\n", \ |
- | 587 | "d - disable auto-closing\n", \ |
|
- | 588 | "t - title\n", \ |
|
563 | "d - disable auto-closing\n", \ |
589 | " \n", \ |
564 | "t - title\n", \ |
590 | "ICONS:\n", \ |
565 | "A - application\n", \ |
591 | "A - application\n", \ |
566 | "E - error\n", \ |
592 | "E - error\n", \ |
567 | "W - warning\n", \ |
593 | "W - warning\n", \ |
Line 615... | Line 641... | ||
615 | .our rd 1 |
641 | .our rd 1 |
Line 616... | Line 642... | ||
616 | 642 | ||
617 | fi rb 26 |
643 | fi rb 26 |
618 | buffer rb 1024 |
644 | buffer rb 1024 |
- | 645 | first_draw rb 1 |
|
Line 619... | Line 646... | ||
619 | first_draw rb 1 |
646 | prev_pid rd 1 |
620 | 647 | ||
621 | ;===================================================================== |
648 | ;===================================================================== |
622 | rb 2048 |
649 | rb 2048 |