Subversion Repositories Kolibri OS

Rev

Rev 409 | Rev 502 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 409 Rev 411
Line 55... Line 55...
55
still:
55
still:
Line 56... Line 56...
56
 
56
 
57
    mov  eax,10              ; wait here for event
57
    mov  eax,10              ; wait here for event
Line 58... Line 58...
58
    int  0x40
58
    int  0x40
59
 
59
 
60
    cmp  eax,1               ; redraw request ?
60
    dec  eax                   ; redraw request ?
61
    je   red
61
    jz   red
62
    cmp  eax,2               ; key in buffer ?
-
 
63
    je   key
-
 
64
    cmp  eax,3               ; button in buffer ?
-
 
65
    je   button
-
 
66
 
-
 
67
    jmp  still
-
 
68
 
-
 
69
  key:                       ; key
-
 
70
    mov  eax,2               ; just read it and ignore
-
 
Line 71... Line 62...
71
    int  0x40
62
    dec  eax                   ; key in buffer ?
72
    jmp  still
63
    jz   key
73
 
64
 
Line 74... Line 65...
74
  button:                    ; button
65
  button:                    ; button
Line 75... Line 66...
75
    mov  eax,17              ; get id
66
    mov  al,17              ; get id
Line 151... Line 142...
151
    int 0x40
142
    int 0x40
Line 152... Line 143...
152
 
143
 
153
    ; (2) terminate all icons
144
    ; (2) terminate all icons
154
    mov  eax,9
145
    mov  eax,9
155
    mov  ebx,I_END
146
    mov  ebx,I_END
156
    mov  ecx,-1
147
    or      ecx,-1
157
    int  0x40
148
    int  0x40
158
    mov  edi,[ebx+30]
149
    mov  edi,[ebx+30]
159
     newread2:
150
     newread2:
160
    mov  esi,1
151
    mov  esi,1
Line 221... Line 212...
221
  no_apply:
212
  no_apply:
Line 222... Line 213...
222
 
213
 
223
    cmp  eax,22                 ; user pressed the 'add icon' button
214
    cmp  eax,22                 ; user pressed the 'add icon' button
Line 224... Line -...
224
    jne  no_add_icon
-
 
225
 
-
 
226
    mov  eax,13
-
 
227
    mov  ebx,24*65536+270
-
 
228
    mov  ecx,(250+8*14)*65536+8
-
 
229
    mov  edx,0xffffff
215
    jne  no_add_icon
230
    int  0x40
216
 
231
    mov  eax,4
217
    mov  eax,4
232
    mov  ebx,24*65536+250+8*14
218
    mov  ebx,24*65536+250+8*14
233
    mov  ecx,0xff0000
219
    mov  ecx,0xc0ff0000
234
    mov  edx,add_text
220
    mov  edx,add_text
Line 235... Line 221...
235
    mov  esi,add_text_len-add_text
221
    mov  edi,0xffffff
236
    int  0x40
222
    int  0x40
237
 
223
 
Line 292... Line 278...
292
 
278
 
293
 
279
 
Line 294... Line -...
294
    cmp  eax,23                     ; user pressed the remove icon button
-
 
295
    jne  no_remove_icon
-
 
296
 
-
 
297
    mov  eax,13
-
 
298
    mov  ebx,24*65536+270
-
 
299
    mov  ecx,(250+8*14)*65536+8
280
    cmp  eax,23                     ; user pressed the remove icon button
300
    mov  edx,0xffffff
281
    jne  no_remove_icon
301
    int  0x40
282
 
302
    mov  eax,4
283
    mov  eax,4
303
    mov  ebx,24*65536+250+8*14
284
    mov  ebx,24*65536+250+8*14
304
    mov  ecx,0xff0000
285
    mov  ecx,0xc0ff0000
Line 305... Line 286...
305
    mov  edx,rem_text
286
    mov  edx,rem_text
306
    mov  esi,rem_text_len-rem_text
287
    mov  edi,0xffffff
307
    int  0x40
288
    int  0x40
Line 563... Line 544...
563
    rep  stosb
544
    rep  stosb
564
    call print_strings
545
    call print_strings
565
    popa
546
    popa
566
    ret
547
    ret
Line -... Line 548...
-
 
548
 
-
 
549
 key:                       ; key
-
 
550
    mov  al,2               ; just read it and ignore
-
 
551
    int  0x40
-
 
552
    jmp  still
567
 
553
 
568
;   *********************************************
554
;   *********************************************
569
;   *******  WINDOW DEFINITIONS AND DRAW ********
555
;   *******  WINDOW DEFINITIONS AND DRAW ********
Line 575... Line 561...
575
    mov  eax,12                    ; function 12:tell os about windowdraw
561
    mov  eax,12                    ; function 12:tell os about windowdraw
576
    mov  ebx,1                     ; 1, start of draw
562
    mov  ebx,1                     ; 1, start of draw
577
    int  0x40
563
    int  0x40
Line 578... Line 564...
578
 
564
 
579
                                   ; DRAW WINDOW
565
                                   ; DRAW WINDOW
580
    mov  eax,0
566
    xor  eax,eax
581
    mov  ebx,210*65536+300
567
    mov  ebx,210*65536+300
582
    mov  ecx,30*65536+390-14
568
    mov  ecx,30*65536+390-14
583
    mov  edx,0x03ffffff
-
 
584
    mov  esi,0x808899ff
-
 
585
    mov  edi,0x008899ff
-
 
586
    int  0x40
-
 
587
 
569
    mov  edx,0x13ffffff
588
                                   ; WINDOW LABEL
-
 
589
    mov  eax,4
-
 
590
    mov  ebx,8*65536+8
-
 
591
    mov  ecx,0x10ffffff
-
 
592
    mov  edx,labelt
-
 
593
    mov  esi,labellen-labelt
570
    mov  edi,header       ; WINDOW LABEL
Line 594... Line 571...
594
    int  0x40
571
    int  0x40
595
 
572
 
596
    mov  eax,13                    ; WINDOW AREA
573
    mov  eax,13                    ; WINDOW AREA
Line 658... Line 635...
658
    lea  edx,[ebx+8 shl 16]
635
    lea  edx,[ebx+8 shl 16]
659
    mov  ecx,[icon_count]
636
    mov  ecx,[icon_count]
660
    mcall 47,0x30000,,,0
637
    mcall 47,0x30000,,,0
Line 661... Line 638...
661
 
638
 
-
 
639
;;
662
;;
640
    mov  eax,4
663
    mov  ebx,24*65536+250+14+14+14
641
    mov  ebx,24*65536+250+14+14+14
664
    mov  ecx,0xffffff
642
    mov  ecx,0xffffff
665
    mov  edx,text
643
    mov  edx,text
666
    mov  esi,47
644
    mov  esi,47
667
  newline:
645
  newline:
668
    mov  ecx,[edx]
646
    mov  ecx,[edx]
669
    add  edx,4
-
 
670
    mov  eax,4
647
    add  edx,4
671
    int  0x40
648
    int  0x40
672
    add  ebx,14
649
    add  ebx,14
673
    add  edx,47
650
    add  edx,47
674
    cmp  [edx],byte 'x'
651
    cmp  [edx],byte 'x'
Line 799... Line 776...
799
      db 255,255,255,0,   ' €€Œ…’›                                     '
776
      db 255,255,255,0,   ' €€Œ…’›                                     '
800
      db 255,255,255,0,   '                 ˆŒ…ˆ’œ                     '
777
      db 255,255,255,0,   '                 ˆŒ…ˆ’œ                     '
801
      db 255,255,255,0,   '      „Ž€‚ˆ’œ              “„€‹ˆ’œ            '
778
      db 255,255,255,0,   '      „Ž€‚ˆ’œ              “„€‹ˆ’œ            '
802
      db 0,0,0,0,         '€†Œˆ’… € Ž‡ˆ–ˆž ˆŠŽŠˆ „‹Ÿ …„€Š’ˆŽ‚€ˆŸ   '
779
      db 0,0,0,0,         '€†Œˆ’… € Ž‡ˆ–ˆž ˆŠŽŠˆ „‹Ÿ …„€Š’ˆŽ‚€ˆŸ   '
803
      db                  'x' ; <- END MARKER, DONT DELETE
780
      db                  'x' ; <- END MARKER, DONT DELETE
804
add_text db '€†Œˆ’… € Ž‡ˆ–ˆž …ˆ‘Ž‹œ‡“…ŒŽ‰ ˆŠŽŠˆ'
781
add_text             db '€†Œˆ’… € Ž‡ˆ–ˆž …ˆ‘Ž‹œ‡“…ŒŽ‰ ˆŠŽŠˆ     ',0
-
 
782
 
-
 
783
rem_text             db '€†Œˆ’… € Ž‡ˆ–ˆž ˆ‘Ž‹œ‡“…ŒŽ‰ ˆŠŽŠˆ       ',0
805
add_text_len:
784
header                 db 'Œ¥­¥¤¦¥à ¨ª®­®ª',0
Line 806... Line -...
806
 
-
 
807
rem_text db '€†Œˆ’… € Ž‡ˆ–ˆž ˆ‘Ž‹œ‡“…ŒŽ‰ ˆŠŽŠˆ'
-
 
808
rem_text_len:
-
 
809
  labelt:
-
 
810
       db ' áâனª  à ¡®ç¥£® á⮫ '
-
 
811
  labellen:
785
 
812
else if lang eq en
786
else if lang eq ge
813
  text:
787
  text:
814
      db 255,255,255,0,   '   TITLE                                       '
788
      db 255,255,255,0,   '   TITLE                                       '
815
      db 255,255,255,0,   '  APP NAME                                     '
789
      db 255,255,255,0,   '  APP NAME                                     '
816
      db 255,255,255,0,   ' PARAMETERS                                    '
790
      db 255,255,255,0,   ' PARAMETER                                     '
817
      db 255,255,255,0,   '                APPLY CHANGES                  '
791
      db 255,255,255,0,   '                ANWENDEN                       '
818
      db 255,255,255,0,   '      ADD ICON              REMOVE ICON        '
792
      db 255,255,255,0,   '     HINZUFUEGEN              ENTFERNEN        '
819
      db 0,0,0,0,         'CLICK BUTTON ON ICON POSITION FOR EDIT         '
793
      db 0,0,0,0,         'AUF BUTTON KLICKEN, UM ICON ZU EDITIEREN       '
820
      db                  'x' ; <- END MARKER, DONT DELETE
794
      db                  'x' ; <- END MARKER, DONT DELETE
-
 
795
add_text             db 'AUF UNBENUTZTE ICONPOSITION KLICKEN         ',0
-
 
796
 
821
add_text db 'CLICK ON A NOT USED POSITION'
797
rem_text             db 'ICON ANKLICKEN; DAS GELOESCHT WERDEN SOLL',0
Line 822... Line -...
822
add_text_len:
-
 
823
 
-
 
824
rem_text db 'CLICK ICON POSITION; YOU WANT TO DELETE'
-
 
825
rem_text_len:
-
 
826
  labelt:
-
 
827
       db 'Icon Manager'
798
header     db 'Icon Manager',0
828
  labellen:
799
 
829
else
800
else
830
  text:
801
  text:
831
      db 255,255,255,0,   '   TITLE                                       '
802
      db 255,255,255,0,   '   TITLE                                       '
832
      db 255,255,255,0,   '  APP NAME                                     '
803
      db 255,255,255,0,   '  APP NAME                                     '
833
      db 255,255,255,0,   ' PARAMETER                                     '
804
      db 255,255,255,0,   ' PARAMETERS                                    '
834
      db 255,255,255,0,   '                ANWENDEN                       '
805
      db 255,255,255,0,   '                APPLY CHANGES                  '
835
      db 255,255,255,0,   '     HINZUFUEGEN              ENTFERNEN        '
806
      db 255,255,255,0,   '      ADD ICON              REMOVE ICON        '
836
      db 0,0,0,0,         'AUF BUTTON KLICKEN, UM ICON ZU EDITIEREN       '
807
      db 0,0,0,0,         'CLICK BUTTON ON ICON POSITION FOR EDIT         '
837
      db                  'x' ; <- END MARKER, DONT DELETE
-
 
Line 838... Line 808...
838
add_text db 'AUF UNBENUTZTE ICONPOSITION KLICKEN'
808
      db                  'x' ; <- END MARKER, DONT DELETE
839
add_text_len:
-
 
840
 
-
 
841
rem_text db 'ICON ANKLICKEN; DAS GELOESCHT WERDEN SOLL'
809
add_text             db 'CLICK ON A NOT USED POSITION               ',0
842
rem_text_len:
-
 
Line 843... Line 810...
843
  labelt:
810
 
Line 844... Line -...
844
       db 'Icon Manager'
-
 
845
  labellen:
-
 
846
 
811
rem_text            db 'CLICK ICON POSITION; YOU WANT TO DELETE',0
847
end if
812
header     db 'Icon Manager',0
848
 
813
 
Line 849... Line 814...
849
;ya    dd 0
814
end if
Line 1031... Line 996...
1031
 
996
 
1032
  .lp1: call    draw_window2
997
  .lp1: call    draw_window2
Line 1033... Line 998...
1033
        jmp     still2
998
        jmp     still2
1034
 
999
 
1035
  key2:
1000
  key2:
Line 1036... Line 1001...
1036
    mov  eax,2
1001
    mov  al,2
Line 1037... Line 1002...
1037
    int  0x40
1002
    int  0x40
1038
 
1003
 
1039
    jmp  still2
1004
    jmp  still2
Line 1040... Line -...
1040
 
-
 
Line 1041... Line 1005...
1041
  button2:
1005
 
1042
    mov  eax,17
1006
  button2:
1043
    int  0x40
1007
    mov  al,17
1044
 
1008
    int  0x40
Line 1059... Line 1023...
1059
;    lea  ebx,[ebp+19]
1023
;    lea  ebx,[ebp+19]
1060
    mov  ebx,finfo_start
1024
    mov  ebx,finfo_start
1061
    mov  eax,70
1025
    mov  eax,70
1062
    int  0x40
1026
    int  0x40
1063
;    dph  eax
1027
;    dph  eax
1064
    cmp  eax,1024
1028
;    cmp  eax,1024
1065
    jae  still2
1029
;    jae  still2
1066
    mcall 55,eax, , ,klick_music
-
 
1067
    jmp  still2
1030
    jmp  still2
Line 1068... Line -...
1068
 
-
 
1069
klick_music db 0x85,0x60,0x85,0x70,0x85,0x65,0
-
 
1070
 
1031
 
1071
fill_paths:
1032
fill_paths:
1072
        push esi edi
1033
        push esi edi
1073
;        dps  '>'
1034
;        dps  '>'
1074
        movzx ecx,byte[str_lens+ebx]
1035
        movzx ecx,byte[str_lens+ebx]
Line 1281... Line 1242...
1281
draw_text:
1242
draw_text:
Line 1282... Line 1243...
1282
 
1243
 
1283
    mov  esi,[ebp+8]
1244
    mov  esi,[ebp+8]
1284
    add  esi,3
1245
    add  esi,3
1285
    push edi
1246
    push edi
1286
    mov  edi,labelt
1247
    mov  edi,header
1287
    mov  ecx,8
1248
    mov  ecx,8
1288
    cld
1249
    cld
1289
    rep  movsb
1250
    rep  movsb
1290
    pop  edi
1251
    pop  edi
1291
    mov   eax,labelt
1252
    mov   eax,header
1292
  news2:
1253
  news2:
1293
    cmp   [eax],byte 33
1254
    cmp   [eax],byte 33
1294
    jb      founde
1255
    jb      founde
1295
    inc   eax
1256
    inc   eax
1296
    cmp   eax,labelt+8;11
1257
    cmp   eax,header+8;11
1297
    jb      news2
1258
    jb      news2
1298
   founde:
1259
   founde:
1299
    sub   eax,labelt
1260
    sub   eax,header
Line 1300... Line 1261...
1300
    mov   [tl],eax
1261
    mov   [tl],eax
1301
 
1262
 
1302
    mov   eax,[tl]
1263
    mov   eax,[tl]
Line 1303... Line 1264...
1303
    lea   eax,[eax+eax*2]  ; eax *= char_width/2
1264
    lea   eax,[eax+eax*2]  ; eax *= char_width/2
1304
    shl   eax,16
1265
    shl   eax,16
Line 1305... Line 1266...
1305
 
1266
 
1306
    mov   ebx,27*65536+42
1267
    mov   ebx,27*65536+40
1307
    sub   ebx,eax
1268
    sub   ebx,eax
1308
 
1269
 
1309
    mov   eax,4
1270
    mov   eax,4
1310
    xor   ecx,ecx         ; black shade of text
1271
    xor   ecx,ecx         ; black shade of text
1311
    mov   edx,labelt
1272
    mov   edx,header
1312
    mov   esi,[tl]
1273
    mov   esi,[tl]
Line 1359... Line 1320...
1359
    int  0x40
1320
    int  0x40
Line 1360... Line 1321...
1360
 
1321
 
1361
    mov  eax,8      ; button
1322
    mov  eax,8      ; button
1362
    mov  ebx,51
1323
    mov  ebx,51
1363
    mov  ecx,50
1324
    mov  ecx,50
1364
    mov  edx,1+20000000 ; or 0x40000000
1325
    mov  edx,0x40000001
Line 1365... Line 1326...
1365
    int  0x40
1326
    int  0x40
1366
 
1327
 
1367
    mov  eax,5
1328
    mov  eax,5