File: goPic.h

package info (click to toggle)
cgoban 1.9.14-18
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 3,448 kB
  • sloc: ansic: 36,037; sh: 707; makefile: 259
file content (69 lines) | stat: -rw-r--r-- 1,676 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
 * src/gopic.h, part of Complete Goban (game program)
 * Copyright (C) 1995-1996 William Shubert.
 * See "configure.h.in" for more copyright information.
 */


#ifndef  _GOPIC_H_

#ifndef  _GOGAME_H_
#include "goGame.h"
#endif
#ifndef  _CGOBAN_H_
#include "cgoban.h"
#endif

#ifdef  _GOPIC_H_
  Levelization Error
#endif
#define  _GOPIC_H_  1


/**********************************************************************
 * Data types
 **********************************************************************/
typedef enum GoPicMoves_enum {
  goPicMove_legal = 0x01,
  goPicMove_empty = 0x02,
  goPicMove_stone = 0x04,
  goPicMove_forceWhite = 0x08,
  goPicMove_forceBlack = 0x10,
  goPicMove_noPass = 0x20,
  goPicMove_noWhite = 0x40,
  goPicMove_noBlack = 0x80
} GoPicMoves;

typedef struct GoPic_struct  {
  Cgoban  *cg;
  GoGame  *game;
  ButOut  (*press)(void *packet, int loc);
  void  *packet;
  int  size;
  /* You must call goPic_update after changing this value. */
  GoPicMoves  allowedMoves;

  But  *boardBg;
  But  **boardButs;
  But  **letters, **numbers;

  MAGIC_STRUCT
} GoPic;


/**********************************************************************
 * Functions
 **********************************************************************/
extern GoPic  *goPic_create(Cgoban *cg, void *packet, GoGame *game,
			    ButWin *win, int layer,
			    ButOut pressed(void *packet, int loc), int size);
extern void  goPic_destroy(GoPic *p);
extern void  goPic_resize(GoPic *p, int x, int y, int w, int h);
extern void  goPic_setButHold(GoPic *p, bool hold);
/*
 * Returns the color whose move it is.
 */
extern GoStone  goPic_update(GoPic *p);


#endif  /* _GOPIC_H_ */