2006-06-16 22:38:39 +04:00
|
|
|
/* vim:set sw=4 sts=4 et cin: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-06-16 22:38:39 +04:00
|
|
|
|
|
|
|
#ifndef NSIMAGETOPIXBUF_H_
|
|
|
|
#define NSIMAGETOPIXBUF_H_
|
|
|
|
|
|
|
|
#include "nsIImageToPixbuf.h"
|
|
|
|
|
2007-03-20 15:14:52 +03:00
|
|
|
class gfxASurface;
|
2008-03-06 09:51:13 +03:00
|
|
|
class gfxPattern;
|
|
|
|
class gfxImageSurface;
|
2007-03-20 15:14:52 +03:00
|
|
|
|
2006-06-16 22:38:39 +04:00
|
|
|
class nsImageToPixbuf : public nsIImageToPixbuf {
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
NS_IMETHOD_(GdkPixbuf*) ConvertImageToPixbuf(imgIContainer* aImage);
|
2006-06-16 22:38:39 +04:00
|
|
|
|
|
|
|
// Friendlier version of ConvertImageToPixbuf for callers inside of
|
|
|
|
// widget
|
2010-12-07 16:54:50 +03:00
|
|
|
/**
|
|
|
|
* The return value of all these, if not null, should be
|
|
|
|
* released as needed by the caller using g_object_unref.
|
|
|
|
*/
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
static GdkPixbuf* ImageToPixbuf(imgIContainer * aImage);
|
2007-03-20 15:14:52 +03:00
|
|
|
static GdkPixbuf* SurfaceToPixbuf(gfxASurface* aSurface,
|
|
|
|
PRInt32 aWidth, PRInt32 aHeight);
|
2006-06-16 22:38:39 +04:00
|
|
|
private:
|
2008-03-06 09:51:13 +03:00
|
|
|
static GdkPixbuf* ImgSurfaceToPixbuf(gfxImageSurface* aImgSurface,
|
|
|
|
PRInt32 aWidth, PRInt32 aHeight);
|
2006-06-16 22:38:39 +04:00
|
|
|
~nsImageToPixbuf() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// fc2389b8-c650-4093-9e42-b05e5f0685b7
|
|
|
|
#define NS_IMAGE_TO_PIXBUF_CID \
|
|
|
|
{ 0xfc2389b8, 0xc650, 0x4093, \
|
|
|
|
{ 0x9e, 0x42, 0xb0, 0x5e, 0x5f, 0x06, 0x85, 0xb7 } }
|
|
|
|
|
|
|
|
#endif
|