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"
|
2012-07-26 23:17:33 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2006-06-16 22:38:39 +04:00
|
|
|
|
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
|
|
|
|
2012-07-26 23:17:33 +04:00
|
|
|
class nsImageToPixbuf MOZ_FINAL : public nsIImageToPixbuf {
|
2006-06-16 22:38:39 +04: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 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,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t aWidth, int32_t aHeight);
|
2006-06-16 22:38:39 +04:00
|
|
|
private:
|
2014-01-23 16:34:56 +04:00
|
|
|
static GdkPixbuf* ImgSurfaceToPixbuf(gfxImageSurface* aImgSurface,
|
|
|
|
int32_t aWidth, int32_t 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
|