Dillo v3.1.1-98-g318d1f14
|
#include "url.h"
Go to the source code of this file.
Classes | |
struct | BrowserWindow |
Contains the specific data for a single window. More... | |
Macros | |
#define | BW_Root (1) /* Root URLs */ |
#define | BW_Img (2) /* Image URLs */ |
#define | BW_Force (4) /* Stop connection too */ |
Typedefs | |
typedef void(* | BwCallback_t) (BrowserWindow *bw, const void *data) |
Functions | |
void | a_Bw_init (void) |
Initialize global data. | |
BrowserWindow * | a_Bw_new (void) |
Create a new browser window and return it. | |
void | a_Bw_free (BrowserWindow *bw) |
Free resources associated to a bw. | |
BrowserWindow * | a_Bw_get (int i) |
Return a bw by index. | |
int | a_Bw_num (void) |
void | a_Bw_add_client (BrowserWindow *bw, int Key, int Root) |
Add a reference to a cache-client. | |
int | a_Bw_remove_client (BrowserWindow *bw, int ClientKey) |
Remove the cache-client from the bw's list (client can be a image or a html page) Return: 0 if found, 1 otherwise. | |
void | a_Bw_close_client (BrowserWindow *bw, int ClientKey) |
Close a cache-client upon successful retrieval. | |
void | a_Bw_stop_clients (BrowserWindow *bw, int flags) |
Stop the active clients of this bw's top page. | |
void | a_Bw_add_doc (BrowserWindow *bw, void *vdoc) |
Add a document to the browser window's list. | |
void * | a_Bw_get_current_doc (BrowserWindow *bw) |
Get current document. | |
void * | a_Bw_get_url_doc (BrowserWindow *bw, const DilloUrl *Url) |
Get document by URL. | |
void | a_Bw_remove_doc (BrowserWindow *bw, void *vdoc) |
Remove a document from the bw's list. | |
void | a_Bw_add_url (BrowserWindow *bw, const DilloUrl *Url) |
Add an URL to the browser window's list. | |
void | a_Bw_cleanup (BrowserWindow *bw) |
Empty RootClients, ImageClients and PageUrls lists and reset progress bar data. | |
void | a_Bw_expect (BrowserWindow *bw, const DilloUrl *Url) |
void | a_Bw_cancel_expect (BrowserWindow *bw) |
bool_t | a_Bw_expecting (BrowserWindow *bw) |
const DilloUrl * | a_Bw_expected_url (BrowserWindow *bw) |
typedef void(* BwCallback_t) (BrowserWindow *bw, const void *data) |
void a_Bw_add_client | ( | BrowserWindow * | bw, |
int | Key, | ||
int | Root | ||
) |
Add a reference to a cache-client.
It is kept int this bw's list. This helps us keep track of which are active in the window so that it's possible to abort/stop them. (Root: Flag, whether a Root URL or not)
TODO: Make NumImages count different images.
Definition at line 128 of file bw.c.
References a_UIcmd_set_buttons_sens(), a_UIcmd_set_img_prog(), dList_append(), dList_length(), dReturn_if_fail, BrowserWindow::ImageClients, INT2VOIDP, BrowserWindow::NumImages, BrowserWindow::NumImagesGot, and BrowserWindow::RootClients.
Referenced by a_Html_load_stylesheet(), StyleEngine::apply(), Html_load_image(), and Nav_open_url().
void a_Bw_add_doc | ( | BrowserWindow * | bw, |
void * | vdoc | ||
) |
Add a document to the browser window's list.
Definition at line 221 of file bw.c.
References dList_append(), BrowserWindow::Docs, and dReturn_if_fail.
Referenced by DilloHtml::DilloHtml().
void a_Bw_add_url | ( | BrowserWindow * | bw, |
const DilloUrl * | Url | ||
) |
Add an URL to the browser window's list.
This helps us keep track of page-requested URLs so that it's possible to stop, abort and reload them.
Definition at line 209 of file bw.c.
References a_Url_cmp(), a_Url_dup(), dList_append(), dList_find_custom(), dReturn_if_fail, and BrowserWindow::PageUrls.
Referenced by a_Html_load_stylesheet(), StyleEngine::apply(), Html_load_image(), and Nav_open_url().
void a_Bw_cancel_expect | ( | BrowserWindow * | bw | ) |
Definition at line 328 of file bw.c.
References a_Url_free(), and BrowserWindow::nav_expect_url.
Referenced by a_Nav_cancel_expect().
void a_Bw_cleanup | ( | BrowserWindow * | bw | ) |
Empty RootClients, ImageClients and PageUrls lists and reset progress bar data.
Definition at line 277 of file bw.c.
References a_Url_free(), dList_nth_data(), dList_remove_fast(), BrowserWindow::ImageClients, BrowserWindow::NumImages, BrowserWindow::NumImagesGot, BrowserWindow::NumPendingStyleSheets, BrowserWindow::PageUrls, and BrowserWindow::RootClients.
Referenced by Nav_open_url().
void a_Bw_close_client | ( | BrowserWindow * | bw, |
int | ClientKey | ||
) |
Close a cache-client upon successful retrieval.
Remove the cache-client from the bw list and update the meters. (client can be a image or a html page)
Definition at line 167 of file bw.c.
References a_Bw_remove_client(), a_UIcmd_set_buttons_sens(), a_UIcmd_set_img_prog(), dList_length(), BrowserWindow::NumImages, BrowserWindow::NumImagesGot, and BrowserWindow::RootClients.
Referenced by a_Dicache_callback(), a_Dicache_close(), Cache_null_client(), DilloHtml::finishParsing(), and Plain_callback().
void a_Bw_expect | ( | BrowserWindow * | bw, |
const DilloUrl * | Url | ||
) |
Definition at line 322 of file bw.c.
References a_Url_dup(), a_Url_free(), and BrowserWindow::nav_expect_url.
Referenced by a_Nav_push(), Nav_reload_callback(), and Nav_repush().
const DilloUrl * a_Bw_expected_url | ( | BrowserWindow * | bw | ) |
Definition at line 339 of file bw.c.
References BrowserWindow::nav_expect_url.
Referenced by a_Nav_cancel_expect_if_eq(), a_Nav_expect_done(), and a_Nav_push().
bool_t a_Bw_expecting | ( | BrowserWindow * | bw | ) |
Definition at line 334 of file bw.c.
References BrowserWindow::nav_expect_url.
Referenced by a_Nav_cancel_expect(), a_Nav_expect_done(), a_UIcmd_set_buttons_sens(), and DilloHtml::loadImages().
void a_Bw_free | ( | BrowserWindow * | bw | ) |
Free resources associated to a bw.
Definition at line 89 of file bw.c.
References a_List_remove, a_Url_free(), bws, dFree(), dList_free(), dList_length(), dList_nth_data(), BrowserWindow::Docs, dStr_free(), BrowserWindow::ImageClients, BrowserWindow::meta_refresh_url, BrowserWindow::nav_expect_url, BrowserWindow::nav_stack, num_bws, BrowserWindow::page_bugs, BrowserWindow::PageUrls, and BrowserWindow::RootClients.
Referenced by a_UIcmd_close_bw().
BrowserWindow * a_Bw_get | ( | int | i | ) |
Return a bw by index.
Definition at line 313 of file bw.c.
Referenced by a_UIcmd_close_all_bw(), and a_UIcmd_get_bw_by_widget().
void * a_Bw_get_current_doc | ( | BrowserWindow * | bw | ) |
Get current document.
Definition at line 231 of file bw.c.
References dList_length(), dList_nth_data(), BrowserWindow::Docs, and MSG.
Referenced by a_Bw_get_url_doc(), and Menu_imgload_toggle_cb().
void * a_Bw_get_url_doc | ( | BrowserWindow * | bw, |
const DilloUrl * | url | ||
) |
Get document by URL.
This is currently used by popup menus that need to ensure that the page has not changed while the menu was popped up.
Definition at line 250 of file bw.c.
References a_Bw_get_current_doc(), a_Url_cmp(), dList_find_custom(), and BrowserWindow::PageUrls.
Referenced by Menu_form_hiddens_cb(), Menu_form_reset_cb(), Menu_form_submit_cb(), and Menu_load_images_cb().
void a_Bw_init | ( | void | ) |
BrowserWindow * a_Bw_new | ( | void | ) |
Create a new browser window and return it.
(the new window is stored in browser_window[])
Definition at line 47 of file bw.c.
References a_List_add, bws, dList_new(), dNew0, BrowserWindow::Docs, dStr_new(), BrowserWindow::ImageClients, BrowserWindow::meta_refresh_status, BrowserWindow::meta_refresh_url, BrowserWindow::nav_expect_url, BrowserWindow::nav_stack, BrowserWindow::nav_stack_ptr, num_bws, num_bws_max, BrowserWindow::num_page_bugs, BrowserWindow::NumImages, BrowserWindow::NumImagesGot, BrowserWindow::NumPendingStyleSheets, BrowserWindow::page_bugs, BrowserWindow::PageUrls, BrowserWindow::redirect_level, BrowserWindow::RootClients, and BrowserWindow::zoom.
Referenced by UIcmd_tab_new().
int a_Bw_num | ( | void | ) |
Definition at line 305 of file bw.c.
References num_bws.
Referenced by a_UIcmd_close_all_bw(), and a_UIcmd_get_bw_by_widget().
int a_Bw_remove_client | ( | BrowserWindow * | bw, |
int | ClientKey | ||
) |
Remove the cache-client from the bw's list (client can be a image or a html page) Return: 0 if found, 1 otherwise.
Definition at line 149 of file bw.c.
References dList_find(), dList_remove_fast(), BrowserWindow::ImageClients, INT2VOIDP, BrowserWindow::NumImagesGot, and BrowserWindow::RootClients.
Referenced by a_Bw_close_client(), a_Cache_process_dbuf(), and Cache_process_queue().
void a_Bw_remove_doc | ( | BrowserWindow * | bw, |
void * | vdoc | ||
) |
Remove a document from the bw's list.
Definition at line 263 of file bw.c.
References dList_find(), dList_remove_fast(), and BrowserWindow::Docs.
Referenced by DilloHtml::~DilloHtml().
void a_Bw_stop_clients | ( | BrowserWindow * | bw, |
int | flags | ||
) |
Stop the active clients of this bw's top page.
Note: rendering stops, but the cache continues to be fed.
Definition at line 182 of file bw.c.
References a_Capi_stop_client(), BW_Force, BW_Img, BW_Root, dList_nth_data(), dList_remove_fast(), BrowserWindow::ImageClients, BrowserWindow::RootClients, and VOIDP2INT.
Referenced by a_UIcmd_close_bw(), a_UIcmd_stop(), and Nav_open_url().