copyf: upload fixes

git-svn-id: svn://kolibrios.org@5515 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-03-09 18:51:16 +00:00
parent 45d0c69fdd
commit a481523442
2 changed files with 34 additions and 29 deletions

View File

@ -1,11 +1,10 @@
//copyf - copy file or folder with content //copyf - copy file or folder with content
#define WIN_COPY_W 300
#define WIN_COPY_H 50
:int copyf(dword from1, in1) :int copyf(dword from1, in1)
{ {
dword error; dword error;
BDVK CopyFile_atr1; BDVK CopyFile_atr1;
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_COPY_W,GetSkinHeight()+WIN_COPY_H-1,0x34,sc.work,T_PASTE_WINDOW);
if (!from1) || (!in1) if (!from1) || (!in1)
{ {
notify("Error: too less copyf params!"); notify("Error: too less copyf params!");
@ -25,11 +24,6 @@
copyf_Draw_Progress(from1+strchr(from1, '/')); copyf_Draw_Progress(from1+strchr(from1, '/'));
return CopyFile(from1, in1); return CopyFile(from1, in1);
} }
if (CheckEvent()==evButton)
{
notify(T_CANCEL_PASTE);
CopyExit();
}
} }
:int CopyFile(dword copy_from3, copy_in3) :int CopyFile(dword copy_from3, copy_in3)

View File

@ -1,27 +1,38 @@
//ýòî âñòàâèòü ïîñëå çàãðóçêè îñíîâíûõ áèáëèîòåê
char fontinfo[28]; char fontinfo[28];
dword libtruetype = #att; dword libtruetype = #att_libtruetype;
char att[] = "/sys/lib/truetype.obj"; //"truetype.obj\0"; char att_libtruetype[22] = "/sys/lib/truetype.obj\0";
dword truetype = #att_truetype; dword truetype = #att_truetype; // truetype(unsigned char *s, stbtt_fontinfo *buffer, char *screen1, int width, int height)
dword get_length = #att_get_length; dword get_length = #att_get_length; // get_length(unsigned char *s, char *buffer, int height, int max_len)
dword get_width = #att_get_width; dword get_width = #att_get_width; // get_width_utf8(unsigned char *s, stbtt_fontinfo *buffer, int height)
dword text_out = #att_text_out; dword text_out = #att_text_out; // text_out(unsigned char *string, char *buffer, int height, int color,int back_color, int x, int y)
dword init_font = #att_init_font; dword init_font = #att_init_font; // init_font(stbtt_fontinfo *font,unsigned char *FontData)
dword text_out_mem = #att_text_out_mem; // text_out_mem(unsigned char *string, stbtt_fontinfo *buffer, int height, int color,int back_color)
dword text_scale_EM = #att_text_scale; // scale_EM(stbtt_fontinfo *buffer, int size)
$DD 2 dup 0 $DD 2 dup 0
//import libimg , \ char att_truetype[] = "truetype";
char att_get_length[] = "get_length";
char att_get_width[] = "get_width";
char att_text_out[] = "text_out";
char att_init_font[] = "init_font";
char att_text_out_mem[] = "text_out_mem";
char att_text_scale[] = "scale_EM";
char att_truetype[] = "truetype"; //============================================================
char att_get_length[] = "get_length"; //============================================================
char att_get_width[] = "get_width";
char att_text_out[] = "text_out";
char att_init_font[] = "init_font";
//load_dll2(libtruetype, #truetype,0); struct stbtt_fontinfo
{
dword userdata;
dword data; // pointer to .ttf file
int fontstart; // offset of start of font
//à ýòî - â ìîìåíò îòðèñîâêè îêíà int numGlyphs; // number of glyphs, needed for range checking
//text_out stdcall (#text, -1, 40, 0xFF0000, 100, 100);
int loca,head,glyf,hhea,hmtx,kern; // table locations as offset from start of .ttf
int index_map; // a cmap mapping for our chosen character encoding
int indexToLocFormat; // format needed to map from glyph index to glyph
};