2007-03-22 10:30:00 -07:00
|
|
|
/* vim:set sw=4 sts=4 et cin: */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef NSIMAGETOPIXBUF_H_
|
|
|
|
#define NSIMAGETOPIXBUF_H_
|
|
|
|
|
|
|
|
#include "nsIImageToPixbuf.h"
|
2012-07-26 12:17:33 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class gfxASurface;
|
2008-03-05 22:51:13 -08:00
|
|
|
class gfxPattern;
|
|
|
|
class gfxImageSurface;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-01-23 03:33:23 -08:00
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
class SourceSurface;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-26 12:17:33 -07:00
|
|
|
class nsImageToPixbuf MOZ_FINAL : public nsIImageToPixbuf {
|
2014-01-23 03:33:23 -08:00
|
|
|
typedef mozilla::gfx::SourceSurface SourceSurface;
|
|
|
|
|
2007-03-22 10:30:00 -07: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-20 18:50:15 -07:00
|
|
|
NS_IMETHOD_(GdkPixbuf*) ConvertImageToPixbuf(imgIContainer* aImage);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// Friendlier version of ConvertImageToPixbuf for callers inside of
|
|
|
|
// widget
|
2010-12-07 05:54:50 -08: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-20 18:50:15 -07:00
|
|
|
static GdkPixbuf* ImageToPixbuf(imgIContainer * aImage);
|
2014-01-23 03:33:23 -08:00
|
|
|
static GdkPixbuf* SourceSurfaceToPixbuf(SourceSurface* aSurface,
|
|
|
|
int32_t aWidth,
|
|
|
|
int32_t aHeight);
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
private:
|
|
|
|
~nsImageToPixbuf() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// fc2389b8-c650-4093-9e42-b05e5f0685b7
|
|
|
|
#define NS_IMAGE_TO_PIXBUF_CID \
|
|
|
|
{ 0xfc2389b8, 0xc650, 0x4093, \
|
|
|
|
{ 0x9e, 0x42, 0xb0, 0x5e, 0x5f, 0x06, 0x85, 0xb7 } }
|
|
|
|
|
|
|
|
#endif
|