This is SurfImageDecoder.h in view mode; [Download] [Up]
/* ** Copyright (c) 1995 Netsurfer Inc. All Rights Reserved. ** ** Author: <bbum@friday.com> */ /* This object is included in the MiscKit by permission from the author ** and its use is governed by the MiscKit license, found in the file ** "LICENSE.rtf" in the MiscKit distribution. Please refer to that file ** for a list of all applicable permissions and restrictions. */ @class HashTable, List; typedef enum { SEV_Unknown = -1, // unknown severity SEV_Notice, // warning or notification message SEV_Failure, // message documents failure in decoder SEV_Fatal // decoder seriously broken } SurfErrorSeverity; @protocol SurfErrorDelegate - (void) decoder: aDecoder spewMessage:(const char *) errMsg withSeverity:(SurfErrorSeverity) aSeverity; @end @interface SurfImageDecoder : Object <SurfErrorDelegate> { HashTable *decoderClassByType; /*"decoder classes hashed by type"*/ HashTable *decoderByType; /*"decoders hashed by type"*/ List *decoderList; /*"list of all decoders"*/ NXWindowDepth imageDepth; /*"target decoding depth"*/ const char * *_unfilteredFileTypes; /*" INTERNAL "*/ HashTable *_decoderReferences; /*" INTERNAL "*/ struct __SIDFlags { /*" INTERNAL "*/ unsigned char verboseMode:1; /*" INTERNAL "*/ unsigned char spewStderr:1; /*" INTERNAL "*/ } _SIDFlags; /*" INTERNAL "*/ id _lastDecoder; /*" INTERNAL "*/ id <SurfErrorDelegate> errorDelegate; /*"Error Delegate"*/ } /*" * Existance Methods "*/ + sharedInstance; - init; - free; /*" * Image Type Management "*/ - (const char *const *)imageUnfilteredFileTypes; - (BOOL)canLoadFromStream:(NXStream *)aStream; - (void) dumpTypes; /*" * Decoder Management "*/ - decoderForType:(const char *) imageType; - (Class) decoderClassForType:(const char *) imageType; - decoderForStream:(NXStream *) aStream; - (Class) decoderClassForStream:(NXStream *) aStream; - addDecoderClass: aClass; /*" * Decoding an Image "*/ - decodeFromFile:(const char *) filePath; - decodeFromFile:(const char *) filePath intoImage: anImage; - decodeFromFile:(const char *) filePath intoImage: anImage withDecoder: aDecoder; - decodeFromStream:(NXStream *) aStream; - decodeFromStream:(NXStream *) aStream intoImage:anImage; - decodeFromStream:(NXStream *) aStream intoImage:anImage withDecoder:aDecoder; /*" * Configuration "*/ - (void) setImageDepth:(NXWindowDepth) aDepth; - (NXWindowDepth) imageDepth; /*" * State Inspection "*/ - (BOOL) lastImageCorrupt; - decoderList; - decoderByType; - decoderClassByType; - (BOOL) verboseMode; - (void) setVerboseMode:(BOOL) aFlag; /*" * Error Handling "*/ - (void) setSpewToStderr:(BOOL) aFlag; - (BOOL) spewToStderr; - (void) setErrorDelegate:(id <SurfErrorDelegate>) aDelegate; - errorDelegate; /*" * Debugging "*/ - (void)printForDebugger:(NXStream *)aStream; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.