Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
2413 leency 1
//Є­®ЇЄЁ
2811 leency 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
2413 leency 11
 
2811 leency 12
#define _WIN  0
13
#define _DOS  1
14
#define _KOI  2
15
#define _UTF  3
2413 leency 16
 
17
 
2874 leency 18
dword get_URL_part(int len) {
19
	char temp1[sizeof(URL)];
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
{
2839 leency 30
	int i, 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;
2839 leency 37
	strcpy(#URL, #page_links[strrchr(#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, //с двухпиксельным смещением
2874 leency 52
	i, skin_height;
2413 leency 53
 
2793 leency 54
	italic_buf = mem_Alloc(w*h*3);
2874 leency 55
 	skin_height = GetSkinHeight();
56
	CopyScreen(italic_buf, x+Form.left+2, y+Form.top+skin_height, w, h);
2413 leency 57
 
2839 leency 58
	FOR (i=0;i*tile_height
2793 leency 59
		PutImage(w*3*tile_height*i+italic_buf,w,tile_height,x+shift-i+1,i*tile_height+y);
2839 leency 60
 
2793 leency 61
	mem_Free(italic_buf);
2413 leency 62
}