C--: update structure

WebView: fix very old bug related with named colors

git-svn-id: svn://kolibrios.org@5499 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-03-05 20:55:28 +00:00
parent 1f31c584e7
commit 698c85d52f
26 changed files with 162 additions and 165 deletions

View File

@ -7,89 +7,89 @@ struct color_spec {
};
struct color_spec color_specs[] = {
"aliceblue", 0xF0F8FF,
"aliceblue", 0xF0F8FF,
"antiquewhite", 0xFAEBD7,
"aqua", 0x00FFFF,
"aquamarine", 0x7FFFD4,
"aqua", 0x00FFFF,
"aquamarine", 0x7FFFD4,
"azure", 0xF0FFFF,
"beige", 0xF5F5DC,
"bisque", 0xFFE4C4,
"black", 0x000000,
"blanchedalmond",0xFFEBCD,
"blue", 0x0000FF,
"blueviolet", 0x8A2BE2,
"blue", 0x0000FF,
"blueviolet", 0x8A2BE2,
"brown", 0xA52A2A,
"burlywood", 0xDEB887,
"cadetblue", 0x5F9EA0,
"chartreuse", 0x7FFF00,
"chocolate", 0xD2691E,
"coral", 0xFF7F50,
"burlywood", 0xDEB887,
"cadetblue", 0x5F9EA0,
"chartreuse", 0x7FFF00,
"chocolate", 0xD2691E,
"coral", 0xFF7F50,
"cornflowerblue",0x6495ED,
"cornsilk", 0xFFF8DC,
"crimson", 0xDC143C,
"cyan", 0x00FFFF,
"cyan", 0x00FFFF,
"darkblue", 0x00008B,
"darkcyan", 0x008B8B,
"darkgoldenrod", 0xB8860B,
"darkgray", 0xA9A9A9,
"darkgreen", 0x006400,
"darkkhaki", 0xBDB76B,
"darkmagenta", 0x8B008B,
"darkgreen", 0x006400,
"darkkhaki", 0xBDB76B,
"darkmagenta", 0x8B008B,
"darkolivegreen",0x556B2F,
"darkorange", 0xFF8C00,
"darkorchid", 0x9932CC,
"darkorange", 0xFF8C00,
"darkorchid", 0x9932CC,
"darkred", 0x8B0000,
"darksalmon", 0xE9967A,
"darksalmon", 0xE9967A,
"darkseagreen", 0x8FBC8F,
"darkslateblue", 0x483D8B,
"darkslategray", 0x2F4F4F,
"darkturquoise", 0x00CED1,
"darkviolet", 0x9400D3,
"deeppink", 0xFF1493,
"deepskyblue", 0x00BFFF,
"dimgray", 0x696969,
"dodgerblue", 0x1E90FF,
"firebrick", 0xB22222,
"floralwhite", 0xFFFAF0,
"forestgreen", 0x228B22,
"fuchsia", 0xFF00FF,
"gainsboro", 0xDCDCDC,
"ghostwhite", 0xF8F8FF,
"gold", 0xFFD700,
"goldenrod", 0xDAA520,
"gray", 0x808080,
"green", 0x008000,
"greenyellow", 0xADFF2F,
"honeydew", 0xF0FFF0,
"hotpink", 0xFF69B4,
"indianred", 0xCD5C5C,
"indigo", 0x4B0082,
"ivory", 0xFFFFF0,
"khaki", 0xF0E68C,
"lavender", 0xE6E6FA,
"darkviolet", 0x9400D3,
"deeppink", 0xFF1493,
"deepskyblue", 0x00BFFF,
"dimgray", 0x696969,
"dodgerblue", 0x1E90FF,
"firebrick", 0xB22222,
"floralwhite", 0xFFFAF0,
"forestgreen", 0x228B22,
"fuchsia", 0xFF00FF,
"gainsboro", 0xDCDCDC,
"ghostwhite", 0xF8F8FF,
"gold", 0xFFD700,
"goldenrod", 0xDAA520,
"gray", 0x808080,
"green", 0x008000,
"greenyellow", 0xADFF2F,
"honeydew", 0xF0FFF0,
"hotpink", 0xFF69B4,
"indianred", 0xCD5C5C,
"indigo", 0x4B0082,
"ivory", 0xFFFFF0,
"khaki", 0xF0E68C,
"lavender", 0xE6E6FA,
"lavenderblush", 0xFFF0F5,
"lawngreen", 0x7CFC00,
"lawngreen", 0x7CFC00,
"lemonchiffon", 0xFFFACD,
"lightblue", 0xADD8E6,
"lightcoral", 0xF08080,
"lightcyan", 0xE0FFFF,
"lightgoldenrodyellow", 0xFAFAD2,
"lightgreen", 0x90EE90,
"lightgrey", 0xD3D3D3,
"lightpink", 0xFFB6C1,
"lightsalmon", 0xFFA07A,
"lightblue", 0xADD8E6,
"lightcoral", 0xF08080,
"lightcyan", 0xE0FFFF,
"lightgoldenrodyellow", 0xFAFAD2,
"lightgreen", 0x90EE90,
"lightgrey", 0xD3D3D3,
"lightpink", 0xFFB6C1,
"lightsalmon", 0xFFA07A,
"lightseagreen", 0x20B2AA,
"lightskyblue", 0x87CEFA,
"lightslategray",0x778899,
"lightsteelblue",0xB0C4DE,
"lightyellow", 0xFFFFE0,
"lime", 0x00FF00,
"limegreen", 0x32CD32,
"linen", 0xFAF0E6,
"magenta", 0xFF00FF,
"maroon", 0x800000,
"lightyellow", 0xFFFFE0,
"lime", 0x00FF00,
"limegreen", 0x32CD32,
"linen", 0xFAF0E6,
"magenta", 0xFF00FF,
"maroon", 0x800000,
"mediumaquamarine",0x66CDAA,
"mediumblue", 0x0000CD,
"mediumblue", 0x0000CD,
"mediumorchid", 0xBA55D3,
"mediumpurple", 0x9370DB,
"mediumseagreen",0x3CB371,
@ -98,55 +98,55 @@ struct color_spec color_specs[] = {
"mediumturquoise",0x48D1CC,
"mediumvioletred",0xC71585,
"midnightblue", 0x191970,
"mintcream", 0xF5FFFA,
"mistyrose", 0xFFE4E1,
"mintcream", 0xF5FFFA,
"mistyrose", 0xFFE4E1,
"moccasin", 0xFFE4B5,
"navajowhite", 0xFFDEAD,
"navy", 0x000080,
"oldlace", 0xFDF5E6,
"olive", 0x808000,
"olivedrab", 0x6B8E23,
"orange", 0xFFA500,
"orangered", 0xFF4500,
"orchid", 0xDA70D6,
"navajowhite", 0xFFDEAD,
"navy", 0x000080,
"oldlace", 0xFDF5E6,
"olive", 0x808000,
"olivedrab", 0x6B8E23,
"orange", 0xFFA500,
"orangered", 0xFF4500,
"orchid", 0xDA70D6,
"palegoldenrod", 0xEEE8AA,
"palegreen", 0x98FB98,
"palegreen", 0x98FB98,
"paleturquoise", 0xAFEEEE,
"palevioletred", 0xDB7093,
"papayawhip", 0xFFEFD5,
"peachpuff", 0xFFDAB9,
"peru", 0xCD853F,
"pink", 0xFFC0CB,
"plum", 0xDDA0DD,
"powderblue", 0xB0E0E6,
"purple", 0x800080,
"red", 0xFF0000,
"rosybrown", 0xBC8F8F,
"royalblue", 0x4169E1,
"saddlebrown", 0x8B4513,
"salmon", 0xFA8072,
"sandybrown", 0xF4A460,
"seagreen", 0x2E8B57,
"seashell", 0xFFF5EE,
"sienna", 0xA0522D,
"silver", 0xC0C0C0,
"skyblue", 0x87CEEB,
"slateblue", 0x6A5ACD,
"slategray", 0x708090,
"snow", 0xFFFAFA,
"springgreen", 0x00FF7F,
"steelblue", 0x4682B4,
"tan", 0xD2B48C,
"teal", 0x008080,
"thistle", 0xD8BFD8,
"tomato", 0xFF6347,
"turquoise", 0x40E0D0,
"violet", 0xEE82EE,
"wheat", 0xF5DEB3,
"white", 0xFFFFFF,
"whitesmoke", 0xF5F5F5,
"yellow", 0xFFFF00,
"yellowgreen", 0x9ACD32,
"papayawhip", 0xFFEFD5,
"peachpuff", 0xFFDAB9,
"peru", 0xCD853F,
"pink", 0xFFC0CB,
"plum", 0xDDA0DD,
"powderblue", 0xB0E0E6,
"purple", 0x800080,
"red", 0xFF0000,
"rosybrown", 0xBC8F8F,
"royalblue", 0x4169E1,
"saddlebrown", 0x8B4513,
"salmon", 0xFA8072,
"sandybrown", 0xF4A460,
"seagreen", 0x2E8B57,
"seashell", 0xFFF5EE,
"sienna", 0xA0522D,
"silver", 0xC0C0C0,
"skyblue", 0x87CEEB,
"slateblue", 0x6A5ACD,
"slategray", 0x708090,
"snow", 0xFFFAFA,
"springgreen", 0x00FF7F,
"steelblue", 0x4682B4,
"tan", 0xD2B48C,
"teal", 0x008080,
"thistle", 0xD8BFD8,
"tomato", 0xFF6347,
"turquoise", 0x40E0D0,
"violet", 0xEE82EE,
"wheat", 0xF5DEB3,
"white", 0xFFFFFF,
"whitesmoke", 0xF5F5F5,
"yellow", 0xFFFF00,
"yellowgreen", 0x9ACD32,
0};
dword StrToCol(char* htmlcolor)
@ -186,7 +186,7 @@ dword GetColor(char* color_str)
else
for (ii=0; color_specs[ii].name!=0; ii++)
{
if (!strcmp(color_str, color_specs[ii].name)) return color_specs[ii].rgb;
if (!strcmpi(color_str, color_specs[ii].name)) return color_specs[ii].rgb;
}
return text_colors[0];

View File

@ -11,8 +11,8 @@
#include "..\lib\dll.h"
#include "..\lib\file_system.h"
#include "..\lib\list_box.h"
#include "..\lib\figures.h"
#include "..\lib\lib.obj\box_lib.h"
#include "..\lib\gui.h"
#include "..\lib\obj\box_lib.h"
#ifdef LANG_RUS
?define WINDOW_HEADER "“á¯à ¢«¥­¨¥ ⥬®©"
@ -165,7 +165,7 @@ void main()
mem_Init();
SetEventMask(0x27);
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("'Fatal Error: library doesn't exists /rd/1/lib/box_lib.obj' -E");
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("'Fatal Error: library doesn't exists /rd/1/lib/box_obj' -E");
list[SKINS].current = list[WALLPAPERS].current = -1;
list[SKINS].first = list[WALLPAPERS].first = 0;
TabClick(WALLPAPERS);

View File

@ -11,7 +11,7 @@
#define MEMSIZE 0x100000
#include "..\lib\kolibri.h"
#include "..\lib\strings.h"
#include "..\lib\figures.h"
#include "..\lib\gui.h"
#include "..\lib\encoding.h"
#include "..\lib\file_system.h"
#include "..\lib\mem.h"
@ -21,10 +21,10 @@
#include "..\lib\cursor.h"
//*.obj libraries
#include "..\lib\lib.obj\box_lib.h"
#include "..\lib\lib.obj\libio_lib.h"
#include "..\lib\lib.obj\libimg_lib.h"
#include "..\lib\lib.obj\http.h"
#include "..\lib\obj\box_lib.h"
#include "..\lib\obj\libio_lib.h"
#include "..\lib\obj\libimg_lib.h"
#include "..\lib\obj\http.h"
//useful patterns
#include "..\lib\patterns\libimg_load_skin.h"

View File

@ -3,9 +3,9 @@
#include "..\lib\strings.h"
#include "..\lib\mem.h"
#include "..\lib\file_system.h"
#include "..\lib\figures.h"
#include "..\lib\gui.h"
#include "..\lib\dll.h"
#include "..\lib\lib.obj\box_lib.h"
#include "..\lib\obj\box_lib.h"
unsigned char speaker[23*40*3]= FROM "speaker.raw";
@ -35,7 +35,7 @@ void main()
{
int id, key;
mem_Init();
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("Error while loading GUI library /sys/lib/boxlib.obj");
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("Error while loading GUI library /sys/lib/boxobj");
dict_folder = abspath(DICT_DIRECROTY);
OpenDictionary(0);

View File

@ -2,7 +2,7 @@
//libraries
#include "..\lib\kolibri.h"
#include "..\lib\strings.h"
#include "..\lib\figures.h"
#include "..\lib\gui.h"
#include "..\lib\encoding.h"
#include "..\lib\draw_buf.h"
#include "..\lib\file_system.h"
@ -10,9 +10,9 @@
#include "..\lib\dll.h"
#include "..\lib\list_box.h"
//*.obj libraries
#include "..\lib\lib.obj\box_lib.h"
#include "..\lib\lib.obj\libio_lib.h"
#include "..\lib\lib.obj\http.h"
#include "..\lib\obj\box_lib.h"
#include "..\lib\obj\libio_lib.h"
#include "..\lib\obj\http.h"
char header[]="New Downloader v0.6";
@ -49,7 +49,7 @@ void main()
char notify_message[4296];
mem_Init();
if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();}
if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_obj"); ExitProcess();}
if (load_dll2(libio, #libio_init,1)!=0) notify("Error: library doesn't exists - libio");
if (load_dll2(libHTTP, #http_lib_init,1)!=0) notify("Error: library doesn't exists - http");
if (!URL) strcpy(#URL, "http://builds.kolibrios.org/eng/latest-iso.7z");

View File

@ -1,6 +1,6 @@
#define MEMSIZE 0x3E80
#include "..\lib\kolibri.h"
#include "..\lib\figures.h"
#include "..\lib\gui.h"
#include "..\lib\strings.h"
#include "..\lib\random.h"
#include "..\lib\mem.h"

View File

@ -13,13 +13,13 @@
#include "..\lib\mem.h"
#include "..\lib\dll.h"
#include "..\lib\file_system.h"
#include "..\lib\figures.h"
#include "..\lib\gui.h"
#include "..\lib\list_box.h"
#include "..\lib\copyf.h"
#include "..\lib\random.h"
//obj
#include "..\lib\lib.obj\libini.h"
#include "..\lib\lib.obj\box_lib.h"
#include "..\lib\obj\libini.h"
#include "..\lib\obj\box_lib.h"
//images
#include "imgs\toolbar.txt"
#include "imgs\left_p.txt"
@ -38,7 +38,7 @@
?define WAIT_DELETING_FOLDER "“¤ «ï¥âáï ¯ ¯ª . <20>®¤®¦¨â¥..."
?define NOT_CREATE_FOLDER "<EFBFBD>¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã."
?define NOT_CREATE_FILE "<EFBFBD>¥ 㤠«®áì ᮧ¤ âì ä ©«."
?define ERROR_1 "Žè¨¡ª  ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj"
?define ERROR_1 "Žè¨¡ª  ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_obj"
?define T_PASTE_WINDOW "Š®¯¨àãî..."
?define T_PASTE_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:"
?define T_CANCEL_PASTE "Š®¯¨à®¢ ­¨¥ ¯à¥ªà é¥­®. <20> ¯ª  ᪮¯¨à®¢ ­  ­¥ ¯®«­®áâìî."
@ -56,7 +56,7 @@
?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
?define NOT_CREATE_FOLDER "Kataloogi ei saa luua."
?define NOT_CREATE_FILE "Faili ei saa luua."
?define ERROR_1 "Viga teegi laadimisel /rd/1/lib/box_lib.obj"
?define ERROR_1 "Viga teegi laadimisel /rd/1/lib/box_obj"
?define T_PASTE_WINDOW "Kopeerin..."
?define T_PASTE_WINDOW_TEXT "Kopeerin faili:"
?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
@ -74,7 +74,7 @@
?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
?define NOT_CREATE_FOLDER "Folder can not be created."
?define NOT_CREATE_FILE "File can not be created."
?define ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj"
?define ERROR_1 "Error while loading library /rd/1/lib/box_obj"
?define T_PASTE_WINDOW "Copying..."
?define T_PASTE_WINDOW_TEXT "Copying file:"
?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."

View File

@ -63,7 +63,6 @@
}
}
:void MoreLessBox(dword x,y,s, bt_id_more, bt_id_less, color_border, color_button, color_text, value, text)
{
#define VALUE_FIELD_W 26;
@ -77,7 +76,6 @@
WriteText(x+VALUE_FIELD_W+s+s+10, s / 2 + y -3, 0x80, color_text, text);
}
:void DrawProgressBar(dword st_x, st_y, st_w, st_h, col_fon, col_border, col_fill, col_text, progress_percent)
{
int progress_w;
@ -106,7 +104,6 @@
DrawBar(x,y+8,w,1,0x4E00E7);
}
:void PutShadow(dword x,y,w,h,skinned,strength)
{
proc_info wForm;
@ -119,14 +116,6 @@
mem_Free(shadow_buf);
}
:void DrawPopupShadow(dword x,y,w,h,skinned)
{
PutShadow(w+x+1,y,1,h+2,skinned,2);
PutShadow(w+x+2,y+1,1,h+2,skinned,1);
PutShadow(x,y+h+2,w+2,1,skinned,2);
PutShadow(x+1,y+h+3,w+1,1,skinned,1);
}
:void DrawPopup(dword x,y,w,h,skinned, col_work,col_border)
{
DrawRectangle(x,y,w,h,col_border);
@ -136,6 +125,14 @@
DrawPopupShadow(x,y,w,h-1,skinned);
}
:void DrawPopupShadow(dword x,y,w,h,skinned)
{
PutShadow(w+x+1,y,1,h+2,skinned,2);
PutShadow(w+x+2,y+1,1,h+2,skinned,1);
PutShadow(x,y+h+2,w+2,1,skinned,2);
PutShadow(x+1,y+h+3,w+1,1,skinned,1);
}
:void GrayScaleImage(dword color_image, w, h)
{
dword i,gray,rr,gg,bb;

View File

@ -1,6 +1,6 @@
//BOX_LIB - Asper
dword boxlib = #aEdit_box_lib;
char aEdit_box_lib[]="/sys/lib/box_lib.obj";
char aEdit_box_lib[]="/sys/lib/box_obj";
dword box_lib_init = #aboxlib_init;

View File

@ -7,19 +7,19 @@
#include "../lib/mem.h"
#include "../lib/dll.h"
#include "../lib/encoding.h"
#include "../lib/figures.h"
#include "../lib/gui.h"
#include "../lib/file_system.h"
#include "../lib/list_box.h"
#include "../lib/socket_new.h"
#include "../lib/socket.h"
#include "../lib/draw_buf.h"
#include "../lib/cursor.h"
//*.obj libraries
#include "../lib/lib.obj/box_lib.h"
#include "../lib/lib.obj/network.h"
#include "../lib/lib.obj/libio_lib.h"
#include "../lib/lib.obj/libimg_lib.h"
#include "../lib/lib.obj/netcode.h"
#include "../lib/lib.obj/iconv.h"
#include "../lib/obj/box_lib.h"
#include "../lib/obj/network.h"
#include "../lib/obj/libio_lib.h"
#include "../lib/obj/libimg_lib.h"
#include "../lib/obj/netcode.h"
#include "../lib/obj/iconv.h"
//images
byte letter_icons[sizeof(file "img/letter_icons.raw")] = FROM "img/letter_icons.raw";
#include "img/letter_icons.h"
@ -102,7 +102,7 @@ char version[]=" WebView 0.1";
void main() {
mem_Init();
CursorPointer.Load(#CursorFile);
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("Error while loading library - box_lib.obj");
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("Error while loading library - box_obj");
if (load_dll2(network_lib, #network_lib_init,0)!=0) notify("Error while loading library - network.obj");
if (load_dll2(netcode_lib, #base64_encode,0)!=0) notify("Error while loading library - netcode.obj");
if (load_dll2(iconv_lib, #iconv_open,0)!=0) { notify("Error while loading library - iconv.obj"); use_iconv=2; }

View File

@ -5,7 +5,7 @@
#include "..\lib\kolibri.h"
#include "..\lib\strings.h"
#include "..\lib\mem.h"
#include "..\lib\figures.h"
#include "..\lib\gui.h"
dword shadow_buf_24, shadow_buf_32, lighter_pixel1, lighter_pixel2;

View File

@ -5,11 +5,11 @@
#include "..\lib\mem.h"
#include "..\lib\file_system.h"
#include "..\lib\dll.h"
#include "..\lib\figures.h"
#include "..\lib\gui.h"
#include "..\lib\lib.obj\libio_lib.h"
#include "..\lib\lib.obj\libini.h"
#include "..\lib\lib.obj\box_lib.h"
#include "..\lib\obj\libio_lib.h"
#include "..\lib\obj\libini.h"
#include "..\lib\obj\box_lib.h"
#include "..\lib\patterns\libimg_load_skin.h"

View File

@ -11,12 +11,12 @@
#include "..\lib\dll.h"
#include "..\lib\file_system.h"
#include "..\lib\list_box.h"
#include "..\lib\figures.h"
#include "..\lib\gui.h"
#include "..\lib\lib.obj\box_lib.h"
#include "..\lib\lib.obj\libio_lib.h"
#include "..\lib\lib.obj\libimg_lib.h"
#include "..\lib\lib.obj\libini.h"
#include "..\lib\obj\box_lib.h"
#include "..\lib\obj\libio_lib.h"
#include "..\lib\obj\libimg_lib.h"
#include "..\lib\obj\libini.h"
#include "..\lib\patterns\libimg_load_skin.h"

View File

@ -8,11 +8,11 @@ SOFTWARE CENTER v2.31
#include "..\lib\mem.h"
#include "..\lib\file_system.h"
#include "..\lib\dll.h"
#include "..\lib\figures.h"
#include "..\lib\gui.h"
#include "..\lib\lib.obj\libio_lib.h"
#include "..\lib\lib.obj\libimg_lib.h"
#include "..\lib\lib.obj\libini.h"
#include "..\lib\obj\libio_lib.h"
#include "..\lib\obj\libimg_lib.h"
#include "..\lib\obj\libini.h"
#include "..\lib\patterns\libimg_load_skin.h"

View File

@ -2,8 +2,8 @@
///////////////////////// GUI ////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
#include "..\lib\figures.h"
#include "..\lib\lib.obj\box_lib.h"
#include "..\lib\gui.h"
#include "..\lib\obj\box_lib.h"
#ifdef LANG_RUS
unsigned char *but_text[]={

View File

@ -5,8 +5,8 @@
#include "..\lib\file_system.h"
#include "..\lib\dll.h"
#include "..\lib\lib.obj\libio_lib.h"
#include "..\lib\lib.obj\libini.h"
#include "..\lib\obj\libio_lib.h"
#include "..\lib\obj\libini.h"
#ifndef AUTOBUILD
#include "lang.h--"