Beispiel #1
0
 def play(self, dur=5.0):
     if not self._enabled:
         self._parent.EnablePreview(0)
         return
     self.previewdur = dur
     currentpos = 0.01 * self.GetPos() * self.previewdur
     import windowinterface, time
     if self.fiber is None:
         self.start = time.time() - currentpos
         self.fiber = windowinterface.setidleproc(self.onIdle)
Beispiel #2
0
 def fixidleproc(self):
     if self.window:
         self.window._set_movie_active(not not self.play_movie)
     wantone = not not ((not self._paused) and self.play_movie)
     if wantone == self.idleprocactive:
         return
     if wantone:
         self.__id = windowinterface.setidleproc(self._playsome)
     else:
         windowinterface.cancelidleproc(self.__id)
     self.idleprocactive = wantone
Beispiel #3
0
 def __register_for_timeslices(self):
     if self.__fiber_id is None:
         self.__fiber_id = windowinterface.setidleproc(self.onIdle)
Beispiel #4
0
 def _startticker(self):
     self.__tid = windowinterface.setidleproc(self._tick)
Beispiel #5
0
 def __register_for_timeslices(self):
     if not self.__fiber_id:
         self.__fiber_id = windowinterface.setidleproc(self.__onIdle)
Beispiel #6
0
 def __register_for_timeslices(self):
     if self.__fiber_id is None:
         if USE_IDLE_PROC:
             self.__fiber_id = windowinterface.setidleproc(self.__onIdle)
         else:
             self.__fiber_id = windowinterface.settimer(0.05, (self.__onIdle,()))