Subversion Repositories Kolibri OS

Rev

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

Rev 109 Rev 485
Line 57... Line 57...
57
     cmp  [window_on],1
57
     cmp  [window_on],1
58
     je   no_open
58
     je   no_open
Line 59... Line 59...
59
 
59
 
60
     mov  eax,37
60
     mov  eax,37
61
     mov  ebx,2
61
     mov  ebx,2
Line 62... Line 62...
62
     int  0x40
62
     mcall
63
 
63
 
Line 64... Line 64...
64
     cmp  [window_on],0
64
     cmp  [window_on],0
Line 71... Line 71...
71
 
71
 
Line 72... Line 72...
72
   waitformouse:
72
   waitformouse:
73
 
73
 
74
     mov  eax,23
74
     mov  eax,23
Line 75... Line 75...
75
     mov  ebx,2
75
     mov  ebx,2
76
     int  0x40
76
     mcall
Line 77... Line 77...
77
 
77
 
78
     cmp  eax,0
78
     cmp  eax,0
79
     jne  no_open
79
     jne  no_open
Line 80... Line 80...
80
 
80
 
81
     mov  eax,37
81
     mov  eax,37
Line 82... Line 82...
82
     mov  ebx,2
82
     mov  ebx,2
83
     int  0x40
83
     mcall
84
 
84
 
Line 85... Line 85...
85
     cmp  eax,0
85
     cmp  eax,0
Line 86... Line 86...
86
     jne  waitformouse
86
     jne  waitformouse
87
 
87
 
Line 118... Line 118...
118
     mov  [closet],1
118
     mov  [closet],1
119
     mov  ecx,100
119
     mov  ecx,100
120
   waitm:
120
   waitm:
121
     mov  eax,5
121
     mov  eax,5
122
     mov  ebx,1
122
     mov  ebx,1
123
     int  0x40
123
     mcall
124
     dec  ecx
124
     dec  ecx
125
     jz   no_open
125
     jz   no_open
126
     cmp  [window_on],0
126
     cmp  [window_on],0
127
     jne  waitm
127
     jne  waitm
128
   noww:
128
   noww:
Line 148... Line 148...
148
     mov  [g_1],1
148
     mov  [g_1],1
Line 149... Line 149...
149
 
149
 
150
     mov  eax,9
150
     mov  eax,9
151
     mov  ebx,table
151
     mov  ebx,table
152
     mov  ecx,-1
152
     mov  ecx,-1
Line 153... Line 153...
153
     int  0x40
153
     mcall
154
 
154
 
155
     mov  eax,[table+34]
155
     mov  eax,[table+34]
156
     mov  [mo_x],eax
156
     mov  [mo_x],eax
Line 157... Line 157...
157
     mov  eax,[table+38]
157
     mov  eax,[table+38]
158
     mov  [mo_y],eax
158
     mov  [mo_y],eax
159
 
159
 
160
     mov  eax,51
160
     mov  eax,51
161
     mov  ebx,1
161
     mov  ebx,1
Line 162... Line 162...
162
     mov  ecx,alert_entry
162
     mov  ecx,alert_entry
Line 163... Line 163...
163
     mov  edx,[g_stack]
163
     mov  edx,[g_stack]
Line 177... Line 177...
177
draw_menu:
177
draw_menu:
Line 178... Line 178...
178
 
178
 
179
     mov  eax,9
179
     mov  eax,9
180
     mov  ebx,table
180
     mov  ebx,table
181
     mov  ecx,-1
181
     mov  ecx,-1
Line 182... Line 182...
182
     int  0x40
182
     mcall
183
 
183
 
Line 184... Line 184...
184
     cmp  [table+46],dword 30
184
     cmp  [table+46],dword 30
Line 191... Line 191...
191
     inc  ebx
191
     inc  ebx
192
     mov  ecx,[m_y]
192
     mov  ecx,[m_y]
193
     shl  ecx,16
193
     shl  ecx,16
194
     add  ecx,[m_ys]
194
     add  ecx,[m_ys]
195
     mov  edx,0xf0f8ff
195
     mov  edx,0xf0f8ff
196
     int  0x40
196
     mcall
Line 197... Line 197...
197
 
197
 
198
     mov  eax,38     ; egde lines
198
     mov  eax,38     ; egde lines
199
     mov  ebx,[m_x]
199
     mov  ebx,[m_x]
200
     shl  ebx,16
200
     shl  ebx,16
201
     add  ebx,[m_x]
201
     add  ebx,[m_x]
202
     add  ebx,[m_xs]
202
     add  ebx,[m_xs]
203
     mov  ecx,[m_y]
203
     mov  ecx,[m_y]
204
     shl  ecx,16
204
     shl  ecx,16
205
     add  ecx,[m_y]
205
     add  ecx,[m_y]
206
     mov  edx,0x000000
206
     mov  edx,0x000000
207
     int  0x40
207
     mcall
208
     mov  eax,38
208
     mov  eax,38
209
     mov  ecx,[m_y]
209
     mov  ecx,[m_y]
210
     add  ecx,[m_ys]
210
     add  ecx,[m_ys]
211
     shl  ecx,16
211
     shl  ecx,16
212
     add  ecx,[m_y]
212
     add  ecx,[m_y]
213
     add  ecx,[m_ys]
213
     add  ecx,[m_ys]
Line 214... Line 214...
214
     int  0x40
214
     mcall
215
 
215
 
216
     mov  esi,menu-1
216
     mov  esi,menu-1
217
     mov  edi,[m_x]
217
     mov  edi,[m_x]
Line 229... Line 229...
229
     add  ebx,0x00050004
229
     add  ebx,0x00050004
230
     mov  ecx,0x000000
230
     mov  ecx,0x000000
231
     mov  edx,esi
231
     mov  edx,esi
232
     add  edx,3
232
     add  edx,3
233
     mov  esi,12
233
     mov  esi,12
234
     int  0x40    ; draw text
234
     mcall    ; draw text
235
     pop  esi
235
     pop  esi
236
     add  esi,2
236
     add  esi,2
237
     add  edi,50
237
     add  edi,50
238
     inc  ebp
238
     inc  ebp
Line 280... Line 280...
280
 
280
 
281
   mov  eax,51
281
   mov  eax,51
282
   mov  ebx,1
282
   mov  ebx,1
283
   mov  ecx,alert_entry
283
   mov  ecx,alert_entry
284
   mov  edx,[g_stack]
284
   mov  edx,[g_stack]
Line 285... Line 285...
285
   int  0x40
285
   mcall
Line 286... Line 286...
286
 
286
 
Line 296... Line 296...
296
 
296
 
Line 297... Line 297...
297
alert_still:
297
alert_still:
298
 
298
 
299
    mov  eax,23                 ; wait here for event
299
    mov  eax,23                 ; wait here for event
Line 300... Line 300...
300
    mov  ebx,1
300
    mov  ebx,1
301
    int  0x40
301
    mcall
302
 
302
 
303
    cmp  eax,1                  ; redraw request ?
303
    cmp  eax,1                  ; redraw request ?
Line 311... Line 311...
311
    jne  ccc
311
    jne  ccc
Line 312... Line 312...
312
 
312
 
313
    mov  eax,9
313
    mov  eax,9
314
    mov  ebx,table
314
    mov  ebx,table
315
    mov  ecx,-1
315
    mov  ecx,-1
Line 316... Line 316...
316
    int  0x40
316
    mcall
317
 
317
 
318
    cmp  ax,[table+4]
318
    cmp  ax,[table+4]
319
    je   no_close
319
    je   no_close
320
  ccc:
320
  ccc:
321
    mov  [closet],0
321
    mov  [closet],0
322
    mov  [g_n],-1
322
    mov  [g_n],-1
323
    mov  [menu_action],'----'
323
    mov  [menu_action],'----'
324
    mov  [window_on],0
324
    mov  [window_on],0
325
    mov  eax,-1
325
    mov  eax,-1
Line 326... Line 326...
326
    int  0x40
326
    mcall
Line 327... Line 327...
327
  no_close:
327
  no_close:
328
 
328
 
329
    jmp  alert_still
329
    jmp  alert_still
Line 330... Line 330...
330
 
330
 
331
  alert_red:                          ; redraw
331
  alert_red:                          ; redraw
332
    call alert_draw_window
332
    call alert_draw_window
333
    jmp  alert_still
333
    jmp  alert_still
Line 334... Line 334...
334
 
334
 
335
  alert_key:                    ; key
335
  alert_key:                    ; key
336
    mov  eax,2                  ; just read it and ignore
336
    mov  eax,2                  ; just read it and ignore
Line 337... Line 337...
337
    int  0x40
337
    mcall
338
    jmp  alert_still
338
    jmp  alert_still
339
 
339
 
340
  alert_button:                 ; button
340
  alert_button:                 ; button
Line 362... Line 362...
362
 
362
 
363
    mov  [closet],0
363
    mov  [closet],0
364
    mov  [g_n],-1
364
    mov  [g_n],-1
365
    mov  [window_on],0
365
    mov  [window_on],0
366
    mov  eax,-1                 ; close this program
366
    mov  eax,-1                 ; close this program
Line 367... Line 367...
367
    int  0x40
367
    mcall
Line 368... Line 368...
368
 
368
 
Line 379... Line 379...
379
alert_draw_window:
379
alert_draw_window:
Line 380... Line 380...
380
 
380
 
381
 
381
 
382
    mov  eax,12                    ; function 12:tell os about windowdraw
382
    mov  eax,12                    ; function 12:tell os about windowdraw
Line 383... Line 383...
383
    mov  ebx,1                     ; 1, start of draw
383
    mov  ebx,1                     ; 1, start of draw
384
    int  0x40
384
    mcall
Line 385... Line 385...
385
 
385
 
Line 416... Line 416...
416
    add  edx,7
416
    add  edx,7
417
    add  ecx,edx
417
    add  ecx,edx
418
    mov  edx,0x00ffffff            ; color of work area RRGGBB,8->color gl
418
    mov  edx,0x00ffffff            ; color of work area RRGGBB,8->color gl
419
    mov  esi,0x00ffffff            ; color of grab bar  RRGGBB,8->color gl
419
    mov  esi,0x00ffffff            ; color of grab bar  RRGGBB,8->color gl
420
    mov  edi,0x000000cc            ; color of frames    RRGGBB
420
    mov  edi,0x000000cc            ; color of frames    RRGGBB
421
    int  0x40
421
    mcall
Line 422... Line 422...
422
 
422
 
Line 423... Line 423...
423
    pop  edx
423
    pop  edx
424
 
424
 
Line 443... Line 443...
443
    shl  ecx,16
443
    shl  ecx,16
444
    add  ecx,0xfffc0000+14
444
    add  ecx,0xfffc0000+14
445
    mov  edx,0x40000000
445
    mov  edx,0x40000000
446
    add  edx,ebp
446
    add  edx,ebp
447
    mov  esi,0
447
    mov  esi,0
448
    int  0x40
448
    mcall
449
    popa
449
    popa
450
    mov  eax,4     ; draw text
450
    mov  eax,4     ; draw text
451
    int  0x40
451
    mcall
452
    inc  ebp
452
    inc  ebp
453
    add  ebx,14
453
    add  ebx,14
454
    jmp  no_d_found
454
    jmp  no_d_found
455
  d_drawed:
455
  d_drawed:
Line 459... Line 459...
459
 
459
 
460
    cmp  [window_on],1
460
    cmp  [window_on],1
Line 461... Line 461...
461
    jne  no_win_1
461
    jne  no_win_1
462
 
462
 
463
    mov  eax,14                    ; to middle of screen
463
    mov  eax,14                    ; to middle of screen
464
    int  0x40
464
    mcall
465
    mov  ecx,eax
465
    mov  ecx,eax
466
    and  ecx,0xffff
466
    and  ecx,0xffff
467
    shr  ecx,1
467
    shr  ecx,1
Line 478... Line 478...
478
    shl  ecx,16
478
    shl  ecx,16
479
    mov  cx,110                    ; [y start] *65536 + [y size]
479
    mov  cx,110                    ; [y start] *65536 + [y size]
480
    mov  edx,0x02ffffff            ; color of work area RRGGBB,8->color gl
480
    mov  edx,0x02ffffff            ; color of work area RRGGBB,8->color gl
481
    mov  esi,0x80d05050            ; color of grab bar  RRGGBB,8->color gl
481
    mov  esi,0x80d05050            ; color of grab bar  RRGGBB,8->color gl
482
    mov  edi,0x00d05050            ; color of frames    RRGGBB
482
    mov  edi,0x00d05050            ; color of frames    RRGGBB
483
    int  0x40
483
    mcall
Line 484... Line 484...
484
 
484
 
485
 
485
 
486
    mov  eax,4                       ; label
486
    mov  eax,4                       ; label
487
    mov  ebx,8*65536+8
487
    mov  ebx,8*65536+8
488
    mov  ecx,0x10ddeeff
488
    mov  ecx,0x10ddeeff
489
    mov  edx,alert_labelt1
489
    mov  edx,alert_labelt1
Line 490... Line 490...
490
    mov  esi,alert_label1len-alert_labelt1
490
    mov  esi,alert_label1len-alert_labelt1
491
    int  0x40
491
    mcall
492
 
492
 
493
    mov  eax,4
493
    mov  eax,4
494
    mov  ebx,10*65536+43
494
    mov  ebx,10*65536+43
495
    mov  ecx,0x10000000
495
    mov  ecx,0x10000000
Line 496... Line 496...
496
    mov  edx,[g_t]
496
    mov  edx,[g_t]
497
    mov  esi,[g_l]
497
    mov  esi,[g_l]
Line 498... Line 498...
498
    int  0x40
498
    mcall
Line 507... Line 507...
507
    shl  ebx,16
507
    shl  ebx,16
508
    add  ebx,30*65536+40
508
    add  ebx,30*65536+40
509
    mov  ecx,75*65536+16
509
    mov  ecx,75*65536+16
510
    mov  edx,3
510
    mov  edx,3
511
    mov  esi,0x446688
511
    mov  esi,0x446688
512
    int  0x40
512
    mcall
Line 513... Line 513...
513
 
513
 
514
    mov  eax,4
514
    mov  eax,4
515
    mov  ebx,[g_x]
515
    mov  ebx,[g_x]
516
    sub  ebx,100
516
    sub  ebx,100
517
    shr  ebx,1
517
    shr  ebx,1
518
    shl  ebx,16
518
    shl  ebx,16
519
    add  ebx,31*65536+80
519
    add  ebx,31*65536+80
520
    mov  ecx,0x10ffffff
520
    mov  ecx,0x10ffffff
521
    mov  edx,alert_t2
521
    mov  edx,alert_t2
522
    mov  esi,alert_t2len-alert_t2
522
    mov  esi,alert_t2len-alert_t2
Line 523... Line 523...
523
    int  0x40
523
    mcall
Line 524... Line 524...
524
 
524
 
525
  gadgets_no_1:
525
  gadgets_no_1:
Line 534... Line 534...
534
    shl  ebx,16
534
    shl  ebx,16
535
    add  ebx,0*65536+40
535
    add  ebx,0*65536+40
536
    mov  ecx,75*65536+16
536
    mov  ecx,75*65536+16
537
    mov  edx,1
537
    mov  edx,1
538
    mov  esi,0x446688
538
    mov  esi,0x446688
539
    int  0x40
539
    mcall
Line 540... Line 540...
540
 
540
 
541
    mov  eax,8
541
    mov  eax,8
542
    mov  ebx,[g_x]
542
    mov  ebx,[g_x]
543
    sub  ebx,100
543
    sub  ebx,100
544
    shr  ebx,1
544
    shr  ebx,1
545
    shl  ebx,16
545
    shl  ebx,16
546
    add  ebx,57*65536+40
546
    add  ebx,57*65536+40
547
    mov  ecx,75*65536+16
547
    mov  ecx,75*65536+16
548
    mov  edx,2
548
    mov  edx,2
549
    mov  esi,0x446688
549
    mov  esi,0x446688
Line 550... Line 550...
550
    int  0x40
550
    mcall
551
 
551
 
552
    mov  eax,4
552
    mov  eax,4
553
    mov  ebx,[g_x]
553
    mov  ebx,[g_x]
554
    sub  ebx,100
554
    sub  ebx,100
555
    shr  ebx,1
555
    shr  ebx,1
556
    shl  ebx,16
556
    shl  ebx,16
557
    add  ebx,1*65536+80
557
    add  ebx,1*65536+80
558
    mov  ecx,0x10ffffff
558
    mov  ecx,0x10ffffff
559
    mov  edx,alert_t1
559
    mov  edx,alert_t1
Line 560... Line 560...
560
    mov  esi,alert_t1len-alert_t1
560
    mov  esi,alert_t1len-alert_t1
Line 561... Line 561...
561
    int  0x40
561
    mcall
Line 562... Line 562...
562
 
562
 
563
  gadgets_no_2:
563
  gadgets_no_2:
564
 
564
 
Line 565... Line 565...
565
  no_win_1:
565
  no_win_1:
Line 566... Line 566...
566
 
566