~alinuxninja/nginx-edge/trunk

« back to all changes in this revision

Viewing changes to debian/modules/ngx_pagespeed/psol/include/third_party/giflib/windows/GifWin.h

  • Committer: Vivian
  • Date: 2015-12-04 18:20:11 UTC
  • Revision ID: git-v1:a36f2bc32e884f7473b3a47040e5411306144d7d
* Do not extract psol.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*********************************************************
2
 
*
3
 
*       File:   GifWin.h
4
 
*       Title:  Graphics Interchange Format header
5
 
*
6
 
*       Author: Lennie Araki
7
 
*       Date:   24-Nov-1999
8
 
*
9
 
*       This class is a thin wrapper around the open source
10
 
*       giflib-1.4.0 for opening, parsing and displaying
11
 
*       Compuserve GIF files on Windows.
12
 
*
13
 
*       Copyright (c) 1999 CallWave, Inc.
14
 
*               CallWave, Inc.
15
 
*               136 W. Canon Perdido Suite A
16
 
*               Santa Barbara, CA 93101
17
 
*
18
 
*       Licensed under the terms laid out in the libungif 
19
 
*       COPYING file.
20
 
*
21
 
*********************************************************/
22
 
 
23
 
#ifndef __GIFWIN_H__
24
 
#define __GIFWIN_H__
25
 
 
26
 
#include <commctrl.h>                   // For LPCOLORMAP
27
 
 
28
 
typedef struct GifFileType GifFileType;                 // Opaque to avoid namespace collisions
29
 
 
30
 
// Fixed length struct to allocate 256-color BITMAPINFO
31
 
// (to avoid dynamic allocation)
32
 
typedef struct tagbmi256
33
 
{
34
 
    BITMAPINFO bmi; 
35
 
    RGBQUAD    fill[255];
36
 
} BMI256; 
37
 
 
38
 
// Win32 Class for wrapping libgif functionality
39
 
class CGIFWin
40
 
{
41
 
protected:
42
 
        GifFileType* m_pGifFile;
43
 
        LPBYTE m_pBits;
44
 
    BMI256 m_bmiGlobal;
45
 
        BMI256 m_bmiDisplay;
46
 
        COLORREF m_rgbTransparent;
47
 
        COLORREF m_rgbBackgnd;
48
 
        int m_iImageNum;
49
 
    UINT m_uLoopCount;               // Netscape 2.0 loop count
50
 
public:
51
 
// Constructor/destructor
52
 
        CGIFWin();
53
 
        ~CGIFWin();
54
 
// Operations
55
 
        int Open(LPCTSTR pszFileName, COLORREF rgbBack = RGB(255,255,255));
56
 
        void Close();
57
 
        int Draw(HDC hDC, LPCRECT pRect, int iFactor = 0);
58
 
        int NextImage();
59
 
    UINT GetLoopCount() const
60
 
    {   return m_uLoopCount;  }
61
 
    HBITMAP CreateMappedBitmap(LPCOLORMAP pMap, UINT uCount, int iScale = 1);
62
 
 
63
 
// Get image size (in pixels)
64
 
        int GetHeight();
65
 
        int GetWidth();
66
 
};
67
 
 
68
 
#endif // __GIFWIN_H__