Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
bw.h
Go to the documentation of this file.
1/*
2 * File: bw.h
3 *
4 * Copyright (C) 2006-2011 Jorge Arellano Cid <jcid@dillo.org>
5 * Copyright (C) 2024 Rodrigo Arias Mallo <rodarima@gmail.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef __BW_H__
14#define __BW_H__
15
16#include "url.h" /* for DilloUrl */
17
18/*
19 * Flag Defines for a_Bw_stop_clients()
20 */
21#define BW_Root (1) /* Root URLs */
22#define BW_Img (2) /* Image URLs */
23#define BW_Force (4) /* Stop connection too */
24
25
76
77
78#ifdef __cplusplus
79extern "C" {
80#endif /* __cplusplus */
81
82
83void a_Bw_init(void);
85void a_Bw_free(BrowserWindow *bw);
87int a_Bw_num(void);
88
89void a_Bw_add_client(BrowserWindow *bw, int Key, int Root);
90int a_Bw_remove_client(BrowserWindow *bw, int ClientKey);
91void a_Bw_close_client(BrowserWindow *bw, int ClientKey);
92void a_Bw_stop_clients(BrowserWindow *bw, int flags);
93void a_Bw_add_doc(BrowserWindow *bw, void *vdoc);
95void *a_Bw_get_url_doc(BrowserWindow *bw, const DilloUrl *Url);
96void a_Bw_remove_doc(BrowserWindow *bw, void *vdoc);
97void a_Bw_add_url(BrowserWindow *bw, const DilloUrl *Url);
99/* expect API */
100void a_Bw_expect(BrowserWindow *bw, const DilloUrl *Url);
104
105typedef void (*BwCallback_t)(BrowserWindow *bw, const void *data);
106
107#ifdef __cplusplus
108}
109#endif /* __cplusplus */
110
111#endif /* __BROWSER_H__ */
112
bool_t a_Bw_expecting(BrowserWindow *bw)
Definition bw.c:334
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,...
Definition bw.c:149
void a_Bw_free(BrowserWindow *bw)
Free resources associated to a bw.
Definition bw.c:89
void a_Bw_close_client(BrowserWindow *bw, int ClientKey)
Close a cache-client upon successful retrieval.
Definition bw.c:167
void(* BwCallback_t)(BrowserWindow *bw, const void *data)
Definition bw.h:105
void a_Bw_expect(BrowserWindow *bw, const DilloUrl *Url)
Definition bw.c:322
void a_Bw_add_url(BrowserWindow *bw, const DilloUrl *Url)
Add an URL to the browser window's list.
Definition bw.c:209
BrowserWindow * a_Bw_get(int i)
Return a bw by index.
Definition bw.c:313
void a_Bw_stop_clients(BrowserWindow *bw, int flags)
Stop the active clients of this bw's top page.
Definition bw.c:182
void * a_Bw_get_current_doc(BrowserWindow *bw)
Get current document.
Definition bw.c:231
void a_Bw_add_client(BrowserWindow *bw, int Key, int Root)
Add a reference to a cache-client.
Definition bw.c:128
void a_Bw_init(void)
Initialize global data.
Definition bw.c:36
void a_Bw_cleanup(BrowserWindow *bw)
Empty RootClients, ImageClients and PageUrls lists and reset progress bar data.
Definition bw.c:277
void a_Bw_cancel_expect(BrowserWindow *bw)
Definition bw.c:328
void * a_Bw_get_url_doc(BrowserWindow *bw, const DilloUrl *Url)
Get document by URL.
Definition bw.c:250
const DilloUrl * a_Bw_expected_url(BrowserWindow *bw)
Definition bw.c:339
int a_Bw_num(void)
Definition bw.c:305
BrowserWindow * a_Bw_new(void)
Create a new browser window and return it.
Definition bw.c:47
void a_Bw_remove_doc(BrowserWindow *bw, void *vdoc)
Remove a document from the bw's list.
Definition bw.c:263
void a_Bw_add_doc(BrowserWindow *bw, void *vdoc)
Add a document to the browser window's list.
Definition bw.c:221
unsigned char bool_t
Definition d_size.h:21
Contains the specific data for a single window.
Definition bw.h:27
Dlist * ImageClients
Image Keys for all active connections in the window.
Definition bw.h:42
int NumImagesGot
Number of images already loaded.
Definition bw.h:46
int redirect_level
Counter for the number of hops on a redirection.
Definition bw.h:63
int meta_refresh_status
Url for zero-delay redirections in the META element.
Definition bw.h:66
Dstr * page_bugs
Definition bw.h:71
Dlist * RootClients
A list of active cache clients in the window (The primary Key)
Definition bw.h:40
Dlist * Docs
Root document(s).
Definition bw.h:37
void * render_layout
All the rendering is done by this.
Definition bw.h:34
float zoom
Definition bw.h:74
void * ui
Pointer to the UI object this bw belongs to.
Definition bw.h:29
Dlist * nav_stack
The navigation stack (holds indexes to history list)
Definition bw.h:53
int NumImages
Number of images in the page.
Definition bw.h:44
int nav_stack_ptr
'nav_stack_ptr' refers to what's being displayed
Definition bw.h:55
DilloUrl * meta_refresh_url
Definition bw.h:67
Dlist * PageUrls
List of all Urls requested by this page (and its types)
Definition bw.h:50
int num_page_bugs
HTML-bugs detected at parse time.
Definition bw.h:70
DilloUrl * nav_expect_url
When the user clicks a link, the URL isn't pushed directly to history; nav_expect_url holds it until ...
Definition bw.h:59
int NumPendingStyleSheets
Number of not yet arrived style sheets.
Definition bw.h:48
Definition url.h:88
Definition dlib.h:131
Definition dlib.h:102
Parse and normalize all URL's inside Dillo.