[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSMovie and NSMovieView
From: |
baronc |
Subject: |
NSMovie and NSMovieView |
Date: |
Wed, 25 Dec 2002 12:16:55 -0000 |
Hi everyone,
I thought that would be interesting to add NSMovie and NSMovieView classes to
the AppKit based on Apple's ones, and using OpenQuickTime
(www.openquicktime.org). Here are the header files for them :
/*
NSMovie.h
Application Kit
Copyright (c) 2000-2001, Apple Computer, Inc.
All rights reserved.
*/
#import <Foundation/Foundation.h>
@class NSPasteboard;
@interface NSMovie : NSObject <NSCopying, NSCoding> {
@private
void* _movie;
NSURL* _url;
long _reserved1;
long _reserved2;
long _reserved3;
}
- (id) initWithMovie:(void* /*Movie*/)movie; // When
archived, saves contents
- (id) initWithURL:(NSURL*)url byReference:(BOOL)byRef; // When archived,
saves ref or contents
- (id) initWithPasteboard:(NSPasteboard*)pasteboard;
- (void*/*Movie*/)QTMovie;
- (NSURL*)URL;
+ (NSArray*) movieUnfilteredFileTypes;
+ (NSArray*) movieUnfilteredPasteboardTypes;
+ (BOOL) canInitWithPasteboard:(NSPasteboard*)pasteboard;
@end
/*
NSMovieView.h
Copyright (c) 1998-2001, Apple Computer, Inc. All rights reserved.
*/
#import <AppKit/NSView.h>
@class NSMovie;
typedef enum {
NSQTMovieNormalPlayback,
NSQTMovieLoopingPlayback,
NSQTMovieLoopingBackAndForthPlayback
} NSQTMovieLoopMode;
typedef struct __MVFlags {
unsigned int editable:1;
NSQTMovieLoopMode loopMode:3;
unsigned int playsEveryFrame:1;
unsigned int playsSelectionOnly:1;
unsigned int controllerVisible:1;
unsigned int reserved:25;
} _MVFlags;
@interface NSMovieView : NSView
{
@protected
NSMovie* _fMovie;
float _fRate;
float _fVolume;
_MVFlags _fFlags;
void* _fAuxData;
unsigned long _fReserved1;
unsigned long _fReserved2;
unsigned long _fReserved3;
}
- (void) setMovie:(NSMovie*)movie;
- (NSMovie*) movie;
- (void* /*MovieController*/) movieController;
- (NSRect) movieRect;
// playing
- (void)start:(id)sender;
- (void)stop:(id)sender;
- (BOOL)isPlaying;
- (void)gotoPosterFrame:(id)sender;
- (void)gotoBeginning:(id)sender;
- (void)gotoEnd:(id)sender;
- (void)stepForward:(id)sender;
- (void)stepBack:(id)sender;
- (void)setRate:(float)rate;
- (float)rate;
// sound
- (void)setVolume:(float)volume;
- (float)volume;
- (void)setMuted:(BOOL)mute;
- (BOOL)isMuted;
// play modes
- (void)setLoopMode:(NSQTMovieLoopMode)mode;
- (NSQTMovieLoopMode)loopMode;
- (void)setPlaysSelectionOnly:(BOOL)flag;
- (BOOL)playsSelectionOnly;
- (void)setPlaysEveryFrame:(BOOL)flag;
- (BOOL)playsEveryFrame;
// controller
- (void)showController:(BOOL)show adjustingSize:(BOOL)adjustSize;
- (BOOL)isControllerVisible;
// size
- (void)resizeWithMagnification:(float)magnification;
- (NSSize)sizeForMagnification:(float)magnification;
// editing
- (void)setEditable:(BOOL)editable;
- (BOOL)isEditable;
- (void)cut:(id)sender;
- (void)copy:(id)sender;
- (void)paste:(id)sender;
- (void)clear:(id)sender;
- (void)undo:(id)sender;
- (void)selectAll:(id)sender;
@end
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- NSMovie and NSMovieView,
baronc <=