ReactOS  0.4.14-dev-49-gfb4591c
cardlib.h File Reference
#include <stdarg.h>
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include "globals.h"
#include "card.h"
#include "cardbutton.h"
#include "cardcolor.h"
#include "cardstack.h"
#include "cardregion.h"
#include "dropzone.h"
#include "cardwindow.h"
Include dependency graph for cardlib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define CARDLIBPROC   __stdcall
 
#define CS_EI_NONE   0
 
#define CS_EI_SUNK   1
 
#define CS_EI_CIRC   67
 
#define CS_EI_X   66
 
#define CS_DEFXOFF   12
 
#define CS_DEFYOFF   18
 
#define CS_NO3D   1
 
#define CS_DEF3D   10
 
#define CS_DRAG_NONE   0
 
#define CS_DRAG_TOP   1
 
#define CS_DRAG_ALL   2
 
#define CS_DRAG_CALLBACK   3
 
#define CS_DROP_NONE   0
 
#define CS_DROP_ALL   1
 
#define CS_DROP_CALLBACK   2
 
#define CS_XJUST_NONE   0
 
#define CS_XJUST_RIGHT   1
 
#define CS_XJUST_CENTER   2
 
#define CS_YJUST_NONE   0
 
#define CS_YJUST_BOTTOM   1
 
#define CS_YJUST_CENTER   2
 
#define CB_STATIC   0
 
#define CB_PUSHBUTTON   1
 
#define CB_ALIGN_CENTER   0
 
#define CB_ALIGN_LEFT   2
 
#define CB_ALIGN_RIGHT   4
 
#define CS_FACE_UP   0
 
#define CS_FACE_DOWN   1
 
#define CS_FACE_DOWNUP   2
 
#define CS_FACE_UPDOWN   3
 
#define CS_FACE_ANY   4
 
#define CS_DROPZONE_NODROP   -1
 
#define ecbCROSSHATCH   53
 
#define ecbWEAVE1   54
 
#define ecbWEAVE2   55
 
#define ecbROBOT   56
 
#define ecbFLOWERS   57
 
#define ecbVINE1   58
 
#define ecbVINE2   59
 
#define ecbFISH1   60
 
#define ecbFISH2   61
 
#define ecbSHELLS   62
 
#define ecbCASTLE   63
 
#define ecbISLAND   64
 
#define ecbCARDHAND   65
 
#define ecbUNUSED   66
 
#define ecbTHE_X   67
 
#define ecbTHE_O   68
 

Typedefs

typedef int iNumDragging
 
typedef bool(CARDLIBPROCpCanDropProc) (CardRegion &stackobj, CardStack &cards)
 
typedef void(CARDLIBPROCpClickProc) (CardRegion &stackobj, int iNumCards)
 
typedef void(CARDLIBPROCpAddProc) (CardRegion &stackobj, const CardStack &cards)
 
typedef void(CARDLIBPROCpRemoveProc) (CardRegion &stackobj, int iNumRemoved)
 
typedef void(CARDLIBPROCpResizeWndProc) (int width, int height)
 
typedef int(CARDLIBPROCpDropZoneProc) (int dzid, const CardStack &cards)
 
typedef void(CARDLIBPROCpButtonProc) (CardButton &pButton)
 

Functions

void CardBlt (HDC hdc, int x, int y, int nCardNum)
 
void CardLib_SetZoomSpeed (int)
 
typedef bool (CARDLIBPROC *pCanDragProc)(CardRegion &stackobj
 

Macro Definition Documentation

◆ CARDLIBPROC

#define CARDLIBPROC   __stdcall

Definition at line 13 of file cardlib.h.

◆ CB_ALIGN_CENTER

#define CB_ALIGN_CENTER   0

Definition at line 47 of file cardlib.h.

◆ CB_ALIGN_LEFT

#define CB_ALIGN_LEFT   2

Definition at line 48 of file cardlib.h.

◆ CB_ALIGN_RIGHT

#define CB_ALIGN_RIGHT   4

Definition at line 49 of file cardlib.h.

◆ CB_PUSHBUTTON

#define CB_PUSHBUTTON   1

Definition at line 46 of file cardlib.h.

◆ CB_STATIC

#define CB_STATIC   0

Definition at line 45 of file cardlib.h.

◆ CS_DEF3D

#define CS_DEF3D   10

Definition at line 26 of file cardlib.h.

◆ CS_DEFXOFF

#define CS_DEFXOFF   12

Definition at line 23 of file cardlib.h.

◆ CS_DEFYOFF

#define CS_DEFYOFF   18

Definition at line 24 of file cardlib.h.

◆ CS_DRAG_ALL

#define CS_DRAG_ALL   2

Definition at line 30 of file cardlib.h.

◆ CS_DRAG_CALLBACK

#define CS_DRAG_CALLBACK   3

Definition at line 31 of file cardlib.h.

◆ CS_DRAG_NONE

#define CS_DRAG_NONE   0

Definition at line 28 of file cardlib.h.

◆ CS_DRAG_TOP

#define CS_DRAG_TOP   1

Definition at line 29 of file cardlib.h.

◆ CS_DROP_ALL

#define CS_DROP_ALL   1

Definition at line 34 of file cardlib.h.

◆ CS_DROP_CALLBACK

#define CS_DROP_CALLBACK   2

Definition at line 35 of file cardlib.h.

◆ CS_DROP_NONE

#define CS_DROP_NONE   0

Definition at line 33 of file cardlib.h.

◆ CS_DROPZONE_NODROP

#define CS_DROPZONE_NODROP   -1

Definition at line 57 of file cardlib.h.

◆ CS_EI_CIRC

#define CS_EI_CIRC   67

Definition at line 20 of file cardlib.h.

◆ CS_EI_NONE

#define CS_EI_NONE   0

Definition at line 18 of file cardlib.h.

◆ CS_EI_SUNK

#define CS_EI_SUNK   1

Definition at line 19 of file cardlib.h.

◆ CS_EI_X

#define CS_EI_X   66

Definition at line 21 of file cardlib.h.

◆ CS_FACE_ANY

#define CS_FACE_ANY   4

Definition at line 55 of file cardlib.h.

◆ CS_FACE_DOWN

#define CS_FACE_DOWN   1

Definition at line 52 of file cardlib.h.

◆ CS_FACE_DOWNUP

#define CS_FACE_DOWNUP   2

Definition at line 53 of file cardlib.h.

◆ CS_FACE_UP

#define CS_FACE_UP   0

Definition at line 51 of file cardlib.h.

◆ CS_FACE_UPDOWN

#define CS_FACE_UPDOWN   3

Definition at line 54 of file cardlib.h.

◆ CS_NO3D

#define CS_NO3D   1

Definition at line 25 of file cardlib.h.

◆ CS_XJUST_CENTER

#define CS_XJUST_CENTER   2

Definition at line 39 of file cardlib.h.

◆ CS_XJUST_NONE

#define CS_XJUST_NONE   0

Definition at line 37 of file cardlib.h.

◆ CS_XJUST_RIGHT

#define CS_XJUST_RIGHT   1

Definition at line 38 of file cardlib.h.

◆ CS_YJUST_BOTTOM

#define CS_YJUST_BOTTOM   1

Definition at line 42 of file cardlib.h.

◆ CS_YJUST_CENTER

#define CS_YJUST_CENTER   2

Definition at line 43 of file cardlib.h.

◆ CS_YJUST_NONE

#define CS_YJUST_NONE   0

Definition at line 41 of file cardlib.h.

◆ ecbCARDHAND

#define ecbCARDHAND   65

Definition at line 74 of file cardlib.h.

◆ ecbCASTLE

#define ecbCASTLE   63

Definition at line 72 of file cardlib.h.

◆ ecbCROSSHATCH

#define ecbCROSSHATCH   53

Definition at line 62 of file cardlib.h.

◆ ecbFISH1

#define ecbFISH1   60

Definition at line 69 of file cardlib.h.

◆ ecbFISH2

#define ecbFISH2   61

Definition at line 70 of file cardlib.h.

◆ ecbFLOWERS

#define ecbFLOWERS   57

Definition at line 66 of file cardlib.h.

◆ ecbISLAND

#define ecbISLAND   64

Definition at line 73 of file cardlib.h.

◆ ecbROBOT

#define ecbROBOT   56

Definition at line 65 of file cardlib.h.

◆ ecbSHELLS

#define ecbSHELLS   62

Definition at line 71 of file cardlib.h.

◆ ecbTHE_O

#define ecbTHE_O   68

Definition at line 77 of file cardlib.h.

◆ ecbTHE_X

#define ecbTHE_X   67

Definition at line 76 of file cardlib.h.

◆ ecbUNUSED

#define ecbUNUSED   66

Definition at line 75 of file cardlib.h.

◆ ecbVINE1

#define ecbVINE1   58

Definition at line 67 of file cardlib.h.

◆ ecbVINE2

#define ecbVINE2   59

Definition at line 68 of file cardlib.h.

◆ ecbWEAVE1

#define ecbWEAVE1   54

Definition at line 63 of file cardlib.h.

◆ ecbWEAVE2

#define ecbWEAVE2   55

Definition at line 64 of file cardlib.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 7 of file cardlib.h.

Typedef Documentation

◆ iNumDragging

typedef int iNumDragging

Definition at line 85 of file cardlib.h.

◆ pAddProc

typedef void(CARDLIBPROC * pAddProc) (CardRegion &stackobj, const CardStack &cards)

Definition at line 88 of file cardlib.h.

◆ pButtonProc

typedef void(CARDLIBPROC * pButtonProc) (CardButton &pButton)

Definition at line 94 of file cardlib.h.

◆ pCanDropProc

typedef bool(CARDLIBPROC * pCanDropProc) (CardRegion &stackobj, CardStack &cards)

Definition at line 86 of file cardlib.h.

◆ pClickProc

typedef void(CARDLIBPROC * pClickProc) (CardRegion &stackobj, int iNumCards)

Definition at line 87 of file cardlib.h.

◆ pDropZoneProc

typedef int(CARDLIBPROC * pDropZoneProc) (int dzid, const CardStack &cards)

Definition at line 92 of file cardlib.h.

◆ pRemoveProc

typedef void(CARDLIBPROC * pRemoveProc) (CardRegion &stackobj, int iNumRemoved)

Definition at line 89 of file cardlib.h.

◆ pResizeWndProc

typedef void(CARDLIBPROC * pResizeWndProc) (int width, int height)

Definition at line 91 of file cardlib.h.

Function Documentation

◆ bool()

◆ CardBlt()

void CardBlt ( HDC  hdc,
int  x,
int  y,
int  nCardNum 
)

Definition at line 22 of file cardrgndraw.cpp.

23 {
24  int sx = nCardNum * __cardwidth;
25  int sy = 0;
26  int width = __cardwidth;
27  int height = __cardheight;
28 
29  //draw main center band
30  BitBlt(hdc, x+2, y, width - 4, height, __hdcCardBitmaps, sx+2, sy+0, SRCCOPY);
31 
32  //draw the two bits to the left
33  BitBlt(hdc, x, y+2, 1, height - 4, __hdcCardBitmaps, sx+0, sy+2, SRCCOPY);
34  BitBlt(hdc, x+1, y+1, 1, height - 2, __hdcCardBitmaps, sx+1, sy+1, SRCCOPY);
35 
36  //draw the two bits to the right
37  BitBlt(hdc, x+width-2, y+1, 1, height - 2, __hdcCardBitmaps, sx+width-2, sy+1, SRCCOPY);
38  BitBlt(hdc, x+width-1, y+2, 1, height - 4, __hdcCardBitmaps, sx+width-1, sy+2, SRCCOPY);
39 }
GLint GLint GLsizei width
Definition: gl.h:1546
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static VOID NTAPI BitBlt(IN ULONG Left, IN ULONG Top, IN ULONG Width, IN ULONG Height, IN PUCHAR Buffer, IN ULONG BitsPerPixel, IN ULONG Delta)
Definition: vga.c:410
HDC __hdcCardBitmaps
Definition: cardlib.cpp:18
HDC hdc
Definition: main.c:9
int __cardwidth
Definition: cardlib.cpp:25
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
int __cardheight
Definition: cardlib.cpp:26
#define SRCCOPY
Definition: wingdi.h:332

Referenced by CardRegion::PrepareDragBitmaps(), CardRegion::PrepareDragBitmapsThreed(), and CardRegion::Render().

◆ CardLib_SetZoomSpeed()

void CardLib_SetZoomSpeed ( int  )

Definition at line 34 of file cardlib.cpp.

35 {
36  __CARDZOOMSPEED = (double)speed;
37 }
double __CARDZOOMSPEED
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:80