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);
192 void switch_tab(
int index);
195 void set_tab_label(
UI *ui,
const char *title);
203 CustTabButton *btn = (CustTabButton*) w;
204 CustTabs *tabs = (CustTabs*) cb_data;
205 int b = Fl::event_button();
207 if (b == FL_LEFT_MOUSE) {
208 tabs->switch_tab(btn);
221 CustTabs *tabs = (CustTabs*) cb_data;
222 int b = Fl::event_button();
224 if (b == FL_LEFT_MOUSE) {
229int CustTabs::handle(
int e)
233 _MSG(
"CustTabs::handle e=%s\n", fl_eventnames[e]);
234 if (e == FL_KEYBOARD) {
236 }
else if (e == FL_SHORTCUT) {
237 UI *ui = (
UI*)wizard()->value();
242 _MSG(
"CustTabs::handle KEYS_NOP\n");
264 int dx = Fl::event_dx();
265 int dy = Fl::event_dy();
266 int dir = dy ? dy : dx;
279 return (ret) ? ret : Fl_Group::handle(e);
285UI *CustTabs::add_new_tab(
UI *old_ui,
int focus)
287 if (num_tabs() == 1) {
290 Wizard->resize(0,ctab_h,Wizard->w(),
window()->h()-ctab_h);
291 resize(0,0,
window()->w(),ctab_h);
293 {
int w = 0, h; Pack->child(0)->measure_label(w, h);
294 Pack->child(0)->size(w+14,ctab_h);}
295 Pack->child(0)->show();
303 new_ui->resize(0,ctab_h,Wizard->w(),Wizard->h());
308 CustTabButton *btn =
new CustTabButton(num_tabs()*tab_w,0,tab_w,ctab_h);
309 btn->align(FL_ALIGN_INSIDE);
310 btn->labelsize(btn->labelsize()-2);
312 btn->clear_visible_focus();
313 btn->box(FL_GTK_THIN_UP_BOX);
324 increase_focus_counter();
325 btn->focus_num(focus_counter);
327 if (num_tabs() == 2) {
334 update_pack_offset();
342void CustTabs::remove_tab(
UI *ui)
347 int act_idx = get_btn_idx((
UI*)Wizard->value());
349 int rm_idx = get_btn_idx(ui);
350 btn = (CustTabButton*)Pack->child(rm_idx);
352 if (act_idx == rm_idx) {
354 CustTabButton *fbtn = NULL;
355 for (
int i = 0; i < num_tabs(); ++i) {
358 fbtn = (CustTabButton*)Pack->child(i);
359 CustTabButton *btn = (CustTabButton*)Pack->child(i);
360 if (btn->focus_num() > fbtn->focus_num())
366 Pack->remove(rm_idx);
367 update_pack_offset();
373 if (num_tabs() == 1) {
377 Pack->child(0)->size(0,0);
378 Pack->child(0)->hide();
379 resize(0,0,
window()->w(),ctab_h);
380 Wizard->resize(0,ctab_h,Wizard->w(),
window()->h()-ctab_h);
386int CustTabs::get_btn_idx(
UI *ui)
388 for (
int i = 0; i < num_tabs(); ++i) {
389 CustTabButton *btn = (CustTabButton*)Pack->child(i);
400void CustTabs::update_pack_offset()
405 int act_idx = get_btn_idx((
UI*)Wizard->value());
406 CustTabButton *cbtn = (CustTabButton*)Pack->child(act_idx);
410 for (
int j=0; j < act_idx; ++j)
411 x_i += Pack->child(j)->w();
412 x_f = x_i + cbtn->w();
414 int scr_x = Scroll->xposition(), scr_y = Scroll->yposition();
415 int px_i = x_i - scr_x;
416 int px_f = px_i + cbtn->w();
417 int pw = Scroll->window()->w() - ctl_w;
418 _MSG(
" scr_x=%d btn_x=%d px_i=%d btn_w=%d px_f=%d pw=%d",
419 Scroll->xposition(),cbtn->x(),px_i,cbtn->w(),px_f,pw);
421 Scroll->scroll_to(x_i, scr_y);
422 }
else if (px_i > pw || (px_i > 0 && px_f > pw)) {
423 Scroll->scroll_to(
MIN(x_i, x_f-pw), scr_y);
426 _MSG(
" >>scr_x=%d btn0_x=%d\n", scr_x, Pack->child(0)->x());
432void CustTabs::switch_tab(CustTabButton *cbtn)
437 UI *old_ui = (
UI*)Wizard->value();
439 if (cbtn && cbtn->ui() != old_ui) {
441 if ((idx = get_btn_idx(old_ui)) != -1) {
442 btn = (CustTabButton*)Pack->child(idx);
457 Wizard->value(cbtn->ui());
461 update_pack_offset();
465 const char *title = (cbtn->ui())->label();
469 increase_focus_counter();
470 cbtn->focus_num(focus_counter);
474void CustTabs::prev_tab()
478 if ((idx = get_btn_idx((
UI*)Wizard->value())) != -1)
479 switch_tab((CustTabButton*)Pack->child(idx>0 ? idx-1 : num_tabs()-1));
482void CustTabs::next_tab()
486 if ((idx = get_btn_idx((
UI*)Wizard->value())) != -1)
487 switch_tab((CustTabButton*)Pack->child((idx+1<num_tabs()) ? idx+1 : 0));
493void CustTabs::switch_tab(
int index)
495 if (index >= 0 && index < num_tabs())
496 switch_tab((CustTabButton*)Pack->child(index));
502void CustTabs::set_tab_label(
UI *ui,
const char *label)
505 int idx = get_btn_idx(ui);
509 size_t tab_chars = 15, label_len = strlen(label);
511 if (label_len > tab_chars)
513 snprintf(title, tab_chars + 1,
"%s", label);
514 if (label_len > tab_chars)
515 snprintf(title + tab_chars, 4,
"...");
518 if (strcmp(Pack->child(idx)->label(), title)) {
520 Pack->child(idx)->copy_label(title);
521 Pack->child(idx)->measure_label(w, h);
522 Pack->child(idx)->size(w+14,ctab_h);
523 update_pack_offset();
531static void win_cb (Fl_Widget *w,
void *cb_data) {
532 CustTabs *tabs = (CustTabs*) cb_data;
533 int choice = 1, ntabs = tabs->num_tabs();
535 if (Fl::event_key() == FL_Escape) {
543 "Window contains more than one tab.",
544 "Close",
"Cancel", NULL);
556 for (
int i = 0; i <
a_Bw_num(); ++i) {
558 if (((
UI*)bw->
ui)->contains((Fl_Widget*)v_wid)) {
570 uint32_t xid,
const void *vbw)
574 UI *old_ui = old_bw ?
BW2UI(old_bw) : NULL;
577 if (ww <= 0 || wh <= 0) {
584 win =
new Xembed(xid, ww, wh);
586 win =
new Fl_Window(ww, wh);
588 win =
new Fl_Double_Window(ww, wh);
593 struct Tabgroup *tg =
new Tabgroup;
594 tg->tabs = DilloTabs;
597 _MSG(
"new: tabgroups=%p\n", (
void *) tg);
600 win->resizable(DilloTabs->wizard());
606 if (old_bw == NULL) {
615 win->callback(
win_cb, DilloTabs);
627 win->Fl_Widget::copy_label(str);
629 win->label(copy, copy);
638 _MSG(
" UIcmd_tab_new\n");
641 UI *new_ui = tabs->add_new_tab(old_ui, focus);
668 new_bw->
ui = (
void *)new_ui;
689 CustTabs *tabs = ui->
tabs();
692 _MSG(
"a_UIcmd_close_bw\n");
696 tabs->remove_tab(ui);
697 if (tabs->num_tabs() == 0) {
700 struct Tabgroup *prev = NULL;
701 for (tmp =
tabgroups; tmp; tmp = tmp->next) {
702 if (tmp->tabs == tabs) {
704 prev->next = tmp->next;
712 _MSG(
"gone: tmp=%p tabgroups=%p\n", (
void *) tmp, (
void *)
tabgroups);
715 delete tabs->window();
731 "More than one open tab or window.",
732 "Quit",
"Cancel", NULL);
746 int len = strcspn(str,
" ");
748 if (len > 0 && str[len] !=
'\0') {
773 char *search_urlstr = NULL;
779 urlstr = search_urlstr;
781 if (urlstr && *urlstr) {
788 if (!ch || ch ==
'.') {
805 dFree(search_urlstr);
815 BW2UI(bw)->focus_main();
818 BW2UI(bw)->focus_location();
836 BW2UI(new_bw)->focus_main();
838 BW2UI(new_bw)->focus_location();
866 bw ?
BW2UI(bw) : NULL, focus);
945 for (tg =
tabgroups; tg; tg = tg->next) {
1002 if (bw->
zoom < 0.10)
1030 char *name, *free1, *free2, *n1, *n2;
1032 free1 = free2 = NULL;
1036 path2 = strrchr(
path,
'/');
1040 if (strlen(
path) > MaxLen) {
1048 if (strlen(query) > MaxLen) {
1049 query = free2 =
dStrndup(query, MaxLen);
1060 for (n1 = n2 = name; *n1; n1++, n2++) {
1064 (n1[0] ==
'%' && n1[1] ==
'2' && n1[2] ==
'0')
1083 (dir[strlen(dir)-1] ==
'/')
1095 if (stat(name, &ss) == 0) {
1100 "The file: %s (%d Bytes) already exists. What do we do?",
1101 name, (
int)ss.st_size);
1103 "Abort",
"Continue",
"Rename", NULL);
1121 dFree(SuggestedName);
1131 MSG(
"UIcmd_save: %s\n", name);
1142 SuggestedName =
dStrdup(name);
1155 UIcmd_save(bw, url, NULL,
"Save Page as File");
1175 MSG(
"a_UIcmd_stop()\n");
1214 char *search_url, *l, *u, *c;
1221 for (c = u; *c; c++) {
1229 MSG_WARN(
"search_url ends with '%%'\n"); c--;
break;
1231 MSG_WARN(
"illegal specifier '%%%c' in search_url\n", *c);
1239 search_url = ds->
str;
1251 if ((query =
a_Dialog_input(
"Dillo: Search",
"Search the Web:"))) {
1264 const char *title =
"Dillo: Password";
1265 char *msg =
dStrconcat(
"Password for user \"", user,
"\"", NULL);
1276 UIcmd_save(bw, url, filename,
"Dillo: Save Link as File");
1367 static int post_id = 0;
1376 dstr_url =
dStr_new(
"dpi:/vsource/:");
1380 post_id = (post_id < 9999) ? post_id + 1 : 0;
1381 snprintf(tag, 16,
"_%.4d", post_id);
1403 a_Dialog_msg(
"Dillo: Good HTML!",
"No HTML errors found while parsing!");
1430 hlist =
dNew(
int, n + 1);
1457 *w =
BW2UI(bw)->w();
1458 *h =
BW2UI(bw)->h();
1459 _MSG(
"a_UIcmd_wh: w=%d, h=%d\n", *w, *h);
1512 const mapping_t map[] = {
1526 for (
uint_t i = 0; i <
sizeof(map) /
sizeof(map[0]); i++) {
1527 if (keycmd == map[i].keys_cmd) {
1549 BW2UI(bw)->set_location(text);
1558 BW2UI(bw)->set_page_prog(nbytes, cmd);
1567 BW2UI(bw)->set_img_prog(n_img, t_img, cmd);
1579 BW2UI(bw)->set_bug_prog(n_bug);
1588 const int size = 128;
1591 if (snprintf(title, size,
"Dillo: %s", label ? label :
"") >= size) {
1593 snprintf(title + i, 4,
"...");
1595 BW2UI(bw)->copy_label(title);
1596 BW2UI(bw)->tabs()->set_tab_label(
BW2UI(bw), label ? label :
"");
1613 va_start(argp, format);
1644 BW2UI(bw)->panels_toggle();
1651 int case_sens,
int backward)
1655 switch (l->
search(key, case_sens, backward)) {
1657 a_UIcmd_set_msg(bw, backward?
"Top reached; restarting from the bottom."
1658 :
"Bottom reached; restarting from the top.");
1685 BW2UI(bw)->findbar_toggle(on);
1693 BW2UI(bw)->focus_main();
1702 BW2UI(bw)->focus_location();
1712 CustTabs *tabs = ui->
tabs();
1714 tabs->switch_tab(index);
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 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)
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_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)
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_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_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)
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_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.