Subversion Repositories Kolibri OS

Rev

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

Rev 2288 Rev 2384
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: 2288 $
9
$Revision: 2384 $
10
 
10
 
11
;==============================================================================
11
;==============================================================================
Line 12... Line 12...
12
;///// public functions ///////////////////////////////////////////////////////
12
;///// public functions ///////////////////////////////////////////////////////
Line 13... Line 13...
13
;==============================================================================
13
;==============================================================================
14
 
-
 
15
button.MAX_BUTTONS = 4095
14
 
16
 
15
button.MAX_BUTTONS = 4095
17
struc SYS_BUTTON
16
 
18
{
17
struct  SYS_BUTTON
19
  .pslot  dw ?
18
        pslot           dw ?
20
  .id_lo  dw ?
19
        id_lo           dw ?
21
  .left   dw ?
20
        left            dw ?
22
  .width  dw ?
21
        width           dw ?
23
  .top    dw ?
-
 
24
  .height dw ?
-
 
25
  .id_hi  dw ?
-
 
26
          dw ?
-
 
27
  .sizeof:
22
        top             dw ?
Line 28... Line 23...
28
}
23
        height          dw ?
29
virtual at 0
24
        id_hi           dw ?
30
  SYS_BUTTON SYS_BUTTON
25
                        dw ?
31
end virtual
26
ends
Line 214... Line 209...
214
syscall_button.remove_button:
209
syscall_button.remove_button:
215
        and     edx, 0x00ffffff
210
        and     edx, 0x00ffffff
216
        mov     edi, [BTN_ADDR]
211
        mov     edi, [BTN_ADDR]
217
        mov     ebx, [edi]
212
        mov     ebx, [edi]
218
        inc     ebx
213
        inc     ebx
219
        imul    esi, ebx, SYS_BUTTON.sizeof
214
        imul    esi, ebx, sizeof.SYS_BUTTON
220
        add     esi, edi
215
        add     esi, edi
221
        xor     ecx, ecx
216
        xor     ecx, ecx
222
        add     ecx, -SYS_BUTTON.sizeof
217
        add     ecx, -sizeof.SYS_BUTTON
223
        add     esi, SYS_BUTTON.sizeof
218
        add     esi, sizeof.SYS_BUTTON
Line 224... Line 219...
224
 
219
 
225
  .next_button:
220
  .next_button:
226
        dec     ebx
221
        dec     ebx
Line 227... Line 222...
227
        jz      .exit
222
        jz      .exit
228
 
223
 
Line 229... Line 224...
229
        add     ecx, SYS_BUTTON.sizeof
224
        add     ecx, sizeof.SYS_BUTTON
230
        add     esi, -SYS_BUTTON.sizeof
225
        add     esi, -sizeof.SYS_BUTTON
231
 
226
 
232
        ; does it belong to our process?
227
        ; does it belong to our process?
Line 242... Line 237...
242
        jne     .next_button
237
        jne     .next_button
Line 243... Line 238...
243
 
238
 
244
        ; okay, undefine it
239
        ; okay, undefine it
245
        push    ebx
240
        push    ebx
246
        mov     ebx, esi
241
        mov     ebx, esi
247
        lea     eax, [esi + SYS_BUTTON.sizeof]
242
        lea     eax, [esi + sizeof.SYS_BUTTON]
248
        call    memmove
243
        call    memmove
249
        dec     dword[edi]
244
        dec     dword[edi]
250
        add     ecx, -SYS_BUTTON.sizeof
245
        add     ecx, -sizeof.SYS_BUTTON
251
        pop     ebx
246
        pop     ebx
Line 252... Line 247...
252
        jmp     .next_button
247
        jmp     .next_button
253
 
248
 
Line 332... Line 327...
332
        shr     edx, 24
327
        shr     edx, 24
333
        and     eax, 0x0ffffff
328
        and     eax, 0x0ffffff
Line 334... Line 329...
334
 
329
 
335
        mov     edi, [BTN_ADDR]
330
        mov     edi, [BTN_ADDR]
336
        mov     ecx, [edi]
331
        mov     ecx, [edi]
337
        imul    esi, ecx, SYS_BUTTON.sizeof
332
        imul    esi, ecx, sizeof.SYS_BUTTON
338
        add     esi, edi
333
        add     esi, edi
339
        inc     ecx
334
        inc     ecx
Line 340... Line 335...
340
        add     esi, SYS_BUTTON.sizeof
335
        add     esi, sizeof.SYS_BUTTON
341
 
336
 
342
  .next_button:
337
  .next_button:
Line 343... Line 338...
343
        dec     ecx
338
        dec     ecx
Line 344... Line 339...
344
        jz      .not_found
339
        jz      .not_found
345
 
340
 
346
        add     esi, -SYS_BUTTON.sizeof
341
        add     esi, -sizeof.SYS_BUTTON