| 28 |
28 |
| 29 #include "toolkit.h" |
29 #include "toolkit.h" |
| 30 #include "container.h" |
30 #include "container.h" |
| 31 |
31 |
| 32 #include "webview.h" |
32 #include "webview.h" |
| |
33 #include "widget.h" |
| 33 |
34 |
| 34 #ifdef UI_WEBVIEW |
35 #ifdef UI_WEBVIEW |
| 35 |
36 |
| 36 UIWIDGET ui_webview_create(UiObject *obj, UiWebviewArgs *args) { |
37 UIWIDGET ui_webview_create(UiObject *obj, UiWebviewArgs *args) { |
| 37 GtkWidget *webview = webkit_web_view_new(); |
38 GtkWidget *webview = webkit_web_view_new(); |
| 38 |
39 |
| 39 ui_set_name_and_style(webview, args->name, args->style_class); |
40 ui_set_name_and_style(webview, args->name, args->style_class); |
| |
41 |
| |
42 ui_widget_size_request(webview, args->width, args->height); |
| 40 |
43 |
| 41 UiVar *var = uic_widget_var(obj->ctx, obj->ctx, args->value, args->varname, UI_VAR_GENERIC); |
44 UiVar *var = uic_widget_var(obj->ctx, obj->ctx, args->value, args->varname, UI_VAR_GENERIC); |
| 42 if(var) { |
45 if(var) { |
| 43 WebViewData *data = malloc(sizeof(WebViewData)); |
46 WebViewData *data = malloc(sizeof(WebViewData)); |
| 44 memset(data, 0, sizeof(WebViewData)); |
47 memset(data, 0, sizeof(WebViewData)); |