ref: 1e71966e759acf08d9fe40b72232ab3b3630ba0f
parent: cab65638b580d0c1cdfcc51cd97a2c4de381754a
author: Simon Tatham <anakin@pobox.com>
date: Mon May 14 14:42:18 EDT 2012
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]
--- a/devel.but
+++ b/devel.but
@@ -1461,7 +1461,7 @@
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,15 +2714,13 @@
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.
+current puzzle (\k{backend-preferred-tilesize}).-\k{backend-preferred-tilesize}-
\H{midend-set-params} \cw{midend_set_params()}\c void midend_set_params(midend *me, game_params *params);
@@ -2806,6 +2804,9 @@
\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 @@
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 @@
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 @@
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 @@
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()}--
⑨