2006-06-16 18:38:39 +00:00
|
|
|
/* vim:set sw=4 sts=4 et cin: */
|
2012-05-21 11:12:37 +00: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 18:38:39 +00:00
|
|
|
|
|
|
|
#ifndef NSIMAGETOPIXBUF_H_
|
|
|
|
#define NSIMAGETOPIXBUF_H_
|
|
|
|
|
|
|
|
#include "nsIImageToPixbuf.h"
|
2012-07-26 19:17:33 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2006-06-16 18:38:39 +00:00
|
|
|
|
2007-03-20 12:14:52 +00:00
|
|
|
class gfxASurface;
|
2008-03-06 06:51:13 +00:00
|
|
|
class gfxPattern;
|
|
|
|
class gfxImageSurface;
|
2007-03-20 12:14:52 +00:00
|
|
|
|
2012-07-26 19:17:33 +00:00
|
|
|
class nsImageToPixbuf MOZ_FINAL : public nsIImageToPixbuf {
|
2006-06-16 18:38:39 +00:00
|
|
|
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 01:50:15 +00:00
|
|
|
NS_IMETHOD_(GdkPixbuf*) ConvertImageToPixbuf(imgIContainer* aImage);
|
2006-06-16 18:38:39 +00:00
|
|
|
|
|
|
|
// Friendlier version of ConvertImageToPixbuf for callers inside of
|
|
|
|
// widget
|
2010-12-07 13:54:50 +00: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 01:50:15 +00:00
|
|
|
static GdkPixbuf* ImageToPixbuf(imgIContainer * aImage);
|
2007-03-20 12:14:52 +00:00
|
|
|
static GdkPixbuf* SurfaceToPixbuf(gfxASurface* aSurface,
|
2012-08-22 15:56:38 +00:00
|
|
|
int32_t aWidth, int32_t aHeight);
|
2006-06-16 18:38:39 +00:00
|
|
|
private:
|
2008-03-06 06:51:13 +00:00
|
|
|
static GdkPixbuf* ImgSurfaceToPixbuf(gfxImageSurface* aImgSurface,
|
2012-08-22 15:56:38 +00:00
|
|
|
int32_t aWidth, int32_t aHeight);
|
2006-06-16 18:38:39 +00: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
|