Subversion Repositories Kolibri OS

Rev

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

Rev 431 Rev 465
Line 1... Line 1...
1
$Revision: 431 $
1
$Revision: 465 $
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
;;                                                              ;;
3
;;                                                              ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
5
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
5
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
6
;; Distributed under terms of the GNU General Public License    ;;
6
;; Distributed under terms of the GNU General Public License    ;;
Line 119... Line 119...
119
           lea edi, [eax+EVENT.code]
119
           lea edi, [eax+EVENT.code]
120
           mov ecx, 6
120
           mov ecx, 6
121
           cld
121
           cld
122
           rep movsd
122
           rep movsd
123
@@:
123
@@:
124
           mov ecx, [CURRENT_TASK]
124
           mov ecx, [current_slot]
125
           shl ecx,8
-
 
126
           add ecx, SLOT_BASE+APP_OBJ_OFFSET
125
           add ecx, APP_OBJ_OFFSET
Line 127... Line 126...
127
 
126
 
128
           pushfd
127
           pushfd
129
           cli
128
           cli
130
           mov edx, [ecx+APPOBJ.fd]
129
           mov edx, [ecx+APPOBJ.fd]
Line 222... Line 221...
222
 
221
 
223
align 4
222
align 4
Line 224... Line 223...
224
proc get_event_ex stdcall, p_ev:dword, timeout:dword
223
proc get_event_ex stdcall, p_ev:dword, timeout:dword
225
 
224
 
226
.wait:
-
 
227
           mov edx,[CURRENT_TASK]
225
.wait:
228
           shl edx,8
226
           mov edx,[current_slot]
Line 229... Line 227...
229
;           cmp [SLOT_BASE+edx+APPDATA.ev_count], 0
227
;           cmp [SLOT_BASE+edx+APPDATA.ev_count], 0
Line 230... Line 228...
230
;           je .switch
228
;           je .switch
231
 
229
 
232
           add edx, SLOT_BASE+APP_EV_OFFSET
230
           add edx, APP_EV_OFFSET
Line 305... Line 303...
305
           jz .switch
303
           jz .switch
Line 306... Line 304...
306
 
304
 
307
           test [eax+EVENT.state], MANUAL_RESET
305
           test [eax+EVENT.state], MANUAL_RESET
Line 308... Line 306...
308
           jnz .done
306
           jnz .done
309
 
-
 
310
           mov edx,[CURRENT_TASK]
-
 
Line 311... Line 307...
311
           shl edx,8
307
 
312
           add edx, SLOT_BASE
308
           mov edx,[current_slot]
313
 
309
 
314
           pushfd
310
           pushfd
Line 576... Line 572...
576
     xor   eax, eax
572
     xor   eax, eax
577
     ret
573
     ret
Line 578... Line 574...
578
 
574
 
Line 579... Line -...
579
   no_eventoccur3:
-
 
580
 
575
no_eventoccur3:
581
 
576
 
582
     ;mov   edi,[TASK_BASE]              ; mouse event
577
     ;mov   edi,[TASK_BASE]              ; mouse event
-
 
578
     test  [edi+TASKDATA.event_mask],dword 00100000b
583
     test  [edi+TASKDATA.event_mask],dword 00100000b
579
     jz    no_mouse_event
584
     jz    no_mouse_event
580
 
585
     mov   eax,[CURRENT_TASK]
581
     mov eax, [CURRENT_TASK]
586
     shl   eax,8
582
     shl eax, 8
587
     test  [eax+SLOT_BASE+APPDATA.event_mask],dword 00100000b
583
     test  [eax+SLOT_BASE+APPDATA.event_mask],dword 00100000b
588
     jz    no_mouse_event
584
     jz    no_mouse_event
589
     and   [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-00100000b
585
     and   [eax+SLOT_BASE+APPDATA.event_mask],dword (not 00100000b)
590
     popad
586
     popad
591
     mov   eax,6
587
     mov   eax,6
Line 592... Line -...
592
     ret
-
 
593
   no_mouse_event:
588
     ret
594
 
589
no_mouse_event:
595
 
590
 
596
     ;mov   edi,[TASK_BASE]              ; DESKTOP BACKGROUND REDRAW
591
     ;mov   edi,[TASK_BASE]              ; DESKTOP BACKGROUND REDRAW
597
     test  [edi+TASKDATA.event_mask],dword 16
592
     test  [edi+TASKDATA.event_mask],dword 16
Line 614... Line 609...
614
     popad
609
     popad
615
     mov   eax,7
610
     mov   eax,7
616
     ret
611
     ret
617
   no_ipc:
612
no_ipc:
Line 618... Line -...
618
 
-
 
619
 
613
 
620
     ;mov   edi,[TASK_BASE]              ; STACK
614
     ;mov   edi,[TASK_BASE]              ; STACK
621
     test  [edi+TASKDATA.event_mask],dword 10000000b
615
     test  [edi+TASKDATA.event_mask],dword 10000000b
622
     jz    no_stack_event
616
     jz    no_stack_event
623
     mov   eax,[CURRENT_TASK]
617
     mov eax, [CURRENT_TASK]