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 417
417
v -d use_openssl -o blog -prod . && strip ./blog
418
418
```
419
419
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.
422
422
423
423
424
424
### To be continued...
Original file line number Diff line number Diff line change 70
70
cleanup_fn FNCb = unsafe { nil }
71
71
fail_fn FNFail = unsafe { nil }
72
72
//
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 }
75
76
//
76
77
keydown_fn FNKeyDown = unsafe { nil }
77
78
keyup_fn FNKeyUp = unsafe { nil }
@@ -353,6 +354,8 @@ fn gg_event_fn(ce voidptr, user_data voidptr) {
353
354
}
354
355
if ctx.config.event_fn != unsafe { nil } {
355
356
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)
356
359
}
357
360
match e.typ {
358
361
.mouse_move {
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ pub type FNCb = fn (data voidptr)
9
9
10
10
pub type FNEvent = fn (e & Event, data voidptr )
11
11
12
+ pub type FNEvent2 = fn (data voidptr , e & Event)
13
+
12
14
pub type FNFail = fn (msg string , data voidptr )
13
15
14
16
pub type FNKeyDown = fn (c KeyCode, m Modifier, data voidptr )
You can’t perform that action at this time.
0 commit comments