CwChessboardCodes.h
Go to the documentation of this file.
1 // cwchessboard -- A GTK+ chessboard widget
2 //
3 // Copyright (C) 2008 Carlo Wood
4 //
5 // Carlo Wood, Run on IRC <carlo@alinoe.com>
6 // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt
7 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61
8 //
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License
11 // as published by the Free Software Foundation; either version 2
12 // of the License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 
23 //! @file CwChessboardCodes.h
24 //! @brief This file contains the definitions of the CwChessboardCode constants.
25 
26 #ifndef CWCHESSBOARDCODES_H
27 #define CWCHESSBOARDCODES_H
28 
29 #include <stdint.h>
30 
31 /** @typedef CwChessboardCode
32  * @brief A code to specify a chess piece.
33 *
34  * One of the following constants:
35  * #empty_square, #black_pawn, #white_pawn, #black_rook, #white_rook, #black_knight, #white_knight,
36  * #black_bishop, #white_bishop, #black_queen, #white_queen, #black_king or #white_king.
37 *
38  * @sa cw_chessboard_set_square, cw_chessboard_add_floating_piece, cw_chessboard_get_floating_piece
39 * /
40 typedef uint16_t CwChessboardCode;
41 
42 // Doxygen refuses to document static variables, so fool it into thinking these are non-static.
43 // The comments for each constant are needed to get doxygen to show them at all.
44 #ifndef DOXYGEN_STATIC
45 #define DOXYGEN_STATIC static
46 #endif
47 
48 /** An empty square. The value <code>1</code> will also result in an empty square.* /
49 DOXYGEN_STATIC CwChessboardCode const empty_square = 0;
50 
51 /** A black pawn.* /
52 DOXYGEN_STATIC CwChessboardCode const black_pawn = 2;
53 
54 /** A white pawn.* /
55 DOXYGEN_STATIC CwChessboardCode const white_pawn = 3;
56 
57 /** A black rook.* /
58 DOXYGEN_STATIC CwChessboardCode const black_rook = 4;
59 
60 /** A white rook.* /
61 DOXYGEN_STATIC CwChessboardCode const white_rook = 5;
62 
63 /** A black knight.* /
64 DOXYGEN_STATIC CwChessboardCode const black_knight = 6;
65 
66 /** A white knight.* /
67 DOXYGEN_STATIC CwChessboardCode const white_knight = 7;
68 
69 /** A black bishop.* /
70 DOXYGEN_STATIC CwChessboardCode const black_bishop = 8;
71 
72 /** A white bishop.* /
73 DOXYGEN_STATIC CwChessboardCode const white_bishop = 9;
74 
75 /** A black queen.* /
76 DOXYGEN_STATIC CwChessboardCode const black_queen = 10;
77 
78 /** A white queen.* /
79 DOXYGEN_STATIC CwChessboardCode const white_queen = 11;
80 
81 /**
82  * A black king.
83  * Since the CwChessboard widget does not do any checking,
84  * it is possible to display more than one king.
85 * /
86 DOXYGEN_STATIC CwChessboardCode const black_king = 12;
87 
88 /**
89  * A white king.
90  * Since the CwChessboard widget does not do any checking,
91  * it is possible to display more than one king.
92 * /
93 DOXYGEN_STATIC CwChessboardCode const white_king = 13;
94 
95 #endif // CWCHESSBOARDCODES_H
CwChessboardCode const white_bishop
CwChessboardCode const empty_square
uint16_t CwChessboardCode
A code to specify a chess piece.
CwChessboardCode const black_queen
CwChessboardCode const white_pawn
CwChessboardCode const white_queen
CwChessboardCode const black_pawn
CwChessboardCode const white_rook
CwChessboardCode const black_bishop
CwChessboardCode const black_knight
CwChessboardCode const white_knight
CwChessboardCode const white_king
CwChessboardCode const black_rook
CwChessboardCode const black_king

Copyright © 2006 - 2010 Carlo Wood.  All rights reserved.