2016-02-06 23:48:51 +01:00
|
|
|
struct _favicon
|
|
|
|
{
|
|
|
|
DOWNLOADER favget;
|
|
|
|
void get();
|
|
|
|
void draw();
|
|
|
|
} favicon;
|
|
|
|
|
|
|
|
void _favicon::get(dword url)
|
|
|
|
{
|
|
|
|
if (url==NULL) || (!favget.Start(url)) {
|
|
|
|
favget.Stop();
|
|
|
|
favget.bufpointer = NULL;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
while (favget.state!=STATE_COMPLETED) favget.MonitorProgress();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void _favicon::draw(int x,y)
|
|
|
|
{
|
|
|
|
dword favicon_data_decoded;
|
|
|
|
if (favget.bufpointer) {
|
2018-05-20 16:03:53 +02:00
|
|
|
img_decode stdcall (favget.bufpointer, favget.httpd.content_length, 0);
|
2016-02-06 23:48:51 +01:00
|
|
|
if (EAX==0) return;
|
|
|
|
favicon_data_decoded = EAX;
|
|
|
|
img_draw stdcall(favicon_data_decoded, x,y, 16, 16, 0, 0);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
_PutImage(x,y,16,16,#blank_icon);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
unsigned char blank_icon[768] = {
|
|
|
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
|
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 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