aboutsummaryrefslogtreecommitdiff
path: root/puzzles.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-05-01 12:53:41 +0000
committerSimon Tatham <anakin@pobox.com>2005-05-01 12:53:41 +0000
commit791940b043d500c096a56d57467b4b68ea31ce1f (patch)
treea8168dfaeb265abc278f9b9ff7897ecd0d911bb9 /puzzles.h
parente72931bfe27e7d7303a22717cce05721551f3e4a (diff)
downloadpuzzles-791940b043d500c096a56d57467b4b68ea31ce1f.zip
puzzles-791940b043d500c096a56d57467b4b68ea31ce1f.tar.gz
puzzles-791940b043d500c096a56d57467b4b68ea31ce1f.tar.bz2
puzzles-791940b043d500c096a56d57467b4b68ea31ce1f.tar.xz
Introduced a new function in every game which formats a game_state
as text. This is used by front ends to implement copy-to-clipboard. Currently the function does nothing (and is disabled) in every game except Solo, but it's a start. [originally from svn r5724]
Diffstat (limited to 'puzzles.h')
-rw-r--r--puzzles.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/puzzles.h b/puzzles.h
index e62a27c..d5c8924 100644
--- a/puzzles.h
+++ b/puzzles.h
@@ -140,6 +140,7 @@ enum { CFG_SETTINGS, CFG_SEED };
config_item *midend_get_config(midend_data *me, int which, char **wintitle);
char *midend_set_config(midend_data *me, int which, config_item *cfg);
char *midend_game_id(midend_data *me, char *id, int def_seed);
+char *midend_text_format(midend_data *me);
/*
* malloc.c
@@ -193,6 +194,8 @@ struct game {
game_state *(*new_game)(game_params *params, char *seed);
game_state *(*dup_game)(game_state *state);
void (*free_game)(game_state *state);
+ int can_format_as_text;
+ char *(*text_format)(game_state *state);
game_ui *(*new_ui)(game_state *state);
void (*free_ui)(game_ui *ui);
game_state *(*make_move)(game_state *from, game_ui *ui, int x, int y,