Subversion Repositories Kolibri OS

Rev

Rev 7300 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7300 Rev 7889
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2004-2018. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2004-2018. 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
;;   Written by hidnplayr@kolibrios.org                            ;;
6
;;   Written by hidnplayr@kolibrios.org                            ;;
7
;;                                                                 ;;
7
;;                                                                 ;;
8
;;         GNU GENERAL PUBLIC LICENSE                              ;;
8
;;         GNU GENERAL PUBLIC LICENSE                              ;;
9
;;          Version 2, June 1991                                   ;;
9
;;          Version 2, June 1991                                   ;;
10
;;                                                                 ;;
10
;;                                                                 ;;
11
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
 
12
 
13
 
13
 
14
draw_window:    ; Completely redraw the window, recalculate all coordinates and sizes
14
draw_window:    ; Completely redraw the window, recalculate all coordinates and sizes
15
 
15
 
16
        pusha
16
        pusha
17
 
17
 
18
        mcall   9, thread_info, -1                      ; get information about this thread
18
        mcall   9, thread_info, -1                      ; get information about this thread
19
        mov     eax, [thread_info.box.width]            ; window xsize
19
        mov     eax, [thread_info.box.width]            ; window xsize
20
        mov     ebx, [thread_info.box.height]           ; ysize
20
        mov     ebx, [thread_info.box.height]           ; ysize
21
        mov     edx, [thread_info.client_box.width]     ; work area xsize
21
        mov     edx, [thread_info.client_box.width]     ; work area xsize
22
        mov     esi, [thread_info.client_box.height]    ; ysize
22
        mov     esi, [thread_info.client_box.height]    ; ysize
23
        sub     eax, edx
23
        sub     eax, edx
24
        sub     ebx, esi
24
        sub     ebx, esi
25
 
25
 
26
        cmp     edx, WIN_MIN_X
26
        cmp     edx, WIN_MIN_X
27
        jae     .x_ok
27
        jae     .x_ok
28
        mov     edx, WIN_MIN_X
28
        mov     edx, WIN_MIN_X
29
  .x_ok:
29
  .x_ok:
30
        mov     [xsize], edx
30
        mov     [xsize], edx
31
        add     edx, eax
31
        add     edx, eax
32
 
32
 
33
        cmp     esi, WIN_MIN_Y
33
        cmp     esi, WIN_MIN_Y
34
        jae     .y_ok
34
        jae     .y_ok
35
        mov     esi, WIN_MIN_Y
35
        mov     esi, WIN_MIN_Y
36
  .y_ok:
36
  .y_ok:
37
        mov     [ysize], esi
37
        mov     [ysize], esi
38
        add     esi, ebx
38
        add     esi, ebx
39
        mcall   67, -1, -1                              ; set the new sizes
39
        mcall   67, -1, -1                              ; set the new sizes
40
 
40
 
41
        popa
41
        popa
42
 
42
 
43
  .dont_resize:
43
  .dont_resize:
44
 
44
 
45
        pusha
45
        pusha
46
 
46
 
47
        mcall   12, 1
47
        mcall   12, 1
48
        xor     eax, eax                                ; draw window
48
        xor     eax, eax                                ; draw window
49
        mov     ebx, WIN_MIN_X+10
49
        mov     ebx, WIN_MIN_X+10
50
        mov     ecx, WIN_MIN_Y+30
50
        mov     ecx, WIN_MIN_Y+30
51
        mov     edx, [colors.work]
51
        mov     edx, [colors.work]
52
        add     edx, 0x33000000
52
        add     edx, 0x33000000
53
        mov     edi, str_programname
53
        mov     edi, str_programname
54
        mcall
54
        mcall
55
                        
55
                        
56
        test    [thread_info.wnd_state], 100b           ; skip if window is rolled up
56
        test    [thread_info.wnd_state], 100b           ; skip if window is rolled up
57
        jne     .exit
57
        jne     .exit
58
 
58
 
59
        cmp     [window_active], 0
59
        cmp     [window_active], 0
60
        je      .no_window
60
        je      .no_window
61
 
61
 
62
; calculate available space for textbox and coordinates for scrollbars
62
; calculate available space for textbox and coordinates for scrollbars
63
        mov     eax, [ysize]
63
        mov     eax, [ysize]
64
        sub     eax, TOP_Y + INPUTBOX_HEIGHT - 1
64
        sub     eax, TOP_Y + INPUTBOX_HEIGHT - 1
65
        mov     [scroll2.y_size], ax
65
        mov     [scroll2.y_size], ax
66
        mov     [scroll1.y_size], ax
66
        mov     [scroll1.y_size], ax
67
        sub     eax, 4
67
        sub     eax, 4
68
        xor     edx, edx
68
        xor     edx, edx
69
        mov     ecx, FONT_HEIGHT
69
        mov     ecx, FONT_HEIGHT
70
        div     ecx
70
        div     ecx
71
        mov     [textbox_height], eax
71
        mov     [textbox_height], eax
72
        mov     [scroll2.cur_area], eax
72
        mov     [scroll2.cur_area], eax
73
        mov     [scroll1.cur_area], eax
73
        mov     [scroll1.cur_area], eax
74
 
74
 
75
        mov     eax, [xsize]
75
        mov     eax, [xsize]
76
        sub     eax, SCROLLBAR_WIDTH
76
        sub     eax, SCROLLBAR_WIDTH
77
        mov     [scroll1.x_pos], ax
77
        mov     [scroll1.x_pos], ax
78
        mov     edi, [window_active]
78
        mov     edi, [window_active]
79
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
79
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
80
        jne     @f
80
        jne     @f
81
        sub     eax, USERLIST_WIDTH + SCROLLBAR_WIDTH + 2
81
        sub     eax, USERLIST_WIDTH + SCROLLBAR_WIDTH + 2
82
  @@:
82
  @@:
83
        mov     [scroll2.x_pos], ax
83
        mov     [scroll2.x_pos], ax
84
        sub     eax, 10
84
        sub     eax, 10
85
        xor     edx, edx
85
        xor     edx, edx
86
        mov     ecx, FONT_WIDTH
86
        mov     ecx, FONT_WIDTH
87
        div     ecx
87
        div     ecx
88
        mov     [textbox_width], eax
88
        mov     [textbox_width], eax
89
 
89
 
90
; recalculate text line breaks (because height/width might have changed..)
90
; recalculate text line breaks (because height/width might have changed..)
91
; meanwhile, recalculate line number of current line
91
; meanwhile, recalculate line number of current line
92
        mov     esi, [edi + window.text_print]
92
        mov     esi, [edi + window.text_print]
93
        mov     al, byte[esi]
93
        mov     al, byte[esi]
94
        push    eax
94
        push    eax
95
        mov     byte[esi], 0
95
        mov     byte[esi], 0
96
        push    esi
96
        push    esi
97
 
97
 
98
        mov     esi, [edi + window.text_start]
98
        mov     esi, [edi + window.text_start]
99
        call    text_insert_newlines
99
        call    text_insert_newlines
100
        mov     [edi + window.text_lines], edx
100
        mov     [edi + window.text_lines], edx
101
        mov     [edi + window.text_scanned], esi
101
        mov     [edi + window.text_scanned], esi
102
        mov     [edi + window.text_line_print], edx
102
        mov     [edi + window.text_line_print], edx
103
 
103
 
104
        pop     esi
104
        pop     esi
105
        pop     eax
105
        pop     eax
106
        mov     byte[esi], al
106
        mov     byte[esi], al
107
 
107
 
108
; and redraw the textbox (and scrollbar if needed)
108
; and redraw the textbox (and scrollbar if needed)
109
        mov     [scroll2.all_redraw], 1
109
        mov     [scroll2.all_redraw], 1
110
        call    draw_channel_text
110
        call    draw_channel_text
111
 
111
 
112
; Draw userlist if active window is a channel
112
; Draw userlist if active window is a channel
113
        mov     edi, [window_active]
113
        mov     edi, [window_active]
114
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
114
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
115
        jne     .not_channel
115
        jne     .not_channel
116
 
116
 
117
        mov     [scroll1.all_redraw], 1
117
        mov     [scroll1.all_redraw], 1
118
        call    draw_user_list
118
        call    draw_user_list
119
 
119
 
120
; draw a vertical separator line when there is no scrollbar
120
; draw a vertical separator line when there is no scrollbar
121
        cmp     [scroll2.all_redraw], 1
121
        cmp     [scroll2.all_redraw], 1
122
        jne     .not_channel
122
        jne     .not_channel
123
 
123
 
124
        mov     ebx, [xsize]
124
        mov     ebx, [xsize]
125
        sub     ebx, USERLIST_WIDTH + SCROLLBAR_WIDTH + 3
125
        sub     ebx, USERLIST_WIDTH + SCROLLBAR_WIDTH + 3
126
        push    bx
126
        push    bx
127
        shl     ebx, 16
127
        shl     ebx, 16
128
        pop     bx
128
        pop     bx
129
        mov     ecx, [ysize]
129
        mov     ecx, [ysize]
130
        add     ecx, TOP_Y shl 16 - (INPUTBOX_HEIGHT)
130
        add     ecx, TOP_Y shl 16 - (INPUTBOX_HEIGHT)
131
        mov     edx, [colors.work_graph]
131
        mov     edx, [colors.work_graph]
132
        mcall   38
132
        mcall   38
133
  .not_channel:
133
  .not_channel:
134
  .no_window:
134
  .no_window:
135
 
135
 
136
; draw editbox
136
; draw editbox
137
        mov     eax, [ysize]
137
        mov     eax, [ysize]
138
        sub     eax, INPUTBOX_HEIGHT
138
        sub     eax, INPUTBOX_HEIGHT
139
        mov     [edit1.top], eax
139
        mov     [edit1.top], eax
140
 
140
 
141
        mov     eax, [xsize]
141
        mov     eax, [xsize]
142
        mov     [edit1.width], eax
142
        mov     [edit1.width], eax
143
 
143
 
144
        invoke  edit_box_draw, edit1
144
        invoke  edit_box_draw, edit1
145
 
145
 
146
; draw tabs
146
; draw tabs
147
        call    draw_window_tabs
147
        call    draw_window_tabs
148
                
148
                
149
  .exit:
149
  .exit:
150
        mcall   12, 2
150
        mcall   12, 2
151
        popa
151
        popa
152
        ret
152
        ret
153
 
153
 
154
 
154
 
155
 
155
 
156
draw_user_list:
156
draw_user_list:
157
 
157
 
158
        pusha
158
        pusha
159
 
159
 
160
        ; Do we need a scrollbar?
160
        ; Do we need a scrollbar?
161
        mov     ebx, [window_active]
161
        mov     ebx, [window_active]
162
        mov     eax, [ebx + window.users]
162
        mov     eax, [ebx + window.users]
163
        mov     [scroll1.max_area], eax
163
        mov     [scroll1.max_area], eax
164
        cmp     [scroll1.cur_area], eax
164
        cmp     [scroll1.cur_area], eax
165
        jae     .noscroll
165
        jae     .noscroll
166
 
166
 
167
        ; Is the current position greater then the max position?
167
        ; Is the current position greater then the max position?
168
        cmp     eax, [scroll1.position]
168
        cmp     eax, [scroll1.position]
169
        ja      @f
169
        ja      @f
170
        mov     [scroll1.position], eax
170
        mov     [scroll1.position], eax
171
  @@:
171
  @@:
172
        ; OK, draw the scrollbar
172
        ; OK, draw the scrollbar
173
        invoke  scrollbar_draw, scroll1
173
        invoke  scrollbar_draw, scroll1
174
 
174
 
175
        ; dont redraw scrollbar completely next time,
175
        ; dont redraw scrollbar completely next time,
176
        ; unless draw_window asks us to by setting [scroll1.all_redraw] back to 1
176
        ; unless draw_window asks us to by setting [scroll1.all_redraw] back to 1
177
        mov     [scroll1.all_redraw], 0
177
        mov     [scroll1.all_redraw], 0
178
        jmp     .scroll_done
178
        jmp     .scroll_done
179
 
179
 
180
  .noscroll:
180
  .noscroll:
181
        mov     [scroll1.position], 0
181
        mov     [scroll1.position], 0
182
  .scroll_done:
182
  .scroll_done:
183
 
183
 
184
        ; draw an invisible button, where the usernames will go
184
        ; draw an invisible button, where the usernames will go
185
        mov     ebx, [xsize]
185
        mov     ebx, [xsize]
186
        sub     ebx, USERLIST_WIDTH + SCROLLBAR_WIDTH
186
        sub     ebx, USERLIST_WIDTH + SCROLLBAR_WIDTH
187
        shl     ebx, 16
187
        shl     ebx, 16
188
        push    ebx
188
        push    ebx
189
        mov     bx, USERLIST_WIDTH
189
        mov     bx, USERLIST_WIDTH
190
        mov     ecx, [ysize]
190
        mov     ecx, [ysize]
191
        add     ecx, TEXT_Y shl 16 - (TEXT_Y + 16)
191
        add     ecx, TEXT_Y shl 16 - (TEXT_Y + 16)
192
        push    ecx ebx
192
        push    ecx ebx
193
        mov     edx, WINDOW_BTN_LIST + 1 shl 29 + 1 shl 30
193
        mov     edx, WINDOW_BTN_LIST + 1 shl 29 + 1 shl 30
194
        mcall   8
194
        mcall   8
195
 
195
 
196
        ; draw a filled rectangle to clear previously printed names
196
        ; draw a filled rectangle to clear previously printed names
197
        pop     ebx ecx
197
        pop     ebx ecx
198
        mov     edx, [colors.work]
198
        mov     edx, [colors.work]
199
        mcall   13
199
        mcall   13
200
 
200
 
201
; now, draw the names according to the scrollbar position and window size
201
; now, draw the names according to the scrollbar position and window size
202
        mov     eax, [scroll1.position]
202
        mov     eax, [scroll1.position]
203
        xor     edx, edx
203
        xor     edx, edx
204
        mov     ecx, MAX_NICK_LEN
204
        mov     ecx, MAX_NICK_LEN
205
        mul     ecx
205
        mul     ecx
206
        mov     edx, eax
206
        mov     edx, eax
207
        mov     eax, [window_active]
207
        mov     eax, [window_active]
208
        mov     ebp, [eax + window.selected]
208
        mov     ebp, [eax + window.selected]
209
        add     edx, [eax + window.data_ptr]
209
        add     edx, [eax + window.data_ptr]
210
        sub     ebp, [scroll1.position]
210
        sub     ebp, [scroll1.position]
211
        add     edx, window_data.names
211
        add     edx, window_data.names
212
 
212
 
213
        pop     ebx
213
        pop     ebx
214
        mov     bx, TEXT_Y
214
        mov     bx, TEXT_Y
215
        mov     ecx, [colors.work_text]
215
        mov     ecx, [colors.work_text]
216
        or      ecx, 0x90000000                 ; 8x16 font, zero terminated string
216
        or      ecx, 0x90000000                 ; 8x16 font, zero terminated string
217
        mov     eax, 4                          ; draw text
217
        mov     eax, 4                          ; draw text
218
 
218
 
219
        mov     edi, [textbox_height]           ; how many names will fit on screen
219
        mov     edi, [textbox_height]           ; how many names will fit on screen
220
  .loop:
220
  .loop:
221
        cmp     byte[edx], 0                    ; end of list?
221
        cmp     byte[edx], 0                    ; end of list?
222
        je      .done
222
        je      .done
223
 
223
 
224
        dec     ebp                             ; is this name selected?
224
        dec     ebp                             ; is this name selected?
225
        jnz     .nothighlight
225
        jnz     .nothighlight
226
                                                ; yes, highlight it
226
                                                ; yes, highlight it
227
        pusha
227
        pusha
228
        mov     cx, bx
228
        mov     cx, bx
229
        mov     bx, USERLIST_WIDTH
229
        mov     bx, USERLIST_WIDTH
230
        shl     ecx, 16
230
        shl     ecx, 16
231
        mov     cx, FONT_HEIGHT
231
        mov     cx, FONT_HEIGHT
232
        mov     edx, 0x00000055                 ; blue!
232
        mov     edx, 0x00000055                 ; blue!
233
        mcall   13
233
        mcall   13
234
        popa
234
        popa
235
 
235
 
236
        mov     ecx, 0x9000ffff                 ; cyan!
236
        mov     ecx, 0x9000ffff                 ; cyan!
237
        mcall
237
        mcall
238
 
238
 
239
        mov     ecx, [colors.work_text]
239
        mov     ecx, [colors.work_text]
240
        or      ecx, 0x90000000                 ; 8x16 font, zero terminated string
240
        or      ecx, 0x90000000                 ; 8x16 font, zero terminated string
241
        jmp     .next
241
        jmp     .next
242
 
242
 
243
  .nothighlight:
243
  .nothighlight:
244
        mcall
244
        mcall
245
 
245
 
246
  .next:
246
  .next:
247
        add     edx, MAX_NICK_LEN
247
        add     edx, MAX_NICK_LEN
248
        add     ebx, FONT_HEIGHT
248
        add     ebx, FONT_HEIGHT
249
        dec     edi
249
        dec     edi
250
        jnz     .loop
250
        jnz     .loop
251
 
251
 
252
  .done:
252
  .done:
253
        popa
253
        popa
254
 
254
 
255
        ret
255
        ret
256
 
256
 
257
 
257
 
258
draw_window_tabs:
258
draw_window_tabs:
259
 
259
 
260
; Draw horizontal line
260
; Draw horizontal line
261
 
261
 
262
        mov     ebx, [xsize]
262
        mov     ebx, [xsize]
263
        mov     edx, [colors.work_graph]
263
        mov     edx, [colors.work_graph]
264
        mov     ecx, TOP_Y SHL 16 + TOP_Y
264
        mov     ecx, TOP_Y SHL 16 + TOP_Y
265
        mcall   38
265
        mcall   38
266
 
266
 
267
; Create the buttons
267
; Create the buttons
268
 
268
 
269
        mov     eax, 8
269
        mov     eax, 8
270
        mov     ebx, TAB_WIDTH
270
        mov     ebx, TAB_WIDTH
271
        mov     ecx, TOP_SPACE shl 16 + TAB_HEIGHT
271
        mov     ecx, TOP_SPACE shl 16 + TAB_HEIGHT
272
        mov     edx, WINDOW_BTN_START
272
        mov     edx, WINDOW_BTN_START
273
        mov     edi, windows
273
        mov     edi, windows
274
  .more_btn:
274
  .more_btn:
275
        mov     esi, [colors.work_button]
275
        mov     esi, [colors.work]
276
        cmp     [window_active], edi
276
        cmp     [window_active], edi
277
        jne     @f
277
        jne     @f
278
        not     esi
278
        ;not     esi
279
        and     esi, 0x00ffffff
279
        ;and     esi, 0x00ffffff
-
 
280
		mov      esi,  [colors.work_light]  
280
      @@:
281
      @@:
281
        mcall
282
        mcall
282
        inc     edx
283
        inc     edx
283
        add     ebx, (TAB_WIDTH + TAB_SPACE) shl 16
284
        add     ebx, (TAB_WIDTH + TAB_SPACE) shl 16
284
        add     edi, sizeof.window
285
        add     edi, sizeof.window
285
        cmp     [edi + window.data_ptr], 0
286
        cmp     [edi + window.data_ptr], 0
286
        jne     .more_btn
287
        jne     .more_btn
287
 
288
 
288
; Draw the close window button
289
; Draw the close window button
289
        mov     edi, [window_active]
290
        mov     edi, [window_active]
290
        cmp     [edi + window.type], WINDOWTYPE_SERVER  ; dont let the user close server window
291
        cmp     [edi + window.type], WINDOWTYPE_SERVER  ; dont let the user close server window
291
        je      @f
292
        je      @f
292
 
293
 
293
;        mov     eax, 8
294
;        mov     eax, 8
294
        mov     ebx, [xsize]
295
        mov     ebx, [xsize]
295
        sub     ebx, SCROLLBAR_WIDTH
296
        sub     ebx, SCROLLBAR_WIDTH
296
        shl     ebx, 16
297
        shl     ebx, 16
297
        mov     bx, SCROLLBAR_WIDTH
298
        mov     bx, SCROLLBAR_WIDTH
298
        mov     ecx, TOP_SPACE shl 16 + TAB_HEIGHT - 1
299
        mov     ecx, TOP_SPACE shl 16 + TAB_HEIGHT - 1
299
        mov     edx, WINDOW_BTN_CLOSE
300
        mov     edx, WINDOW_BTN_CLOSE
300
        mov     esi, 0x00aa0000         ; red !
301
        mov     esi, 0x00aa0000         ; red !
301
        mcall
302
		mcall
-
 
303
 
-
 
304
		pusha
-
 
305
		; write closing cross
-
 
306
		mov     ebx, [xsize]
-
 
307
		sub     ebx, 9
-
 
308
        shl     ebx, 16
-
 
309
		add     ebx, TOP_SPACE+3
-
 
310
		mov     ecx, 0x80FFFfff
-
 
311
		mov     edx, closing_cross
-
 
312
        mcall   4
-
 
313
		popa
302
  @@:
314
  @@:
303
 
315
 
304
; Draw the windownames onto the buttons
316
; Draw the windownames onto the buttons
305
 
317
 
306
        mov     eax, 4
318
        mov     eax, 4
307
        mov     ebx, 5 shl 16 + TOP_SPACE + 4 ;;;;
319
        mov     ebx, 5 shl 16 + TOP_SPACE + 4 ;;;;
308
        mov     esi, MAX_WINDOWS
320
        mov     esi, MAX_WINDOWS
309
        mov     edi, windows
321
        mov     edi, windows
310
  .more:
322
  .more:
311
        mov     ecx, [colors.work_button_text]
323
        mov     ecx, [colors.work_text]
312
        test    [edi + window.flags], FLAG_UPDATED
324
        test    [edi + window.flags], FLAG_UPDATED
313
        jz      @f
325
        jz      @f
314
        mov     ecx, 0x00aa0000         ; RED!
326
        mov     ecx, 0x00aa0000         ; RED!
315
  @@:
327
  @@:
316
        or      ecx, 0x80000000         ; ASCIIZ string
328
        or      ecx, 0x80000000         ; ASCIIZ string
317
        lea     edx, [edi + window.name]
329
        lea     edx, [edi + window.name]
318
        mcall
330
        mcall
319
        add     edi, sizeof.window      ; get ptr to next window
331
        add     edi, sizeof.window      ; get ptr to next window
320
        cmp     [edi + window.data_ptr], 0
332
        cmp     [edi + window.data_ptr], 0
321
        je      .enough
333
        je      .enough
322
        add     ebx, (TAB_WIDTH + TAB_SPACE) shl 16
334
        add     ebx, (TAB_WIDTH + TAB_SPACE) shl 16
323
        dec     esi
335
        dec     esi
324
        jnz     .more
336
        jnz     .more
325
  .enough:
337
  .enough:
326
 
338
 
327
        ret
339
        ret
328
 
340
 
329
 
341
 
330
 
342
 
331
highlight_updated_tabs:
343
highlight_updated_tabs:
332
        mov     eax, 4
344
        mov     eax, 4
333
        mov     ebx, 5 shl 16 + TOP_SPACE + 4 ;;;;
345
        mov     ebx, 5 shl 16 + TOP_SPACE + 4 ;;;;
334
        mov     ecx, 0x80aa0000
346
        mov     ecx, 0x80aa0000
335
        mov     esi, MAX_WINDOWS
347
        mov     esi, MAX_WINDOWS
336
        mov     edi, windows
348
        mov     edi, windows
337
  .more_:
349
  .more_:
338
        test    [edi + window.flags], FLAG_UPDATED
350
        test    [edi + window.flags], FLAG_UPDATED
339
        jz      .next
351
        jz      .next
340
        lea     edx, [edi + window.name]
352
        lea     edx, [edi + window.name]
341
        mcall
353
        mcall
342
  .next:
354
  .next:
343
        add     edi, sizeof.window      ; get ptr to next window
355
        add     edi, sizeof.window      ; get ptr to next window
344
        cmp     [edi + window.data_ptr], 0
356
        cmp     [edi + window.data_ptr], 0
345
        je      .enough_
357
        je      .enough_
346
        add     ebx, (TAB_WIDTH + TAB_SPACE) shl 16
358
        add     ebx, (TAB_WIDTH + TAB_SPACE) shl 16
347
        dec     esi
359
        dec     esi
348
        jnz     .more_
360
        jnz     .more_
349
  .enough_:
361
  .enough_:
350
 
362
 
351
        ret
363
        ret