Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4535 → Rev 4536

/programs/cmm/browser/HTMLv.c
24,6 → 24,7
#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"
//images
#include "img\toolbar_icons.c"
#include "img\URLgoto.txt";
73,18 → 74,18
int scroll_used=0, show_menu;
mem_Init();
CursorPointer.Load(#CursorFile);
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(libio, #libio_init,1)!=0) debug("Error: library doesn't exists - libio");
if (load_dll2(libimg, #libimg_init,1)!=0) debug("Error: library doesn't exists - libimg");
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 (!URL) strcpy(#URL, "/sys/index.htm");
CursorPointer.Load(#CursorFile);
Form.width=WIN_W;
Form.height=WIN_H;
SetElementSizes();
OpenPage();
 
SetEventMask(0x27);
SetEventMask(0xa7);
loop()
{
WaitEventTimeout(2);
164,6 → 165,29
if (action_buf) { Scan(action_buf); action_buf=0;}
Draw_Window();
break;
case evNetwork:
return;
//open page
http_get stdcall (#URL, 0);
http_transfer = EAX;
IF (http_transfer<0) notify("Error from HTTP lib");
//
if (http_transfer != 0) {
http_process stdcall (http_transfer);
$push EAX
ESI = http_transfer;
if (!ESI.http_msg.content_received) break;
buf = ESI.http_msg.content_ptr;
debug(buf);
filesize = ESI.http_msg.content_received;
debugi(filesize);
WB1.ParseHTML(buf);
$pop EAX
if (EAX == 0) {
http_free stdcall (http_transfer);
http_transfer=0;
}
}
default:
if (downloader_id<>0)
{
/programs/cmm/lib/kolibri.h
20,11 → 20,13
#define false 0
 
//Events
#define evReDraw 1
#define evKey 2
#define evButton 3
#define evMouse 6
#define evButton 3
#define evKey 2
#define evReDraw 1
#define evNetwork 8
 
 
//Button options
#define BT_DEL 0x80000000
#define BT_HIDE 0x40000000
/programs/cmm/lib/lib.obj/http.h
28,7 → 28,7
 
#define FLAG_HTTP11 1 << 0
#define FLAG_GOT_HEADER 1 << 1
#define FLAG_GOT_DATA 1 << 2
#define FLAG_GOT_ALL_DATA 1 << 2
#define FLAG_CONTENT_LENGTH 1 << 3
#define FLAG_CHUNKED 1 << 4
#define FLAG_CONNECTED 1 << 5
38,6 → 38,7
#define FLAG_NO_RAM 1 << 17
#define FLAG_SOCKET_ERROR 1 << 18
#define FLAG_TIMEOUT_ERROR 1 << 19
#define FLAG_TRANSFER_FAILED 1 << 20
 
struct http_msg{
dword socket;
48,7 → 49,8
dword timestamp;
dword status;
dword header_length;
dword content_ptr;
dword content_length;
dword content_received;
char data;
char http_header;
};