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>
57#define DEFAULT_TAB_LABEL "-.new.-"
60#define BW2UI(bw) ((UI*)((bw)->ui))
75 struct Tabgroup *next;
99class CustTabButton :
public Fl_Button {
104 CustTabButton (
int x,
int y,
int w,
int h,
const char* label = 0) :
105 Fl_Button (x,y,w,h,label) { ui_ = NULL; focus_num_ = 0; };
106 void ui(
UI *pui) { ui_ = pui; }
107 UI *ui(
void) {
return ui_; }
108 void focus_num(
uint_t fn) { focus_num_ = fn; }
109 uint_t focus_num(
void) {
return focus_num_; }
112static int btn_cmp(
const void *p1,
const void *p2)
114 return ((*(CustTabButton *
const *)p1)->focus_num() -
115 (*(CustTabButton *
const *)p2)->focus_num() );
121class CustTabs :
public Fl_Group {
123 int tab_w, tab_h, ctab_h, btn_w, ctl_w;
130 void update_pack_offset(
void);
131 void resize(
int x,
int y,
int w,
int h)
132 { Fl_Group::resize(x,y,w,h); update_pack_offset(); }
133 int get_btn_idx(
UI *ui);
134 void increase_focus_counter() {
135 if (focus_counter < UINT_MAX)
139 CustTabButton **btns =
dNew(CustTabButton*, num_tabs());
140 for (
int i = 0; i < num_tabs(); ++i)
141 btns[i] = (CustTabButton*)Pack->child(i);
142 qsort(btns, num_tabs(),
sizeof(CustTabButton *),
btn_cmp);
144 for (
int i = 0; i < num_tabs(); ++i)
145 btns[i]->focus_num(focus_counter++);
151 CustTabs (
int ww,
int wh,
int th,
const char *lbl=0) :
152 Fl_Group(0,0,ww,th,lbl) {
155 tab_w = 50, tab_h = th, ctab_h = 1, btn_w = 20, ctl_w = 1*btn_w+2;
156 resize(0,0,ww,ctab_h);
158 Scroll =
new Fl_Scroll(0,0,ww-ctl_w,ctab_h);
160 Scroll->box(FL_NO_BOX);
161 Pack =
new Fl_Pack(0,0,ww-ctl_w,tab_h);
162 Pack->type(Fl_Pack::HORIZONTAL);
163 Pack->box(FL_NO_BOX);
169 Control =
new Fl_Group(ww-ctl_w,0,ctl_w,ctab_h);
170 CloseBtn =
new CustButton(ww-ctl_w+2,0,btn_w,ctab_h,
"X");
171 CloseBtn->box(FL_THIN_UP_BOX);
172 CloseBtn->clear_visible_focus();
174 "Close current tab.\nor Right-click tab label to close." :
175 "Close current tab.\nor Middle-click tab label to close.");
183 Wizard =
new Fl_Wizard(0,ctab_h,ww,wh-ctab_h);
184 Wizard->box(FL_NO_BOX);
188 UI *add_new_tab(
UI *old_ui,
int focus);
189 void remove_tab(
UI *ui);
190 Fl_Wizard *wizard(
void) {
return Wizard; }
191 int num_tabs() {
return (Pack ? Pack->children() : 0); }
192 void switch_tab(CustTabButton *cbtn);
193 void switch_tab(
int index);
196 void set_tab_label(
UI *ui,
const char *title);
204 CustTabButton *btn = (CustTabButton*) w;
205 CustTabs *tabs = (CustTabs*) cb_data;
206 int b = Fl::event_button();
208 if (b == FL_LEFT_MOUSE) {
209 tabs->switch_tab(btn);
222 CustTabs *tabs = (CustTabs*) cb_data;
223 int b = Fl::event_button();
225 if (b == FL_LEFT_MOUSE) {
230int CustTabs::handle(
int e)
234 _MSG(
"CustTabs::handle e=%s\n", fl_eventnames[e]);
235 if (e == FL_KEYBOARD) {
237 }
else if (e == FL_SHORTCUT) {
238 UI *ui = (
UI*)wizard()->value();
243 _MSG(
"CustTabs::handle KEYS_NOP\n");
265 int dx = Fl::event_dx();
266 int dy = Fl::event_dy();
267 int dir = dy ? dy : dx;
280 return (ret) ? ret : Fl_Group::handle(e);
286UI *CustTabs::add_new_tab(
UI *old_ui,
int focus)
288 if (num_tabs() == 1) {
291 Wizard->resize(0,ctab_h,Wizard->w(),
window()->h()-ctab_h);
292 resize(0,0,
window()->w(),ctab_h);
294 {
int w = 0, h; Pack->child(0)->measure_label(w, h);
295 Pack->child(0)->size(w+14,ctab_h);}
296 Pack->child(0)->show();
304 new_ui->resize(0,ctab_h,Wizard->w(),Wizard->h());
309 CustTabButton *btn =
new CustTabButton(num_tabs()*tab_w,0,tab_w,ctab_h);
310 btn->align(FL_ALIGN_INSIDE);
311 btn->labelsize(btn->labelsize()-2);
313 btn->clear_visible_focus();
314 btn->box(FL_GTK_THIN_UP_BOX);
325 increase_focus_counter();
326 btn->focus_num(focus_counter);
328 if (num_tabs() == 2) {
335 update_pack_offset();
343void CustTabs::remove_tab(
UI *ui)
348 int act_idx = get_btn_idx((
UI*)Wizard->value());
350 int rm_idx = get_btn_idx(ui);
351 btn = (CustTabButton*)Pack->child(rm_idx);
353 if (act_idx == rm_idx) {
355 CustTabButton *fbtn = NULL;
356 for (
int i = 0; i < num_tabs(); ++i) {
359 fbtn = (CustTabButton*)Pack->child(i);
360 CustTabButton *btn = (CustTabButton*)Pack->child(i);
361 if (btn->focus_num() > fbtn->focus_num())
367 Pack->remove(rm_idx);
368 update_pack_offset();
374 if (num_tabs() == 1) {
378 Pack->child(0)->size(0,0);
379 Pack->child(0)->hide();
380 resize(0,0,
window()->w(),ctab_h);
381 Wizard->resize(0,ctab_h,Wizard->w(),
window()->h()-ctab_h);
387int CustTabs::get_btn_idx(
UI *ui)
389 for (
int i = 0; i < num_tabs(); ++i) {
390 CustTabButton *btn = (CustTabButton*)Pack->child(i);
401void CustTabs::update_pack_offset()
406 int act_idx = get_btn_idx((
UI*)Wizard->value());
407 CustTabButton *cbtn = (CustTabButton*)Pack->child(act_idx);
411 for (
int j=0; j < act_idx; ++j)
412 x_i += Pack->child(j)->w();
413 x_f = x_i + cbtn->w();
415 int scr_x = Scroll->xposition(), scr_y = Scroll->yposition();
416 int px_i = x_i - scr_x;
417 int px_f = px_i + cbtn->w();
418 int pw = Scroll->window()->w() - ctl_w;
419 _MSG(
" scr_x=%d btn_x=%d px_i=%d btn_w=%d px_f=%d pw=%d",
420 Scroll->xposition(),cbtn->x(),px_i,cbtn->w(),px_f,pw);
422 Scroll->scroll_to(x_i, scr_y);
423 }
else if (px_i > pw || (px_i > 0 && px_f > pw)) {
424 Scroll->scroll_to(
MIN(x_i, x_f-pw), scr_y);
427 _MSG(
" >>scr_x=%d btn0_x=%d\n", scr_x, Pack->child(0)->x());
433void CustTabs::switch_tab(CustTabButton *cbtn)
438 UI *old_ui = (
UI*)Wizard->value();
440 if (cbtn && cbtn->ui() != old_ui) {
442 if ((idx = get_btn_idx(old_ui)) != -1) {
443 btn = (CustTabButton*)Pack->child(idx);
458 Wizard->value(cbtn->ui());
462 update_pack_offset();
466 const char *title = (cbtn->ui())->label();
470 increase_focus_counter();
471 cbtn->focus_num(focus_counter);
475void CustTabs::prev_tab()
479 if ((idx = get_btn_idx((
UI*)Wizard->value())) != -1)
480 switch_tab((CustTabButton*)Pack->child(idx>0 ? idx-1 : num_tabs()-1));
483void CustTabs::next_tab()
487 if ((idx = get_btn_idx((
UI*)Wizard->value())) != -1)
488 switch_tab((CustTabButton*)Pack->child((idx+1<num_tabs()) ? idx+1 : 0));
494void CustTabs::switch_tab(
int index)
496 if (index >= 0 && index < num_tabs())
497 switch_tab((CustTabButton*)Pack->child(index));
503void CustTabs::set_tab_label(
UI *ui,
const char *label)
506 int idx = get_btn_idx(ui);
510 size_t tab_chars = 15, label_len = strlen(label);
512 if (label_len > tab_chars)
514 snprintf(title, tab_chars + 1,
"%s", label);
515 if (label_len > tab_chars)
516 snprintf(title + tab_chars, 4,
"...");
519 if (strcmp(Pack->child(idx)->label(), title)) {
521 Pack->child(idx)->copy_label(title);
522 Pack->child(idx)->measure_label(w, h);
523 Pack->child(idx)->size(w+14,ctab_h);
524 update_pack_offset();
532static void win_cb (Fl_Widget *w,
void *cb_data) {
533 CustTabs *tabs = (CustTabs*) cb_data;
534 int choice = 1, ntabs = tabs->num_tabs();
536 if (Fl::event_key() == FL_Escape) {
544 "Window contains more than one tab.",
545 "Close",
"Cancel", NULL);
557 for (
int i = 0; i <
a_Bw_num(); ++i) {
559 if (((
UI*)bw->
ui)->contains((Fl_Widget*)v_wid)) {
571 uint32_t xid,
const void *vbw)
575 UI *old_ui = old_bw ?
BW2UI(old_bw) : NULL;
578 if (ww <= 0 || wh <= 0) {
585 win =
new Xembed(xid, ww, wh);
587 win =
new Fl_Window(ww, wh);
589 win =
new Fl_Double_Window(ww, wh);
594 struct Tabgroup *tg =
new Tabgroup;
595 tg->tabs = DilloTabs;
598 _MSG(
"new: tabgroups=%p\n", (
void *) tg);
601 win->resizable(DilloTabs->wizard());
607 if (old_bw == NULL) {
616 win->callback(
win_cb, DilloTabs);
628 win->Fl_Widget::copy_label(str);
630 win->label(copy, copy);
639 _MSG(
" UIcmd_tab_new\n");
642 UI *new_ui = tabs->add_new_tab(old_ui, focus);
669 new_bw->
ui = (
void *)new_ui;
690 CustTabs *tabs = ui->
tabs();
693 _MSG(
"a_UIcmd_close_bw\n");
697 tabs->remove_tab(ui);
698 if (tabs->num_tabs() == 0) {
701 struct Tabgroup *prev = NULL;
702 for (tmp =
tabgroups; tmp; tmp = tmp->next) {
703 if (tmp->tabs == tabs) {
705 prev->next = tmp->next;
713 _MSG(
"gone: tmp=%p tabgroups=%p\n", (
void *) tmp, (
void *)
tabgroups);
716 delete tabs->window();
732 "More than one open tab or window.",
733 "Quit",
"Cancel", NULL);
734 if (force || choice == 1)
747 int len = strcspn(str,
" ");
749 if (len > 0 && str[len] !=
'\0') {
774 char *search_urlstr = NULL;
780 urlstr = search_urlstr;
782 if (urlstr && *urlstr) {
789 if (!ch || ch ==
'.') {
806 dFree(search_urlstr);
816 BW2UI(bw)->focus_main();
819 BW2UI(bw)->focus_location();
837 BW2UI(new_bw)->focus_main();
839 BW2UI(new_bw)->focus_location();
867 bw ?
BW2UI(bw) : NULL, focus);
943 for (tg =
tabgroups; tg; tg = tg->next) {
958 for (tg =
tabgroups; tg; tg = tg->next) {
1015 if (bw->
zoom < 0.10)
1043 char *name, *free1, *free2, *n1, *n2;
1045 free1 = free2 = NULL;
1049 path2 = strrchr(
path,
'/');
1053 if (strlen(
path) > MaxLen) {
1061 if (strlen(query) > MaxLen) {
1062 query = free2 =
dStrndup(query, MaxLen);
1073 for (n1 = n2 = name; *n1; n1++, n2++) {
1077 (n1[0] ==
'%' && n1[1] ==
'2' && n1[2] ==
'0')
1096 (dir[strlen(dir)-1] ==
'/')
1108 if (stat(name, &ss) == 0) {
1113 "The file: %s (%d Bytes) already exists. What do we do?",
1114 name, (
int)ss.st_size);
1116 "Abort",
"Continue",
"Rename", NULL);
1134 dFree(SuggestedName);
1144 MSG(
"UIcmd_save: %s\n", name);
1155 SuggestedName =
dStrdup(name);
1168 UIcmd_save(bw, url, NULL,
"Save Page as File");
1188 MSG(
"a_UIcmd_stop()\n");
1227 char *search_url, *l, *u, *c;
1234 for (c = u; *c; c++) {
1242 MSG_WARN(
"search_url ends with '%%'\n"); c--;
break;
1244 MSG_WARN(
"illegal specifier '%%%c' in search_url\n", *c);
1252 search_url = ds->
str;
1264 if ((query =
a_Dialog_input(
"Dillo: Search",
"Search the Web:"))) {
1277 const char *title =
"Dillo: Password";
1278 char *msg =
dStrconcat(
"Password for user \"", user,
"\"", NULL);
1289 UIcmd_save(bw, url, filename,
"Dillo: Save Link as File");
1380 static int post_id = 0;
1389 dstr_url =
dStr_new(
"dpi:/vsource/:");
1393 post_id = (post_id < 9999) ? post_id + 1 : 0;
1394 snprintf(tag, 16,
"_%.4d", post_id);
1416 a_Dialog_msg(
"Dillo: Good HTML!",
"No HTML errors found while parsing!");
1443 hlist =
dNew(
int, n + 1);
1470 *w =
BW2UI(bw)->w();
1471 *h =
BW2UI(bw)->h();
1472 _MSG(
"a_UIcmd_wh: w=%d, h=%d\n", *w, *h);
1525 const mapping_t map[] = {
1539 for (
uint_t i = 0; i <
sizeof(map) /
sizeof(map[0]); i++) {
1540 if (keycmd == map[i].keys_cmd) {
1562 BW2UI(bw)->set_location(text);
1571 BW2UI(bw)->set_page_prog(nbytes, cmd);
1580 BW2UI(bw)->set_img_prog(n_img, t_img, cmd);
1592 BW2UI(bw)->set_bug_prog(n_bug);
1601 const int size = 128;
1604 if (snprintf(title, size,
"Dillo: %s", label ? label :
"") >= size) {
1606 snprintf(title + i, 4,
"...");
1608 BW2UI(bw)->copy_label(title);
1609 BW2UI(bw)->tabs()->set_tab_label(
BW2UI(bw), label ? label :
"");
1626 va_start(argp, format);
1688 BW2UI(bw)->panels_toggle();
1695 int case_sens,
int backward)
1699 switch (l->
search(key, case_sens, backward)) {
1701 a_UIcmd_set_msg(bw, backward?
"Top reached; restarting from the bottom."
1702 :
"Bottom reached; restarting from the top.");
1729 BW2UI(bw)->findbar_toggle(on);
1737 BW2UI(bw)->focus_main();
1746 BW2UI(bw)->focus_location();
1756 CustTabs *tabs = ui->
tabs();
1758 tabs->switch_tab(index);
1769 CustTabs *tabs = ui->
tabs();
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 KeysCommand_t getCmdCode(const char *symbolName)
Takes a command name and searches it in the mapping table.
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 pattern 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 copyCurrentSelection(int destination)
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, int destination)
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)
void a_Control_notify_finish(BrowserWindow *bw)
int a_Control_is_waiting(void)
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_back_nt(BrowserWindow *bw)
void a_Nav_forw_nt(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 DilloUrl *page_url)
void a_UIcmd_book(void *vbw, int nt)
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_finish_loading(BrowserWindow *bw)
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_forw_nt(void *vbw)
void a_UIcmd_set_msg(BrowserWindow *bw, const char *format,...)
static char * UIcmd_find_search_str(const char *str)
void a_UIcmd_form_popup(void *vbw, const DilloUrl *url, void *vform, bool_t showing_hiddens)
void a_UIcmd_close_bw(void *vbw)
void a_UIcmd_home(void *vbw, int nt)
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_copy_urlstr(BrowserWindow *bw, const char *urlstr, int destination)
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_focus_tab(void *vbw, int index)
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 UIcmd_save(BrowserWindow *bw, const DilloUrl *url, char *filename, const char *title)
BrowserWindow * a_UIcmd_get_first_active_bw(void)
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)
int a_UIcmd_by_name(void *vbw, const char *cmd_name)
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_close_all_bw(void *force)
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()
int a_UIcmd_has_finished(BrowserWindow *bw)
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_copy(void *vbw)
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)
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_save_link(BrowserWindow *bw, const DilloUrl *url, char *filename)
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_back_nt(void *vbw)
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.