00001 // cwchessboard -- A GTK+ chessboard widget 00002 // 00003 // Copyright (C) 2008 Carlo Wood 00004 // 00005 // Carlo Wood, Run on IRC <carlo@alinoe.com> 00006 // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt 00007 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61 00008 // 00009 // This program is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU General Public License 00011 // as published by the Free Software Foundation; either version 2 00012 // of the License, or (at your option) any later version. 00013 // 00014 // This program is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 // GNU General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU General Public License 00020 // along with this program; if not, write to the Free Software 00021 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 00022 00023 //! @file CwChessboardCodes.h 00024 //! @brief This file contains the definitions of the CwChessboardCode constants. 00025 00026 #ifndef CWCHESSBOARDCODES_H 00027 #define CWCHESSBOARDCODES_H 00028 00029 #include <stdint.h> 00030 00031 /** @typedef CwChessboardCode 00032 * @brief A code to specify a chess piece. 00033 * 00034 * One of the following constants: 00035 * #empty_square, #black_pawn, #white_pawn, #black_rook, #white_rook, #black_knight, #white_knight, 00036 * #black_bishop, #white_bishop, #black_queen, #white_queen, #black_king or #white_king. 00037 * 00038 * @sa cw_chessboard_set_square, cw_chessboard_add_floating_piece, cw_chessboard_get_floating_piece 00039 * / 00040 typedef uint16_t CwChessboardCode; 00041 00042 // Doxygen refuses to document static variables, so fool it into thinking these are non-static. 00043 // The comments for each constant are needed to get doxygen to show them at all. 00044 #ifndef DOXYGEN_STATIC 00045 #define DOXYGEN_STATIC static 00046 #endif 00047 00048 /** An empty square. The value <code>1</code> will also result in an empty square.* / 00049 DOXYGEN_STATIC CwChessboardCode const empty_square = 0; 00050 00051 /** A black pawn.* / 00052 DOXYGEN_STATIC CwChessboardCode const black_pawn = 2; 00053 00054 /** A white pawn.* / 00055 DOXYGEN_STATIC CwChessboardCode const white_pawn = 3; 00056 00057 /** A black rook.* / 00058 DOXYGEN_STATIC CwChessboardCode const black_rook = 4; 00059 00060 /** A white rook.* / 00061 DOXYGEN_STATIC CwChessboardCode const white_rook = 5; 00062 00063 /** A black knight.* / 00064 DOXYGEN_STATIC CwChessboardCode const black_knight = 6; 00065 00066 /** A white knight.* / 00067 DOXYGEN_STATIC CwChessboardCode const white_knight = 7; 00068 00069 /** A black bishop.* / 00070 DOXYGEN_STATIC CwChessboardCode const black_bishop = 8; 00071 00072 /** A white bishop.* / 00073 DOXYGEN_STATIC CwChessboardCode const white_bishop = 9; 00074 00075 /** A black queen.* / 00076 DOXYGEN_STATIC CwChessboardCode const black_queen = 10; 00077 00078 /** A white queen.* / 00079 DOXYGEN_STATIC CwChessboardCode const white_queen = 11; 00080 00081 /** 00082 * A black king. 00083 * Since the CwChessboard widget does not do any checking, 00084 * it is possible to display more than one king. 00085 * / 00086 DOXYGEN_STATIC CwChessboardCode const black_king = 12; 00087 00088 /** 00089 * A white king. 00090 * Since the CwChessboard widget does not do any checking, 00091 * it is possible to display more than one king. 00092 * / 00093 DOXYGEN_STATIC CwChessboardCode const white_king = 13; 00094 00095 #endif // CWCHESSBOARDCODES_H