Rev 3129 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3067 | 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 |
||
3129 | leency | 9 | #define INPUT_CH 307 |
10 | #define INPUT_BT 308 |
||
3067 | leency | 11 | #define ID1 178 |
12 | #define ID2 177 |
||
13 | |||
14 | #define _WIN 0 |
||
15 | #define _DOS 1 |
||
16 | #define _KOI 2 |
||
17 | #define _UTF 3 |
||
18 | |||
19 | |||
20 | dword get_URL_part(int len) { |
||
21 | char temp1[sizeof(URL)]; |
||
22 | strcpy(#temp1, #URL); |
||
23 | temp1[len] = 0x00; |
||
24 | return #temp1; |
||
25 | } |
||
26 | |||
27 | inline byte chTag(dword text) {return strcmp(#tag,text);} |
||
28 | |||
29 | |||
30 | void GetURLfromPageLinks(int id) |
||
31 | { |
||
32 | int i, j = 0; |
||
33 | for (i = 0; i <= id - 401; i++) |
||
34 | { |
||
35 | do |
||
36 | { |
||
37 | j++; |
||
38 | if (j>=strlen(#page_links)) return; //не самое удачное решение |
||
39 | } |
||
40 | while (page_links[j] <>'|'); |
||
41 | } |
||
42 | page_links[j] = 0x00; |
||
43 | strcpy(#URL, #page_links+strrchr(#page_links, '|')); |
||
44 | } |
||
45 | |||
46 | |||
47 | //У нас нет наклонных шрифтов, поэтому делаем костыль из |
||
48 | //палочек для мороженого и жевательной резинки: |
||
49 | //Снимаем область экрана и выводим её обратно полосками со смещением, |
||
50 | //что даёт перекос картинки |
||
51 | //При наличии фона и т.п. проявится вся костыльность решения :) |
||
52 | |||
53 | inline void Skew(dword x,y,w,h) |
||
54 | { |
||
55 | dword italic_buf; |
||
56 | int tile_height=2, //будем выводить двухпиксельными полосками |
||
57 | shift=-2, //с двухпиксельным смещением |
||
58 | i, skin_height; |
||
59 | |||
60 | italic_buf = mem_Alloc(w*h*3); |
||
61 | skin_height = GetSkinHeight(); |
||
62 | CopyScreen(italic_buf, x+Form.left+2, y+Form.top+skin_height, w, h); |
||
63 | |||
64 | FOR (i=0;i*tile_height |
||
3363 | leency | 65 | _PutImage(x+shift-i+1,i*tile_height+y, w,tile_height, w*3*tile_height*i+italic_buf); |
3067 | leency | 66 | |
67 | mem_Free(italic_buf); |
||
68 | } |