Subversion Repositories Kolibri OS

Rev

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

Rev 53 Rev 54
Line 54... Line 54...
54
load_skin:
54
load_skin:
55
        pushad
55
        pushad
56
        mov     [_skinh],22
56
        mov     [_skinh],22
57
        mov     eax,_skin_file
57
        mov     eax,_skin_file
58
        mov     edx,skin_data
58
        mov     edx,skin_data
59
        mov     [ebp+SKIN_HEADER.ident],'????'
59
        mov     [edx+SKIN_HEADER.ident],'????'
60
        call    load_skin_file
60
        call    load_skin_file
-
 
61
        cmp     eax,ERROR_SUCCESS
-
 
62
        je      @f
-
 
63
        cmp     eax,ERROR_END_OF_FILE
-
 
64
        jne     .exit
61
        call    parse_skin_data
65
    @@: call    parse_skin_data
-
 
66
  .exit:
62
        popad
67
        popad
63
        ret
68
        ret
Line 64... Line 69...
64
 
69
 
65
parse_skin_data:
70
parse_skin_data:
66
        mov     ebp,skin_data
71
        mov     ebp,skin_data
67
        cmp     [ebp+SKIN_HEADER.ident],'SKIN'
72
        cmp     [ebp+SKIN_HEADER.ident],'SKIN'
Line -... Line 73...
-
 
73
        jne     .exit
-
 
74
 
-
 
75
        mov     edi,skin_udata
-
 
76
        mov     ecx,(skin_udata.end-skin_udata)/4
-
 
77
        xor     eax,eax
-
 
78
        cld
68
        jne     .exit
79
        rep	stosd
69
 
80
 
70
        mov     ebx,[ebp+SKIN_HEADER.params]
81
        mov     ebx,[ebp+SKIN_HEADER.params]
71
        add     ebx,skin_data
82
        add     ebx,skin_data
72
        mov     eax,[ebx+SKIN_PARAMS.skin_height]
83
        mov     eax,[ebx+SKIN_PARAMS.skin_height]
Line 85... Line 96...
85
        mov     [skin_inactive.colors.frame],eax
96
        mov     [skin_inactive.colors.frame],eax
86
        lea     esi,[ebx+SKIN_PARAMS.dtp.data]
97
        lea     esi,[ebx+SKIN_PARAMS.dtp.data]
87
        mov     edi,common_colours
98
        mov     edi,common_colours
88
        mov     ecx,[ebx+SKIN_PARAMS.dtp.size]
99
        mov     ecx,[ebx+SKIN_PARAMS.dtp.size]
89
        and     ecx,127
100
        and     ecx,127
90
        cld
-
 
91
        rep     movsb
101
        rep     movsb
92
        mov     eax,dword[ebx+SKIN_PARAMS.margin.right]
102
        mov     eax,dword[ebx+SKIN_PARAMS.margin.right]
93
        mov     dword[_skinmargins+0],eax
103
        mov     dword[_skinmargins+0],eax
94
        mov     eax,dword[ebx+SKIN_PARAMS.margin.bottom]
104
        mov     eax,dword[ebx+SKIN_PARAMS.margin.bottom]
95
        mov     dword[_skinmargins+4],eax
105
        mov     dword[_skinmargins+4],eax
Line 231... Line 241...
231
        js    no_skin_add_button
241
        js    no_skin_add_button
232
        test  bx,bx
242
        test  bx,bx
233
        js    no_skin_add_button
243
        js    no_skin_add_button
234
        call  draw_rectangle
244
        call  draw_rectangle
Line -... Line 245...
-
 
245
 
-
 
246
        cmp   dword[skin_data],'SKIN'
-
 
247
        je    @f
-
 
248
        xor   eax,eax
-
 
249
        xor   ebx,ebx
-
 
250
        mov   esi,[esp]
-
 
251
        mov   ecx,[esi+8]
-
 
252
        inc   ecx
-
 
253
        mov   edx,[_skinh]
-
 
254
        mov   edi,[common_colours+4] ; standard grab color
-
 
255
        call  [drawbar]
-
 
256
        jmp   draw_clientbar
-
 
257
    @@:
235
 
258
 
236
        mov   esi,[esp]
259
        mov   esi,[esp]
237
        mov   eax,[esi+8]    ; window width
260
        mov   eax,[esi+8]    ; window width
238
        mov   edx,[ebp+SKIN_DATA.left.left]
261
        mov   edx,[ebp+SKIN_DATA.left.left]
239
        shl   edx,16
262
        shl   edx,16
Line 287... Line 310...
287
        mov   ecx,[ebp+SKIN_DATA.oper.width]
310
        mov   ecx,[ebp+SKIN_DATA.oper.width]
288
        shl   ecx,16
311
        shl   ecx,16
289
        add   ecx,[_skinh]
312
        add   ecx,[_skinh]
290
        call  sys_putimage_with_check
313
        call  sys_putimage_with_check
Line -... Line 314...
-
 
314
 
-
 
315
    draw_clientbar:
291
 
316
 
Line 292... Line 317...
292
        mov   esi,[esp]
317
        mov   esi,[esp]
293
 
318
 
294
        mov   edx,[esi+04]                       ; WORK AREA
319
        mov   edx,[esi+04]                       ; WORK AREA
Line 305... Line 330...
305
        sub   edx,4
330
        sub   edx,4
306
        mov   edi,[esi+16]
331
        mov   edi,[esi+16]
307
        call  [drawbar]
332
        call  [drawbar]
308
      _noinside2:
333
      _noinside2:
Line -... Line 334...
-
 
334
 
-
 
335
        cmp   dword[skin_data],'SKIN'
-
 
336
        jne   no_skin_add_button
309
 
337
 
310
;* close button
338
;* close button
311
        mov   edi,[0xfe88]
339
        mov   edi,[0xfe88]
312
        movzx eax,word [edi]
340
        movzx eax,word [edi]
313
        cmp   eax,1000
341
        cmp   eax,1000