26,10 → 26,13 |
#include "..\lib\lib.obj\libimg_lib.h" |
#include "..\lib\lib.obj\http.h" |
|
//useful patterns |
#include "..\lib\patterns\libimg_load_skin.h" |
|
char homepage[] = FROM "html\homepage.htm"; |
|
#ifdef LANG_RUS |
char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 1.0 Beta 6.1"; |
char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 1.0 Beta 6.2"; |
?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
char loading[] = " £à㧪 áâà ¨æë...<br>"; |
36,7 → 39,7 |
char page_not_found[] = FROM "html\page_not_found_ru.htm"; |
char accept_language[]= "Accept-Language: ru\n"; |
#else |
char version[]=" Text-based Browser 1.0 Beta 6.1"; |
char version[]=" Text-based Browser 1.0 Beta 6.2"; |
?define IMAGES_CACHE_CLEARED "Images cache cleared" |
?define T_LAST_SLIDE "This slide is the last" |
char loading[] = "Loading...<br>"; |
85,20 → 88,12 |
|
enum { BACK=300, FORWARD, REFRESH, HOME, NEWTAB, GOTOURL, SEARCHWEB, INPUT_CH, INPUT_BT, BTN_UP, BTN_DOWN }; |
|
struct struct_skin { |
dword image, w, h; |
int Load(); |
} skin; |
libimg_image skin; |
|
int struct_skin::Load() |
int SetSkinColors() |
{ |
dword image_data; |
skin.image = load_image(abspath("wv_skin.png")); |
if (!skin.image) notify("WebView skin file 'wv_skin.png' not found, program will terminate"); |
skin.w = DSWORD[skin.image+4]; |
skin.h = DSWORD[skin.image+8]; |
image_data = DSDWORD[skin.image+24]; |
|
col_bg = DSDWORD[image_data]; |
panel_color = DSDWORD[skin.w*4*4 + image_data]; |
border_color = DSDWORD[skin.w*4*7 + image_data]; |
132,7 → 127,8 |
if (load_dll2(libio, #libio_init,1)!=0) notify("Error: library doesn't exists - libio"); |
if (load_dll2(libimg, #libimg_init,1)!=0) notify("Error: library doesn't exists - libimg"); |
if (load_dll2(libHTTP, #http_lib_init,1)!=0) notify("Error: library doesn't exists - http"); |
skin.Load(); |
Libimg_LoadImage(#skin, abspath("wv_skin.png")); |
SetSkinColors(); |
|
Form.width=WIN_W; |
Form.height=WIN_H; |