Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
3058 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
	{
3061 leency 33
		do
34
		{
35
			j++;
36
			if (j>=strlen(#page_links)) return; //не самое удачное решение
37
		}
2444 leency 38
		while (page_links[j] <>'|');
39
	}
40
	page_links[j] = 0x00;
3061 leency 41
	strcpy(#URL, #page_links+strrchr(#page_links, '|'));
2413 leency 42
}
43
 
44
 
2793 leency 45
//У нас нет наклонных шрифтов, поэтому делаем костыль из
46
//палочек для мороженого и жевательной резинки:
47
//Снимаем область экрана и выводим её обратно полосками со смещением,
48
//что даёт перекос картинки
49
//При наличии фона и т.п. проявится вся костыльность решения :)
2444 leency 50
 
2413 leency 51
inline void Skew(dword x,y,w,h)
52
{
2793 leency 53
	dword italic_buf;
54
	int tile_height=2, //будем выводить двухпиксельными полосками
55
	shift=-2, //с двухпиксельным смещением
2874 leency 56
	i, skin_height;
2413 leency 57
 
2793 leency 58
	italic_buf = mem_Alloc(w*h*3);
2874 leency 59
 	skin_height = GetSkinHeight();
60
	CopyScreen(italic_buf, x+Form.left+2, y+Form.top+skin_height, w, h);
2413 leency 61
 
2839 leency 62
	FOR (i=0;i*tile_height
2793 leency 63
		PutImage(w*3*tile_height*i+italic_buf,w,tile_height,x+shift-i+1,i*tile_height+y);
2839 leency 64
 
2793 leency 65
	mem_Free(italic_buf);
2413 leency 66
}