File: icondir.h

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (91 lines) | stat: -rw-r--r-- 3,011 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
///////////////////////////////////////////////////////////////////////////////
// Name:        wx/private/icondir.h
// Purpose:     Declarations of structs used for loading MS icons
// Author:      wxWidgets team
// Created:     2017-05-19
// Copyright:   (c) 2017 wxWidgets team
// Licence:     wxWindows licence
///////////////////////////////////////////////////////////////////////////////

#ifndef _WX_PRIVATE_ICONDIR_H_
#define _WX_PRIVATE_ICONDIR_H_

#include "wx/defs.h"          // wxUint* declarations


// Structs declared here are used for loading group icons from
// .ICO files or MS Windows resources.
// Icon entry and directory structs for .ICO files and
// MS Windows resources are very similar but not identical.

#if wxUSE_ICO_CUR

#if wxUSE_STREAMS

// icon entry in .ICO files
struct ICONDIRENTRY
{
    wxUint8         bWidth;               // Width of the image
    wxUint8         bHeight;              // Height of the image (times 2)
    wxUint8         bColorCount;          // Number of colors in image (0 if >=8bpp)
    wxUint8         bReserved;            // Reserved

    // these two are different in icons and cursors:
                                          // icon           or  cursor
    wxUint16        wPlanes;              // Color Planes   or  XHotSpot
    wxUint16        wBitCount;            // Bits per pixel or  YHotSpot

    wxUint32        dwBytesInRes;         // how many bytes in this resource?
    wxUint32        dwImageOffset;        // where in the file is this image
};

// icon directory in .ICO files
struct ICONDIR
{
    wxUint16     idReserved;   // Reserved
    wxUint16     idType;       // resource type (1 for icons, 2 for cursors)
    wxUint16     idCount;      // how many images?
};

#endif // wxUSE_STREAMS


#ifdef __WINDOWS__

#pragma pack(push)
#pragma pack(2)

// icon entry in MS Windows resources
struct GRPICONDIRENTRY
{
    wxUint8         bWidth;               // Width of the image
    wxUint8         bHeight;              // Height of the image (times 2)
    wxUint8         bColorCount;          // Number of colors in image (0 if >=8bpp)
    wxUint8         bReserved;            // Reserved

    // these two are different in icons and cursors:
                                          // icon           or  cursor
    wxUint16        wPlanes;              // Color Planes   or  XHotSpot
    wxUint16        wBitCount;            // Bits per pixel or  YHotSpot

    wxUint32        dwBytesInRes;         // how many bytes in this resource?

    wxUint16        nID;                  // actual icon resource ID
};

// icon directory in MS Windows resources
struct GRPICONDIR
{
    wxUint16        idReserved;   // Reserved
    wxUint16        idType;       // resource type (1 for icons, 2 for cursors)
    wxUint16        idCount;      // how many images?
    GRPICONDIRENTRY idEntries[1]; // The entries for each image
};

#pragma pack(pop)

#endif // __WINDOWS__

#endif // wxUSE_ICO_CUR

#endif // _WX_PRIVATE_ICONDIR_H_