Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2265 → Rev 2266

/programs/fs/Eolite/trunk/Eolite.c--
42,7 → 42,7
dword file_mas[6898];
int j, i, mouse_dd;
 
dword stak[100]=0; //îêíî About
dword stak[100]; //îêíî About
 
edit_box edit1= {250,247,13,0xffffff,videlenie,0xD3DDEB,0xffffff,0,248,#edit_path,#mouse_dd,64,6,6};
edit_box edit2= {250,213,80,0xFFFFCC,videlenie,0xFFFFCC,0xffffff,0,248,#file_name,#mouse_dd,64,6,6};
51,7 → 51,8
dword buf, off; //äëÿ òåêñòà è áóôåðà
dword devbuf, dev_num;
 
#include "include\LVabout.h--"
#include "include\about_dialog.h--"
#include "include\some_code.h--"
#include "include\sorting.h--"
#include "include\icons_f.h--"
#include "include\ini.h--"
87,7 → 88,6
WriteText(45,i*16+79,0x80,0,#drive_name,0);
PutImage(dev_icon*14*13*3+#devices,14,13,21,i*16+76);
}
Actions(); //ôóíêöèè ôàéëîâ è ïàïîê
}
 
void main()
387,6 → 387,7
DrawRegion_3D(1,40,Form.width-12,onTop(46,0),0x94AECE,0x94AECE); //ñèíèé îáîäîê
DrawRegion_3D(0,39,Form.width-10,onTop(44,0),0xE4DFE1,0xE4DFE1); //ôîí
Devices(); //ïàíåëü ñëåâà íà ñèíåì ôîíå
Actions(); //ôóíêöèè ôàéëîâ è ïàïîê
//SortButtons
DrawFlatButton(192,40,onLeft(192,168),16,31,0xE4DFE1,"File");
DrawFlatButton(onLeft(168,0),40,73,16,32,0xE4DFE1,"Type");
/programs/fs/Eolite/trunk/include/LVabout.h--
File deleted
/programs/fs/Eolite/trunk/include/about_dialog.h--
0,0 → 1,56
//Leency - 2011
 
#include "imgs\logo.txt"
 
#define BROWSER_PATH "/sys/htmlv"
#define BROWSER_LINK "http://www.kolibri-os.narod.ru"
 
 
void authors()
{
byte p;
mouse mm;
byte id, letitclose=0;
SetEventMask(100111b);
loop() switch(WaitEvent())
{
case evMouse:
mm.get();
//êóëüíî
IF (mm.x>85) && (mm.x<155) && (mm.y>190) && (mm.y<190+22)
IF (mm.lkm) {DrawRegion_3D(86,191,68,20,0xC7C7C7,0xFFFFFF); letitclose=1;}
ELSE {IF (letitclose) {DrawRegion_3D(86,191,68,20,0xFFFFFF,0xC7C7C7); Pause(7); ExitProcess();}}
ELSE IF (letitclose) {letitclose=0; DrawRegion_3D(86,191,68,20,0xFFFFFF,0xC7C7C7);}
break;
case evButton:
id=GetButtonID();
IF (id==1) ExitProcess();
IF (id==23) RunProgram(BROWSER_PATH, BROWSER_LINK);
break;
case evKey:
IF (GetKey()==27) ExitProcess();
break;
case evReDraw:
DefineAndDrawWindow(500,200,181,256,0x34,0x10EFEBEF,0,0,"About Eolite");
DrawBar(0,0,172,50,0x8494C4); //ãîëóáîå ñçàäè
PutPaletteImage(#logo,85,85,43,7,#logo_pal);
WriteText(33,100,0x80,0xBF40BF,"Eolite v0.99.8 RC3",0);
WriteText(55,120,0x80,0,"Developers:",0);
WriteText(39,130,0x80,0,"Leency & Veliant",0);
WriteText(30,140,0x80,0,"Diamond, Lrz, Nable",0);
WriteText(55,150,0x80,0," 2008-2011 ",0);
WriteText(12,170,0x80,0,"Visit",0);
DrawLink(48,170,23, "kolibri-os.narod.ru"); //ññûëêa
DrawFlatButton(85,190,70,22,0,0xE4DFE1, "Close");
}
}
 
void DrawLink(dword x,y,btn_id, inscription)
{
WriteText(x,y,0x80,0x4E00E7,inscription,0);
DrawBar(x,y+8,strlen(inscription)*6,1,0x4E00E7); //ïîä÷åðêíóòü ññûëêó
DefineButton(x-1,y-1,strlen(inscription)*6,10,btn_id+BT_HIDE,0);
}
/programs/fs/Eolite/trunk/include/icons_f.h--
232,7 → 232,6
DrawBar(195,y+13,4,1,videlenie);
DrawBar(195,y+14,6,1,videlenie);
 
DrawBar(195+11,y,5,1,videlenie);
DrawBar(195+13,y+1,3,1,videlenie);
DrawBar(195+14,y+2,2,1,videlenie);
/programs/fs/Eolite/trunk/include/some_code.h--
0,0 → 1,53
//Leency - 2011
 
#define add_new_path 1
#define go_back 2
 
void HistoryPath(byte action)
{
if (action==add_new_path)
{
IF (strcmp(#PathHistory+find_symbol(#PathHistory,'|'),#path)==0) return;
IF (strlen(#PathHistory)+strlen(#path)>2560)
{
copystr(#PathHistory+1024,#PathHistory);
copystr("/",#PathHistory+strlen(#PathHistory));
}
copystr("|",#PathHistory+strlen(#PathHistory));
copystr(#path,#PathHistory+strlen(#PathHistory));
}
if (action==go_back)
{
i=strlen(#PathHistory)-1;
WHILE (PathHistory[i]<>'|') { i--; };
IF (i>0) PathHistory[i]=0x00;
WHILE (PathHistory[i]<>'|') { copystr(#PathHistory[i],#path); i--; }
IF (i>0) PathHistory[i]=0x00;
}
}
 
 
dword onLeft(dword right,left) {EAX=Form.width-right-left;}
dword onTop(dword down,up) {EAX=Form.height-GetSkinWidth()-down-up;}
 
 
void ShowMessage(dword message)
{
DrawFlatButton(Form.width/2-13,160,200,80,0,0xFFB6B5, message);
Pause(150);
List_ReDraw();
}
 
 
dword ConvertSize(dword bytes)
{
byte size_prefix[8], temp[3];
IF (bytes>=1073741824) copystr(" Gb",#temp);
ELSE IF (bytes>=1048576) copystr(" Mb",#temp);
ELSE IF (bytes>=1024) copystr(" Kb",#temp);
ELSE copystr(" b ",#temp);
WHILE (bytes>1023) bytes/=1024;
copystr(IntToStr(bytes),#size_prefix);
copystr(#temp,#size_prefix+strlen(#size_prefix));
EAX=#size_prefix;
}
/programs/fs/Eolite/trunk/include/sorting.h--
25,7 → 25,11
void Sort_by_Type(int a, b) // äëÿ ïåðâîãî âûçîâà: a = 0, b = <ýëåìåíòîâ â ìàññèâå> - 1
{
int i=a; dword offset=buf+72; byte filename1[256], filename2[256]; int n;
int i=a;
int n;
dword offset=buf+72;
byte filename1[256], filename2[256];
IF (a >= b) return;
for (j = a; j <= b; j++)
{
/programs/fs/Eolite/trunk/lib/kolibri.h--
11,6 → 11,7
dword x86esp_reg = 0x00100000; // 0x0007fff0;
dword I_Param = #param;
dword I_Path = #program_path;
 
char param[4096]="";
char program_path[4096]="";
 
37,7 → 38,7
void get();
};
 
int TestBit(EAX, CL)
inline fastcall int TestBit(EAX, CL)
{
$shr eax,cl
$and eax,1
95,7 → 96,7
$int 0x40
}
 
int GetSlot(dword ECX)
inline fastcall int GetSlot(dword ECX)
{
EAX = 18;
EBX = 21;
102,7 → 103,7
$int 0x40
}
 
int ActiveProcess()
inline fastcall int ActiveProcess()
{
EAX = 18;
EBX = 7;
156,21 → 157,21
}
 
//------------------------------------------------------------------------------
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,
byte mainAreaType, dword mainAreaColor,byte headerType,dword headerColor,EDI)
void DefineAndDrawWindow(dword x,y,sizeX,sizeY,byte mainAreaType,
dword mainAreaColour,byte headerType,dword headerColour,EDI)
{
EAX = 12;
EAX = 12; // function 12:tell os about windowdraw
EBX = 1;
$int 0x40
EBX = x << 16 + sizeX;
ECX = y << 16 + sizeY;
EDX = mainAreaType << 24 | mainAreaColor;
ESI = headerType << 24 | headerColor;
EDX = mainAreaType << 24 | mainAreaColour;
ESI = headerType << 24 | headerColour;
$xor eax,eax
$int 0x40
EAX = 12;
EAX = 12; // function 12:tell os about windowdraw
EBX = 2;
$int 0x40
}
366,7 → 367,7
}
 
//------------------------------------------------------------------------------
/*void WriteDebug(dword EDX)
inline fastcall void WriteDebug(dword EDX)
{
$mov eax, 63
$mov ebx, 1
402,4 → 403,4
WriteDebug(IntToStr(za_kadrom));
Pause(200);
}*/
}