mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 15:41:30 -07:00
js: Add a new function whereby C can ask JS for a preferred board size
Currently JS has no opinion.
This commit is contained in:
14
emcclib.js
14
emcclib.js
@ -563,6 +563,20 @@ mergeInto(LibraryManager.library, {
|
||||
statusbar.textContent = UTF8ToString(ptr);
|
||||
},
|
||||
|
||||
/*
|
||||
* 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);
|
||||
*
|
||||
|
Reference in New Issue
Block a user