File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
tutorials/building_a_simple_web_blog_with_vweb Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 417417v -d use_openssl -o blog -prod . && strip ./blog
418418```
419419
420- This will result in a ~ 400KB binary. ` -d use_openssl ` tells vweb to link to OpenSSL. Without this flag mbedtls will be embedded, and the
421- binary size will increase to ~ 700KB.
420+ This will result in a ~ 400KB binary. ` -d use_openssl ` tells vweb to link to OpenSSL.
421+ Without this flag mbedtls will be embedded, and the binary size will increase to ~ 700KB.
422422
423423
424424### To be continued...
Original file line number Diff line number Diff line change 7070 cleanup_fn FNCb = unsafe { nil }
7171 fail_fn FNFail = unsafe { nil }
7272 //
73- event_fn FNEvent = unsafe { nil }
74- quit_fn FNEvent = unsafe { nil }
73+ event_fn FNEvent = unsafe { nil }
74+ on_event FNEvent2 = unsafe { nil }
75+ quit_fn FNEvent = unsafe { nil }
7576 //
7677 keydown_fn FNKeyDown = unsafe { nil }
7778 keyup_fn FNKeyUp = unsafe { nil }
@@ -353,6 +354,8 @@ fn gg_event_fn(ce voidptr, user_data voidptr) {
353354 }
354355 if ctx.config.event_fn != unsafe { nil } {
355356 ctx.config.event_fn (e, ctx.config.user_data)
357+ } else if ctx.config.on_event != unsafe { nil } {
358+ ctx.config.on_event (ctx.config.user_data, e)
356359 }
357360 match e.typ {
358361 .mouse_move {
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ pub type FNCb = fn (data voidptr)
99
1010pub type FNEvent = fn (e & Event, data voidptr )
1111
12+ pub type FNEvent2 = fn (data voidptr , e & Event)
13+
1214pub type FNFail = fn (msg string , data voidptr )
1315
1416pub type FNKeyDown = fn (c KeyCode, m Modifier, data voidptr )
You can’t perform that action at this time.
0 commit comments