]> git.cworth.org Git - grrobot/blobdiff - src/grr_board_view.h
Added keybindings. Can now play a board from a file without any server.
[grrobot] / src / grr_board_view.h
index 87aeebc23736d734cf3164d8258300013d1f8aea..706a56826623a5ca74e6440abea3419be3691ab7 100644 (file)
@@ -33,6 +33,8 @@
 
 #include <rr.h>
 
+#include "grr_icon.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
@@ -50,19 +52,27 @@ struct grr_board_view
     GtkWidget widget;
 
     rr_board_t *board;
-    int owns_board;
+
     int board_width, board_height;
     int board_pad_x, board_pad_y;
 
     int cell_width, cell_height;
 
-    /* XXX: Obviously, the rest of this needs to be gutted */
+    rr_robot_t active_robot;
+
+    rr_client_t *client;
     
     /* Button currently pressed or 0 if none */
     guint8 button;
     
     /* ID of update timer, or 0 if none */
     guint32 timer;
+
+    grr_icon_t *cell_icon;
+    grr_icon_t *wall_icon;
+
+    grr_icon_t *robot_icon[RR_NUM_ROBOTS];
+    grr_icon_t *target_icon[RR_NUM_TARGETS];
 };
 
 struct grr_board_view_class
@@ -70,10 +80,24 @@ struct grr_board_view_class
     GtkWidgetClass parent_class;
 };
 
-GtkWidget*     grr_board_view_new      (rr_board_t *board);
-GtkType        grr_board_view_get_type (void);
-void           grr_board_view_set_board        (grr_board_view_t *view,
-                                        rr_board_t *board);
+grr_board_view_t *
+grr_board_view_new (rr_board_t *board);
+
+void
+grr_board_view_set_client (grr_board_view_t *view, rr_client_t *client);
+
+GtkType
+grr_board_view_get_type (void);
+
+void
+grr_board_view_set_active_robot (grr_board_view_t *view, rr_robot_t robot);
+
+void
+grr_board_view_move_active (grr_board_view_t *view, rr_direction_t dir);
+
+void
+grr_board_view_undo (grr_board_view_t *view);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */