widget/gtk/nsIImageToPixbuf.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/gtk/nsIImageToPixbuf.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef NSIIMAGETOPIXBUF_H_
     1.9 +#define NSIIMAGETOPIXBUF_H_
    1.10 +
    1.11 +#include "nsISupports.h"
    1.12 +
    1.13 +// dfa4ac93-83f2-4ab8-9b2a-0ff7022aebe2
    1.14 +#define NSIIMAGETOPIXBUF_IID \
    1.15 +{ 0xdfa4ac93, 0x83f2, 0x4ab8, \
    1.16 +  { 0x9b, 0x2a, 0x0f, 0xf7, 0x02, 0x2a, 0xeb, 0xe2 } }
    1.17 +
    1.18 +class imgIContainer;
    1.19 +typedef struct _GdkPixbuf GdkPixbuf;
    1.20 +
    1.21 +/**
    1.22 + * An interface that allows converting the current frame of an imgIContainer to a GdkPixbuf*.
    1.23 + */
    1.24 +class nsIImageToPixbuf : public nsISupports {
    1.25 +    public:
    1.26 +        NS_DECLARE_STATIC_IID_ACCESSOR(NSIIMAGETOPIXBUF_IID)
    1.27 +
    1.28 +        /**
    1.29 +         * The return value, if not null, should be released as needed
    1.30 +         * by the caller using g_object_unref.
    1.31 +         */
    1.32 +        NS_IMETHOD_(GdkPixbuf*) ConvertImageToPixbuf(imgIContainer* aImage) = 0;
    1.33 +};
    1.34 +
    1.35 +NS_DEFINE_STATIC_IID_ACCESSOR(nsIImageToPixbuf, NSIIMAGETOPIXBUF_IID)
    1.36 +
    1.37 +#endif

mercurial