fix DefineAndDrawWindow(), rename vfc to diff

git-svn-id: svn://kolibrios.org@6746 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2016-11-23 11:37:13 +00:00
parent ec00fe6b28
commit 2cfdddd8c6
30 changed files with 39 additions and 37 deletions

View File

@ -312,7 +312,7 @@ void main()
void draw_window()
{
system.color.get();
DefineAndDrawWindow(GetScreenWidth()-WIN_W/2,GetScreenHeight()-WIN_H/2,WIN_W,WIN_H,0x73,0xFFFFFF,#win_title);
DefineAndDrawWindow(GetScreenWidth()-WIN_W/2,GetScreenHeight()-WIN_H/2,WIN_W,WIN_H,0x73,0xFFFFFF,#win_title,0);
GetProcessInfo(#Form, SelfInfo);
DrawBar(0, 0, Form.cwidth, TOPPANELH, system.color.work);
DrawBar(0, Form.cheight-BOTPANELH, Form.cwidth, BOTPANELH, system.color.work);

View File

@ -81,7 +81,7 @@ void properties_dialog()
break;
case evReDraw:
DefineAndDrawWindow(Form.left + 150,150,270,285+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES);
DefineAndDrawWindow(Form.left + 150,150,270,285+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0;
GetProcessInfo(#settings_form, SelfInfo);
DrawCaptButton(settings_form.cwidth-70-13, settings_form.cheight-34, 70, 22, 10, 0x288FBD, 0xFFFfff, BTN_CLOSE);
}

View File

@ -405,7 +405,7 @@ void EventShowDownloader()
void draw_window()
{
DefineAndDrawWindow(Form.left,Form.top,Form.width,Form.height,0x73,0,#title);
DefineAndDrawWindow(Form.left,Form.top,Form.width,Form.height,0x73,0,#title,0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return;

View File

@ -92,7 +92,7 @@ void draw_window()
dword x=30;
y.n=0;
system.color.get();
DefineAndDrawWindow(screen.width-570/2, 100, 570, 280+skin_height, 0x34, system.color.work, WINDOW_TITLE_TEXT);
DefineAndDrawWindow(screen.width-570/2, 100, 570, 280+skin_height, 0x34, system.color.work, WINDOW_TITLE_TEXT,0);
GetProcessInfo(#Form, SelfInfo);
WriteTextB(x+2,y.inc(20)+2,0x81,MixColors(system.color.work, 0xB92234,220),CONTENT_HEADER_TEXT);
WriteTextB(x,y.n,0x81,0xB92234,CONTENT_HEADER_TEXT);

View File

@ -75,7 +75,7 @@ void main()
case evReDraw:
system.color.get();
DefineAndDrawWindow(215,120,500,350,0x73,system.color.work,WINDOW_TITLE);
DefineAndDrawWindow(215,120,500,350,0x73,system.color.work,WINDOW_TITLE,0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break;
if (Form.height<140) { MoveSize(OLD,OLD,OLD,140); break; }

View File

@ -3,4 +3,4 @@ if tup.getconfig("LANG") == "ru"
then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config
end
tup.rule("vfc.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "vfc.com")
tup.rule("diff.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "diff.com")

View File

@ -0,0 +1,5 @@
@del diff
@c-- diff.c
@move diff.com diff
@del warning.txt
@pause

View File

@ -11,13 +11,13 @@ IO io1, io2;
#include "32user32.h"
#include "objects.h"
#include "vfc_gui.h"
#include "diff_gui.h"
#define mincmpstrings 2
#define maxcmpstrings 10
#define maxcmpoffset 100
char window_title[] = "Visual Text Comparer (Diff tool)";
char window_title[] = "Kolibri Diff tool (Visual Text Comparer)";
char* srcfilename;
char* dstfilename;

View File

@ -28,6 +28,8 @@ void gui()
OpenDialog_init stdcall (#o_dialog);
SetEventMask(0x27);
debugln("GUI");
loop() switch(WaitEvent())
{
case evMouse:
@ -93,7 +95,7 @@ void gui()
void draw_window()
{
system.color.get();
DefineAndDrawWindow(215, 100, 450, 195 + skin_height, 0x34, system.color.work, #window_title);
DefineAndDrawWindow(215, 100, 450, 195 + skin_height, 0x34, system.color.work, #window_title,0);
GetProcessInfo(#Form, SelfInfo);
WriteText(src_box.left-2, src_box.top-21, 0x90, system.color.work_text, "First file:");

View File

@ -193,7 +193,7 @@ void GetCurrentSectionData()
void Event_DrawWindow()
{
system.color.get();
DefineAndDrawWindow(215, 100, 600, 400, 0x33, system.color.work, WINDOW_TITLE);
DefineAndDrawWindow(215, 100, 600, 400, 0x33, system.color.work, WINDOW_TITLE,0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return;
if (Form.width < 450) { MoveSize(OLD,OLD,450,OLD); return; }

View File

@ -34,7 +34,7 @@ void about_dialog()
break;
case evReDraw:
DefineAndDrawWindow(Form.left+Form.width/2,Form.top+Form.height/2-114,310,300+GetSkinHeight(),0x34,system.color.work,NULL);
DefineAndDrawWindow(Form.left+Form.width/2,Form.top+Form.height/2-114,310,300+GetSkinHeight(),0x34,system.color.work,NULL,0);
GetProcessInfo(#about_form, SelfInfo);
if (about_form.status_window>2) break;
logo_pal[0] = system.color.work;

View File

@ -35,7 +35,7 @@ void DisplayOperationForm()
title = T_DELETE_WINDOW_TITLE;
message = T_DELETE_WINDOW_TEXT;
}
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W,skin_height+WIN_DIALOG_H,0x34,system.color.work,title);
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W,skin_height+WIN_DIALOG_H,0x34,system.color.work,title,0);
GetProcessInfo(#Dialog_Form, SelfInfo);
WriteText(45, 11, 0x90, system.color.work_text, message);
DrawFlatButton(Dialog_Form.cwidth - 105, copy_bar.top-2 , T_CANCEL_PASTE, T_ABORT_WINDOW_BUTTON);

View File

@ -345,7 +345,7 @@ void properties_dialog()
void DrawPropertiesWindow()
{
DefineAndDrawWindow(Form.left + 150,150,305,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES);
DefineAndDrawWindow(Form.left + 150,150,305,360+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES,0);
if ( !asm test path_to_file_ed.flags, 2)
{
path_to_file_ed.blur_border_color = system.color.work;

View File

@ -91,7 +91,7 @@ void settings_dialog()
break;
case evReDraw:
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 376, 370+skin_height,0x34,system.color.work,TITLE_SETT);
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 376, 370+skin_height,0x34,system.color.work,TITLE_SETT,0);
DrawSettingsCheckBoxes();
}
}

View File

@ -59,7 +59,7 @@ void main()
if (menu.list.cur_y) {
if (menu.list.cur_y > butv.id) && (menu.list.cur_y < buta.id) category = menu.list.cur_y - butv.id;
}
DefineAndDrawWindow(215,100,350,300,0x34,0xFFFFFF,"Window header");
DefineAndDrawWindow(215,100,350,300,0x34,0xFFFFFF,"Window header",0);
GetProcessInfo(#Form, SelfInfo);
WriteText(10,110,0x80,0,#param);
DrawCaptButton(butv.x, butv.y, butv.w, butv.h, butv.id, 0xCCCccc, 0x000000, "Vegetables");

View File

@ -45,7 +45,7 @@ byte id;
break;
case evReDraw:
system.color.get();
DefineAndDrawWindow(screen.width-fw/2,screen.height-fh/2,fw,fh+skin_height,0x33,0xE0DFE3,"Rainbow (rgb test)");
DefineAndDrawWindow(screen.width-fw/2,screen.height-fh/2,fw,fh+skin_height,0x33,0xE0DFE3,"Rainbow (rgb test)",0);
_PutImage(0,0,256,256,#image);
DrawCaptButton(280,20, 110,30,DRAW1_BTN,system.color.work_button,system.color.work_button_text,"Draw 1");
DrawCaptButton(280,60, 110,30,DRAW2_BTN,system.color.work_button,system.color.work_button_text,"Draw 2");

View File

@ -29,7 +29,7 @@ void draw_window()
{
proc_info Form;
int i;
DefineAndDrawWindow(215,100,350,300,0x34,0xFFFFFF,"Window header");
DefineAndDrawWindow(215,100,350,300,0x34,0xFFFFFF,"Window header",0);
GetProcessInfo(#Form, SelfInfo);
for (i=0; i<io.dir.count; i++)
{

View File

@ -54,7 +54,7 @@ void main()
case evReDraw:
sc.get();
DefineAndDrawWindow(b_screen_width/4, b_screen_height/4, s_screen_width + 9, s_screen_height + GetSkinHeight() + 45,0x74, 0, "EasyShot v0.2",0);
DefineAndDrawWindow(b_screen_width/4, b_screen_height/4, s_screen_width + 9, s_screen_height + skin_height + 45,0x74, 0, "EasyShot v0.2",0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break;
DrawBar(0, 0, Form.cwidth, 41, sc.work);

View File

@ -33,7 +33,7 @@ void main()
goto _DRAW_WINDOW_CONTENT;
case evReDraw:
system.color.get();
DefineAndDrawWindow(215,100,500,320+skin_height,0x74,0xFFFFFF,#title);
DefineAndDrawWindow(215,100,500,320+skin_height,0x74,0xFFFFFF,#title,0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break;
_DRAW_WINDOW_CONTENT:

View File

@ -331,18 +331,18 @@ inline fastcall int TestBit( EAX, CL)
//------------------------------------------------------------------------------
:void DefineAndDrawWindow(dword x, y, size_w, size_h, byte WindowType,dword WindowAreaColor, bgcolor, title)
:void DefineAndDrawWindow(dword _x, _y, _w, _h, _window_type, _bgcolor, _title, _flags)
{
EAX = 12; // function 12:tell os about windowdraw
EBX = 1;
$int 0x40
$xor EAX,EAX
EBX = x << 16 + size_w;
ECX = y << 16 + size_h;
EDX = WindowType << 24 | WindowAreaColor;
EDI = bgcolor;
ESI = title;
EBX = _x << 16 + _w;
ECX = _y << 16 + _h;
EDX = _window_type << 24 | _bgcolor;
EDI = _title;
ESI = _flags;
$int 0x40
@ -510,7 +510,7 @@ inline fastcall dword GetStartTime()
loop()switch(WaitEvent())
{
case evReDraw:
DefineAndDrawWindow(X_EventRedrawWindow,Y_EventRedrawWindow,100,1,1,0x34,0xFFFFFF,"");
DefineAndDrawWindow(X_EventRedrawWindow,Y_EventRedrawWindow,100,1,1,0x34,0xFFFFFF,"",0);
pause(10);
ExitProcess();
break;

View File

@ -117,7 +117,7 @@ void main() {
int DefineWindow(dword wtitle) {
system.color.get();
DefineAndDrawWindow(GetScreenWidth()-WIN_W/2,GetScreenHeight()-WIN_H/2, WIN_W, WIN_H, 0x73,system.color.work);
DefineAndDrawWindow(GetScreenWidth()-WIN_W/2,GetScreenHeight()-WIN_H/2, WIN_W, WIN_H, 0x73,system.color.work, 0,0);
DrawTitle(wtitle);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return 0; //rolled_up

View File

@ -143,7 +143,7 @@ void main()
case evReDraw:
system.color.get();
DefineAndDrawWindow(130, 150, 465, 398+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE);
DefineAndDrawWindow(130, 150, 465, 398+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE,0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break;
taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth;

View File

@ -99,7 +99,7 @@ void main()
break;
case evReDraw:
system.color.get();
DefineAndDrawWindow(screen.width-400/2,screen.height-450/2,400,454,0x73,0,T_WINDOW_TITLE);
DefineAndDrawWindow(screen.width-400/2,screen.height-450/2,400,454,0x73,0,T_WINDOW_TITLE,0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break;
if (Form.width < 300) { MoveSize(OLD,OLD,300,OLD); break; }

View File

@ -92,7 +92,7 @@ void main()
case evReDraw:
system.color.get();
DefineAndDrawWindow(GetScreenWidth()-window_width/2,GetScreenHeight()-window_height/2,window_width,window_height,0x74,system.color.work,"");
DefineAndDrawWindow(screen.width-window_width/2,screen.height-window_height/2,window_width,window_height,0x74,system.color.work,"",0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) { DrawTitle(#window_title); break; } else DrawTitle("");
draw_top_bar();

View File

@ -32,6 +32,6 @@ void main()
void draw_window()
{
DefineAndDrawWindow(215, 100, 350, 300, 0x34, 0xEEEeee, "Window title");
DefineAndDrawWindow(215, 100, 350, 300, 0x34, 0xEEEeee, "Window title",0);
GetProcessInfo(#Form, SelfInfo);
}

View File

@ -259,7 +259,7 @@ void OpenFile(dword f_path)
void draw_window()
{
DefineAndDrawWindow(Form.left,Form.top,Form.width,Form.height,0x73,0,#title);
DefineAndDrawWindow(Form.left,Form.top,Form.width,Form.height,0x73,0,#title,0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return;

View File

@ -1,5 +0,0 @@
@del vfc
@c-- vfc.c
@move vfc.com vfc
@del warning.txt
@pause