forked from KolibriOS/kolibrios
View3DS: support kpacked files
WebView: DOCX support git-svn-id: svn://kolibrios.org@7788 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6bc343bd07
commit
7ff31d4724
@ -8,6 +8,7 @@ rtf=3
|
|||||||
log=3
|
log=3
|
||||||
dic=3
|
dic=3
|
||||||
doc=3
|
doc=3
|
||||||
|
docx=3
|
||||||
exc=3
|
exc=3
|
||||||
wtx=3
|
wtx=3
|
||||||
inf=3
|
inf=3
|
||||||
@ -225,8 +226,8 @@ obj=92
|
|||||||
dll=92
|
dll=92
|
||||||
skn=80
|
skn=80
|
||||||
kex=88
|
kex=88
|
||||||
rft=85
|
|
||||||
rft=85
|
|
||||||
kf=118
|
kf=118
|
||||||
mgb=121
|
mgb=121
|
||||||
txt=122
|
txt=122
|
||||||
|
rtf=122
|
||||||
|
docx=122
|
||||||
|
@ -27,16 +27,17 @@ skn=/sys/skincfg
|
|||||||
lap=/sys/media/listplay
|
lap=/sys/media/listplay
|
||||||
asf=/sys/media/listplay
|
asf=/sys/media/listplay
|
||||||
m3u=/sys/media/AC97SND
|
m3u=/sys/media/AC97SND
|
||||||
wav=/sys/media/AC97SND
|
wav=/sys/media/pixie
|
||||||
mp3=/sys/media/pixie
|
mp3=/sys/media/pixie
|
||||||
xm=/sys/media/AC97SND
|
xm=/sys/media/pixie
|
||||||
mid=/sys/media/MIDAMP
|
mid=/sys/media/MIDAMP
|
||||||
cvs=/sys/graph
|
cvs=/sys/graph
|
||||||
obj=/sys/develop/cObj
|
obj=/sys/develop/cObj
|
||||||
htm=/sys/network/WebView
|
htm=/sys/network/WebView
|
||||||
html=/sys/network/WebView
|
html=/sys/network/WebView
|
||||||
fb2=/sys/fb2read
|
|
||||||
mht=/sys/network/WebView
|
mht=/sys/network/WebView
|
||||||
|
docx=/sys/network/WebView
|
||||||
|
fb2=/sys/fb2read
|
||||||
kla=/sys/games/klavisha
|
kla=/sys/games/klavisha
|
||||||
pdf=/kolibrios/media/updf
|
pdf=/kolibrios/media/updf
|
||||||
avi=/kolibrios/media/fplay_run
|
avi=/kolibrios/media/fplay_run
|
||||||
|
@ -172,9 +172,9 @@ tif /sys/media/kiv
|
|||||||
tiff /sys/media/kiv
|
tiff /sys/media/kiv
|
||||||
wbmp /sys/media/kiv
|
wbmp /sys/media/kiv
|
||||||
m3u /sys/media/ac97snd
|
m3u /sys/media/ac97snd
|
||||||
wav /sys/media/ac97snd
|
wav /sys/media/pixie
|
||||||
mp3 /sys/media/pixie
|
mp3 /sys/media/pixie
|
||||||
xm /sys/media/ac97snd
|
xm /sys/media/pixie
|
||||||
mid /sys/media/midamp
|
mid /sys/media/midamp
|
||||||
rtf /sys/rtfread
|
rtf /sys/rtfread
|
||||||
3ds /sys/3d/view3ds
|
3ds /sys/3d/view3ds
|
||||||
@ -211,6 +211,7 @@ obj /sys/develop/cObj
|
|||||||
htm /sys/network/WebView
|
htm /sys/network/WebView
|
||||||
html /sys/network/WebView
|
html /sys/network/WebView
|
||||||
mht /sys/network/WebView
|
mht /sys/network/WebView
|
||||||
|
docx /sys/network/WebView
|
||||||
fb2 /sys/fb2read
|
fb2 /sys/fb2read
|
||||||
kla /sys/games/klavisha
|
kla /sys/games/klavisha
|
||||||
bin /sys/develop/heed
|
bin /sys/develop/heed
|
||||||
|
@ -13,6 +13,10 @@ exec=/sys/txtread
|
|||||||
icon=85
|
icon=85
|
||||||
next=$HexEditor
|
next=$HexEditor
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
exec=/sys/run
|
||||||
|
icon=55
|
||||||
|
|
||||||
[FB2Read]
|
[FB2Read]
|
||||||
exec=/sys/fb2read
|
exec=/sys/fb2read
|
||||||
icon=44
|
icon=44
|
||||||
@ -92,6 +96,7 @@ fb2=$FB2Read
|
|||||||
htm=$WebView
|
htm=$WebView
|
||||||
html=$WebView
|
html=$WebView
|
||||||
mht=$WebView
|
mht=$WebView
|
||||||
|
docx=$WebView
|
||||||
|
|
||||||
avi=$FPlay
|
avi=$FPlay
|
||||||
mkv=$FPlay
|
mkv=$FPlay
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.3 KiB |
@ -89,7 +89,7 @@ enum {
|
|||||||
#include "tabs.h"
|
#include "tabs.h"
|
||||||
|
|
||||||
char default_dir[] = "/rd/1";
|
char default_dir[] = "/rd/1";
|
||||||
od_filter filter2 = { 16, "TXT\0HTM\0HTML\0\0" };
|
od_filter filter2 = { 22, "TXT\0HTM\0HTML\0DOCX\0\0" };
|
||||||
|
|
||||||
char editURL[URL_SIZE+1];
|
char editURL[URL_SIZE+1];
|
||||||
edit_box address_box = {, PADDING+TSZE*2+PADDING+6, PADDING+3, 0xffffff,
|
edit_box address_box = {, PADDING+TSZE*2+PADDING+6, PADDING+3, 0xffffff,
|
||||||
@ -519,6 +519,7 @@ bool GetLocalFileData(dword _path)
|
|||||||
void OpenPage(dword _open_URL)
|
void OpenPage(dword _open_URL)
|
||||||
{
|
{
|
||||||
char new_url[URL_SIZE+1];
|
char new_url[URL_SIZE+1];
|
||||||
|
int unz_id;
|
||||||
|
|
||||||
StopLoading();
|
StopLoading();
|
||||||
|
|
||||||
@ -571,6 +572,13 @@ void OpenPage(dword _open_URL)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//LOCAL PAGE
|
//LOCAL PAGE
|
||||||
|
if (UrlExtIs(#new_url,".docx")) {
|
||||||
|
DeleteFile("/tmp0/1/temp/word/document.xml");
|
||||||
|
CreateDir("/tmp0/1/temp");
|
||||||
|
unz_id = RunProgram("/sys/unz", sprintf(#param, "-o \"/tmp0/1/temp\" -h \"%s\"", #new_url));
|
||||||
|
while (GetProcessSlot(unz_id)) pause(2);
|
||||||
|
strcpy(#new_url, "/tmp0/1/temp/word/document.xml");
|
||||||
|
}
|
||||||
if (!GetLocalFileData(#new_url)) {
|
if (!GetLocalFileData(#new_url)) {
|
||||||
LoadInternalPage(#page_not_found, sizeof(page_not_found));
|
LoadInternalPage(#page_not_found, sizeof(page_not_found));
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
char version[]="WebView 2.41";
|
char version[]="WebView 2.45";
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0";
|
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
struct od_filter
|
struct od_filter
|
||||||
{
|
{
|
||||||
dword size; //size = len(#ext) + sizeof(dword)
|
dword size; //size = len(#ext) + sizeof(dword)
|
||||||
char ext[16];
|
char ext[25];
|
||||||
};
|
};
|
||||||
|
|
||||||
proc_info pr_inf;
|
proc_info pr_inf;
|
||||||
|
@ -344,7 +344,7 @@ base_vector:
|
|||||||
if Ext=SSE2
|
if Ext=SSE2
|
||||||
db ' (SSE2)'
|
db ' (SSE2)'
|
||||||
end if
|
end if
|
||||||
db ' 0.068',0
|
db ' 0.069',0
|
||||||
labellen:
|
labellen:
|
||||||
STRdata db '-1 '
|
STRdata db '-1 '
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
; application : View3ds ver. 0.068b - tiny .3ds and .asc files viewer
|
; application : View3ds ver. 0.069 - tiny .3ds and .asc files viewer
|
||||||
; with a few graphics effects demonstration.
|
; with a few graphics effects demonstration.
|
||||||
; compiler : FASM
|
; compiler : FASM
|
||||||
; system : KolibriOS
|
; system : KolibriOS
|
||||||
@ -3379,34 +3379,55 @@ end if
|
|||||||
read_from_disk:
|
read_from_disk:
|
||||||
if USE_LFN
|
if USE_LFN
|
||||||
;-
|
;-
|
||||||
mov eax, 70
|
|
||||||
mov ebx, file_info
|
|
||||||
mov dword[ebx], 5 ; -> subfunction number
|
|
||||||
int 0x40 ; -> read file size
|
|
||||||
mov ebx, [fptr]
|
|
||||||
mov ebx, dword[ebx+32]
|
|
||||||
inc ebx
|
|
||||||
mov [fsize], ebx
|
|
||||||
|
|
||||||
mov eax, 68
|
mov eax, 68
|
||||||
mov ebx, 11
|
mov ebx, 11
|
||||||
int 0x40 ; -> create heap
|
int 0x40 ; -> init heap
|
||||||
|
|
||||||
mov eax, 68
|
;mov eax, 70
|
||||||
mov ebx, 12
|
;mov ebx, file_info
|
||||||
mov ecx, [fsize]
|
;mov dword[ebx], 5 ; -> subfunction number
|
||||||
int 0x40 ; -> allocate memory for file
|
;int 0x40 ; -> read file size
|
||||||
mov [fptr], eax ; -> eax = pointer to allocated mem
|
;mov ebx, [fptr]
|
||||||
|
;mov ebx, dword[ebx+32]
|
||||||
|
;inc ebx
|
||||||
|
;mov [fsize], ebx
|
||||||
|
|
||||||
mov eax, 70
|
;mov eax, 68
|
||||||
mov ebx, file_info
|
;mov ebx, 12
|
||||||
mov dword[ebx],0
|
;mov ecx, [fsize]
|
||||||
int 0x40 ; -> read file
|
;int 0x40 ; -> allocate memory for file
|
||||||
|
;mov [fptr], eax ; -> eax = pointer to allocated mem
|
||||||
|
|
||||||
mov [fsize],ebx
|
;mov eax, 70
|
||||||
cmp eax,6
|
;mov ebx, file_info
|
||||||
jnz @f
|
;mov dword[ebx],0
|
||||||
xor eax,eax ;;;;---
|
;int 0x40 ; -> read file
|
||||||
|
|
||||||
|
;mov [fsize],ebx
|
||||||
|
;cmp eax,6
|
||||||
|
;jnz @f
|
||||||
|
;xor eax,eax ;;;;---
|
||||||
|
|
||||||
|
;cmp eax,6
|
||||||
|
;jnz @f
|
||||||
|
;xor eax,eax ;;;;---
|
||||||
|
|
||||||
|
;load kpacked files by Leency
|
||||||
|
|
||||||
|
mov eax,68
|
||||||
|
mov ebx,27
|
||||||
|
mov ecx,I_Param
|
||||||
|
int 0x40
|
||||||
|
|
||||||
|
mov [fsize],edx
|
||||||
|
mov [file_info+16],eax
|
||||||
|
|
||||||
|
test eax,eax
|
||||||
|
jnz .open_opened_well
|
||||||
|
mov eax,6 ;otherwise => failed
|
||||||
|
jmp @f
|
||||||
|
.open_opened_well:
|
||||||
|
xor eax,eax
|
||||||
@@:
|
@@:
|
||||||
else
|
else
|
||||||
mov eax,58
|
mov eax,58
|
||||||
|
Loading…
Reference in New Issue
Block a user