Subversion Repositories Kolibri OS

Rev

Rev 4534 | Rev 4537 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4534 Rev 4536
Line 22... Line 22...
22
 
22
 
23
//*.obj libraries
23
//*.obj libraries
24
#include "..\lib\lib.obj\box_lib.h"
24
#include "..\lib\lib.obj\box_lib.h"
25
#include "..\lib\lib.obj\libio_lib.h"
25
#include "..\lib\lib.obj\libio_lib.h"
-
 
26
#include "..\lib\lib.obj\libimg_lib.h"
26
#include "..\lib\lib.obj\libimg_lib.h"
27
#include "..\lib\lib.obj\http.h"
27
//images
28
//images
28
#include "img\toolbar_icons.c"
29
#include "img\toolbar_icons.c"
Line 29... Line 30...
29
#include "img\URLgoto.txt";
30
#include "img\URLgoto.txt";
Line 71... Line 72...
71
	int key, btn;
72
	int key, btn;
72
	int half_scroll_size;
73
	int half_scroll_size;
73
	int scroll_used=0, show_menu;
74
	int scroll_used=0, show_menu;
Line 74... Line 75...
74
	
75
	
-
 
76
	mem_Init();
75
	mem_Init();
77
	CursorPointer.Load(#CursorFile);
76
	if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();}
78
	if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();}
77
	if (load_dll2(libio, #libio_init,1)!=0) debug("Error: library doesn't exists - libio");
79
	if (load_dll2(libio, #libio_init,1)!=0) notify("Error: library doesn't exists - libio");
Line 78... Line 80...
78
	if (load_dll2(libimg, #libimg_init,1)!=0) debug("Error: library doesn't exists - libimg");
80
	if (load_dll2(libimg, #libimg_init,1)!=0) notify("Error: library doesn't exists - libimg");
79
	
-
 
80
	if (!URL) strcpy(#URL, "/sys/index.htm");	
81
	
81
	CursorPointer.Load(#CursorFile);
82
	if (!URL) strcpy(#URL, "/sys/index.htm");
82
	Form.width=WIN_W;
83
	Form.width=WIN_W;
83
	Form.height=WIN_H;
84
	Form.height=WIN_H;
Line 84... Line 85...
84
	SetElementSizes();
85
	SetElementSizes();
85
	OpenPage();
86
	OpenPage();
86
 
87
 
87
	SetEventMask(0x27);
88
	SetEventMask(0xa7);
88
	loop()
89
	loop()
89
	{
90
	{
Line 162... Line 163...
162
				break;
163
				break;
163
			case evReDraw:
164
			case evReDraw:
164
				if (action_buf) { Scan(action_buf); action_buf=0;}
165
				if (action_buf) { Scan(action_buf); action_buf=0;}
165
				Draw_Window();
166
				Draw_Window();
166
				break;
167
				break;
-
 
168
			case evNetwork:
-
 
169
				return;
-
 
170
				//open page
-
 
171
				http_get stdcall (#URL, 0);	
-
 
172
				http_transfer = EAX;
-
 
173
				IF (http_transfer<0) notify("Error from HTTP lib");
-
 
174
				//
-
 
175
				if (http_transfer != 0) {
-
 
176
					http_process stdcall (http_transfer);
-
 
177
					$push EAX
-
 
178
					ESI = http_transfer;
-
 
179
					if (!ESI.http_msg.content_received) break;
-
 
180
					buf = ESI.http_msg.content_ptr;
-
 
181
					debug(buf);	
-
 
182
					filesize = ESI.http_msg.content_received;
-
 
183
					debugi(filesize);
-
 
184
					WB1.ParseHTML(buf);							
-
 
185
					$pop EAX	
-
 
186
					if (EAX == 0) {			
-
 
187
						http_free stdcall (http_transfer);
-
 
188
						http_transfer=0;				
-
 
189
					}
-
 
190
				}
167
			default:
191
			default:
168
				if (downloader_id<>0)
192
				if (downloader_id<>0)
169
				{
193
				{
170
					if (GetProcessSlot(downloader_id)<>0) break;
194
					if (GetProcessSlot(downloader_id)<>0) break;
171
					downloader_id=0;
195
					downloader_id=0;