kolibrios-fun/programs/network/htmlv/browser/include/some_code.h
Kirill Lipatov (Leency) 823a0a9a8f HTMLv 0.75: new futures and bags.
git-svn-id: svn://kolibrios.org@2413 a494cfbc-eb01-0410-851d-a64ba20cac60
2012-02-27 13:48:04 +00:00

70 lines
1.6 KiB
C
Raw Blame History

//ª­®¯ª¨
#define BACK 300
#define FORWARD 301
#define REFRESH 302
#define HOME 303
#define NEWTAB 304
#define GOTOURL 305
#define SEARCHWEB 306
#define ID1 178
#define ID2 177
#define WINDOWS 0
#define DOS 1
#define KOI 2
#define UTF 3
dword get_URL_part(byte len) {
char temp1[1000];
copystr(#URL, #temp1);
temp1[len] = 0x00;
return #temp1;
}
inline fastcall CopyScreen(dword EBX, ECX, EDX)
{
EAX = 36;
$int 0x40;
}
inline byte chTag(dword text) {return strcmp(#tag,text);}
//“ ­ á ­¥â ­ ª«®­­ëå èà¨ä⮢, ¯®í⮬㠤¥« ¥¬ ª®áâë«ì ¨§
//¯ «®ç¥ª ¤«ï ¬®à®¦¥­®£® ¨ ¦¥¢ â¥«ì­®© १¨­ª¨:
//‘­¨¬ ¥¬ ®¡« áâì íªà ­  ¨ ¢ë¢®¤¨¬ ¥ñ ®¡à â­® ¯®«®áª ¬¨ ᮠᬥ饭¨¥¬,
//çâ® ¤ ñâ ¯¥à¥ª®á ª à⨭ª¨
//<2F>ਠ­ «¨ç¨¨ ä®­  ¨ â.¯. ¯à®ï¢¨âáï ¢áï ª®áâë«ì­®áâì à¥è¥­¨ï :)
//ç áâì ¤ ­­ëå 㦥 ¯®«ã祭  ¢ TBW - skin_width, Form.top, ¯®¤ª«î祭¨¥ memory
inline void Skew(dword x,y,w,h)
{
dword italic_buf;
int tile_height=2,//¡ã¤¥¬ ¢ë¢®¤¨âì ¤¢ã寨ªá¥«ì­ë¬¨ ¯®«®áª ¬¨
i, skin_width,
shift=-2;
italic_buf = mem_Alloc(w*h*3);
skin_width = GetSkinWidth();
CopyScreen(italic_buf, w * 65536 + h, x + Form.left + 2 * 65536 + y + Form.top + skin_width);
FOR (i=0;i*tile_height<h;i++){
PutImage(w*3*tile_height*i+italic_buf,w,tile_height,x+shift-i+1,i*tile_height+y);
}
mem_Free(italic_buf);
}
void GetURLfromPageLinks(int id) //ñòîëüêî áðåäà, ïîòîìó ÷òî íåëüçÿ ñîçäàòü ìàññèâ ñòðèíãîâ
{
j = 0;
for (i = 0; i <= id - 401; i++)
{
do j++;
while (page_links[j] <>'|');
}
page_links[j] = 0x00;
copystr(#page_links[find_symbol(#page_links, '|')], #URL);
}