27#include <FL/Fl_Widget.H>
28#include <FL/Fl_Double_Window.H>
29#include <FL/Fl_Wizard.H>
31#include <FL/Fl_Pack.H>
32#include <FL/Fl_Scroll.H>
56#define DEFAULT_TAB_LABEL "-.new.-"
59#define BW2UI(bw) ((UI*)((bw)->ui))
74 struct Tabgroup *next;
98class CustTabButton :
public Fl_Button {
103 CustTabButton (
int x,
int y,
int w,
int h,
const char* label = 0) :
104 Fl_Button (x,y,w,h,label) { ui_ = NULL; focus_num_ = 0; };
105 void ui(
UI *pui) { ui_ = pui; }
106 UI *ui(
void) {
return ui_; }
107 void focus_num(
uint_t fn) { focus_num_ = fn; }
108 uint_t focus_num(
void) {
return focus_num_; }
111static int btn_cmp(
const void *p1,
const void *p2)
113 return ((*(CustTabButton *
const *)p1)->focus_num() -
114 (*(CustTabButton *
const *)p2)->focus_num() );
120class CustTabs :
public Fl_Group {
122 int tab_w, tab_h, ctab_h, btn_w, ctl_w;
129 void update_pack_offset(
void);
130 void resize(
int x,
int y,
int w,
int h)
131 { Fl_Group::resize(x,y,w,h); update_pack_offset(); }
132 int get_btn_idx(
UI *ui);
133 void increase_focus_counter() {
134 if (focus_counter < UINT_MAX)
138 CustTabButton **btns =
dNew(CustTabButton*, num_tabs());
139 for (
int i = 0; i < num_tabs(); ++i)
140 btns[i] = (CustTabButton*)Pack->child(i);
141 qsort(btns, num_tabs(),
sizeof(CustTabButton *),
btn_cmp);
143 for (
int i = 0; i < num_tabs(); ++i)
144 btns[i]->focus_num(focus_counter++);
150 CustTabs (
int ww,
int wh,
int th,
const char *lbl=0) :
151 Fl_Group(0,0,ww,th,lbl) {
154 tab_w = 50, tab_h = th, ctab_h = 1, btn_w = 20, ctl_w = 1*btn_w+2;
155 resize(0,0,ww,ctab_h);
157 Scroll =
new Fl_Scroll(0,0,ww-ctl_w,ctab_h);
159 Scroll->box(FL_NO_BOX);
160 Pack =
new Fl_Pack(0,0,ww-ctl_w,tab_h);
161 Pack->type(Fl_Pack::HORIZONTAL);
162 Pack->box(FL_NO_BOX);
168 Control =
new Fl_Group(ww-ctl_w,0,ctl_w,ctab_h);
169 CloseBtn =
new CustButton(ww-ctl_w+2,0,btn_w,ctab_h,
"X");
170 CloseBtn->box(FL_THIN_UP_BOX);
171 CloseBtn->clear_visible_focus();
173 "Close current tab.\nor Right-click tab label to close." :
174 "Close current tab.\nor Middle-click tab label to close.");
182 Wizard =
new Fl_Wizard(0,ctab_h,ww,wh-ctab_h);
183 Wizard->box(FL_NO_BOX);
187 UI *add_new_tab(
UI *old_ui,
int focus);
188 void remove_tab(
UI *ui);
189 Fl_Wizard *wizard(
void) {
return Wizard; }
190 int num_tabs() {
return (Pack ? Pack->children() : 0); }
191 void switch_tab(CustTabButton *cbtn);
194 void set_tab_label(
UI *ui,
const char *title);
202 CustTabButton *btn = (CustTabButton*) w;
203 CustTabs *tabs = (CustTabs*) cb_data;
204 int b = Fl::event_button();
206 if (b == FL_LEFT_MOUSE) {
207 tabs->switch_tab(btn);
220 CustTabs *tabs = (CustTabs*) cb_data;
221 int b = Fl::event_button();
223 if (b == FL_LEFT_MOUSE) {
228int CustTabs::handle(
int e)
232 _MSG(
"CustTabs::handle e=%s\n", fl_eventnames[e]);
233 if (e == FL_KEYBOARD) {
235 }
else if (e == FL_SHORTCUT) {
236 UI *ui = (
UI*)wizard()->value();
241 _MSG(
"CustTabs::handle KEYS_NOP\n");
263 int dx = Fl::event_dx();
264 int dy = Fl::event_dy();
265 int dir = dy ? dy : dx;
278 return (ret) ? ret : Fl_Group::handle(e);
284UI *CustTabs::add_new_tab(
UI *old_ui,
int focus)
286 if (num_tabs() == 1) {
289 Wizard->resize(0,ctab_h,Wizard->w(),
window()->h()-ctab_h);
290 resize(0,0,
window()->w(),ctab_h);
292 {
int w = 0, h; Pack->child(0)->measure_label(w, h);
293 Pack->child(0)->size(w+14,ctab_h);}
294 Pack->child(0)->show();
302 new_ui->resize(0,ctab_h,Wizard->w(),Wizard->h());
307 CustTabButton *btn =
new CustTabButton(num_tabs()*tab_w,0,tab_w,ctab_h);
308 btn->align(FL_ALIGN_INSIDE);
309 btn->labelsize(btn->labelsize()-2);
311 btn->clear_visible_focus();
312 btn->box(FL_GTK_THIN_UP_BOX);
323 increase_focus_counter();
324 btn->focus_num(focus_counter);
326 if (num_tabs() == 2) {
333 update_pack_offset();
341void CustTabs::remove_tab(
UI *ui)
346 int act_idx = get_btn_idx((
UI*)Wizard->value());
348 int rm_idx = get_btn_idx(ui);
349 btn = (CustTabButton*)Pack->child(rm_idx);
351 if (act_idx == rm_idx) {
353 CustTabButton *fbtn = NULL;
354 for (
int i = 0; i < num_tabs(); ++i) {
357 fbtn = (CustTabButton*)Pack->child(i);
358 CustTabButton *btn = (CustTabButton*)Pack->child(i);
359 if (btn->focus_num() > fbtn->focus_num())
365 Pack->remove(rm_idx);
366 update_pack_offset();
372 if (num_tabs() == 1) {
376 Pack->child(0)->size(0,0);
377 Pack->child(0)->hide();
378 resize(0,0,
window()->w(),ctab_h);
379 Wizard->resize(0,ctab_h,Wizard->w(),
window()->h()-ctab_h);
385int CustTabs::get_btn_idx(
UI *ui)
387 for (
int i = 0; i < num_tabs(); ++i) {
388 CustTabButton *btn = (CustTabButton*)Pack->child(i);
399void CustTabs::update_pack_offset()
404 int act_idx = get_btn_idx((
UI*)Wizard->value());
405 CustTabButton *cbtn = (CustTabButton*)Pack->child(act_idx);
409 for (
int j=0; j < act_idx; ++j)
410 x_i += Pack->child(j)->w();
411 x_f = x_i + cbtn->w();
413 int scr_x = Scroll->xposition(), scr_y = Scroll->yposition();
414 int px_i = x_i - scr_x;
415 int px_f = px_i + cbtn->w();
416 int pw = Scroll->window()->w() - ctl_w;
417 _MSG(
" scr_x=%d btn_x=%d px_i=%d btn_w=%d px_f=%d pw=%d",
418 Scroll->xposition(),cbtn->x(),px_i,cbtn->w(),px_f,pw);
420 Scroll->scroll_to(x_i, scr_y);
421 }
else if (px_i > pw || (px_i > 0 && px_f > pw)) {
422 Scroll->scroll_to(
MIN(x_i, x_f-pw), scr_y);
425 _MSG(
" >>scr_x=%d btn0_x=%d\n", scr_x, Pack->child(0)->x());
431void CustTabs::switch_tab(CustTabButton *cbtn)
436 UI *old_ui = (
UI*)Wizard->value();
438 if (cbtn && cbtn->ui() != old_ui) {
440 if ((idx = get_btn_idx(old_ui)) != -1) {
441 btn = (CustTabButton*)Pack->child(idx);
456 Wizard->value(cbtn->ui());
460 update_pack_offset();
464 const char *title = (cbtn->ui())->label();
468 increase_focus_counter();
469 cbtn->focus_num(focus_counter);
473void CustTabs::prev_tab()
477 if ((idx = get_btn_idx((
UI*)Wizard->value())) != -1)
478 switch_tab((CustTabButton*)Pack->child(idx>0 ? idx-1 : num_tabs()-1));
481void CustTabs::next_tab()
485 if ((idx = get_btn_idx((
UI*)Wizard->value())) != -1)
486 switch_tab((CustTabButton*)Pack->child((idx+1<num_tabs()) ? idx+1 : 0));
492void CustTabs::set_tab_label(
UI *ui,
const char *label)
495 int idx = get_btn_idx(ui);
499 size_t tab_chars = 15, label_len = strlen(label);
501 if (label_len > tab_chars)
503 snprintf(title, tab_chars + 1,
"%s", label);
504 if (label_len > tab_chars)
505 snprintf(title + tab_chars, 4,
"...");
508 if (strcmp(Pack->child(idx)->label(), title)) {
510 Pack->child(idx)->copy_label(title);
511 Pack->child(idx)->measure_label(w, h);
512 Pack->child(idx)->size(w+14,ctab_h);
513 update_pack_offset();
521static void win_cb (Fl_Widget *w,
void *cb_data) {
522 CustTabs *tabs = (CustTabs*) cb_data;
523 int choice = 1, ntabs = tabs->num_tabs();
525 if (Fl::event_key() == FL_Escape) {
533 "Window contains more than one tab.",
534 "Close",
"Cancel", NULL);
546 for (
int i = 0; i <
a_Bw_num(); ++i) {
548 if (((
UI*)bw->
ui)->contains((Fl_Widget*)v_wid)) {
560 uint32_t xid,
const void *vbw)
564 UI *old_ui = old_bw ?
BW2UI(old_bw) : NULL;
567 if (ww <= 0 || wh <= 0) {
574 win =
new Xembed(xid, ww, wh);
576 win =
new Fl_Window(ww, wh);
578 win =
new Fl_Double_Window(ww, wh);
583 struct Tabgroup *tg =
new Tabgroup;
584 tg->tabs = DilloTabs;
587 _MSG(
"new: tabgroups=%p\n", (
void *) tg);
590 win->resizable(DilloTabs->wizard());
596 if (old_bw == NULL) {
605 win->callback(
win_cb, DilloTabs);
617 win->Fl_Widget::copy_label(str);
619 win->label(copy, copy);
628 _MSG(
" UIcmd_tab_new\n");
631 UI *new_ui = tabs->add_new_tab(old_ui, focus);
658 new_bw->
ui = (
void *)new_ui;
679 CustTabs *tabs = ui->
tabs();
682 _MSG(
"a_UIcmd_close_bw\n");
686 tabs->remove_tab(ui);
687 if (tabs->num_tabs() == 0) {
690 struct Tabgroup *prev = NULL;
691 for (tmp =
tabgroups; tmp; tmp = tmp->next) {
692 if (tmp->tabs == tabs) {
694 prev->next = tmp->next;
702 _MSG(
"gone: tmp=%p tabgroups=%p\n", (
void *) tmp, (
void *)
tabgroups);
705 delete tabs->window();
721 "More than one open tab or window.",
722 "Quit",
"Cancel", NULL);
736 int len = strcspn(str,
" ");
738 if (len > 0 && str[len] !=
'\0') {
763 char *search_urlstr = NULL;
769 urlstr = search_urlstr;
771 if (urlstr && *urlstr) {
778 if (!ch || ch ==
'.') {
795 dFree(search_urlstr);
805 BW2UI(bw)->focus_main();
808 BW2UI(bw)->focus_location();
826 BW2UI(new_bw)->focus_main();
828 BW2UI(new_bw)->focus_location();
856 bw ?
BW2UI(bw) : NULL, focus);
916 for (tg =
tabgroups; tg; tg = tg->next) {
991 char *name, *free1, *free2, *n1, *n2;
993 free1 = free2 = NULL;
997 path2 = strrchr(
path,
'/');
1001 if (strlen(
path) > MaxLen) {
1009 if (strlen(query) > MaxLen) {
1010 query = free2 =
dStrndup(query, MaxLen);
1021 for (n1 = n2 = name; *n1; n1++, n2++) {
1025 (n1[0] ==
'%' && n1[1] ==
'2' && n1[2] ==
'0')
1044 (dir[strlen(dir)-1] ==
'/')
1056 if (stat(name, &ss) == 0) {
1061 "The file: %s (%d Bytes) already exists. What do we do?",
1062 name, (
int)ss.st_size);
1064 "Abort",
"Continue",
"Rename", NULL);
1082 dFree(SuggestedName);
1092 MSG(
"UIcmd_save: %s\n", name);
1103 SuggestedName =
dStrdup(name);
1136 MSG(
"a_UIcmd_stop()\n");
1175 char *search_url, *l, *u, *c;
1182 for (c = u; *c; c++) {
1190 MSG_WARN(
"search_url ends with '%%'\n"); c--;
break;
1192 MSG_WARN(
"illegal specifier '%%%c' in search_url\n", *c);
1200 search_url = ds->
str;
1212 if ((query =
a_Dialog_input(
"Dillo: Search",
"Search the Web:"))) {
1225 const char *title =
"Dillo: Password";
1226 char *msg =
dStrconcat(
"Password for user \"", user,
"\"", NULL);
1237 UIcmd_save(bw, url,
"Dillo: Save Link as File");
1321 static int post_id = 0;
1330 dstr_url =
dStr_new(
"dpi:/vsource/:");
1334 post_id = (post_id < 9999) ? post_id + 1 : 0;
1335 snprintf(tag, 16,
"_%.4d", post_id);
1357 a_Dialog_msg(
"Dillo: Good HTML!",
"No HTML errors found while parsing!");
1384 hlist =
dNew(
int, n + 1);
1411 *w =
BW2UI(bw)->w();
1412 *h =
BW2UI(bw)->h();
1413 _MSG(
"a_UIcmd_wh: w=%d, h=%d\n", *w, *h);
1466 const mapping_t map[] = {
1480 for (
uint_t i = 0; i <
sizeof(map) /
sizeof(map[0]); i++) {
1481 if (keycmd == map[i].keys_cmd) {
1503 BW2UI(bw)->set_location(text);
1512 BW2UI(bw)->set_page_prog(nbytes, cmd);
1521 BW2UI(bw)->set_img_prog(n_img, t_img, cmd);
1533 BW2UI(bw)->set_bug_prog(n_bug);
1542 const int size = 128;
1545 if (snprintf(title, size,
"Dillo: %s", label ? label :
"") >= size) {
1547 snprintf(title + i, 4,
"...");
1549 BW2UI(bw)->copy_label(title);
1550 BW2UI(bw)->tabs()->set_tab_label(
BW2UI(bw), label ? label :
"");
1567 va_start(argp, format);
1598 BW2UI(bw)->panels_toggle();
1605 int case_sens,
int backward)
1609 switch (l->
search(key, case_sens, backward)) {
1611 a_UIcmd_set_msg(bw, backward?
"Top reached; restarting from the bottom."
1612 :
"Bottom reached; restarting from the top.");
1639 BW2UI(bw)->findbar_toggle(on);
1647 BW2UI(bw)->focus_main();
1656 BW2UI(bw)->focus_location();
void a_Bookmarks_add(BrowserWindow *bw, const DilloUrl *url)
Add the new bookmark through the bookmarks server.
bool_t a_Bw_expecting(BrowserWindow *bw)
void a_Bw_free(BrowserWindow *bw)
Free resources associated to a bw.
BrowserWindow * a_Bw_get(int i)
Return a bw by index.
void a_Bw_stop_clients(BrowserWindow *bw, int flags)
Stop the active clients of this bw's top page.
BrowserWindow * a_Bw_new(void)
Create a new browser window and return it.
static KeysCommand_t getKeyCmd(void)
Look if the just pressed key is bound to a command.
static char * getOldWorkingDir(void)
Return the initial current working directory in a string.
void findbar_toggle(bool add)
Adjust space for the findbar (if necessary) and show or remove it.
void set_render_layout(Fl_Group *nw)
Set 'nw' as the main render area widget.
@ SUCCESS
The next occurrence of the pattern has been found.
@ NOT_FOUND
The patten does not at all occur in the text.
@ RESTART
There is no further occurrence of the pattern, instead, the first occurrence has been selected.
The central class for managing and drawing a widget tree.
void attachView(View *view)
Attach a view to the layout.
FindtextState::Result search(const char *str, bool caseSens, int backwards)
See dw::core::FindtextState::search.
void resetSearch()
See dw::core::FindtextState::resetSearch.
void setBgColor(style::Color *color)
void setBgImage(style::StyleImage *bgImage, style::BackgroundRepeat bgRepeat, style::BackgroundAttachment bgAttachment, style::Length bgPositionX, style::Length bgPositionY)
void copySelection(const char *text)
void scrollTo(HPosition hpos, VPosition vpos, int x, int y, int width, int height)
Scrolls all viewports, so that the region [x, y, width, height] is seen, according to hpos and vpos.
void scroll(ScrollCommand)
void setAnchor(const char *anchor)
Sets the anchor to scroll to.
static Color * create(Layout *layout, int color)
void setBufferedDrawing(bool b)
void setPageOverlap(int overlap)
void setScrollbarPageMode(bool enable)
void setDragScroll(bool enable)
void setScrollStep(int step)
void setScrollbarOnLeft(bool enable)
char * a_Dialog_open_file(const char *title, const char *pattern, const char *fname)
Show the open file dialog.
int a_Dialog_choice(const char *title, const char *msg,...)
Make a question-dialog with a question and alternatives.
void a_Dialog_msg(const char *title, const char *msg)
Display a message in a popup window.
const char * a_Dialog_save_file(const char *title, const char *pattern, const char *fname)
Show the save file dialog.
const char * a_Dialog_passwd(const char *title, const char *msg)
Dialog for password.
void a_Dialog_text_window(const char *title, const char *txt)
Show a new window with the provided text.
const char * a_Dialog_select_file(const char *title, const char *pattern, const char *fname)
Show the select file dialog.
const char * a_Dialog_input(const char *title, const char *msg)
Dialog for one line of Input with a message.
char * dStrconcat(const char *s1,...)
Concatenate a NULL-terminated list of strings.
int dStrAsciiCasecmp(const char *s1, const char *s2)
void dStr_append(Dstr *ds, const char *s)
Append a C string to a Dstr.
char * dStrdup(const char *s)
Dstr * dStr_sized_new(int sz)
Create a new string with a given size.
int dStrnAsciiCasecmp(const char *s1, const char *s2, size_t n)
int dList_length(Dlist *lp)
For completing the ADT.
void * dList_nth_data(Dlist *lp, int n0)
Return the nth data item, NULL when not found or 'n0' is out of range.
void dStr_free(Dstr *ds, int all)
Free a dillo string.
void dStr_append_c(Dstr *ds, int c)
Append one character.
char * dStrndup(const char *s, size_t sz)
void dStr_sprintf(Dstr *ds, const char *format,...)
Printf-like function.
Dstr * dStr_new(const char *s)
Create a new string.
void dStr_vsprintf(Dstr *ds, const char *format, va_list argp)
vsprintf-like function.
#define dNew(type, count)
static Fl_Window * window
static FltkPlatform * platform
static FltkViewport * viewport
const DilloUrl * a_History_get_url(int idx)
Return the DilloUrl field (by index)
int a_Misc_parse_search_url(char *source, char **label, char **urlstr)
Parse dillorc's search_url string ([<label> ]<url>) Return value: -1 on error, 0 on success (and labe...
void a_Misc_parse_content_type(const char *type, char **major, char **minor, char **charset)
Parse Content-Type string, e.g., "text/html; charset=utf-8".
@ BACKGROUND_ATTACHMENT_SCROLL
Length createPerLength(double v)
Returns a percentage, v is relative to 1, not to 100.
The core of Dw is defined in this namespace.
This namespace contains FLTK implementations of Dw interfaces.
int a_Nav_stack_ptr(BrowserWindow *bw)
void a_Nav_redirection0(BrowserWindow *bw, const DilloUrl *new_url)
void a_Nav_forw(BrowserWindow *bw)
const char * a_Nav_get_content_type(const DilloUrl *url)
void a_Nav_cancel_expect(BrowserWindow *bw)
void a_Nav_jump(BrowserWindow *bw, int offset, int new_bw)
void a_Nav_back(BrowserWindow *bw)
void a_Nav_reload(BrowserWindow *bw)
void a_Nav_repush(BrowserWindow *bw)
void a_Nav_unref_buf(const DilloUrl *Url)
int a_Nav_stack_size(BrowserWindow *bw)
void a_Nav_set_vsource_url(const DilloUrl *Url)
void a_Nav_save_url(BrowserWindow *bw, const DilloUrl *url, const char *filename)
int a_Nav_get_buf(const DilloUrl *Url, char **PBuf, int *BufSize)
void a_Nav_push(BrowserWindow *bw, const DilloUrl *url, const DilloUrl *requester)
DilloPrefs prefs
Global Data.
#define PREFS_UI_TAB_ACTIVE_BG_COLOR
#define PREFS_UI_TAB_ACTIVE_FG_COLOR
#define PREFS_UI_TAB_FG_COLOR
#define PREFS_UI_TAB_BG_COLOR
Contains the specific data for a single window.
Dlist * ImageClients
Image Keys for all active connections in the window.
Dlist * RootClients
A list of active cache clients in the window (The primary Key)
void * render_layout
All the rendering is done by this.
void * ui
Pointer to the UI object this bw belongs to.
int num_page_bugs
HTML-bugs detected at parse time.
bool_t middle_click_drags_page
bool_t right_click_closes_tab
bool_t scrollbar_page_mode
int32_t scroll_page_overlap
bool_t scroll_switches_tabs
bool_t scroll_switches_tabs_reverse
void a_Timeout_add(float t, TimeoutCb_t cb, void *cbdata)
Hook a one-time timeout function 'cb' after 't' seconds with 'cbdata" as its data.
void a_UIcmd_tools(void *vbw, int x, int y)
void a_UIcmd_link_popup(void *vbw, const DilloUrl *url)
const char * a_UIcmd_get_passwd(const char *user)
static void UIcmd_open_url_nbw(BrowserWindow *new_bw, const DilloUrl *url)
static BrowserWindow * UIcmd_tab_new(CustTabs *tabs, UI *old_ui, int focus)
void a_UIcmd_set_bug_prog(BrowserWindow *bw, int n_bug)
void a_UIcmd_set_scroll_xy(BrowserWindow *bw, int x, int y)
void a_UIcmd_page_popup(void *vbw, bool_t has_bugs, void *v_cssUrls)
void a_UIcmd_bugmeter_popup(void *vbw)
void a_UIcmd_set_msg(BrowserWindow *bw, const char *format,...)
static char * UIcmd_find_search_str(const char *str)
void a_UIcmd_home(void *vbw)
void a_UIcmd_copy_urlstr(BrowserWindow *bw, const char *urlstr)
void a_UIcmd_form_popup(void *vbw, const DilloUrl *url, void *vform, bool_t showing_hiddens)
void a_UIcmd_close_bw(void *vbw)
static char * UIcmd_make_search_str(const char *str)
void a_UIcmd_image_popup(void *vbw, const DilloUrl *url, bool_t loaded_img, DilloUrl *page_url, DilloUrl *link_url)
int * a_UIcmd_get_history(BrowserWindow *bw, int direction)
static void win_cb(Fl_Widget *w, void *cb_data)
void a_UIcmd_reload_all_active()
void a_UIcmd_open_file(void *vbw)
BrowserWindow * a_UIcmd_browser_window_new(int ww, int wh, uint32_t xid, const void *vbw)
void a_UIcmd_focus_location(void *vbw)
void a_UIcmd_zoom_reset(void *vbw)
void a_UIcmd_zoom_in(void *vbw)
void a_UIcmd_zoom_out(void *vbw)
void a_UIcmd_set_page_title(BrowserWindow *bw, const char *label)
void a_UIcmd_focus_main_area(BrowserWindow *bw)
void a_UIcmd_findtext_search(BrowserWindow *bw, const char *key, int case_sens, int backward)
void a_UIcmd_reload(void *vbw)
static void tab_btn_cb(Fl_Widget *w, void *cb_data)
Callback for mouse click.
#define DEFAULT_TAB_LABEL
BrowserWindow * a_UIcmd_get_bw_by_widget(void *v_wid)
void a_UIcmd_file_popup(void *vbw, void *v_wid)
void a_UIcmd_open_url_nw(BrowserWindow *bw, const DilloUrl *url)
static void close_tab_btn_cb(Fl_Widget *w, void *cb_data)
Callback for the close-tab button.
void a_UIcmd_view_page_source(BrowserWindow *bw, const DilloUrl *url)
void a_UIcmd_book(void *vbw)
void a_UIcmd_search_dialog(void *vbw)
void a_UIcmd_view_page_bugs(void *vbw)
void a_UIcmd_nav_jump(BrowserWindow *bw, int offset, int new_bw)
static char * UIcmd_make_save_filename(const DilloUrl *url)
void a_UIcmd_findbar_toggle(BrowserWindow *bw, int on)
static int btn_cmp(const void *p1, const void *p2)
void a_UIcmd_get_wh(BrowserWindow *bw, int *w, int *h)
void a_UIcmd_open_urlstr(void *vbw, const char *urlstr)
void a_UIcmd_set_buttons_sens(BrowserWindow *bw)
static struct Tabgroup * tabgroups
void a_UIcmd_panels_toggle(BrowserWindow *bw)
const char * a_UIcmd_select_file()
void a_UIcmd_forw_popup(void *vbw, int x, int y)
void a_UIcmd_save(void *vbw)
void a_UIcmd_back(void *vbw)
void a_UIcmd_get_scroll_xy(BrowserWindow *bw, int *x, int *y)
void a_UIcmd_forw(void *vbw)
void a_UIcmd_save_link(BrowserWindow *bw, const DilloUrl *url)
static void UIcmd_save(BrowserWindow *bw, const DilloUrl *url, const char *title)
void a_UIcmd_repush(void *vbw)
void a_UIcmd_back_popup(void *vbw, int x, int y)
char * a_UIcmd_get_location_text(BrowserWindow *bw)
void a_UIcmd_close_all_bw(void *)
static const char * save_dir
void a_UIcmd_add_bookmark(BrowserWindow *bw, const DilloUrl *url)
void a_UIcmd_open_url(BrowserWindow *bw, const DilloUrl *url)
void a_UIcmd_set_page_prog(BrowserWindow *bw, size_t nbytes, int cmd)
void a_UIcmd_stop(void *vbw)
void a_UIcmd_findtext_reset(BrowserWindow *bw)
void a_UIcmd_scroll(BrowserWindow *bw, int icmd)
static void UIcmd_set_window_labels(Fl_Window *win, const char *str)
void a_UIcmd_set_scroll_by_fragment(BrowserWindow *bw, const char *f)
void a_UIcmd_set_img_prog(BrowserWindow *bw, int n_img, int t_img, int cmd)
static int UIcmd_save_file_check(const char *name)
void a_UIcmd_redirection0(void *vbw, const DilloUrl *url)
void a_UIcmd_set_location_text(void *vbw, const char *text)
void a_UIcmd_open_url_nt(void *vbw, const DilloUrl *url, int focus)
char * a_Url_string_strip_delimiters(const char *str)
RFC-3986 suggests this stripping when "importing" URLs from other media.
char * a_Url_encode_hex_str(const char *str)
Urlencode 'str'.
void a_Url_free(DilloUrl *url)
Free a DilloUrl.
DilloUrl * a_Url_new(const char *url_str, const char *base_url)
Transform (and resolve) an URL string into the respective DilloURL.
uint_t a_Utf8_end_of_char(const char *str, uint_t i)
Return index of the last byte of the UTF-8-encoded character that str + i points to or into.