Rev 1635 | Rev 2439 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1635 | Rev 2434 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 1362 $ |
8 | $Revision: 2434 $ |
Line 9... | Line 9... | ||
9 | 9 | ||
Line 41... | Line 41... | ||
41 | push 2 |
41 | push 2 |
42 | pop eax |
42 | pop eax |
43 | ret |
43 | ret |
Line 44... | Line 44... | ||
44 | 44 | ||
45 | struct SKIN_HEADER |
45 | struct SKIN_HEADER |
46 | .ident dd ? |
46 | ident dd ? |
47 | .version dd ? |
47 | version dd ? |
48 | .params dd ? |
48 | params dd ? |
49 | .buttons dd ? |
49 | buttons dd ? |
50 | .bitmaps dd ? |
50 | bitmaps dd ? |
Line 51... | Line 51... | ||
51 | ends |
51 | ends |
52 | 52 | ||
53 | struct SKIN_PARAMS |
53 | struct SKIN_PARAMS |
54 | .skin_height dd ? |
54 | skin_height dd ? |
55 | .margin.right dw ? |
55 | margin.right dw ? |
56 | .margin.left dw ? |
56 | margin.left dw ? |
57 | .margin.bottom dw ? |
57 | margin.bottom dw ? |
58 | .margin.top dw ? |
58 | margin.top dw ? |
59 | .colors.inner dd ? |
59 | colors.inner dd ? |
60 | .colors.outer dd ? |
60 | colors.outer dd ? |
61 | .colors.frame dd ? |
61 | colors.frame dd ? |
62 | .colors_1.inner dd ? |
62 | colors_1.inner dd ? |
63 | .colors_1.outer dd ? |
63 | colors_1.outer dd ? |
64 | .colors_1.frame dd ? |
64 | colors_1.frame dd ? |
65 | .dtp.size dd ? |
65 | dtp.size dd ? |
Line 66... | Line 66... | ||
66 | .dtp.data db 40 dup (?) |
66 | dtp.data rb 40 |
67 | ends |
67 | ends |
68 | 68 | ||
69 | struct SKIN_BUTTONS |
69 | struct SKIN_BUTTONS |
70 | .type dd ? |
70 | type dd ? |
71 | .pos: |
71 | ; position |
72 | .left dw ? |
72 | left dw ? |
73 | .top dw ? |
73 | top dw ? |
74 | .size: |
74 | ; size |
Line 75... | Line 75... | ||
75 | .width dw ? |
75 | width dw ? |
76 | .height dw ? |
76 | height dw ? |
77 | ends |
77 | ends |
78 | 78 | ||
79 | struct SKIN_BITMAPS |
79 | struct SKIN_BITMAPS |
Line 80... | Line 80... | ||
80 | .kind dw ? |
80 | kind dw ? |
81 | .type dw ? |
81 | type dw ? |
82 | .data dd ? |
82 | data dd ? |
Line 125... | Line 125... | ||
125 | mov eax,dword[ebx+SKIN_PARAMS.margin.bottom] |
125 | mov eax, dword[ebx+SKIN_PARAMS.margin.bottom] |
126 | mov dword[_skinmargins+4],eax |
126 | mov dword[_skinmargins+4], eax |
Line 127... | Line 127... | ||
127 | 127 | ||
128 | mov ebx,[ebp+SKIN_HEADER.bitmaps] |
128 | mov ebx, [ebp+SKIN_HEADER.bitmaps] |
- | 129 | add ebx, skin_data |
|
129 | add ebx,skin_data |
130 | .lp1: |
130 | .lp1: cmp dword[ebx],0 |
131 | cmp dword[ebx], 0 |
131 | je .end_bitmaps |
132 | je .end_bitmaps |
132 | movzx eax,[ebx+SKIN_BITMAPS.kind] |
133 | movzx eax, [ebx+SKIN_BITMAPS.kind] |
133 | movzx ecx,[ebx+SKIN_BITMAPS.type] |
134 | movzx ecx, [ebx+SKIN_BITMAPS.type] |
134 | dec eax |
135 | dec eax |
135 | jnz .not_left |
136 | jnz .not_left |
136 | xor eax,eax |
137 | xor eax, eax |
137 | mov edx,skin_active.left.data |
138 | mov edx, skin_active.left.data |
138 | or ecx,ecx |
139 | or ecx, ecx |
139 | jnz @f |
140 | jnz @f |
- | 141 | mov edx, skin_inactive.left.data |
|
140 | mov edx,skin_inactive.left.data |
142 | @@: |
141 | @@: jmp .next_bitmap |
143 | jmp .next_bitmap |
142 | .not_left: |
144 | .not_left: |
143 | dec eax |
145 | dec eax |
144 | jnz .not_oper |
146 | jnz .not_oper |
145 | mov esi,[ebx+SKIN_BITMAPS.data] |
147 | mov esi, [ebx+SKIN_BITMAPS.data] |
Line 148... | Line 150... | ||
148 | neg eax |
150 | neg eax |
149 | mov edx,skin_active.oper.data |
151 | mov edx, skin_active.oper.data |
150 | or ecx,ecx |
152 | or ecx, ecx |
151 | jnz @f |
153 | jnz @f |
152 | mov edx,skin_inactive.oper.data |
154 | mov edx, skin_inactive.oper.data |
- | 155 | @@: |
|
153 | @@: jmp .next_bitmap |
156 | jmp .next_bitmap |
154 | .not_oper: |
157 | .not_oper: |
155 | dec eax |
158 | dec eax |
156 | jnz .not_base |
159 | jnz .not_base |
157 | mov eax,[skin_active.left.width] |
160 | mov eax, [skin_active.left.width] |
158 | mov edx,skin_active.base.data |
161 | mov edx, skin_active.base.data |
159 | or ecx,ecx |
162 | or ecx, ecx |
160 | jnz @f |
163 | jnz @f |
161 | mov eax,[skin_inactive.left.width] |
164 | mov eax, [skin_inactive.left.width] |
162 | mov edx,skin_inactive.base.data |
165 | mov edx, skin_inactive.base.data |
- | 166 | @@: |
|
163 | @@: jmp .next_bitmap |
167 | jmp .next_bitmap |
164 | .not_base: |
168 | .not_base: |
165 | add ebx,8 |
169 | add ebx, 8 |
166 | jmp .lp1 |
170 | jmp .lp1 |
167 | .next_bitmap: |
171 | .next_bitmap: |
168 | mov ecx,[ebx+SKIN_BITMAPS.data] |
172 | mov ecx, [ebx+SKIN_BITMAPS.data] |
Line 176... | Line 180... | ||
176 | jmp .lp1 |
180 | jmp .lp1 |
177 | .end_bitmaps: |
181 | .end_bitmaps: |
Line 178... | Line 182... | ||
178 | 182 | ||
179 | mov ebx,[ebp+SKIN_HEADER.buttons] |
183 | mov ebx, [ebp+SKIN_HEADER.buttons] |
- | 184 | add ebx, skin_data |
|
180 | add ebx,skin_data |
185 | .lp2: |
181 | .lp2: cmp dword[ebx],0 |
186 | cmp dword[ebx], 0 |
182 | je .end_buttons |
187 | je .end_buttons |
183 | mov eax,[ebx+SKIN_BUTTONS.type] |
188 | mov eax, [ebx+SKIN_BUTTONS.type] |
184 | dec eax |
189 | dec eax |
185 | jnz .not_close |
190 | jnz .not_close |
Line 211... | Line 216... | ||
211 | 216 | ||
212 | sys_putimage_with_check: |
217 | sys_putimage_with_check: |
213 | or ebx,ebx |
218 | or ebx, ebx |
214 | jz @f |
219 | jz @f |
- | 220 | call sys_putimage.forced |
|
215 | call sys_putimage.forced |
221 | @@: |
Line 216... | Line 222... | ||
216 | @@: ret |
222 | ret |
Line 217... | Line 223... | ||
217 | 223 | ||
218 | drawwindow_IV_caption: |
224 | drawwindow_IV_caption: |
Line 309... | Line 315... | ||
309 | add bx,word [edi+WDATA.box.height] |
315 | add bx, word [edi+WDATA.box.height] |
310 | ; mov esi,[edi+24] |
316 | ; mov esi,[edi+24] |
311 | ; shr esi,1 |
317 | ; shr esi,1 |
312 | ; and esi,0x007f7f7f |
318 | ; and esi,0x007f7f7f |
313 | mov esi,[ebp+SKIN_DATA.colors.outer] |
319 | mov esi, [ebp+SKIN_DATA.colors.outer] |
- | 320 | or esi, 1 shl 25 ; 0x02000000 used for draw_rectangle without top line |
|
- | 321 | ror ebx, 16 |
|
- | 322 | add ebx, [_skinh] |
|
- | 323 | sub bx, 1 |
|
- | 324 | rol ebx, 16 |
|
314 | call draw_rectangle |
325 | call draw_rectangle |
315 | mov ecx,3 |
326 | mov ecx, 3 |
316 | _dw3l: |
327 | _dw3l: |
317 | add eax,1*65536-1 |
328 | add eax, 1*65536-1 |
318 | add ebx,1*65536-1 |
329 | add ebx, 0*65536-1 |
319 | test ax,ax |
330 | test ax, ax |
320 | js no_skin_add_button |
331 | js no_skin_add_button |
321 | test bx,bx |
332 | test bx, bx |
322 | js no_skin_add_button |
333 | js no_skin_add_button |
323 | mov esi,[ebp+SKIN_DATA.colors.frame] ;[edi+24] |
334 | mov esi, [ebp+SKIN_DATA.colors.frame];[edi+24] |
- | 335 | or esi, 1 shl 25; 0x02000000 used for draw_rectangle without top line |
|
324 | call draw_rectangle |
336 | call draw_rectangle |
325 | dec ecx |
337 | dec ecx |
326 | jnz _dw3l |
338 | jnz _dw3l |
327 | mov esi,[ebp+SKIN_DATA.colors.inner] |
339 | mov esi, [ebp+SKIN_DATA.colors.inner] |
- | 340 | or esi, 1 shl 25; 0x02000000 used for draw_rectangle without top line |
|
328 | add eax,1*65536-1 |
341 | add eax, 1*65536-1 |
329 | add ebx,1*65536-1 |
342 | add ebx, 0*65536-1 |
330 | test ax,ax |
343 | test ax, ax |
331 | js no_skin_add_button |
344 | js no_skin_add_button |
332 | test bx,bx |
345 | test bx, bx |
333 | js no_skin_add_button |
346 | js no_skin_add_button |
334 | call draw_rectangle |
347 | call draw_rectangle |