aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2012-05-14 18:42:18 +0000
committerSimon Tatham <anakin@pobox.com>2012-05-14 18:42:18 +0000
commit1e71966e759acf08d9fe40b72232ab3b3630ba0f (patch)
treec91df4e2742e5ab8e5718dae25d6dad82b87a719
parentcab65638b580d0c1cdfcc51cd97a2c4de381754a (diff)
downloadpuzzles-1e71966e759acf08d9fe40b72232ab3b3630ba0f.zip
puzzles-1e71966e759acf08d9fe40b72232ab3b3630ba0f.tar.gz
puzzles-1e71966e759acf08d9fe40b72232ab3b3630ba0f.tar.bz2
puzzles-1e71966e759acf08d9fe40b72232ab3b3630ba0f.tar.xz
Patch from Jonas Koelker for the developer docs, fixing a couple of
editing errors and adding some comments about the necessary order of midend operations called by a front end. [originally from svn r9533]
-rw-r--r--devel.but23
1 files changed, 14 insertions, 9 deletions
diff --git a/devel.but b/devel.but
index 806ac63..27ef5d7 100644
--- a/devel.but
+++ b/devel.but
@@ -1461,7 +1461,7 @@ them internally. (There are currently no puzzles which have a
one-line ASCII representation, so there's no precedent yet for
whether that should come with a newline or not.)
-\S{backend-wants-statusbar} \cw{wants_statusbar()}
+\S{backend-wants-statusbar} \cw{wants_statusbar}
\c int wants_statusbar;
@@ -2714,14 +2714,12 @@ without closing the window...)
Frees a mid-end structure and all its associated data.
-\H{midend-tilesize}
+\H{midend-tilesize} \cw{midend_tilesize()}
\c int midend_tilesize(midend *me);
Returns the \cq{tilesize} parameter being used to display the
-current puzzle.
-
-\k{backend-preferred-tilesize}
+current puzzle (\k{backend-preferred-tilesize}).
\H{midend-set-params} \cw{midend_set_params()}
@@ -2806,6 +2804,9 @@ to use scroll bars for large puzzles), you can pass dimensions of
\cw{INT_MAX} as input to this function. You should probably not do
that \e{and} set the \c{user_size} flag, though!
+The midend relies on the frontend calling \cw{midend_new_game()}
+(\k{midend-new-game}) before calling \cw{midend_size()}.
+
\H{midend-new-game} \cw{midend_new_game()}
\c void midend_new_game(midend *me);
@@ -2842,7 +2843,8 @@ undo list (so that an accidental restart can be undone).
This function automatically causes a redraw, i.e. the front end can
expect its drawing API to be called from \e{within} a call to this
-function.
+function. Some back ends require that \cw{midend_size()}
+(\k{midend-size}) is called before \cw{midend_restart_game()}.
\H{midend-force-redraw} \cw{midend_force_redraw()}
@@ -2853,7 +2855,8 @@ discarding the current \c{game_drawstate} and creating a new one
from scratch before calling the game's \cw{redraw()} function.
The front end can expect its drawing API to be called from within a
-call to this function.
+call to this function. Some back ends require that \cw{midend_size()}
+(\k{midend-size}) is called before \cw{midend_force_redraw()}.
\H{midend-redraw} \cw{midend_redraw()}
@@ -2864,7 +2867,8 @@ calling the game's \cw{redraw()} function. (That is, the only things
redrawn will be things that have changed since the last redraw.)
The front end can expect its drawing API to be called from within a
-call to this function.
+call to this function. Some back ends require that \cw{midend_size()}
+(\k{midend-size}) is called before \cw{midend_redraw()}.
\H{midend-process-key} \cw{midend_process_key()}
@@ -3122,7 +3126,8 @@ user.
The front end can expect its drawing API and/or
\cw{activate_timer()} to be called from within a call to this
-function.
+function. Some back ends require that \cw{midend_size()}
+(\k{midend-size}) is called before \cw{midend_solve()}.
\H{midend-status} \cw{midend_status()}