diff --git a/docs/lvgl.html b/docs/lvgl.html
index c10d1153..879b531f 100644
--- a/docs/lvgl.html
+++ b/docs/lvgl.html
@@ -1299,88 +1299,119 @@
diff --git a/docs/lvgl.js b/docs/lvgl.js
index b43a5b18..50e186af 100644
--- a/docs/lvgl.js
+++ b/docs/lvgl.js
@@ -1292,11 +1292,11 @@ function updateGlobalBufferAndViews(buf) {
}
var STATIC_BASE = 1024,
- STACK_BASE = 5730896,
+ STACK_BASE = 5730928,
STACKTOP = STACK_BASE,
- STACK_MAX = 488016,
- DYNAMIC_BASE = 5730896,
- DYNAMICTOP_PTR = 487856;
+ STACK_MAX = 488048,
+ DYNAMIC_BASE = 5730928,
+ DYNAMICTOP_PTR = 487888;
assert(STACK_BASE % 16 === 0, 'stack must start aligned');
assert(DYNAMIC_BASE % 16 === 0, 'heap must start aligned');
@@ -1881,7 +1881,7 @@ var ASM_CONSTS = {
-// STATICTOP = STATIC_BASE + 486992;
+// STATICTOP = STATIC_BASE + 487024;
/* global initializers */ __ATINIT__.push({ func: function() { ___wasm_call_ctors() } });
@@ -1946,7 +1946,7 @@ var ASM_CONSTS = {
}
function _emscripten_get_sbrk_ptr() {
- return 487856;
+ return 487888;
}
function _emscripten_memcpy_big(dest, src, num) {
@@ -2076,6 +2076,76 @@ var ASM_CONSTS = {
return 0;
}
+
+ function _tzset() {
+ // TODO: Use (malleable) environment variables instead of system settings.
+ if (_tzset.called) return;
+ _tzset.called = true;
+
+ // timezone is specified as seconds west of UTC ("The external variable
+ // `timezone` shall be set to the difference, in seconds, between
+ // Coordinated Universal Time (UTC) and local standard time."), the same
+ // as returned by getTimezoneOffset().
+ // See http://pubs.opengroup.org/onlinepubs/009695399/functions/tzset.html
+ HEAP32[((__get_timezone())>>2)]=(new Date()).getTimezoneOffset() * 60;
+
+ var currentYear = new Date().getFullYear();
+ var winter = new Date(currentYear, 0, 1);
+ var summer = new Date(currentYear, 6, 1);
+ HEAP32[((__get_daylight())>>2)]=Number(winter.getTimezoneOffset() != summer.getTimezoneOffset());
+
+ function extractZone(date) {
+ var match = date.toTimeString().match(/\(([A-Za-z ]+)\)$/);
+ return match ? match[1] : "GMT";
+ };
+ var winterName = extractZone(winter);
+ var summerName = extractZone(summer);
+ var winterNamePtr = allocateUTF8(winterName);
+ var summerNamePtr = allocateUTF8(summerName);
+ if (summer.getTimezoneOffset() < winter.getTimezoneOffset()) {
+ // Northern hemisphere
+ HEAP32[((__get_tzname())>>2)]=winterNamePtr;
+ HEAP32[(((__get_tzname())+(4))>>2)]=summerNamePtr;
+ } else {
+ HEAP32[((__get_tzname())>>2)]=summerNamePtr;
+ HEAP32[(((__get_tzname())+(4))>>2)]=winterNamePtr;
+ }
+ }function _mktime(tmPtr) {
+ _tzset();
+ var date = new Date(HEAP32[(((tmPtr)+(20))>>2)] + 1900,
+ HEAP32[(((tmPtr)+(16))>>2)],
+ HEAP32[(((tmPtr)+(12))>>2)],
+ HEAP32[(((tmPtr)+(8))>>2)],
+ HEAP32[(((tmPtr)+(4))>>2)],
+ HEAP32[((tmPtr)>>2)],
+ 0);
+
+ // There's an ambiguous hour when the time goes back; the tm_isdst field is
+ // used to disambiguate it. Date() basically guesses, so we fix it up if it
+ // guessed wrong, or fill in tm_isdst with the guess if it's -1.
+ var dst = HEAP32[(((tmPtr)+(32))>>2)];
+ var guessedOffset = date.getTimezoneOffset();
+ var start = new Date(date.getFullYear(), 0, 1);
+ var summerOffset = new Date(date.getFullYear(), 6, 1).getTimezoneOffset();
+ var winterOffset = start.getTimezoneOffset();
+ var dstOffset = Math.min(winterOffset, summerOffset); // DST is in December in South
+ if (dst < 0) {
+ // Attention: some regions don't have DST at all.
+ HEAP32[(((tmPtr)+(32))>>2)]=Number(summerOffset != winterOffset && dstOffset == guessedOffset);
+ } else if ((dst > 0) != (dstOffset == guessedOffset)) {
+ var nonDstOffset = Math.max(winterOffset, summerOffset);
+ var trueOffset = dst > 0 ? dstOffset : nonDstOffset;
+ // Don't try setMinutes(date.getMinutes() + ...) -- it's messed up.
+ date.setTime(date.getTime() + (trueOffset - guessedOffset)*60000);
+ }
+
+ HEAP32[(((tmPtr)+(24))>>2)]=date.getDay();
+ var yday = ((date.getTime() - start.getTime()) / (1000 * 60 * 60 * 24))|0;
+ HEAP32[(((tmPtr)+(28))>>2)]=yday;
+
+ return (date.getTime() / 1000)|0;
+ }
+
function _setTempRet0($i) {
setTempRet0(($i) | 0);
}
@@ -2109,7 +2179,7 @@ function intArrayToString(array) {
var asmGlobalArg = {};
-var asmLibraryArg = { "__assert_fail": ___assert_fail, "__handle_stack_overflow": ___handle_stack_overflow, "abort": _abort, "emscripten_get_sbrk_ptr": _emscripten_get_sbrk_ptr, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "fd_write": _fd_write, "memory": wasmMemory, "setTempRet0": _setTempRet0, "table": wasmTable };
+var asmLibraryArg = { "__assert_fail": ___assert_fail, "__handle_stack_overflow": ___handle_stack_overflow, "abort": _abort, "emscripten_get_sbrk_ptr": _emscripten_get_sbrk_ptr, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "fd_write": _fd_write, "memory": wasmMemory, "mktime": _mktime, "setTempRet0": _setTempRet0, "table": wasmTable };
var asm = createWasm();
/** @type {function(...*):?} */
var ___wasm_call_ctors = Module["___wasm_call_ctors"] = createExportWrapper("__wasm_call_ctors");
diff --git a/docs/lvgl.txt b/docs/lvgl.txt
index 5d69f15c..f8071827 100644
--- a/docs/lvgl.txt
+++ b/docs/lvgl.txt
@@ -14,8 +14,8 @@ Type[40]:
- type[7] (i32, i32, i32, i32) -> nil
- type[8] () -> i32
- type[9] (i32, i32, i32, i32, i32) -> i32
- - type[10] (i32, i32, i32, i32) -> i32
- - type[11] (i32) -> i64
+ - type[10] (i32) -> i64
+ - type[11] (i32, i32, i32, i32) -> i32
- type[12] (i32, i32, i32, i32, i32, i32, i32) -> nil
- type[13] (i32, i32) -> i64
- type[14] (i32, i32, i32, i32, i32) -> nil
@@ -25,12 +25,12 @@ Type[40]:
- type[18] (i32, i32, i32, i32, i32, i32, i32) -> i32
- type[19] (i32, f64, i32, i32, i32, i32) -> i32
- type[20] (i32, i64, i32) -> i64
- - type[21] (i32, i64, i64, i32) -> nil
- - type[22] (i32, i32, i32, i32, i32, i32, i32, i32) -> i32
- - type[23] (i32, i64) -> i32
- - type[24] (i64, i32) -> i32
- - type[25] () -> i64
- - type[26] (i32, i32, i32, i32, i32, i32, i32, i32, i32) -> nil
+ - type[21] (i32, i32, i32, i32, i32, i32, i32, i32, i32) -> nil
+ - type[22] (i32, i64, i64, i32) -> nil
+ - type[23] (i32, i32, i32, i32, i32, i32, i32, i32) -> i32
+ - type[24] (i32, i64) -> i32
+ - type[25] (i64, i32) -> i32
+ - type[26] () -> i64
- type[27] (i32, i64) -> nil
- type[28] (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32
- type[29] (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32
@@ -44,1911 +44,1952 @@ Type[40]:
- type[37] (i32) -> f32
- type[38] (i64, i64) -> f64
- type[39] (f64, i32) -> f64
-Import[9]:
+Import[10]:
- func[0] sig=7 <__assert_fail> <- env.__assert_fail
- - func[1] sig=6 <- env.abort
- - func[2] sig=10 <__wasi_fd_write> <- wasi_snapshot_preview1.fd_write
- - func[3] sig=1 <- env.emscripten_resize_heap
- - func[4] sig=3 <- env.emscripten_memcpy_big
- - func[5] sig=6 <__handle_stack_overflow> <- env.__handle_stack_overflow
- - func[6] sig=5 <- env.setTempRet0
+ - func[1] sig=1 <- env.mktime
+ - func[2] sig=6 <- env.abort
+ - func[3] sig=11 <__wasi_fd_write> <- wasi_snapshot_preview1.fd_write
+ - func[4] sig=1 <- env.emscripten_resize_heap
+ - func[5] sig=3 <- env.emscripten_memcpy_big
+ - func[6] sig=6 <__handle_stack_overflow> <- env.__handle_stack_overflow
+ - func[7] sig=5 <- env.setTempRet0
- memory[0] pages: initial=256 max=256 <- env.memory
- table[0] type=funcref initial=48 <- env.table
-Function[900]:
- - func[7] sig=8
- - func[8] sig=6 <__wasm_call_ctors>
- - func[9] sig=6 <_lv_indev_init>
- - func[10] sig=4
- - func[11] sig=8
- - func[12] sig=1
- - func[13] sig=1
- - func[14] sig=1
- - func[15] sig=1
- - func[16] sig=1
- - func[17] sig=6
- - func[18] sig=4
- - func[19] sig=7
- - func[20] sig=0
- - func[21] sig=3
- - func[22] sig=3
- - func[23] sig=1
- - func[24] sig=4
- - func[25] sig=1
- - func[26] sig=1
- - func[27] sig=1
- - func[28] sig=2
- - func[29] sig=5
- - func[30] sig=0
- - func[31] sig=0
- - func[32] sig=0
- - func[33] sig=5
- - func[34] sig=5
- - func[35] sig=4
- - func[36] sig=4
- - func[37] sig=1
- - func[38] sig=4
- - func[39] sig=0
- - func[40] sig=0
- - func[41] sig=0
- - func[42] sig=0
- - func[43] sig=0
- - func[44] sig=0
- - func[45] sig=0
- - func[46] sig=0
- - func[47] sig=0
- - func[48] sig=2
- - func[49] sig=3 <_lv_memcpy_small>
- - func[50] sig=4
- - func[51] sig=2
- - func[52] sig=4
- - func[53] sig=1
- - func[54] sig=1
- - func[55] sig=5
- - func[56] sig=1
- - func[57] sig=3
- - func[58] sig=7
- - func[59] sig=5
- - func[60] sig=0
- - func[61] sig=1
- - func[62] sig=1
- - func[63] sig=1
- - func[64] sig=4
- - func[65] sig=4
- - func[66] sig=2
- - func[67] sig=1
- - func[68] sig=1
- - func[69] sig=14
- - func[70] sig=14
- - func[71] sig=4
- - func[72] sig=0
- - func[73] sig=0
- - func[74] sig=3 <_lv_obj_get_style_int>
- - func[75] sig=12
- - func[76] sig=12
- - func[77] sig=2
- - func[78] sig=0
- - func[79] sig=4
- - func[80] sig=3
- - func[81] sig=5
- - func[82] sig=4
- - func[83] sig=5
- - func[84] sig=4
- - func[85] sig=0
- - func[86] sig=4
- - func[87] sig=4
- - func[88] sig=0
- - func[89] sig=0
- - func[90] sig=0
- - func[91] sig=0
- - func[92] sig=0
- - func[93] sig=0
- - func[94] sig=0
- - func[95] sig=0
- - func[96] sig=0
- - func[97] sig=9
- - func[98] sig=4
- - func[99] sig=4
- - func[100] sig=4
- - func[101] sig=5
- - func[102] sig=4
- - func[103] sig=5
- - func[104] sig=4
- - func[105] sig=2
- - func[106] sig=4
- - func[107] sig=4
- - func[108] sig=4
- - func[109] sig=1
- - func[110] sig=4
- - func[111] sig=4
- - func[112] sig=3 <_lv_obj_get_style_ptr>
- - func[113] sig=7 <_lv_obj_get_style_color>
- - func[114] sig=3 <_lv_obj_get_style_opa>
- - func[115] sig=7
- - func[116] sig=4
- - func[117] sig=10
- - func[118] sig=4
- - func[119] sig=4
- - func[120] sig=0
- - func[121] sig=0
- - func[122] sig=0
- - func[123] sig=1
- - func[124] sig=1
- - func[125] sig=0
- - func[126] sig=1
- - func[127] sig=1
- - func[128] sig=1
- - func[129] sig=2
- - func[130] sig=0
- - func[131] sig=2
- - func[132] sig=0
- - func[133] sig=0
- - func[134] sig=0
- - func[135] sig=2
- - func[136] sig=0
- - func[137] sig=0
- - func[138] sig=0
- - func[139] sig=2
- - func[140] sig=0
- - func[141] sig=0
- - func[142] sig=0
- - func[143] sig=0
- - func[144] sig=0
- - func[145] sig=2
- - func[146] sig=0
- - func[147] sig=0
- - func[148] sig=0
- - func[149] sig=0
- - func[150] sig=0
- - func[151] sig=0
- - func[152] sig=2
- - func[153] sig=0
- - func[154] sig=0
- - func[155] sig=0
- - func[156] sig=0
- - func[157] sig=0
- - func[158] sig=2
- - func[159] sig=0
- - func[160] sig=2
- - func[161] sig=0
- - func[162] sig=0
- - func[163] sig=0
- - func[164] sig=0
- - func[165] sig=2
- - func[166] sig=0
- - func[167] sig=0
- - func[168] sig=0
- - func[169] sig=0
- - func[170] sig=0
- - func[171] sig=6 <_lv_refr_init>
- - func[172] sig=5 <_lv_disp_refr_task>
- - func[173] sig=6
- - func[174] sig=6
- - func[175] sig=6
- - func[176] sig=1
- - func[177] sig=4 <_lv_inv_area>
- - func[178] sig=4
- - func[179] sig=3 <_lv_memcpy_small.1>
- - func[180] sig=8 <_lv_refr_get_disp_refreshing>
- - func[181] sig=5
- - func[182] sig=5
- - func[183] sig=1
- - func[184] sig=0
- - func[185] sig=4
- - func[186] sig=4
- - func[187] sig=5
- - func[188] sig=4
- - func[189] sig=1
- - func[190] sig=1 <_lv_style_get_mem_size>
- - func[191] sig=0
- - func[192] sig=0
- - func[193] sig=0
- - func[194] sig=0
- - func[195] sig=0
- - func[196] sig=1
- - func[197] sig=4
- - func[198] sig=0
- - func[199] sig=5
- - func[200] sig=4
- - func[201] sig=1
- - func[202] sig=5 <_lv_style_list_reset>
- - func[203] sig=1
- - func[204] sig=1
- - func[205] sig=5
- - func[206] sig=1 <_lv_style_list_get_transition_style>
- - func[207] sig=0
- - func[208] sig=4 <_lv_style_list_add_style>
- - func[209] sig=4 <_lv_style_list_remove_style>
- - func[210] sig=2 <_lv_style_set_int>
- - func[211] sig=3 <_lv_memcpy_small.2>
- - func[212] sig=2 <_lv_style_set_color>
- - func[213] sig=2 <_lv_style_set_opa>
- - func[214] sig=2 <_lv_style_set_ptr>
- - func[215] sig=3 <_lv_style_get_int>
- - func[216] sig=3 <_lv_style_get_opa>
- - func[217] sig=3 <_lv_style_get_color>
- - func[218] sig=3 <_lv_style_get_ptr>
- - func[219] sig=1 <_lv_style_list_add_trans_style>
- - func[220] sig=3 <_lv_style_list_get_int>
- - func[221] sig=3 <_lv_style_list_get_color>
- - func[222] sig=3 <_lv_style_list_get_opa>
- - func[223] sig=3 <_lv_style_list_get_ptr>
- - func[224] sig=5
- - func[225] sig=7
- - func[226] sig=1
- - func[227] sig=1
- - func[228] sig=1
- - func[229] sig=1
- - func[230] sig=1
- - func[231] sig=8
- - func[232] sig=1
- - func[233] sig=1
- - func[234] sig=5
- - func[235] sig=1
- - func[236] sig=1
- - func[237] sig=1
- - func[238] sig=8
- - func[239] sig=1
- - func[240] sig=0
- - func[241] sig=3
- - func[242] sig=3
- - func[243] sig=4
- - func[244] sig=1
- - func[245] sig=4
- - func[246] sig=0
- - func[247] sig=3
- - func[248] sig=3
- - func[249] sig=4
- - func[250] sig=4
- - func[251] sig=1
- - func[252] sig=1
- - func[253] sig=4
- - func[254] sig=1
- - func[255] sig=4
- - func[256] sig=1
- - func[257] sig=4
- - func[258] sig=3
- - func[259] sig=0
- - func[260] sig=0
- - func[261] sig=4
- - func[262] sig=4
- - func[263] sig=1
- - func[264] sig=1
- - func[265] sig=1
- - func[266] sig=1
- - func[267] sig=1
- - func[268] sig=0
- - func[269] sig=5
- - func[270] sig=5
- - func[271] sig=5
- - func[272] sig=4
- - func[273] sig=4
- - func[274] sig=0
- - func[275] sig=0
- - func[276] sig=0
- - func[277] sig=0
- - func[278] sig=0
- - func[279] sig=0
- - func[280] sig=0
- - func[281] sig=4
- - func[282] sig=4
- - func[283] sig=4