/programs/cmm/aelia/aelia.c |
---|
61,6 → 61,7 |
#include "favicon.h" |
#include "ini.h" |
#include "tag.h" |
#include "gui.h" |
#include "label.h" |
#include "link.h" |
/programs/cmm/aelia/prepare_page.h |
---|
68,68 → 68,6 |
= = |
========================================================*/ |
/* <title> <meta encoding> <a hrf=""> <img src="" alt=""> <h1>..<h6> <b> <u> <s> <pre> */ |
struct _DOM { |
dword start; |
dword end; |
dword len; |
}; |
struct _style { |
bool b, u, i, s; |
bool h1, h2, h3, h4, h5, h6; |
bool a; |
bool pre; |
bool ignore; |
dword color; |
void clear(); |
} style; |
void _style::clear() |
{ |
b=u=i=s=0; |
h1=h2=h3=h4=h5=h6=0; |
a=0; |
pre=0; |
ignore=0; |
color=0; |
} |
struct _text { |
dword start; |
int x, y; |
}; |
struct _tag { |
dword start; |
dword name; |
dword param[10]; |
dword value[10]; |
void parce(); |
int nameis(); |
void clear(); |
}; |
void _tag::parce() |
{ |
dword o = name = start; |
while (ESBYTE[o]!=' ') && (ESBYTE[o]) o++; //searching for a space after tag name |
ESBYTE[o] = '\0'; |
strlwr(name); |
} |
int _tag::nameis(dword _in_tag_name) |
{ |
if (name) && (strcmp(_in_tag_name, name)==0) return true; |
return false; |
} |
void _tag::clear() |
{ |
start=name=0; |
} |
#define HTML_PADDING_X 8; |
#define HTML_PADDING_Y 5; |
136,30 → 74,27 |
void ParceHtml(byte draw) |
{ |
dword DOM_start, DOM_end, DOM_len, DOM_pos; |
int stroka_x = HTML_PADDING_X; |
int stroka_y = HTML_PADDING_Y; |
dword line_break; |
byte ch, zeroch; |
_DOM DOM; |
_text text; |
_tag tag; |
dword DOM_pos; |
tag.clear(); |
style.clear(); |
/* Create DOM */ |
debugln("creating DOM"); |
DOM.len = strlen(io.buffer_data); |
DOM.start = malloc(DOM.len); |
DOM.end = DOM.start + DOM.len; |
strlcpy(DOM.start, io.buffer_data, DOM.len); |
//RemoveSpecialSymbols(DOM.start, DOM.len); |
//DOM.len = strlen(DOM.start); |
DOM_len = strlen(io.buffer_data); |
DOM_start = malloc(DOM_len); |
DOM_end = DOM_start + DOM_len; |
strlcpy(DOM_start, io.buffer_data, DOM_len); |
/* Parce DOM */ |
debugln("starting DOM parce..."); |
text.start = DOM.start; |
for (DOM_pos=DOM.start; DOM_pos<DOM.end; DOM_pos++) |
text.start = DOM_start; |
for (DOM_pos=DOM_start; DOM_pos<DOM_end; DOM_pos++) |
{ |
if (ESBYTE[DOM_pos]==0x0D) || (ESBYTE[DOM_pos]==0x0A) ESBYTE[DOM_pos]=' '; |
ch = ESBYTE[DOM_pos]; |
234,5 → 169,5 |
label.size.height = list.count+5*list.item_h; |
label.raw_size = 0; |
} |
free(DOM.start); |
free(DOM_start); |
} |
/programs/cmm/aelia/tag.h |
---|
0,0 → 1,105 |
struct _tag { |
dword start; |
dword name; |
dword param[10]; |
dword value[10]; |
void parce(); |
int nameis(); |
void clear(); |
}; |
void _tag::parce() |
{ |
dword o = name = start; |
while (ESBYTE[o]!=' ') && (ESBYTE[o]) o++; //searching for a space after tag name |
ESBYTE[o] = '\0'; |
strlwr(name); |
} |
int _tag::nameis(dword _in_tag_name) |
{ |
if (name) && (strcmp(_in_tag_name, name)==0) return true; |
return false; |
} |
void _tag::clear() |
{ |
start=name=0; |
} |
/* |
unsigned int GetNextParam() |
{ |
byte kavichki=0; |
int i = strlen(#tagparam) - 1; |
if (!tagparam) return 0; |
WHILE((i > 0) && ((tagparam[i] == '"') || (tagparam[i] == ' ') || (tagparam[i] == '\'') || (tagparam[i] == '/'))) |
{ |
IF (tagparam[i] == '"') || (tagparam[i] == '\'') kavichki=tagparam[i]; |
tagparam[i] = 0x00; |
i--; |
} |
if (kavichki) |
{ |
i=strrchr(#tagparam, kavichki); |
strlcpy(#val, #tagparam + i, sizeof(val)); |
} |
else |
{ |
WHILE((i > 0) && (tagparam[i] <>'=')) i--; //i=strrchr(#tagparam, '=')+1; |
i++; |
strlcpy(#val, #tagparam + i, sizeof(val)); |
WHILE (val[0] == ' ') strcpy(#val, #val+1); |
} |
tagparam[i] = 0x00; |
FOR ( ; ((tagparam[i] <>' ') && (i > 0); i--) |
{ |
IF (tagparam[i] == '=') //äåðçêàÿ çàãëóøêà |
tagparam[i + 1] = 0x00; |
} |
strlcpy(#attr, #tagparam + i + 1, sizeof(attr)); |
tagparam[i] = 0x00; |
strlwr(#attr); |
return 1; |
} |
*/ |
// |
// STYLE |
// |
struct _style { |
bool b, u, i, s; |
bool h1, h2, h3, h4, h5, h6; |
bool a; |
bool pre; |
bool ignore; |
dword color; |
void clear(); |
} style; |
void _style::clear() |
{ |
b=u=i=s=0; |
h1=h2=h3=h4=h5=h6=0; |
a=0; |
pre=0; |
ignore=0; |
color=0; |
} |
// |
// TEXT |
// |
struct _text { |
dword start; |
int x, y; |
}; |
/programs/cmm/lib/font.h |
---|
224,7 → 224,7 |
// wb |
if(b24(i)!=background) && (b24(i+3)==background) && (b24(i+line_w)==background) && (b24(i+3+line_w)!=background) |
{ |
dark_background = MixColors(background,b24(i),200); |
dark_background = MixColors(background,b24(i),210); |
DSDWORD[i+3] = DSDWORD[i+3] & 0xFF000000 | dark_background; |
DSDWORD[i+line_w] = DSDWORD[i+line_w] & 0xFF000000 | dark_background; |
} |
232,7 → 232,7 |
// bw |
else if(b24(i)==background) && (b24(i+3)!=background) && (b24(i+line_w)!=background) && (b24(i+3+line_w)==background) |
{ |
dark_background = MixColors(background,b24(i+3),200); |
dark_background = MixColors(background,b24(i+3),210); |
DSDWORD[i] = DSDWORD[i] & 0xFF000000 | dark_background; |
DSDWORD[i+3+line_w] = DSDWORD[i+3+line_w] & 0xFF000000 | dark_background; |
} |
/programs/cmm/lib/patterns/http_downloader.h |
---|
105,12 → 105,12 |
_in++; |
if(!strncmp(_in,"rd/",3)) return true; |
if(!strncmp(_in,"fd/",3)) return true; |
if(!strncmp(_in,"hd/",3)) return true; |
if(!strncmp(_in,"bd/",3)) return true; |
if(!strncmp(_in,"cd/",3)) return true; |
if(!strncmp(_in,"hd",2)) return true; |
if(!strncmp(_in,"bd",2)) return true; |
if(!strncmp(_in,"cd",2)) return true; |
if(!strncmp(_in,"sys/",4)) return true; |
if(!strncmp(_in,"tmp/",4)) return true; |
if(!strncmp(_in,"usbhd",6)) return true; |
if(!strncmp(_in,"usbhd",5)) return true; |
if(!strncmp(_in,"kolibrios",10)) return true; |
return false; |
} |
/programs/other/calc/trunk/calc.asm |
---|
676,8 → 676,6 |
jbe newbutton |
mcall , <253, 36>, <55, 22>, 2, 0xF0969D ; 'C' |
mcall , <236,53>, <DISPLAY_Y,DISPLAY_H>, 3, [sc.work] ; 'dec-bin-hex' |
mov esi, [sc.work_button] |
mov ecx, [sc.work_button_text] |
718,19 → 716,19 |
mcall 38, < DISPLAY_X+1, DISPLAY_W+DISPLAY_X-1>, <DISPLAY_Y+1, DISPLAY_Y+1>, 0xE0E0E0 ; internal shadow |
mcall , < DISPLAY_X+1, DISPLAY_X+1>, <DISPLAY_Y+2, DISPLAY_Y+DISPLAY_H-1>, ; internal shadow |
mcall 13, < DISPLAY_X+2, DISPLAY_W-2>, <DISPLAY_Y+2, DISPLAY_H-2>, 0xFFFfff ; background |
mcall 8, <236,53>, <DISPLAY_Y,DISPLAY_H>, 3, [sc.work] ; 'dec-bin-hex' |
mov ecx, [sc.work_text] |
or ecx, 0x40000000 |
mcall 4, <135,6>,,calc,1,[sc.work] |
mov ebx, 250 shl 16 + DISPLAY_Y+(DISPLAY_H-14)/2 |
mov edx, [display_type] |
shl edx, 2 |
add edx, display_type_text |
mov esi, 3 |
mov edi, [sc.work] |
mov ecx, [sc.work_text] |
or ecx, 0x10000000 |
mcall |
mcall 4,<250,DISPLAY_Y+(DISPLAY_H-14)/2> |
cmp [dsign], byte '+' |
je positive |
/skins/Leency/Blueberries/default.asm |
---|
3,12 → 3,12 |
SKIN_PARAMS \ |
height = bmp_center1.height,\ ; skin height |
margins = [6:5:43:3],\ ; margins [left:top:right:bottom] |
colors active = [binner=0xEDEBEB:\ ; border inner |
colors active = [binner=0xC8C8C8:\ ; border inner |
bouter=0x33383A:\ ; border outer |
bframe=0xEDEBEB],\ ; border middle |
colors inactive = [binner=0xEDEBEB:\ ; border inner |
bframe=0xC8C8C8],\ ; border middle |
colors inactive = [binner=0xC8C8C8:\ ; border inner |
bouter=0x747474:\ ; border outer |
bframe=0xEDEBEB],\ ; border middle |
bframe=0xC8C8C8],\ ; border middle |
dtp = 'default.dtp' ; dtp colors |
SKIN_BUTTONS \ |
/skins/Leency/Blueberries/default.dtp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/skins/Leency/Blueberries/default.dtp.asm |
---|
5,7 → 5,7 |
.work_3d_dark dd 0xAEA6A6 |
.work_3d_light dd 0xFBFBFB |
.window_title dd 0xF3F3F3 |
.work dd 0xEDEBEB |
.work dd 0xC8C8C8 |
.work_button dd 0xD9F382 |
.work_button_text dd 0x333333 |
.work_text dd 0x000000 |
/skins/Leency/Blueberries/right1.bmp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |