forked from KolibriOS/kolibrios
424ffe7057
git-svn-id: svn://kolibrios.org@2811 a494cfbc-eb01-0410-851d-a64ba20cac60
63 lines
1.4 KiB
C
63 lines
1.4 KiB
C
//ª®¯ª¨
|
|
#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 _WIN 0
|
|
#define _DOS 1
|
|
#define _KOI 2
|
|
#define _UTF 3
|
|
|
|
|
|
dword get_URL_part(byte len) {
|
|
char temp1[1000];
|
|
strcpy(#temp1, #URL);
|
|
temp1[len] = 0x00;
|
|
return #temp1;
|
|
}
|
|
|
|
inline byte chTag(dword text) {return strcmp(#tag,text);}
|
|
|
|
|
|
void GetURLfromPageLinks(int id)
|
|
{
|
|
int j = 0;
|
|
for (i = 0; i <= id - 401; i++)
|
|
{
|
|
do j++;
|
|
while (page_links[j] <>'|');
|
|
}
|
|
page_links[j] = 0x00;
|
|
strcpy(#URL, #page_links[find_symbol(#page_links, '|')]);
|
|
}
|
|
|
|
|
|
//Ó íàñ íåò íàêëîííûõ øðèôòîâ, ïîýòîìó äåëàåì êîñòûëü èç
|
|
//ïàëî÷åê äëÿ ìîðîæåíîãî è æåâàòåëüíîé ðåçèíêè:
|
|
//Ñíèìàåì îáëàñòü ýêðàíà è âûâîäèì å¸ îáðàòíî ïîëîñêàìè ñî ñìåùåíèåì,
|
|
//÷òî äà¸ò ïåðåêîñ êàðòèíêè
|
|
//Ïðè íàëè÷èè ôîíà è ò.ï. ïðîÿâèòñÿ âñÿ êîñòûëüíîñòü ðåøåíèÿ :)
|
|
|
|
inline void Skew(dword x,y,w,h)
|
|
{
|
|
dword italic_buf;
|
|
int tile_height=2, //áóäåì âûâîäèòü äâóõïèêñåëüíûìè ïîëîñêàìè
|
|
shift=-2, //ñ äâóõïèêñåëüíûì ñìåùåíèåì
|
|
i;
|
|
|
|
italic_buf = mem_Alloc(w*h*3);
|
|
|
|
CopyScreen(italic_buf, x+Form.left+2, GetSkinWidth()+y+Form.top, w, h);
|
|
|
|
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);
|
|
}
|