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

Last change on this file since 4 was 4, checked in by ktk, 26 years ago

Import

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