1 /**********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
13 #ifndef FC__PLRDLG_COMMON_H
14 #define FC__PLRDLG_COMMON_H
18 #endif /* __cplusplus */
21 #include "support.h" /* bool type */
28 enum player_dlg_column_type
{
33 COL_RIGHT_TEXT
/* right aligned text */
36 typedef int (*plr_dlg_sort_func
)(const struct player
* p1
,
37 const struct player
* p2
);
39 struct player_dlg_column
{
41 enum player_dlg_column_type type
;
42 const char *title
; /* already translated */
43 const char *(*func
)(const struct player
*); /* if type = COL_*TEXT */
44 bool (*bool_func
)(const struct player
*); /* if type = COL_BOOLEAN */
45 plr_dlg_sort_func sort_func
;
46 const char *tagname
; /* for save_options */
49 extern struct player_dlg_column player_dlg_columns
[];
50 extern const int num_player_dlg_columns
;
52 const char *plrdlg_col_state(const struct player
*plr
);
54 void init_player_dlg_common(void);
55 int player_dlg_default_sort_column(void);
57 const char *player_addr_hack(const struct player
*pplayer
);
61 #endif /* __cplusplus */
63 #endif /* FC__PLRDLG_COMMON_H */