Subversion Repositories Kolibri OS

Rev

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

Rev 9709 Rev 9910
Line 4... Line 4...
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
6
;;                                                              ;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 8... Line 8...
8
 
8
 
Line 9... Line 9...
9
$Revision: 9709 $
9
$Revision: 9910 $
10
 
10
 
11
;==============================================================================
11
;==============================================================================
Line 282... Line 282...
282
 
282
 
283
.getScreenWorkingArea:
283
.getScreenWorkingArea:
284
; out: eax = pack[left, right], ebx = pack[top, bottom]
284
; out: eax = pack[left, right], ebx = pack[top, bottom]
285
        mov     eax, [screen_workarea.left - 2]
285
        mov     eax, [screen_workarea.left - 2]
286
        mov     ax, word[screen_workarea.right]
286
        mov     ax, word[screen_workarea.right]
287
        mov     [esp + 32], eax
287
        mov     [esp + SYSCALL_STACK.eax], eax
288
        mov     eax, [screen_workarea.top - 2]
288
        mov     eax, [screen_workarea.top - 2]
289
        mov     ax, word[screen_workarea.bottom]
289
        mov     ax, word[screen_workarea.bottom]
290
        mov     [esp + 20], eax
290
        mov     [esp + SYSCALL_STACK.ebx], eax
Line 291... Line 291...
291
        ret
291
        ret
292
 
292
 
293
.setScreenWorkingArea:
293
.setScreenWorkingArea:
Line 344... Line 344...
344
        jmp     calculatescreen
344
        jmp     calculatescreen
Line 345... Line 345...
345
 
345
 
346
.getSkinMargins:
346
.getSkinMargins:
347
; out: eax = pack[left, right], ebx = pack[top, bottom]
347
; out: eax = pack[left, right], ebx = pack[top, bottom]
348
        mov     eax, [_skinmargins + 0]
348
        mov     eax, [_skinmargins + 0]
349
        mov     [esp + 32], eax
349
        mov     [esp + SYSCALL_STACK.eax], eax
350
        mov     eax, [_skinmargins + 4]
350
        mov     eax, [_skinmargins + 4]
351
        mov     [esp + 20], eax
351
        mov     [esp + SYSCALL_STACK.ebx], eax
Line 352... Line 352...
352
        ret
352
        ret
353
 
353
 
354
.setSkin:
354
.setSkin:
355
; in: ecx -> file path string
355
; in: ecx -> file path string
356
        mov     ebx, ecx
356
        mov     ebx, ecx
357
        call    read_skin_file
357
        call    read_skin_file
358
        mov     [esp + 32], eax
358
        mov     [esp + SYSCALL_STACK.eax], eax
359
        test    eax, eax
359
        test    eax, eax
360
        jnz     .ret
360
        jnz     .ret
Line 361... Line 361...
361
        call    .calculateScreen
361
        call    .calculateScreen
362
        jmp     .redrawScreen
362
        jmp     .redrawScreen
363
 
363
 
364
.getFontSmoothing:
364
.getFontSmoothing:
365
        xor     eax, eax
365
        xor     eax, eax
Line 366... Line 366...
366
        mov     al, [fontSmoothing]
366
        mov     al, [fontSmoothing]
367
        mov     [esp + 32], eax
367
        mov     [esp + SYSCALL_STACK.eax], eax
368
        ret
368
        ret
Line 369... Line 369...
369
 
369
 
370
.setFontSmoothing:
370
.setFontSmoothing:
371
        mov     [fontSmoothing], cl
371
        mov     [fontSmoothing], cl
372
        ret
372
        ret
373
 
373
 
Line 374... Line 374...
374
.getFontSize:
374
.getFontSize:
375
        xor     eax, eax
375
        xor     eax, eax
376
        mov     al, [fontSize]
376
        mov     al, [fontSize]
Line 391... Line 391...
391
        call    getFullPath
391
        call    getFullPath
392
        test    eax, eax
392
        test    eax, eax
393
        jz      @f
393
        jz      @f
394
        mov     ebx, [esp]
394
        mov     ebx, [esp]
395
        call    read_skin_file
395
        call    read_skin_file
396
        mov     [esp + 32 + 4], eax
396
        mov     [esp + SYSCALL_STACK.eax + 4], eax
397
@@:
397
@@:
398
        call    kernel_free
398
        call    kernel_free
399
        call    .calculateScreen
399
        call    .calculateScreen
400
        jmp     .redrawScreen
400
        jmp     .redrawScreen
Line 503... Line 503...
503
        jmp     window._.draw_window_caption
503
        jmp     window._.draw_window_caption
504
;------------------------------------------------------------------------------
504
;------------------------------------------------------------------------------
Line 505... Line 505...
505
 
505
 
506
align 4
506
align 4
507
set_window_defaults:
507
set_window_defaults:
508
        mov     byte [window_data + 0x20 + WDATA.cl_titlebar + 3], 1 ; desktop is not movable
508
        mov     byte [window_data + sizeof.WDATA + WDATA.cl_titlebar + 3], 1 ; desktop is not movable
509
        push    eax ecx
509
        push    eax ecx
510
        xor     eax, eax
510
        xor     eax, eax
511
        mov     ecx, WIN_STACK
511
        mov     ecx, WIN_STACK
512
;--------------------------------------
512
;--------------------------------------
Line 1088... Line 1088...
1088
align 4
1088
align 4
1089
.loop:
1089
.loop:
1090
        movzx   edi, word[WIN_POS + eax * 2]
1090
        movzx   edi, word[WIN_POS + eax * 2]
1091
        shl     edi, BSF sizeof.WDATA
1091
        shl     edi, BSF sizeof.WDATA
1092
; it is a unused slot?
1092
; it is a unused slot?
1093
        cmp     byte [edi*8 + SLOT_BASE + APPDATA.state], TSTATE_FREE
1093
        cmp     byte [SLOT_BASE + edi*8 + APPDATA.state], TSTATE_FREE
1094
        je      @f
1094
        je      @f
1095
; it is a hidden thread?
1095
; it is a hidden thread?
1096
        lea     esi, [edi*8+SLOT_BASE+APPDATA.app_name]
1096
        lea     esi, [SLOT_BASE + edi*8 + APPDATA.app_name]
1097
        cmp     [esi], byte '@'
1097
        cmp     [esi], byte '@'
1098
        je      @f
1098
        je      @f
1099
; is it already minimized?
1099
; is it already minimized?
1100
        test    [edi + window_data+WDATA.fl_wstate], WSTATE_MINIMIZED
1100
        test    [edi + window_data+WDATA.fl_wstate], WSTATE_MINIMIZED
1101
        jnz     @f
1101
        jnz     @f
Line 2546... Line 2546...
2546
        popfd
2546
        popfd
2547
        pop     esi
2547
        pop     esi
Line 2548... Line 2548...
2548
 
2548
 
2549
        add     esp, 4   ;dword for 0/1 - set_screen/fl_redraw
2549
        add     esp, 4   ;dword for 0/1 - set_screen/fl_redraw
2550
        ret
-
 
2551
-
 
2552
-