Rev 7425 | Rev 7437 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7425 | Rev 7428 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | _http http = {0, 0, 0, 0, 0, 0, 0}; |
30 | _http http = {0, 0, 0, 0, 0, 0, 0}; |
Line 31... | Line 31... | ||
31 | 31 | ||
Line 32... | Line 32... | ||
32 | char homepage[] = FROM "html\\homepage.htm""\0"; |
32 | char homepage[] = FROM "html\\homepage.htm""\0"; |
33 | 33 | ||
34 | #ifdef LANG_RUS |
34 | #ifdef LANG_RUS |
35 | char version[]="¥ªáâ®¢ë© ¡à 㧥à 1.8b"; |
35 | char version[]="¥ªáâ®¢ë© ¡à 㧥à 1.8c"; |
36 | ?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
36 | ?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
37 | ?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
37 | ?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
38 | char loading[] = " £à㧪 áâà ¨æë... |
38 | char loading[] = " £à㧪 áâà ¨æë... |
Line 45... | Line 45... | ||
45 | ¥¥¤¦¥à § £à㧮ª"; |
45 | ¥¥¤¦¥à § £à㧮ª"; |
46 | char link_menu[] = |
46 | char link_menu[] = |
47 | "®¯¨à®¢ âì áá뫪ã |
47 | "®¯¨à®¢ âì áá뫪ã |
48 | ª ç âì ᮤ¥à¦¨¬®¥ áá뫪¨"; |
48 | ª ç âì ᮤ¥à¦¨¬®¥ áá뫪¨"; |
49 | #else |
49 | #else |
50 | char version[]="Text-based Browser 1.8"; |
50 | char version[]="Text-based Browser 1.8c"; |
51 | ?define IMAGES_CACHE_CLEARED "Images cache cleared" |
51 | ?define IMAGES_CACHE_CLEARED "Images cache cleared" |
52 | ?define T_LAST_SLIDE "This slide is the last" |
52 | ?define T_LAST_SLIDE "This slide is the last" |
53 | char loading[] = "Loading... |
53 | char loading[] = "Loading... |
54 | char page_not_found[] = FROM "html\\page_not_found_en.htm""\0"; |
54 | char page_not_found[] = FROM "html\\page_not_found_en.htm""\0"; |
55 | char accept_language[]= "Accept-Language: en\n"; |
55 | char accept_language[]= "Accept-Language: en\n"; |
Line 113... | Line 113... | ||
113 | 113 | ||
114 | char editURL[sizeof(URL)]; |
114 | char editURL[sizeof(URL)]; |
115 | int mouse_twb; |
115 | int mouse_twb; |
Line -... | Line 116... | ||
- | 116 | edit_box address_box = {250,60,30,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(URL),#editURL,#mouse_twb,2,19,19}; |
|
Line 116... | Line 117... | ||
116 | edit_box address_box = {250,60,30,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(URL),#editURL,#mouse_twb,2,19,19}; |
117 | |
117 | 118 | #define SKIN_Y 24 |
|
118 | 119 | ||
119 | void main() |
120 | void main() |
120 | { |
121 | { |
121 | int i; |
122 | int i; |
122 | load_dll(boxlib, #box_lib_init,0); |
123 | load_dll(boxlib, #box_lib_init,0); |
123 | load_dll(libio, #libio_init,1); |
124 | load_dll(libio, #libio_init,1); |
124 | load_dll(libimg, #libimg_init,1); |
125 | load_dll(libimg, #libimg_init,1); |
125 | load_dll(libHTTP, #http_lib_init,1); |
126 | load_dll(libHTTP, #http_lib_init,1); |
126 | load_dll(iconv_lib, #iconv_open,0); |
127 | load_dll(iconv_lib, #iconv_open,0); |
127 | Libimg_LoadImage(#skin, abspath("wv_skin.png")); |
128 | Libimg_LoadImage(#skin, "/sys/toolbar.png"); |
128 | wv_progress_bar.progress_color = 0x72B7EB; |
129 | wv_progress_bar.progress_color = 0x72B7EB; |
129 | CreateDir("/tmp0/1/downloads"); |
130 | CreateDir("/tmp0/1/downloads"); |
Line 251... | Line 252... | ||
251 | DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, border_color); |
252 | DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, border_color); |
252 | SetElementSizes(); |
253 | SetElementSizes(); |
253 | DrawRectangle(address_box.left-3, address_box.top-3, address_box.width+5, 25,border_color); |
254 | DrawRectangle(address_box.left-3, address_box.top-3, address_box.width+5, 25,border_color); |
254 | DefineButton(address_box.left-52, address_box.top-2, 24, skin.h-2, BACK_BUTTON+BT_HIDE, 0); |
255 | DefineButton(address_box.left-52, address_box.top-2, 24, skin.h-2, BACK_BUTTON+BT_HIDE, 0); |
255 | DefineButton(address_box.left-27, address_box.top-2, 24, skin.h-2, FORWARD_BUTTON+BT_HIDE, 0); |
256 | DefineButton(address_box.left-27, address_box.top-2, 24, skin.h-2, FORWARD_BUTTON+BT_HIDE, 0); |
256 | img_draw stdcall(skin.image, address_box.left-53, address_box.top-3, 51, skin.h, 3, 0); |
257 | img_draw stdcall(skin.image, address_box.left-53, address_box.top-3, 51, skin.h, 0, SKIN_Y); |
257 | DefineButton(address_box.left+address_box.width+1, address_box.top-3, 16, skin.h-1, REFRESH_BUTTON+BT_HIDE+BT_NOFRAME, 0); |
258 | DefineButton(address_box.left+address_box.width+1, address_box.top-3, 16, skin.h-1, REFRESH_BUTTON+BT_HIDE+BT_NOFRAME, 0); |
258 | DefineButton(Form.cwidth-27, address_box.top-3, 23, skin.h-1, SANDWICH_BUTTON+BT_HIDE, 0); |
259 | DefineButton(Form.cwidth-27, address_box.top-3, 23, skin.h-1, SANDWICH_BUTTON+BT_HIDE, 0); |
259 | img_draw stdcall(skin.image, Form.cwidth-24, address_box.top-3, 17, skin.h, 105, 0); |
260 | img_draw stdcall(skin.image, Form.cwidth-24, address_box.top-3, 17, skin.h, 102, SKIN_Y); |
260 | DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, col_bg); |
261 | DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, col_bg); |
261 | DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, border_color); |
262 | DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, border_color); |
262 | if (!header) |
263 | if (!header) |
263 | OpenPage(); |
264 | OpenPage(); |
264 | else { |
265 | else { |
Line 412... | Line 413... | ||
412 | DrawEditBoxWebView(); |
413 | DrawEditBoxWebView(); |
413 | return; |
414 | return; |
414 | } |
415 | } |
415 | if (!strncmp(#URL,"http:",5)) || (!strncmp(#URL,"https://",8)) |
416 | if (!strncmp(#URL,"http:",5)) || (!strncmp(#URL,"https://",8)) |
416 | { |
417 | { |
417 | img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, 131, 0); |
418 | img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, 68, SKIN_Y); |
Line 418... | Line 419... | ||
418 | 419 | ||
419 | if (!strncmp(#URL,"http:",5)) { |
420 | if (!strncmp(#URL,"http:",5)) { |
420 | http.get(#URL); |
421 | http.get(#URL); |
421 | } |
422 | } |
Line 448... | Line 449... | ||
448 | } |
449 | } |
449 | } |
450 | } |
Line 450... | Line 451... | ||
450 | 451 | ||
451 | DrawEditBoxWebView() |
452 | DrawEditBoxWebView() |
- | 453 | { |
|
452 | { |
454 | int skin_x_offset; |
453 | DrawBar(address_box.left-2, address_box.top-2, address_box.width+3, 2, address_box.color); |
455 | DrawBar(address_box.left-2, address_box.top-2, address_box.width+3, 2, address_box.color); |
454 | DrawBar(address_box.left-2, address_box.top, 2, 22, address_box.color); |
456 | DrawBar(address_box.left-2, address_box.top, 2, 22, address_box.color); |
455 | address_box.size = address_box.pos = address_box.shift = address_box.shift_old = strlen(#editURL); |
457 | address_box.size = address_box.pos = address_box.shift = address_box.shift_old = strlen(#editURL); |
456 | address_box.offset = 0; |
458 | address_box.offset = 0; |
457 | edit_box_draw stdcall(#address_box); |
459 | edit_box_draw stdcall(#address_box); |
458 | if (http.transfer > 0) EAX = 131; else EAX = 54; |
460 | if (http.transfer > 0) skin_x_offset = 68; else skin_x_offset = 51; |
459 | img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, EAX, 0); |
461 | img_draw stdcall(skin.image, address_box.left+address_box.width+1, address_box.top-3, 17, skin.h, skin_x_offset, SKIN_Y); |
Line 460... | Line 462... | ||
460 | } |
462 | } |
461 | 463 |