32#define DW2TB(dw) ((Textblock*)dw)
46 PlainLinkReceiver plainReceiver;
48 void addLine(
char *Buf,
uint_t BufSize);
61 void write(
void *Buf,
uint_t BufSize,
int Eof);
91 plainReceiver.plain =
this;
103 styleEngine.startElement (
"body", bw);
104 styleEngine.startElement (
"pre", bw);
118DilloPlain::~DilloPlain()
120 _MSG(
"::~DilloPlain()\n");
127bool DilloPlain::PlainLinkReceiver::press (
Widget *widget,
int,
int,
int,
int,
130 _MSG(
"DilloPlain::PlainLinkReceiver::buttonPress\n");
139void DilloPlain::addLine(
char *Buf,
uint_t BufSize)
143 char *end = Buf + BufSize;
149 assert ((
uint_t)len <
sizeof(buf));
165void DilloPlain::write(
void *Buf,
uint_t BufSize,
int Eof)
170 _MSG(
"DilloPlain::write Eof=%d\n", Eof);
172 Start = (
char*)Buf + Start_Ofs;
173 MaxBytes = BufSize - Start_Ofs;
175 while ( i < MaxBytes ) {
178 if (Start[i] ==
'\n' || Start[i] ==
'\r')
185 addLine(Start + i - len, len);
186 if (Start[i] ==
'\r' && Start[i + 1] ==
'\n') ++i;
187 if (i < MaxBytes) ++i;
193 Start_Ofs += i - len;
195 addLine(Start + i - len, len);
208 DilloPlain *plain =
new DilloPlain(web->
bw);
211 *Data = (
void*)plain;
213 return (
void*)plain->dw;
218 _MSG(
"a_Plain_free! %p\n", data);
219 delete ((DilloPlain *)data);
227 DilloPlain *plain = (DilloPlain*)Client->
CbData;
231 plain->write(Client->
Buf, Client->
BufSize, 1);
235 plain->write(Client->
Buf, Client->
BufSize, 0);
void a_Bw_close_client(BrowserWindow *bw, int ClientKey)
Close a cache-client upon successful retrieval.
void(* CA_Callback_t)(int Op, CacheClient_t *Client)
Callback type for cache clients.
This class provides the glue between HTML parser and CSS subsystem.
A Widget for rendering text blocks, i.e.
The central class for managing and drawing a widget tree.
void connectLink(LinkReceiver *receiver)
static Style * widgetStyle
int a_Misc_expand_tabs(char **start, char *end, char *buf, int buflen)
Takes a string and converts any tabs to spaces.
The core of Dw is defined in this namespace.
Dw is in this namespace, or sub namespaces of this one.
void * a_Plain_text(const char *type, void *P, CA_Callback_t *Call, void **Data)
Set callback function and callback data for "text/" MIME major-type.
void a_Plain_free(void *data)
static void Plain_callback(int Op, CacheClient_t *Client)
This function is a cache client.
DilloPrefs prefs
Global Data.
Contains the specific data for a single window.
Data structure for cache clients.
int Key
Primary Key for this client.
void * CbData
Client function data.
uint_t BufSize
Valid size of cache-data.
void * Buf
Pointer to cache-data.
BrowserWindow * bw
The requesting browser window [reference].
void a_UIcmd_page_popup(void *vbw, bool_t has_bugs, void *v_cssUrls)