This is the doxygen documentation for gtkboard.
.
#include <stdlib.h>
#include <assert.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include "board.h"
#include "ui_common.h"
#include "ui.h"
#include "menu.h"
Go to the source code of this file.
Functions | |
void | ui_make_human_move (byte *move, int *rmove) |
void | board_set_game_params () |
void | board_set_cell (int x, int y, byte val) |
void | board_apply_refresh (byte *move, int *rmove) |
void | board_refresh_cell_real (int x, int y, int real_x, int real_y) |
Draws the square (x, y). On the board it is shown at (real_x, real_y). | |
void | board_refresh_cell (int x, int y) |
A wrapper around board_refresh_cell_real() to take care of whether the board is flipped. | |
gboolean | board_redraw (GtkWidget *widget, GdkEventExpose *event) |
Redraws the exposed area of the board. | |
void | board_redraw_all () |
Redraw the whole board. | |
void | board_show () |
Called when the game is unpaused. | |
void | board_hide () |
Hide the board when the game is paused. | |
void | board_get_cell (GdkEventButton *event, int *row, int *col, int *pixel_x, int *pixel_y) |
gint | board_signal_handler (GtkWidget *widget, GdkEventButton *event, gpointer data) |
handles mouse clicks as well as key presses. | |
void | board_free () |
Free all malloc()d stuff. | |
gchar* | board_get_filerank_label_str (int label, int idx) |
gchar* | board_get_file_label_str (int label, int idx) |
gchar* | board_get_rank_label_str (int label, int idx) |
void | board_color_init (char *color, GdkColor *gdkcolor, GdkGC **gc, GdkColormap *cmap, GtkWidget *board_area) |
void | board_init () |
initialization of the board. | |
Variables | |
GtkWidget* | board_rowbox_real = NULL |
for showing names of rows and columns. | |
GtkWidget * | board_colbox_real = NULL |
for showing names of rows and columns. | |
GdkColor | board_colors [6] |
Colors for the light squares, dark squares, lines. | |
GdkColor | board_highlight_colors [3] |
Colors for highlighting. | |
GdkColor | board_buttonize_colors [2] |
Colors for turning pixmaps into buttons. | |
GdkGC* | board_gcs [3] = {NULL, NULL, NULL} |
gcs for light squares, dark squares and lines. | |
GdkGC* | board_highlight_gcs [3] = {NULL, NULL, NULL} |
gcs for highlighting. | |
GdkGC* | board_buttonize_gcs [3] = {NULL, NULL, NULL} |
gcs for drawing buttons. | |
GdkPixmap** | pieces = NULL |
Images representing the pieces. | |
GdkBitmap** | piece_masks = NULL |
Bitmaps to specify transparency for the pieces. | |
GdkPixmap* | board_bgimage = NULL |
Backround image. | |
gboolean | board_suspended = FALSE |
This is TRUE when the game is paused. | |
gboolean | state_board_flipped = FALSE |
Is the board flipped (rotated 180 deg). | |
char | board_default_colors [9] = {215, 215, 215, 215, 215, 215, 0, 0, 0} |
default background. | |
int | cell_size |
int | num_pieces |
Definition in file board.c.
|
|
|
Definition at line 502 of file board.c. Referenced by board_init(). |
|
Free all malloc()d stuff.
Definition at line 427 of file board.c. Referenced by ui_terminate_game(). |
|
Definition at line 317 of file board.c. Referenced by board_signal_handler(). |
|
|
|
Definition at line 476 of file board.c. Referenced by board_get_file_label_str(), and board_get_rank_label_str(). |
|
|
|
Hide the board when the game is paused.
Definition at line 306 of file board.c. Referenced by menu_show_pause_dialog(). |
|
initialization of the board.
Definition at line 516 of file board.c. Referenced by gui_init(), and ui_start_game(). |
|
Redraws the exposed area of the board.
|
|
Redraw the whole board.
Definition at line 292 of file board.c. Referenced by board_hide(), board_show(), menu_load_file(), and ui_start_game(). |
|
A wrapper around board_refresh_cell_real() to take care of whether the board is flipped.
|
|
Draws the square (x, y). On the board it is shown at (real_x, real_y).
Definition at line 132 of file board.c. Referenced by board_redraw(), and board_refresh_cell(). |
|
|
|
Definition at line 79 of file board.c. Referenced by ui_start_game(). |
|
Called when the game is unpaused.
Definition at line 298 of file board.c. Referenced by menu_start_stop_game(). |
|
handles mouse clicks as well as key presses.
|
|
|
|
Backround image.
|
|
Colors for turning pixmaps into buttons.
|
|
gcs for drawing buttons.
|
|
for showing names of rows and columns.
|
|
Colors for the light squares, dark squares, lines.
|
|
default background.
|
|
gcs for light squares, dark squares and lines.
|
|
Colors for highlighting.
|
|
gcs for highlighting.
|
|
for showing names of rows and columns.
|
|
This is TRUE when the game is paused.
|
|
|
|
|
|
Bitmaps to specify transparency for the pieces.
|
|
Images representing the pieces.
|
|
Is the board flipped (rotated 180 deg).
|