michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef NSIIMAGETOPIXBUF_H_ michael@0: #define NSIIMAGETOPIXBUF_H_ michael@0: michael@0: #include "nsISupports.h" michael@0: michael@0: // dfa4ac93-83f2-4ab8-9b2a-0ff7022aebe2 michael@0: #define NSIIMAGETOPIXBUF_IID \ michael@0: { 0xdfa4ac93, 0x83f2, 0x4ab8, \ michael@0: { 0x9b, 0x2a, 0x0f, 0xf7, 0x02, 0x2a, 0xeb, 0xe2 } } michael@0: michael@0: class imgIContainer; michael@0: typedef struct _GdkPixbuf GdkPixbuf; michael@0: michael@0: /** michael@0: * An interface that allows converting the current frame of an imgIContainer to a GdkPixbuf*. michael@0: */ michael@0: class nsIImageToPixbuf : public nsISupports { michael@0: public: michael@0: NS_DECLARE_STATIC_IID_ACCESSOR(NSIIMAGETOPIXBUF_IID) michael@0: michael@0: /** michael@0: * The return value, if not null, should be released as needed michael@0: * by the caller using g_object_unref. michael@0: */ michael@0: NS_IMETHOD_(GdkPixbuf*) ConvertImageToPixbuf(imgIContainer* aImage) = 0; michael@0: }; michael@0: michael@0: NS_DEFINE_STATIC_IID_ACCESSOR(nsIImageToPixbuf, NSIIMAGETOPIXBUF_IID) michael@0: michael@0: #endif