// Copyright 1997-1999 Omni Development, Inc.  All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
// distributed with this project and can also be found at
// http://www.omnigroup.com/DeveloperResources/OmniSourceLicense.html.
//
// $Header: /Network/Source/CVS/OmniGroup/OIF/OIImage.h,v 1.12 1999/06/07 17:53:06 kc Exp $

#import <OWF/OWAbstractContent.h>

@class NSData, NSMutableArray;
@class NSImage;

#import <Foundation/NSGeometry.h> // For NSSize
#import <OWF/OWContentProtocol.h>
#import "OIImageObserverProtocol.h"
#import "OIImageSourceDataProtocol.h"

@interface OIImage : OWAbstractContent
{
    BOOL haveSize;
    NSSize imageSize;
    NSImage *nsImage;

    NSMutableArray *observerValues;
    id <OIImageSourceData> sourceData;
}

+ (OWContentType *)contentType;

- (BOOL)hasSize;
- (NSSize)size;
- (void)setSize:(NSSize)newSize;
- (NSImage *)image;

- (void)updateImage:(NSImage *)anImage;
- (void)abortImage;

- (void)startAnimation;
- (void)stopAnimation;

- (void)addObserver:(id <OIImageObserver>)anObserver;
    // Subscribed anObserver to receive messages described in the OIImageObserver protocol.  The new observer is not retained.  The new observer is responsible for unsubscribing itself before it gets deallocated.

- (void)removeObserver:(id <OIImageObserver>)anObserver;
    // Unsubscribes anObserver such that it will not receive the messages described in the OIImageObserver protocol.

- (void)setSourceData:(id <OIImageSourceData>)imageSourceData;

@end
