xref: /reactos/sdk/lib/3rdparty/cardlib/cardlib.h (revision c2c66aff)
1 #ifndef CARDLIB_INCLUDED
2 #define CARDLIB_INCLUDED
3 
4 #include <stdarg.h>
5 #include <stdlib.h>
6 
7 #define WIN32_NO_STATUS
8 #include <windef.h>
9 #include <winbase.h>
10 #include <wingdi.h>
11 #include <winuser.h>
12 
13 #define CARDLIBPROC __stdcall
14 
15 void CardBlt(HDC hdc, int x, int y, int nCardNum);
16 void CardLib_SetZoomSpeed(int);
17 
18 #define CS_EI_NONE	0
19 #define CS_EI_SUNK	1
20 #define CS_EI_CIRC	67
21 #define CS_EI_X		66
22 
23 #define CS_DEFXOFF			12		//x-offset
24 #define CS_DEFYOFF			18		//y-offset
25 #define CS_NO3D				1		//default 3d counts (recommened)
26 #define CS_DEF3D			10		//(best for decks)
27 
28 #define CS_DRAG_NONE		0
29 #define CS_DRAG_TOP			1
30 #define CS_DRAG_ALL			2
31 #define CS_DRAG_CALLBACK	3
32 
33 #define CS_DROP_NONE		0
34 #define CS_DROP_ALL			1
35 #define	CS_DROP_CALLBACK	2
36 
37 #define CS_XJUST_NONE		0
38 #define CS_XJUST_RIGHT		1
39 #define CS_XJUST_CENTER		2
40 
41 #define CS_YJUST_NONE		0
42 #define CS_YJUST_BOTTOM		1
43 #define CS_YJUST_CENTER		2
44 
45 #define CB_STATIC			0		//static text label
46 #define CB_PUSHBUTTON		1		//normal button
47 #define CB_ALIGN_CENTER		0		//centered is default
48 #define CB_ALIGN_LEFT		2
49 #define CB_ALIGN_RIGHT		4
50 
51 #define CS_FACE_UP		 0	//all cards face-up
52 #define CS_FACE_DOWN	 1	//all cards face-down
53 #define CS_FACE_DOWNUP	 2	//bottom X cards down, top-most face-up
54 #define CS_FACE_UPDOWN	 3	//bottom X cards up, top-most face-down
55 #define CS_FACE_ANY		 4	//cards can be any orientation
56 
57 #define CS_DROPZONE_NODROP	-1
58 
59 //
60 //	Define the standard card-back indices
61 //
62 #define ecbCROSSHATCH	53
63 #define ecbWEAVE1		54
64 #define ecbWEAVE2		55
65 #define ecbROBOT		56
66 #define ecbFLOWERS		57
67 #define ecbVINE1		58
68 #define ecbVINE2		59
69 #define ecbFISH1		60
70 #define ecbFISH2		61
71 #define ecbSHELLS		62
72 #define ecbCASTLE		63
73 #define ecbISLAND		64
74 #define ecbCARDHAND		65
75 #define ecbUNUSED		66
76 #define ecbTHE_X		67
77 #define ecbTHE_O		68
78 
79 
80 class CardRegion;
81 class CardButton;
82 class CardStack;
83 class CardWindow;
84 
85 typedef bool (CARDLIBPROC *pCanDragProc)    (CardRegion &stackobj, int iNumDragging);
86 typedef bool (CARDLIBPROC *pCanDropProc)    (CardRegion &stackobj, CardStack &cards);
87 typedef void (CARDLIBPROC *pClickProc)      (CardRegion &stackobj, int iNumCards);
88 typedef void (CARDLIBPROC *pAddProc)        (CardRegion &stackobj, const CardStack &cards);
89 typedef void (CARDLIBPROC *pRemoveProc)     (CardRegion &stackobj, int iNumRemoved);
90 
91 typedef void (CARDLIBPROC *pResizeWndProc)  (int width, int height);
92 typedef int  (CARDLIBPROC *pDropZoneProc)   (int dzid, const CardStack &cards);
93 
94 typedef void (CARDLIBPROC *pButtonProc)		(CardButton &pButton);
95 
96 #include "globals.h"
97 #include "card.h"
98 #include "cardbutton.h"
99 #include "cardcolor.h"
100 #include "cardstack.h"
101 #include "cardregion.h"
102 #include "dropzone.h"
103 #include "cardwindow.h"
104 
105 #ifdef _DEBUG
106 typedef bool (CARDLIBPROC *pDebugClickProc) (CardRegion &stackobj);
107 void CardLib_SetStackClickProc(pDebugClickProc proc);
108 #endif
109 
110 #endif /* CARDLIB_INCLUDED */
111