File: editInfo.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 (71 lines) | stat: -rw-r--r-- 1,740 bytes parent folder | download | duplicates (9)
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
70
71
 /*
 * src/editInfo.h, part of Complete Goban (game program)
 * Copyright (C) 1996 William Shubert.
 * See "configure.h.in" for more copyright information.
 */

#ifndef  _EDITINFO_H_

#ifndef  _CGOBAN_H_
#include "cgoban.h"
#endif
#ifndef  _ABUT_TERM_H_
#include <abut/term.h>
#endif
#ifndef  _GOBAN_H_
#include "goban.h"
#endif
#ifdef  _EDITINFO_H_
  Levelization Error.
#endif
#define  _EDITINFO_H_  1


/**********************************************************************
 * Data Types
 **********************************************************************/
typedef enum  {
  editInfo_gameTitle, editInfo_copyright,
  editInfo_wName,     editInfo_bName,
  editInfo_wRank,     editInfo_bRank,
  editInfo_handicap,  editInfo_komi,
  editInfo_time,      editInfo_result,
  editInfo_date,      editInfo_place,
  editInfo_event,     editInfo_source,
  editInfo_count
} EditInfoVal;


typedef struct EditInfo_struct  {
  Cgoban  *cg;
  Goban  *goban;
  ButWin  *win;
  But  *bg;
  Sgf  *sgf;

  But  *winTitle;
  struct  {
    But  *name, *in;
  } infos[editInfo_count];
  AbutTerm  *gameComment;

  void  (*destroy)(struct EditInfo_struct *info, void *packet);
  void  *packet;

  MAGIC_STRUCT
} EditInfo;


/**********************************************************************
 * Functions
 **********************************************************************/
#define  editInfoVal_iter(v)  \
  for ((v) = editInfo_gameTitle;  (v) < editInfo_count;  ++(v))
extern EditInfo  *editInfo_create(Cgoban *cg, Goban *goban, Sgf *sgf,
				  void (*dCallback)(EditInfo *info,
						    void *packet),
				  void *packet);
extern void  editInfo_destroy(EditInfo *info, bool propagate);
extern void  editInfo_updateSgf(EditInfo *info);

#endif