static HRESULT WINAPI IMILBitmapImpl_CopyPixels(IMILBitmapSource *iface,
    const WICRect *rc, UINT stride, UINT size, BYTE *buffer)
{
    BitmapImpl *This = impl_from_IMILBitmapSource(iface);
    TRACE("(%p,%p,%u,%u,%p)\n", iface, rc, stride, size, buffer);
    return IWICBitmap_CopyPixels(&This->IWICBitmap_iface, rc, stride, size, buffer);
}
static HRESULT WINAPI IMILBitmapImpl_CopyPalette(IMILBitmapSource *iface,
    IWICPalette *palette)
{
    BitmapImpl *This = impl_from_IMILBitmapSource(iface);
    TRACE("(%p,%p)\n", iface, palette);
    return IWICBitmap_CopyPalette(&This->IWICBitmap_iface, palette);
}
static HRESULT WINAPI IMILBitmapImpl_GetResolution(IMILBitmapSource *iface,
    double *dpix, double *dpiy)
{
    BitmapImpl *This = impl_from_IMILBitmapSource(iface);
    TRACE("(%p,%p,%p)\n", iface, dpix, dpiy);
    return IWICBitmap_GetResolution(&This->IWICBitmap_iface, dpix, dpiy);
}
static HRESULT WINAPI IMILBitmapImpl_GetSize(IMILBitmapSource *iface,
    UINT *width, UINT *height)
{
    BitmapImpl *This = impl_from_IMILBitmapSource(iface);
    TRACE("(%p,%p,%p)\n", iface, width, height);
    return IWICBitmap_GetSize(&This->IWICBitmap_iface, width, height);
}
static HRESULT WINAPI IMILBitmapImpl_QueryInterface(IMILBitmapSource *iface, REFIID iid,
    void **ppv)
{
    BitmapImpl *This = impl_from_IMILBitmapSource(iface);
    TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);

    if (!ppv) return E_INVALIDARG;

    if (IsEqualIID(&IID_IUnknown, iid) ||
        IsEqualIID(&IID_IMILBitmap, iid) ||
        IsEqualIID(&IID_IMILBitmapSource, iid))
    {
        IUnknown_AddRef(&This->IMILBitmapSource_iface);
        *ppv = &This->IMILBitmapSource_iface;
        return S_OK;
    }
    else if (IsEqualIID(&IID_IWICBitmap, iid) ||
             IsEqualIID(&IID_IWICBitmapSource, iid))
    {
        IUnknown_AddRef(&This->IWICBitmap_iface);
        *ppv = &This->IWICBitmap_iface;
        return S_OK;
    }

    FIXME("unknown interface %s\n", debugstr_guid(iid));
    *ppv = NULL;
    return E_NOINTERFACE;
}
Пример #6
0
static HRESULT WINAPI IMILBitmapImpl_UnknownMethod1(IMILBitmapSource *iface, void **ppv)
{
    BitmapImpl *This = impl_from_IMILBitmapSource(iface);

    TRACE("(%p,%p)\n", iface, ppv);

    if (!ppv) return E_INVALIDARG;

    IUnknown_AddRef(&This->IMILUnknown1_iface);
    *ppv = &This->IMILUnknown1_iface;

    return S_OK;
}
static HRESULT WINAPI IMILBitmapImpl_unknown1(IMILBitmapSource *iface, void **ppv)
{
    BitmapImpl *This = impl_from_IMILBitmapSource(iface);

    TRACE("(%p,%p)\n", iface, ppv);

    if (!ppv) return E_INVALIDARG;

    /* reference count is not incremented here */
    *ppv = &This->IMILUnknown1_iface;

    return S_OK;
}
Пример #8
0
static HRESULT WINAPI IMILBitmapImpl_GetPixelFormat(IMILBitmapSource *iface,
    int *format)
{
    BitmapImpl *This = impl_from_IMILBitmapSource(iface);
    int i;

    TRACE("(%p,%p)\n", iface, format);

    if (!format) return E_INVALIDARG;

    *format = 0;

    for (i = 0; i < sizeof(pixel_fmt_map)/sizeof(pixel_fmt_map[0]); i++)
    {
        if (IsEqualGUID(pixel_fmt_map[i].WIC_format, &This->pixelformat))
        {
            *format = pixel_fmt_map[i].enum_format;
            break;
        }
    }

    return S_OK;
}
Пример #9
0
static ULONG WINAPI IMILBitmapImpl_Release(IMILBitmapSource *iface)
{
    BitmapImpl *This = impl_from_IMILBitmapSource(iface);
    return IWICBitmap_Release(&This->IWICBitmap_iface);
}
static HRESULT WINAPI IMILBitmapImpl_Lock(IMILBitmapSource *iface, const WICRect *rc, DWORD flags, IWICBitmapLock **lock)
{
    BitmapImpl *This = impl_from_IMILBitmapSource(iface);
    TRACE("(%p,%p,%08x,%p)\n", iface, rc, flags, lock);
    return IWICBitmap_Lock(&This->IWICBitmap_iface, rc, flags, lock);
}