aboutsummaryrefslogtreecommitdiff
path: root/devel.but
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2008-04-08 16:25:39 +0000
committerSimon Tatham <anakin@pobox.com>2008-04-08 16:25:39 +0000
commitae6c7381272f84c0fd398f6d3e496f571ba42ec8 (patch)
treeec91cb5e52dbbdcd8097c0fc02ee250f245edf19 /devel.but
parentea13d39a1780406421d2e9aa01c4caeca100c9eb (diff)
downloadpuzzles-ae6c7381272f84c0fd398f6d3e496f571ba42ec8.zip
puzzles-ae6c7381272f84c0fd398f6d3e496f571ba42ec8.tar.gz
puzzles-ae6c7381272f84c0fd398f6d3e496f571ba42ec8.tar.bz2
puzzles-ae6c7381272f84c0fd398f6d3e496f571ba42ec8.tar.xz
New feature in midend.c which allows us to ask for the number of the
currently selected preset, if any. I've used this in the GTK front end to have the Type menu mark the currently selected menu item. (After considerable beating of GTK with sticks, I might add. Grr.) Currently the same UI feature is not yet supported on Windows or MacOS, but I hope to do those too at some point if it's feasible. [originally from svn r7980]
Diffstat (limited to 'devel.but')
-rw-r--r--devel.but10
1 files changed, 10 insertions, 0 deletions
diff --git a/devel.but b/devel.but
index 1df57cf..e481ec6 100644
--- a/devel.but
+++ b/devel.but
@@ -2728,6 +2728,16 @@ are owned by the mid-end structure: the front end should not ever
free them directly, because they will be freed automatically during
\cw{midend_free()}.
+\H{midend-which-preset} \cw{midend_which_preset()}
+
+\c int midend_which_preset(midend *me);
+
+Returns the numeric index of the preset game parameter structure
+which matches the current game parameters, or a negative number if
+no preset matches. Front ends could use this to maintain a tick
+beside one of the items in the menu (or tick the \q{Custom} option
+if the return value is less than zero).
+
\H{midend-wants-statusbar} \cw{midend_wants_statusbar()}
\c int midend_wants_statusbar(midend *me);