32#define DW2TB(dw) ((Textblock*)dw)
46 PlainLinkReceiver plainReceiver;
48 void addLine(
char *Buf,
uint_t BufSize);
62 void write(
void *Buf,
uint_t BufSize,
int Eof);
92 plainReceiver.plain =
this;
105 styleEngine.startElement (
"body", bw);
106 styleEngine.startElement (
"pre", bw);
120DilloPlain::~DilloPlain()
122 _MSG(
"::~DilloPlain()\n");
129bool DilloPlain::PlainLinkReceiver::press (
Widget *widget,
int,
int,
int,
int,
132 _MSG(
"DilloPlain::PlainLinkReceiver::buttonPress\n");
141void DilloPlain::addLine(
char *Buf,
uint_t BufSize)
145 char *end = Buf + BufSize;
148 sprintf(buf,
"L%ld", currentLine);
155 assert ((
uint_t)len <
sizeof(buf));
171void DilloPlain::write(
void *Buf,
uint_t BufSize,
int Eof)
176 _MSG(
"DilloPlain::write Eof=%d\n", Eof);
178 Start = (
char*)Buf + Start_Ofs;
179 MaxBytes = BufSize - Start_Ofs;
181 while ( i < MaxBytes ) {
184 if (Start[i] ==
'\n' || Start[i] ==
'\r')
191 addLine(Start + i - len, len);
192 if (Start[i] ==
'\r' && Start[i + 1] ==
'\n') ++i;
193 if (i < MaxBytes) ++i;
199 Start_Ofs += i - len;
201 addLine(Start + i - len, len);
214 DilloPlain *plain =
new DilloPlain(web->
bw);
217 *Data = (
void*)plain;
219 return (
void*)plain->dw;
224 _MSG(
"a_Plain_free! %p\n", data);
225 delete ((DilloPlain *)data);
233 DilloPlain *plain = (DilloPlain*)Client->
CbData;
237 plain->write(Client->
Buf, Client->
BufSize, 1);
241 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)