Rev 6219 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6219 | Rev 9971 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;------------------------------------------------------------------------------ |
1 | ;------------------------------------------------------------------------------ |
2 | align 4 |
2 | align 4 |
3 | draw_running_applications: |
3 | draw_running_applications: |
4 | pusha |
4 | pusha |
Line 5... | Line 5... | ||
5 | 5 | ||
6 | cmp [run_appl],dword 0 |
6 | cmp [run_appl],dword 0 |
Line 7... | Line 7... | ||
7 | je .exit |
7 | je .exit |
Line 8... | Line 8... | ||
8 | 8 | ||
9 | call calculate_applications |
9 | call calculate_applications |
10 | 10 | ||
11 | cmp edi,[running_applications] |
11 | cmp edi,[running_applications] |
12 | jne .noret |
12 | jne .noret |
13 | popa |
13 | popa |
14 | ret |
14 | ret |
15 | ;-------------------------------------- |
15 | ;-------------------------------------- |
16 | align 4 |
16 | align 4 |
17 | .noret: |
17 | .noret: |
18 | call draw_window |
18 | call draw_window |
19 | mov [running_applications],edi |
19 | mov [running_applications],edi |
20 | call redraw_window_tabs |
20 | call redraw_window_tabs |
21 | ;-------------------------------------- |
21 | ;-------------------------------------- |
22 | align 4 |
22 | align 4 |
23 | .exit: |
23 | .exit: |
24 | popa |
24 | popa |
25 | ret |
25 | ret |
26 | ;------------------------------------------------------------------------------ |
26 | ;------------------------------------------------------------------------------ |
27 | align 4 |
27 | align 4 |
28 | need_window_tab: |
28 | need_window_tab: |
29 | ; in: ebx->process info |
29 | ; in: ebx->process info |
30 | ; out: ZF set <=> do not draw |
30 | ; out: ZF set <=> do not draw |
31 | cmp byte [ebx+10], '@' |
31 | cmp byte [ebx + process_information.process_name], '@' |
32 | jz .nodraw |
32 | jz .nodraw |
33 | ; do not draw undefined (zero-sized) windows |
33 | ; do not draw undefined (zero-sized) windows |
34 | cmp dword [ebx+42], 0 |
34 | cmp dword [ebx + process_information.box.width], 0 |
35 | jnz @f |
35 | jnz @f |
36 | cmp dword [ebx+46], 0 |
36 | cmp dword [ebx + process_information.box.height], 0 |
37 | jz .nodraw |
37 | jz .nodraw |
38 | ;-------------------------------------- |
38 | ;-------------------------------------- |
39 | align 4 |
39 | align 4 |
40 | @@: |
40 | @@: |
41 | ; do not draw OpenDialog windows |
41 | ; do not draw OpenDialog windows |
42 | push edi |
42 | push edi |
43 | mov edi, dword [ebx+10] |
43 | mov edi, dword [ebx + process_information.process_name] |
Line 44... | Line 44... | ||
44 | or edi, 0x20202020 |
44 | or edi, 0x20202020 |
45 | cmp edi, 'open' |
45 | cmp edi, 'open' |
46 | jne @f |
46 | jne @f |
47 | 47 | ||
Line 48... | Line 48... | ||
48 | mov edi, dword [ebx+14] |
48 | mov edi, dword [ebx + process_information.process_name + 4] |
49 | or edi, 0x20202020 |
49 | or edi, 0x20202020 |
50 | cmp dword [ebx+14], 'dial' |
50 | cmp edi, 'dial' |
51 | jne @f |
51 | jne @f |
52 | 52 | ||
53 | pop edi |
53 | pop edi |
54 | jmp .nodraw |
54 | jmp .nodraw |
55 | ;-------------------------------------- |
55 | ;-------------------------------------- |
Line 56... | Line 56... | ||
56 | align 4 |
56 | align 4 |
57 | @@: |
57 | @@: |
Line 58... | Line 58... | ||
58 | pop edi |
58 | pop edi |
59 | cmp dword [ebx+10], 'ICON' |
59 | cmp dword [ebx + process_information.process_name], 'ICON' |
60 | jnz @f |
60 | jnz @f |
61 | 61 | ||
62 | cmp [ebx+42], dword 51 |
62 | cmp [ebx + process_information.box.width], dword 51 |
63 | jnz @f |
63 | jnz @f |
64 | 64 | ||
65 | cmp [ebx+46], dword 51 |
65 | cmp [ebx + process_information.box.height], dword 51 |
66 | jz .nodraw |
66 | jz .nodraw |
67 | ;-------------------------------------- |
67 | ;-------------------------------------- |
68 | align 4 |
68 | align 4 |
69 | @@: |
69 | @@: |
70 | cmp [ebx+10], dword ' ' |
70 | cmp dword[ebx + process_information.process_name], ' ' |
71 | ;-------------------------------------- |
71 | ;-------------------------------------- |
72 | align 4 |
72 | align 4 |
73 | .nodraw: |
73 | .nodraw: |
74 | ret |
74 | ret |
Line 75... | Line 75... | ||
75 | ;------------------------------------------------------------------------------ |
75 | ;------------------------------------------------------------------------------ |
76 | align 4 |
76 | align 4 |
77 | calculate_applications: |
77 | calculate_applications: |
78 | mov eax,[max_applications] |
78 | mov eax,[max_applications] |
79 | mul [page_list] |
79 | mul [page_list] |
Line 80... | Line 80... | ||
80 | test eax,eax |
80 | test eax,eax |
81 | je @f |
81 | je @f |
82 | 82 | ||
83 | inc eax |
83 | inc eax |
84 | ;-------------------------------------- |
84 | ;-------------------------------------- |
Line 85... | Line 85... | ||
85 | align 4 |
85 | align 4 |
86 | @@: |
86 | @@: |
87 | mov [draw_start_position],eax |
87 | mov [draw_start_position],eax |
88 | 88 | ||
89 | mov edi,app_list |
89 | mov edi,app_list |
90 | mov ecx,20 ; show max 20 application ???!!! |
90 | mov ecx,20 ; show max 20 application ???!!! |
Line 91... | Line 91... | ||
91 | mov eax,-1 |
91 | mov eax,-1 |
92 | cld |
92 | cld |
Line 93... | Line 93... | ||
93 | rep stosd |
93 | rep stosd |
94 | 94 | ||
Line 95... | Line 95... | ||
95 | mov edi,0 |
95 | mov edi,0 |
96 | mov ecx,2 |
96 | mov ecx,2 |
97 | ;-------------------------------------- |
97 | ;-------------------------------------- |
98 | align 4 |
98 | align 4 |
99 | cnewpr: |
99 | cnewpr: |
100 | mcall 9,procinfo_window_tabs |
100 | mcall 9,procinfo_window_tabs |
101 | 101 | ||
102 | call need_window_tab |
102 | call need_window_tab |
Line 103... | Line 103... | ||
103 | jz cnorpl |
103 | jz cnorpl |
104 | 104 | ||
105 | sub [draw_start_position], 1 |
105 | sub [draw_start_position], 1 |
106 | jg cnorpl |
106 | jg cnorpl |
107 | 107 | ||
108 | mov [app_list+edi*4],ecx |
108 | mov [app_list+edi*4],ecx |
109 | inc edi |
109 | inc edi |
Line 110... | Line 110... | ||
110 | ;-------------------------------------- |
110 | ;-------------------------------------- |
111 | align 4 |
111 | align 4 |
112 | cnorpl: |
112 | cnorpl: |
113 | inc ecx |
113 | inc ecx |
114 | cmp eax,ecx |
114 | cmp eax,ecx |
115 | jge cnewpr |
115 | jge cnewpr |
116 | 116 | ||
117 | mov [app_tab_count], edi |
117 | mov [app_tab_count], edi |
118 | ret |
118 | ret |
119 | ;------------------------------------------------------------------------------ |
119 | ;------------------------------------------------------------------------------ |
120 | align 4 |
120 | align 4 |
Line 121... | Line 121... | ||
121 | redraw_window_tabs: |
121 | redraw_window_tabs: |
122 | xor edi, edi |
122 | xor edi, edi |
Line 123... | Line 123... | ||
123 | mov [contrast], 0 |
123 | mov [contrast], 0 |
124 | 124 | ||
125 | push ebp |
125 | push ebp |
126 | mcall 18,7 |
126 | mcall 18,7 |
127 | mov ebp,eax |
127 | mov ebp,eax |
128 | 128 | ||
Line 129... | Line 129... | ||
129 | call calculate_offset_X |
129 | call calculate_offset_X |
130 | ;-------------------------------------- |
130 | ;-------------------------------------- |
131 | align 4 |
131 | align 4 |
Line 132... | Line 132... | ||
132 | .loop: |
132 | .loop: |
133 | mov ecx,[app_list+edi*4] |
133 | mov ecx,[app_list+edi*4] |
Line 134... | Line 134... | ||
134 | cmp ecx,-1 |
134 | cmp ecx,-1 |
135 | jz .done |
135 | jz .done |
136 | 136 | ||
137 | mov [active_slot_number],ecx |
137 | mov [active_slot_number],ecx |
138 | mcall 9,procinfo_window_tabs |
138 | mcall 9,procinfo_window_tabs |
139 | 139 | ||
140 | 140 | ||
141 | imul ebx, edi, TAB_SIZE |
141 | imul ebx, edi, TAB_SIZE |
Line 142... | Line 142... | ||
142 | add ebx,[offset_X] |
142 | add ebx,[offset_X] |
143 | add ebx,2 |
143 | add ebx,2 |
Line 144... | Line 144... | ||
144 | shl ebx,16 |
144 | shl ebx,16 |
145 | add ebx,TAB_SIZE-2 ;54 |
145 | add ebx,TAB_SIZE-2 ;54 |
146 | 146 | ||
147 | push edi |
147 | push edi |
148 | mov edx,[system_colours.work_button] |
148 | mov edx,[system_colours.work_button] |
Line 149... | Line 149... | ||
149 | xor edi,edi |
149 | xor edi,edi |
150 | 150 | ||
151 | cmp ebp,[active_slot_number] ;ecx ; ecx=active slot number |
151 | cmp ebp,[active_slot_number] ;ecx ; ecx=active slot number |
152 | jnz @f |
152 | jnz @f |
153 | 153 | ||
154 | mov edx,[wcolor] |
154 | mov edx,[wcolor] |
155 | inc edi |
155 | inc edi |
156 | ;-------------------------------------- |
156 | ;-------------------------------------- |
157 | align 4 |
157 | align 4 |
158 | @@: |
158 | @@: |
159 | mov esi,[current_alt_tab_app] |
159 | mov esi,[current_alt_tab_app] |
160 | cmp esi,-1 |
160 | cmp esi,-1 |
161 | jz @f |
161 | jz @f |
162 | 162 | ||
163 | cmp ecx,[alt_tab_list+esi*8] |
163 | cmp ecx,[alt_tab_list+esi*8] |
164 | jnz @f |
164 | jnz @f |
165 | 165 | ||
166 | mov edx,[AltTab_color] ;0xFF8000 ; current select for ALT+Tab |
166 | mov edx,[AltTab_color] ;0xFF8000 ; current select for ALT+Tab |
167 | ;-------------------------------------- |
167 | ;-------------------------------------- |
168 | align 4 |
168 | align 4 |
169 | @@: |
169 | @@: |
170 | call calculate_button_y_coordinate_and_size |
170 | call calculate_button_y_coordinate_and_size |
171 | 171 | ||
172 | mov esi,[wcolor] |
172 | mov esi,[wcolor] |
173 | call draw_appl_button |
173 | call draw_appl_button |
174 | pop edi |
174 | pop edi |
175 | ;------------------------------------------------------------------------------ |
175 | ;------------------------------------------------------------------------------ |
176 | add ebx,4 shl 16 |
176 | add ebx,4 shl 16 |
177 | mov bx,cx ;[height] |
177 | mov bx,cx ;[height] |
178 | shr bx,1 |
178 | shr bx,1 |
179 | sub bx,4 |
179 | sub bx,4 |
180 | shr ecx,16 |
180 | shr ecx,16 |
181 | add bx,cx |
181 | add bx,cx |
182 | 182 | ||
183 | mov edx, procinfo_window_tabs+10 |
183 | mov edx, procinfo_window_tabs.process_name |
184 | mcall 4,,[system_colours.work_button_text],,11 |
184 | mcall 4,,[system_colours.work_button_text],, sizeof.process_information.process_name |
185 | ;-------------------------------------- |
185 | ;-------------------------------------- |
186 | align 4 |
186 | align 4 |
187 | .nodraw: |
187 | .nodraw: |
188 | inc edi |
188 | inc edi |
189 | cmp edi, [max_applications] |
189 | cmp edi, [max_applications] |
190 | jb .loop |
190 | jb .loop |
191 | 191 | ||
192 | mov ecx,[app_list+edi*4] |
192 | mov ecx,[app_list+edi*4] |
193 | cmp ecx,-1 |
193 | cmp ecx,-1 |
Line 194... | Line 194... | ||
194 | jz .done |
194 | jz .done |
195 | 195 | ||
Line 196... | Line 196... | ||
196 | xor eax,eax |
196 | xor eax,eax |
197 | cmp [page_list],eax |
197 | cmp [page_list],eax |
198 | jne @f |
198 | jne @f |
199 | 199 | ||
200 | inc eax |
200 | inc eax |
201 | cmp [page_list_enable],eax |
201 | cmp [page_list_enable],eax |
202 | je @f |
202 | je @f |
203 | 203 | ||
204 | mov [page_list_enable],eax |
204 | mov [page_list_enable],eax |