39 UiContext *ctx = ucx_mempool_malloc(mp, sizeof(UiContext)); |
39 UiContext *ctx = ucx_mempool_malloc(mp, sizeof(UiContext)); |
40 ctx->mempool = mp; |
40 ctx->mempool = mp; |
41 |
41 |
42 ctx->toplevel = toplevel; |
42 ctx->toplevel = toplevel; |
43 ctx->vars = ucx_map_new_a(mp->allocator, 16); |
43 ctx->vars = ucx_map_new_a(mp->allocator, 16); |
|
44 |
|
45 #ifdef UI_GTK |
|
46 ctx->accel_group = gtk_accel_group_new(); |
|
47 gtk_window_add_accel_group(GTK_WINDOW(toplevel->widget), ctx->accel_group); |
|
48 #endif |
44 |
49 |
45 return ctx; |
50 return ctx; |
46 } |
51 } |
47 |
52 |
48 UiVar* uic_getvar(UiContext *ctx, char *name) { |
53 UiVar* uic_getvar(UiContext *ctx, char *name) { |