source: trunk/src/pe2lx/cursor.h@ 46

Last change on this file since 46 was 46, checked in by sandervl, 26 years ago

* empty log message *

File size: 1.7 KB
Line 
1/*
2 * PE2LX cursor conversion code
3 *
4 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
5 *
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10#ifndef __CURSOR_H__
11#define __CURSOR_H__
12
13#pragma pack(1)
14
15typedef struct {
16 WORD wReserved; // Currently zero
17 WORD wType; // 2 for cursors
18 WORD cwCount; // Number of components
19//Fout in docs, geen padding
20// WORD padding; // filler for DWORD alignment
21} CursorHeader;
22
23typedef struct {
24 WORD wWidth;
25 WORD wHeight;
26 WORD wPlanes;
27 WORD wBitCount;
28 DWORD lBytesInRes;
29 WORD wNameOrdinal; // Points to component
30//Fout in docs, geen padding
31// WORD padding; // filler for DWORD alignment
32} CursorResDir;
33
34typedef struct {
35 short xHotspot;
36 short yHotspot;
37} CursorComponent;
38
39#pragma pack()
40
41class OS2Cursor
42{
43public:
44 // Constructors and destructors
45 OS2Cursor(int id, CursorComponent *bmpHdr, int size);
46 ~OS2Cursor();
47
48 int QueryCursorSize();
49 void SetCursorHdrOffset(int offset);
50 BITMAPFILEHEADER *GetCursorHeader(int wWidth, int wHeight, int wPlanes, int wBitCount);
51
52 static OS2Cursor *GetCursor(int id);
53 static void DestroyAll();
54
55protected:
56
57private:
58 int id, cursorsize, prevoffset;
59 BITMAPFILEHEADER *cursorhdr;
60
61 // Linked list management
62 OS2Cursor* next; // Next Cursor
63 static OS2Cursor* cursors; // List of Cursors
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.