Fixed <rdar://problem/3926825> Safari ignores GIF loop count
[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 // Needed for CGCompositeOperation
9 #import <CoreGraphics/CGContextPrivate.h>
10
11 @class WebImageRenderer;
12
13 @interface WebImageData : NSObject <NSCopying>
14 {
15     size_t imagesSize;
16     CGImageRef *images;
17     size_t imagePropertiesSize;
18     CFDictionaryRef fileProperties;
19     CFDictionaryRef *imageProperties;
20     CGImageSourceRef imageSource;
21
22     CGSize size;
23     BOOL haveSize;
24     
25     CFMutableDictionaryRef animatingRenderers;
26     NSTimer *frameTimer;
27
28     size_t frameDurationsSize;
29     float *frameDurations;
30     
31     size_t currentFrame;
32     int repetitionsComplete;
33     BOOL animationFinished;
34     
35     NSLock *decodeLock;
36     
37     id _PDFDoc;
38     BOOL isPDF;
39 }
40
41 - (size_t)numberOfImages;
42 - (CGImageRef)imageAtIndex:(size_t)index;
43 - (BOOL)incrementalLoadWithBytes:(const void *)bytes length:(unsigned)length complete:(BOOL)isComplete callback:(id)c;
44 - (void)drawImageAtIndex:(size_t)index inRect:(CGRect)ir fromRect:(CGRect)fr compositeOperation:(CGCompositeOperation)op context:(CGContextRef)aContext;
45 - (void)drawImageAtIndex:(size_t)index inRect:(CGRect)ir fromRect:(CGRect)fr adjustedSize:(CGSize)size compositeOperation:(CGCompositeOperation)op context:(CGContextRef)aContext;
46 - (void)tileInRect:(CGRect)rect fromPoint:(CGPoint)point context:(CGContextRef)aContext;
47 - (BOOL)isNull;
48 - (CGSize)size;
49 - (void)animate;
50 - (BOOL)shouldAnimate;
51 + (void)stopAnimationsInView:(NSView *)aView;
52 - (void)addAnimatingRenderer:(WebImageRenderer *)r inView:(NSView *)view;
53 - (void)removeAnimatingRenderer:(WebImageRenderer *)self;
54 - (BOOL)isAnimationFinished;
55 - (size_t)currentFrame;
56 - (CFDictionaryRef)propertiesAtIndex:(size_t)index;
57
58 - (void)decodeData:(CFDataRef)data isComplete:(BOOL)f callback:(id)c;
59
60 - (void)setIsPDF:(BOOL)f;
61 - (BOOL)isPDF;
62
63 @end
64
65 #endif