This commit is contained in:
pnunn%netscape.com 1999-04-19 22:00:02 +00:00
Родитель df6ef1d4e6
Коммит 594f1c3490
3 изменённых файлов: 141 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,45 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* ipng.h */
typedef enum {
PNG_ERROR,
PNG_INIT,
PNG_CONTINUE,
PNG_DELAY,
PNG_FINISH,
PNG_DONE
} png_state;
typedef struct ipng_str {
png_state state; /* Decoder FSM state */
int rows_per_chunk;
void *delay_timeout;
uint32 delay_time;
png_struct *pngs_p;
png_infop info_p;
/* One scanline's worth of post-processed sample data */
il_container *ic;
} ipng_struct, *ipng_structp;

Просмотреть файл

@ -0,0 +1,56 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http:/www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* -*- Mode: C; tab-width: 4 -*-
* nsPNGDecoder.cpp --- interface to png decoder
*/
#ifndef _nsPNGCallbk_h
#define _nsPNGCallbk_h
#include "nsIImgDecoder.h"
#include "nsPNGDecoder.h"
/* 2b0c6b90-d8b1-11d2-802c-0060088f91a3 */
#define NS_PNGCALLBK_CID \
{ 0x2b0c6b90, 0xd8b1, 0x11d2, \
{ 0x80, 0x2c, 0x00, 0x60, 0x08, 0x8f, 0x91, 0xa3 } }
/* 5cb47c60-d8b1-11d2-802c-0060088f91a3 */
#define NS_PNGCALLBK_IID \
{ 0x5cb47c60, 0xd8b1, 0x11d2, \
{ 0x80, 0x2c, 0x00, 0x60, 0x08, 0x8f, 0x91, 0xa3 } }
class PNGCallbk : public nsIImgDCallbk {
public:
NS_DECL_ISUPPORTS
il_container *GetContainer() {return mContainer;};
il_container *SetContainer(il_container *ic) {mContainer=ic; return ic;};
PNGCallbk(il_container *aContainer){mContainer=aContainer;};
~PNGCallbk();
private:
il_container* mContainer;
};
#endif

Просмотреть файл

@ -0,0 +1,40 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http:/www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* -*- Mode: C; tab-width: 4 -*-
* nsPNGDecoder.cpp --- interface to png decoder
*/
#ifndef _nsPNGDec_h
#define _nsPNGDec_h
/* 573010b0-de61-11d2-802c-0060088f91a3 */
#define NS_PNGDECODER_CID \
{ 0x573010b0, 0xde61, 0x11d2, \
{ 0x80, 0x2c, 0x00, 0x60, 0x08, 0x8f, 0x91, 0xa3 } }
/* 789d4ab0-de61-11d2-802e-0060088f91a3 */
#define NS_PNGDECODER_IID \
{ 0x789d4ab0, 0xde61, 0x11d2, \
{ 0x80, 0x2c, 0x00, 0x60, 0x08, 0x8f, 0x91, 0xa3 } }
static NS_DEFINE_IID(kPNGDecoderIID, NS_PNGDECODER_IID);
static NS_DEFINE_CID(kPNGDecoderCID, NS_PNGDECODER_CID);
#endif