ReactOS 0.4.16-dev-306-g647d351
cardlib.h
Go to the documentation of this file.
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
15void CardBlt(HDC hdc, int x, int y, int nCardNum);
16void 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
80class CardRegion;
81class CardButton;
82class CardStack;
83class CardWindow;
84
85typedef bool (CARDLIBPROC *pCanDragProc) (CardRegion &stackobj, int iNumDragging);
86typedef bool (CARDLIBPROC *pCanDropProc) (CardRegion &stackobj, CardStack &cards);
87typedef void (CARDLIBPROC *pClickProc) (CardRegion &stackobj, int iNumCards);
88typedef void (CARDLIBPROC *pAddProc) (CardRegion &stackobj, const CardStack &cards);
89typedef void (CARDLIBPROC *pRemoveProc) (CardRegion &stackobj, int iNumRemoved);
90
92typedef int (CARDLIBPROC *pDropZoneProc) (int dzid, const CardStack &cards);
93
94typedef 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
106typedef bool (CARDLIBPROC *pDebugClickProc) (CardRegion &stackobj);
107void CardLib_SetStackClickProc(pDebugClickProc proc);
108#endif
109
110#endif /* CARDLIB_INCLUDED */
#define CARDLIBPROC
Definition: cardlib.h:13
void(CARDLIBPROC * pResizeWndProc)(int width, int height)
Definition: cardlib.h:91
void(CARDLIBPROC * pButtonProc)(CardButton &pButton)
Definition: cardlib.h:94
void(CARDLIBPROC * pClickProc)(CardRegion &stackobj, int iNumCards)
Definition: cardlib.h:87
void CardLib_SetZoomSpeed(int)
Definition: cardlib.cpp:34
bool(CARDLIBPROC * pCanDragProc)(CardRegion &stackobj, int iNumDragging)
Definition: cardlib.h:85
void(CARDLIBPROC * pAddProc)(CardRegion &stackobj, const CardStack &cards)
Definition: cardlib.h:88
bool(CARDLIBPROC * pCanDropProc)(CardRegion &stackobj, CardStack &cards)
Definition: cardlib.h:86
void CardBlt(HDC hdc, int x, int y, int nCardNum)
Definition: cardrgndraw.cpp:22
int(CARDLIBPROC * pDropZoneProc)(int dzid, const CardStack &cards)
Definition: cardlib.h:92
void(CARDLIBPROC * pRemoveProc)(CardRegion &stackobj, int iNumRemoved)
Definition: cardlib.h:89
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
#define bool
Definition: nsiface.idl:72
static HANDLE proc()
Definition: pdb.c:34