Home | History | Annotate | Download | only in NetscapeCoreAnimationMoviePlugin
      1 /*
      2      File: MovieControllerLayer.h
      3 
      4  Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
      5  Inc. ("Apple") in consideration of your agreement to the following
      6  terms, and your use, installation, modification or redistribution of
      7  this Apple software constitutes acceptance of these terms.  If you do
      8  not agree with these terms, please do not use, install, modify or
      9  redistribute this Apple software.
     10 
     11  In consideration of your agreement to abide by the following terms, and
     12  subject to these terms, Apple grants you a personal, non-exclusive
     13  license, under Apple's copyrights in this original Apple software (the
     14  "Apple Software"), to use, reproduce, modify and redistribute the Apple
     15  Software, with or without modifications, in source and/or binary forms;
     16  provided that if you redistribute the Apple Software in its entirety and
     17  without modifications, you must retain this notice and the following
     18  text and disclaimers in all such redistributions of the Apple Software.
     19  Neither the name, trademarks, service marks or logos of Apple Inc. may
     20  be used to endorse or promote products derived from the Apple Software
     21  without specific prior written permission from Apple.  Except as
     22  expressly stated in this notice, no other rights or licenses, express or
     23  implied, are granted by Apple herein, including but not limited to any
     24  patent rights that may be infringed by your derivative works or by other
     25  works in which the Apple Software may be incorporated.
     26 
     27  The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
     28  MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
     29  THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
     30  FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
     31  OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
     32 
     33  IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
     34  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     35  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     36  INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
     37  MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
     38  AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
     39  STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
     40  POSSIBILITY OF SUCH DAMAGE.
     41 
     42  Copyright (C) 2009 Apple Inc. All Rights Reserved.
     43 
     44  */
     45 
     46 
     47 #import <QuartzCore/QuartzCore.h>
     48 
     49 @class QTMovie;
     50 
     51 @interface MovieControllerLayer : CALayer {
     52     CGImageRef _playImage;
     53     CGImageRef _pauseImage;
     54 
     55     CGImageRef _sliderTrackLeft;
     56     CGImageRef _sliderTrackRight;
     57     CGImageRef _sliderTrackCenter;
     58 
     59     CGImageRef _thumb;
     60 
     61     QTMovie *_movie;
     62     NSTimer *_updateTimeTimer;
     63 
     64     BOOL _wasPlayingBeforeMouseDown;
     65     BOOL _isScrubbing;
     66     CGFloat _mouseDownXDelta;
     67 }
     68 
     69 - (void)setMovie:(QTMovie *)movie;
     70 
     71 - (void)handleMouseDown:(CGPoint)point;
     72 - (void)handleMouseUp:(CGPoint)point;
     73 - (void)handleMouseDragged:(CGPoint)point;
     74 
     75 @end
     76