/* dwb_quickmark_new(const char *uri, const char *title, const char *key) {{{*/ Quickmark * dwb_quickmark_new(const char *uri, const char *title, const char *key) { Quickmark *q = dwb_malloc(sizeof(Quickmark)); q->key = key ? g_strdup(key) : NULL; q->nav = dwb_navigation_new(uri, title); return q; }/* }}} */
/* dwb_navigation_new(const char *uri, const char *title) {{{*/ Navigation * dwb_navigation_new(const char *uri, const char *title) { Navigation *nv = dwb_malloc(sizeof(Navigation)); nv->first = uri ? g_strdup(uri) : NULL; nv->second = title ? g_strdup(title) : NULL; return nv; }/*}}}*/
Plugins * plugins_new() { Plugins *p = dwb_malloc(sizeof(Plugins)); p->created = 0; p->clicks = NULL; p->status = 0; p->elements = NULL; p->max = 0; return p; }
Arg * util_arg_new() { Arg *ret = dwb_malloc(sizeof(Arg)); ret->n = 0; ret->i = 0; ret->d = 0; ret->p = NULL; ret->arg = NULL; ret->b = false; ret->e = NULL; return ret; }
/* session_load_webview(WebKitWebView *, char *, int *){{{*/ static void session_load_webview(GList *gl, char *uri, int last, int lock_status) \ { if (last > 0) webkit_web_view_go_back_or_forward(WEBVIEW(gl), -last); else { WebKitWebBackForwardList *bf_list = webkit_web_view_get_back_forward_list(WEBVIEW(gl)); webkit_web_view_go_to_back_forward_item(WEBVIEW(gl), webkit_web_back_forward_list_get_nth_item(bf_list, 0)); } if (lock_status > 0) { SessionTab *tab = dwb_malloc(sizeof(SessionTab)); tab->gl = gl; tab->lock = lock_status; g_signal_connect(WEBVIEW(gl), "notify::load-status", G_CALLBACK(session_load_status_callback), tab); } }/*}}}*/