예제 #1
0
 def idle(self, *args):
     if self.movie:
         if not self.movie.IsMovieDone() and self.running:
             Qd.ObscureCursor()
             while 1:
                 self.movie.MoviesTask(0)
                 gotone, event = Evt.EventAvail(Events.everyEvent)
                 if gotone or self.movie.IsMovieDone():
                     break
         elif self.running:
             box = self.movie.GetMovieBox()
             self.SetPort()
             self.GetWindow().InvalWindowRect(box)
             self.movie = None
             self.running = 0
예제 #2
0
 def set(self, path_or_fss, start=0):
     self.SetPort()
     if self.movie:
         #self.GetWindow().InvalWindowRect(self.movie.GetMovieBox())
         Qd.PaintRect(self.movie.GetMovieBox())
     path = File.pathname(path)
     self.movietitle = os.path.basename(path)
     movieResRef = Qt.OpenMovieFile(path_or_fss, 1)
     self.movie, dummy, dummy = Qt.NewMovieFromFile(
         movieResRef, 0, QuickTime.newMovieActive)
     self.moviebox = self.movie.GetMovieBox()
     self.calcmoviebox()
     Qd.ObscureCursor()  # XXX does this work at all?
     self.movie.GoToBeginningOfMovie()
     if start:
         self.movie.StartMovie()
         self.running = 1
     else:
         self.running = 0
         self.movie.MoviesTask(0)
예제 #3
0
 def start(self):
     if self.movie:
         Qd.ObscureCursor()
         self.movie.StartMovie()
         self.running = 1