chess

Terminal based Chess trainer using Anki
git clone git://git.dimitrijedobrota.com/chess.git
Log | Files | Refs

display.h (1337B)


      1 #ifndef DISPAY_H
      2 #define DISPAY_H
      3 
      4 #include <pane/pane.h>
      5 #include <pane/widgets.h>
      6 
      7 #include "board.h"
      8 
      9 #define MAX_READ 5
     10 
     11 void display_start(void);
     12 void display_stop(void);
     13 
     14 /* void display_board(Board_T self); */
     15 void display_moves(int halfmoves);
     16 void display_title(char *name);
     17 void display_error(char *err);
     18 
     19 void display_fail(void);
     20 void display_pass(void);
     21 void display_clear(void);
     22 
     23 int display_input(char *buf, int *index);
     24 
     25 char *display_select_menu(const char **list, int size);
     26 char  display_getch(void);
     27 
     28 typedef struct boardInfo_T *boardInfo_T;
     29 struct boardInfo_T {
     30   int something;
     31 };
     32 
     33 typedef struct boardStyle_T *boardStyle_T;
     34 struct boardStyle_T {
     35   int square_light;
     36   int square_dark;
     37   int border;
     38   int piece;
     39   int annotation;
     40   int pass;
     41   int fail;
     42 };
     43 
     44 typedef struct movesInfo_T *movesInfo_T;
     45 struct movesInfo_T {
     46   widgetList_T list;
     47 };
     48 
     49 typedef struct movesStyle_T *movesStyle_T;
     50 struct movesStyle_T {
     51   int move_padding;
     52   int num_padding;
     53   int foreground;
     54   int background;
     55   int active;
     56 };
     57 
     58 typedef struct titleInfo_T *titleInfo_T;
     59 struct titleInfo_T {
     60   widget_T subwidget;
     61 };
     62 
     63 typedef struct titleStyle_T *titleStyle_T;
     64 struct titleStyle_T {
     65   int something;
     66 };
     67 
     68 void board_display(widget_T widget);
     69 void moves_display(widget_T widget);
     70 int  game_handleInput(data_T data, struct tb_event ev);
     71 
     72 #endif