aboutsummaryrefslogtreecommitdiff
path: root/emcclib.js
diff options
context:
space:
mode:
Diffstat (limited to 'emcclib.js')
-rw-r--r--emcclib.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/emcclib.js b/emcclib.js
index b63c6b2..60dbbf9 100644
--- a/emcclib.js
+++ b/emcclib.js
@@ -564,6 +564,20 @@ mergeInto(LibraryManager.library, {
},
/*
+ * bool js_canvas_get_preferred_size(int *wp, int *hp);
+ *
+ * This is called before calling midend_size() to set a puzzle to
+ * the default size. If the JavaScript layer has an opinion about
+ * how big the puzzle should be, it can overwrite *wp and *hp with
+ * its preferred size, and return true if the "user" parameter to
+ * midend_size() should be true. Otherwise it should leave them
+ * alone and return false.
+ */
+ js_canvas_get_preferred_size: function(wp, hp) {
+ return false;
+ },
+
+ /*
* void js_canvas_set_size(int w, int h);
*
* Set the size of the puzzle canvas. Called whenever the size of