Reviewed by NOBODY (OOPS!).
[WebKit-https.git] / WebKit / WebCoreSupport.subproj / WebImageData.h
1 /*      WebImageData.h
2         Copyright 2004, Apple, Inc. All rights reserved.
3 */
4 #ifndef OMIT_TIGER_FEATURES
5
6 #import <Cocoa/Cocoa.h>
7
8 @class WebImageRenderer;
9
10 @interface WebImageData : NSObject <NSCopying>
11 {
12     size_t imagesSize;
13     CGImageRef *images;
14     size_t imagePropertiesSize;
15     CFDictionaryRef fileProperties;
16     CFDictionaryRef *imageProperties;
17     CGImageSourceRef imageSource;
18
19     CGSize size;
20     BOOL haveSize;
21     
22     CFMutableDictionaryRef animatingRenderers;
23     NSTimer *frameTimer;
24
25     size_t frameDurationsSize;
26     float *frameDurations;
27     
28     size_t currentFrame;
29     int repetitionsComplete;
30     BOOL animationFinished;
31     
32     NSLock *decodeLock;
33     
34     id _PDFDoc;
35     BOOL isPDF;
36     
37     BOOL isSolidColor;                              // Is frame 0 a solid color?
38     CGColorRef solidColor;                          // If isSolidColor this is the color, or NULL for transparent
39     
40     BOOL sizeAvailable;
41 }
42
43 - (size_t)numberOfImages;
44 - (CGImageRef)imageAtIndex:(size_t)index;
45 - (BOOL)incrementalLoadWithBytes:(const void *)bytes length:(unsigned)length complete:(BOOL)isComplete callback:(id)c;
46 - (void)drawImageAtIndex:(size_t)index inRect:(CGRect)ir fromRect:(CGRect)fr compositeOperation:(NSCompositingOperation)op context:(CGContextRef)aContext;
47 - (void)drawImageAtIndex:(size_t)index inRect:(CGRect)ir fromRect:(CGRect)fr adjustedSize:(CGSize)size compositeOperation:(NSCompositingOperation)op context:(CGContextRef)aContext;
48 - (void)tileInRect:(CGRect)rect fromPoint:(CGPoint)point context:(CGContextRef)aContext;
49 - (BOOL)isNull;
50 - (CGSize)size;
51 - (void)animate;
52 - (BOOL)shouldAnimate;
53 + (void)stopAnimationsInView:(NSView *)aView;
54 - (void)addAnimatingRenderer:(WebImageRenderer *)r inView:(NSView *)view;
55 - (void)removeAnimatingRenderer:(WebImageRenderer *)self;
56 - (BOOL)isAnimationFinished;
57 - (size_t)currentFrame;
58 - (CFDictionaryRef)propertiesAtIndex:(size_t)index;
59
60 - (void)decodeData:(CFDataRef)data isComplete:(BOOL)f callback:(id)c;
61
62 - (void)setIsPDF:(BOOL)f;
63 - (BOOL)isPDF;
64
65 - (void)resetAnimation;
66
67 @end
68
69 #endif