Subversion Repositories Kolibri OS

Rev

Rev 2793 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2413 leency 1
//Є­®ЇЄЁ
2
#define BACK		300
3
#define FORWARD		301
4
#define REFRESH		302
5
#define HOME		303
6
#define NEWTAB		304
7
#define GOTOURL		305
8
#define SEARCHWEB	306
9
#define ID1		178
10
#define ID2		177
11
 
12
#define WINDOWS	0
13
#define DOS		1
14
#define KOI		2
15
#define UTF		3
16
 
17
 
18
dword get_URL_part(byte len) {
19
	char temp1[1000];
2810 leency 20
	strcpy(#temp1, #URL);
2413 leency 21
	temp1[len] = 0x00;
22
	return #temp1;
23
}
24
 
2444 leency 25
inline byte chTag(dword text) {return strcmp(#tag,text);}
26
 
27
 
2793 leency 28
void GetURLfromPageLinks(int id)
2413 leency 29
{
2810 leency 30
	int j = 0;
2444 leency 31
	for (i = 0; i <= id - 401; i++)
32
	{
33
		do j++;
34
		while (page_links[j] <>'|');
35
	}
36
	page_links[j] = 0x00;
2810 leency 37
	strcpy(#URL, #page_links[find_symbol(#page_links, '|')]);
2413 leency 38
}
39
 
40
 
2793 leency 41
//У нас нет наклонных шрифтов, поэтому делаем костыль из
42
//палочек для мороженого и жевательной резинки:
43
//Снимаем область экрана и выводим её обратно полосками со смещением,
44
//что даёт перекос картинки
45
//При наличии фона и т.п. проявится вся костыльность решения :)
2444 leency 46
 
2413 leency 47
inline void Skew(dword x,y,w,h)
48
{
2793 leency 49
	dword italic_buf;
50
	int tile_height=2, //будем выводить двухпиксельными полосками
51
	shift=-2, //с двухпиксельным смещением
52
	i;
2413 leency 53
 
2793 leency 54
	italic_buf = mem_Alloc(w*h*3);
2413 leency 55
 
2793 leency 56
	CopyScreen(italic_buf, x+Form.left+2, GetSkinWidth()+y+Form.top, w, h);
2413 leency 57
 
2793 leency 58
	FOR (i=0;i*tile_height
59
		PutImage(w*3*tile_height*i+italic_buf,w,tile_height,x+shift-i+1,i*tile_height+y);
60
	}
61
	mem_Free(italic_buf);
2413 leency 62
}