| 84 | | pyatspi.Registry.onPumpQueuedEvents() |
|---|
| | 84 | # temp till pyatspi gets patched |
|---|
| | 85 | def PumpQueuedEvents(self): |
|---|
| | 86 | ''' |
|---|
| | 87 | Provides asynch processing of events in the queue by executeing them with |
|---|
| | 88 | _dispatchEvent(), as is done immediately when synch processing. |
|---|
| | 89 | This method would normally be called from a main or idle loop. |
|---|
| | 90 | ''' |
|---|
| | 91 | import Queue |
|---|
| | 92 | while 1: |
|---|
| | 93 | try: |
|---|
| | 94 | # get next waiting event |
|---|
| | 95 | event = self.queue.get_nowait() |
|---|
| | 96 | except Queue.Empty: |
|---|
| | 97 | break |
|---|
| | 98 | try: |
|---|
| | 99 | # dispatch it |
|---|
| | 100 | self._dispatchEvent(event) |
|---|
| | 101 | except: |
|---|
| | 102 | pass # not expected |
|---|
| | 103 | PumpQueuedEvents(pyatspi.Registry()) |
|---|