/programs/cmm/eolite/Eolite.c |
---|
150,18 → 150,22 |
#include "include\properties.h" |
#include "include\breadcrumbs.h" |
void load_libraries() |
{ |
load_dll(boxlib, #box_lib_init,0); |
load_dll(libini, #lib_init,1); |
load_dll(libio, #libio_init,1); |
load_dll(libimg, #libimg_init,1); |
} |
void main() |
{ |
dword id; |
byte count_sl = 0; |
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y; |
char stats; |
rand_n = random(40); |
load_dll(boxlib, #box_lib_init,0); |
load_dll(libini, #lib_init,1); |
load_dll(libio, #libio_init,1); |
load_dll(libimg, #libimg_init,1); |
load_libraries(); |
SetAppColors(); |
LoadIniSettings(); |
182,12 → 186,9 |
{ |
if (strlen(#param)>1) && (param[strlen(#param)-1]=='/') param[strlen(#param)-1]=NULL; //no "/" at the end |
if (dir_exists(#param)==true) |
{ |
if (dir_exists(#param)) { |
strcpy(#path, #param); |
} |
else |
{ |
} else { |
notify(T_NOTIFY_APP_PARAM_WRONG); |
} |
} |
196,8 → 197,7 |
strcpy(#inactive_path, #path); |
llist_copy(#files_inactive, #files); |
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER); |
loop(){ |
switch(WaitEventTimeout(50)) |
loop() switch(WaitEventTimeout(50)) |
{ |
case evMouse: |
if (del_active) || (Form.status_window>2) break; |
209,47 → 209,8 |
mouse.get(); |
if (!mouse.mkm) && (stats>0) stats = 0; |
if (mouse.mkm) && (!stats) |
{ |
x_old = mouse.x; |
y_old = mouse.y; |
stats = 1; |
} |
if (mouse.mkm) && (stats==1) |
{ |
dif_x = mouse.x-x_old; |
dif_y = mouse.y-y_old; |
adif_x = fabs(dif_x); |
adif_y = fabs(dif_y); |
ProceedMouseGestures(); |
if (adif_x>adif_y) |
{ |
if (dif_x > 150) |
{ |
if (history.forward()) |
{ |
strcpy(#path, history.current()); |
files.KeyHome(); |
Open_Dir(#path,WITH_REDRAW); |
} |
stats = 0; |
} |
if (dif_x < -150) |
{ |
GoBack(); |
stats = 0; |
} |
} |
else |
{ |
if (dif_y < -100) |
{ |
Dir_Up(); |
stats = 0; |
} |
} |
} |
if (files.MouseOver(mouse.x, mouse.y)) |
{ |
//select file |
361,15 → 322,10 |
Clipboard__CopyText(#path); |
break; |
case 21: //Back |
GoBack(); |
EventHistoryGoBack(); |
break; |
case 22: //Forward |
if (history.forward()) |
{ |
strcpy(#path, history.current()); |
files.KeyHome(); |
Open_Dir(#path,WITH_REDRAW); |
} |
EventHistoryGoForward(); |
break; |
case 23: |
Dir_Up(); |
486,7 → 442,7 |
switch (key_scancode) |
{ |
case SCAN_CODE_BS: |
//GoBack(); |
//EventHistoryGoBack(); |
Dir_Up(); |
break; |
case SCAN_CODE_ENTER: |
546,7 → 502,6 |
cmd_free = false; |
} |
} |
} |
void draw_window() |
{ |
817,7 → 772,7 |
if (errornum) |
{ |
history.add(#path); |
GoBack(); |
EventHistoryGoBack(); |
Write_Error(errornum); |
return; |
} |
973,7 → 928,7 |
} |
} |
inline fastcall void GoBack() |
inline fastcall void EventHistoryGoBack() |
{ |
char cur_folder[4096]; |
strcpy(#cur_folder, #path); |
1091,26 → 1046,22 |
switch(N) |
{ |
case 1: |
if (!active_about) |
{ |
if (!active_about) { |
about_stak = malloc(4096); |
about_thread_id = CreateThread(#about_dialog,about_stak+4092); |
break; |
} |
else |
{ |
} else { |
ActivateWindow(GetProcessSlot(about_thread_id)); |
} |
break; |
case 2: |
if (!files.count) break; |
NewElement_Form(RENAME_ITEM, #file_name); |
if (files.count) NewElement_Form(RENAME_ITEM, #file_name); |
break; |
case 3: |
if (!itdir) RunProgram("/sys/tinypad", #file_path); |
if (files.count) && (!itdir) RunProgram("/sys/tinypad", #file_path); |
break; |
case 4: |
if (!itdir) RunProgram("/sys/develop/heed", #file_path); |
if (files.count) && (!itdir) RunProgram("/sys/develop/heed", #file_path); |
break; |
case 5: //refresh cur dir & devs |
if (two_panels.checked) |
1238,4 → 1189,49 |
SelectFileByName(#selected_filename); |
} |
void EventHistoryGoForward() |
{ |
if (history.forward()) { |
strcpy(#path, history.current()); |
files.KeyHome(); |
Open_Dir(#path,WITH_REDRAW); |
} |
} |
void ProceedMouseGestures() |
{ |
char stats; |
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y; |
if (!mouse.mkm) && (stats>0) stats = 0; |
if (mouse.mkm) && (!stats) |
{ |
x_old = mouse.x; |
y_old = mouse.y; |
stats = 1; |
} |
if (mouse.mkm) && (stats==1) |
{ |
dif_x = mouse.x-x_old; |
dif_y = mouse.y-y_old; |
adif_x = fabs(dif_x); |
adif_y = fabs(dif_y); |
if (adif_x>adif_y) { |
if (dif_x > 150) { |
EventHistoryGoForward(); |
stats = 0; |
} |
if (dif_x < -150) { |
EventHistoryGoBack(); |
stats = 0; |
} |
} else { |
if (dif_y < -100) { |
Dir_Up(); |
stats = 0; |
} |
} |
} |
} |
stop: |
/programs/develop/sdk/trunk/pixlib/demo1.asm |
---|
5,8 → 5,8 |
{ |
.frame dd ? |
.grab dd ? |
.work_3d_dark dd ? |
.work_3d_light dd ? |
.work_dark dd ? |
.work_light dd ? |
.grab_text dd ? |
.work dd ? |
.work_button dd ? |
/programs/develop/sdk/trunk/pixlib/demo2.asm |
---|
5,8 → 5,8 |
{ |
.frame dd ? |
.grab dd ? |
.work_3d_dark dd ? |
.work_3d_light dd ? |
.work_dark dd ? |
.work_light dd ? |
.grab_text dd ? |
.work dd ? |
.work_button dd ? |
/programs/develop/sdk/trunk/pixlib/demo3.asm |
---|
5,8 → 5,8 |
{ |
.frame dd ? |
.grab dd ? |
.work_3d_dark dd ? |
.work_3d_light dd ? |
.work_dark dd ? |
.work_light dd ? |
.grab_text dd ? |
.work dd ? |
.work_button dd ? |
/programs/fs/fspeed/udata.inc |
---|
28,8 → 28,8 |
app_colours: |
w_frame dd ? |
w_grab dd ? |
w_work_3d_dark dd ? |
w_work_3d_light dd ? |
w_work_dark dd ? |
w_work_light dd ? |
w_grab_text dd ? |
w_work dd ? |
w_work_button dd ? |
/programs/fs/opendial/opendial.asm |
---|
3207,8 → 3207,8 |
w_frame rd 1 |
w_grab rd 1 |
w_work_3d_dark rd 1 |
w_work_3d_light rd 1 |
w_work_dark rd 1 |
w_work_light rd 1 |
w_grab_text rd 1 |
w_work rd 1 |
w_work_button rd 1 |
/programs/games/flood-it/trunk/lib/kolibri.h |
---|
47,7 → 47,7 |
} |
struct system_colors{ |
dword frame,grab,work_3d_dark,work_3d_light,grab_text,work,work_button,work_button_text,work_text,work_graph; |
dword frame,grab,work_dark,work_light,grab_text,work,work_button,work_button_text,work_text,work_graph; |
void get(); |
}; |
/programs/games/mine/trunk/kos_sys.h-- |
---|
73,8 → 73,8 |
{ |
dword nonset1, |
nonset2, |
work_3d_dark, |
work_3d_light, |
work_dark, |
work_light, |
w_title, |
w_work, |
w_work_button, |
/programs/gui_patterns.inc |
---|
1,3 → 1,12 |
BT_DEL equ 0x80000000 |
BT_HIDE equ 0x40000000 |
BT_NOFRAME equ 0x20000000 |
macro DefineButton x, y, w, h, id, background_color |
{ |
mcall 8, (x) shl 16 + (w), (y) shl 16 + (h), id, background_color |
} |
macro DrawBar x, y, width, height, color |
{ |
mcall 13, (x) shl 16 + (width), (y) shl 16 + (height), color |
39,11 → 48,3 |
mcall |
} |
BT_DEL equ 0x80000000 |
BT_HIDE equ 0x40000000 |
BT_NOFRAME equ 0x20000000 |
macro DefineButton x, y, w, h, id, background_color |
{ |
mcall 8, (x) shl 16 + (w), (y) shl 16 + (h), id, background_color |
} |
/programs/macros.inc |
---|
469,8 → 469,8 |
struct system_colors |
frame dd ? ;nonset1 |
grab dd ? ;nonset2 |
work_3d_dark dd ? |
work_3d_light dd ? |
work_dark dd ? |
work_light dd ? |
grab_text dd ? ;window_title |
work dd ? |
work_button dd ? |
/programs/media/scrshoot/scrshoot.mac |
---|
224,8 → 224,8 |
{ |
.frames: dd ? ;+0 |
.grab: dd ? ;+4 |
.work_3d_dark: dd ? ;+8 |
.work_3d_light: dd ? ;+12 |
.work_dark: dd ? ;+8 |
.work_light: dd ? ;+12 |
.grab_text: dd ? ;+16 |
.work: dd ? ;+20 |
.work_button: dd ?;+24 |
/programs/other/Timer/Timer.asm |
---|
59,8 → 59,8 |
sc: |
.frames dd 0 |
.grab dd 0 |
.work_3d_dark dd 0 |
.work_3d_light dd 0 |
.work_dark dd 0 |
.work_light dd 0 |
.grab_text dd 0 |
.work dd 0 |
.work_button dd 0 |
/programs/other/calc/trunk/calc.asm |
---|
715,7 → 715,7 |
cmp [edx], byte 'x' |
jne next_line |
DrawRectangle3D DISPLAY_X-1,DISPLAY_Y-1,DISPLAY_W+2,DISPLAY_H+2, [sc.work_3d_dark], [sc.work_3d_light] |
DrawRectangle3D DISPLAY_X-1,DISPLAY_Y-1,DISPLAY_W+2,DISPLAY_H+2, [sc.work_dark], [sc.work_light] |
DrawRectangle DISPLAY_X,DISPLAY_Y,DISPLAY_W,DISPLAY_H, [sc.work_graph] |
mcall 38, < DISPLAY_X+1, DISPLAY_W+DISPLAY_X-1>, <DISPLAY_Y+1, DISPLAY_Y+1>, 0xE0E0E0 ; internal shadow |
mcall , < DISPLAY_X+1, DISPLAY_X+1>, <DISPLAY_Y+2, DISPLAY_Y+DISPLAY_H-1>, ; internal shadow |
/programs/system/menu/trunk/build_ru.bat |
---|
File deleted |
\ No newline at end of file |
/programs/system/menu/trunk/build_en.bat |
---|
File deleted |
\ No newline at end of file |
/programs/system/menu/trunk/build.bat |
---|
0,0 → 1,6 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm -m 16384 menu.asm @menu |
@kpack @menu |
@erase lang.inc |
@pause |
/programs/system/menu/trunk/menu.asm |
---|
21,6 → 21,7 |
; Compile with FASM for Menuet |
;****************************************************************************** |
BTN_HEIGHT = 22 |
BTN_WIDTH = 140 |
TXT_Y = (BTN_HEIGHT)/2-4 |
PANEL_HEIGHT = 20 |
39,8 → 40,8 |
dd bootparam ; boot parameters |
dd 0x0 ; path |
;------------------------------------------------------------------------------ |
include "lang.inc" |
include "..\..\..\macros.inc" |
include "..\..\..\gui_patterns.inc" |
;include "../../../debug.inc" ; debug macros |
;------------------------------------------------------------------------------ |
align 4 |
475,7 → 476,7 |
jnz click |
mcall 37,1 |
ror eax,16 ; eax = [ Y | X ] relative to window |
cmp ax,140 ; pointer in window? |
cmp ax,BTN_WIDTH ; pointer in window? |
ja noinwindow |
; *** in window *** |
shr eax,16 ; eax = [ 0 | Y ] |
722,10 → 723,11 |
.1: |
shl ecx,16 |
add ecx,eax ; ecx = [ Y_START | Y_SIZE ] |
dec ecx |
movzx ebx,[edi + x_start] |
shl ebx,16 |
mov bx,140 ; ebx = [ X_START | X_SIZE ] |
mov bx,BTN_WIDTH ; ebx = [ X_START | X_SIZE ] |
mov edx,0x01000000 ; color of work area RRGGBB,8->color gl |
mov esi,edx ; unmovable window |
788,9 → 790,10 |
; receives number of button in dl |
push edx |
mov eax,8 |
mov ebx,140 |
mov ebx,BTN_WIDTH |
movzx ecx,dl |
imul ecx,BTN_HEIGHT |
mov [draw_y], ecx |
shl ecx,16 |
add ecx,BTN_HEIGHT |
; edx = button identifier |
798,6 → 801,7 |
cmp esi,0xdfdfdf |
jb nocorrect |
sub esi,0x1b1b1b |
;-------------------------------------- |
align 4 |
nocorrect: |
808,12 → 812,24 |
;-------------------------------------- |
align 4 |
.nohighlight: |
or edx,0x20000000 |
or edx,BT_NOFRAME + BT_HIDE |
; dunkaist[ |
add edx,0xd1ff00 ; This makes first menu buttons differ |
; from system close button with 0x000001 id |
; dunkaist] |
mcall |
pusha |
mov edx, esi |
mcall 13 |
mcall , BTN_WIDTH, <[draw_y],1>, [sc.work_light] |
mcall , 1, <[draw_y],BTN_HEIGHT> |
mcall , <BTN_WIDTH,1>, <[draw_y],BTN_HEIGHT+1>, [sc.work_dark] |
add [draw_y], BTN_HEIGHT-1 |
mcall , BTN_WIDTH, <[draw_y],1> |
popa |
movzx edx,dl |
dec dl |
imul ebx,edx,BTN_HEIGHT |
911,6 → 927,8 |
.y dw ? |
.x dw ? |
;-------------------------------------- |
draw_y dd ? |
;-------------------------------------- |
x_working_area: |
.right: dw ? |
.left: dw ? |
/programs/system/rdsave/trunk/rdsave.asm |
---|
359,7 → 359,7 |
m2m dword [frame_data.font_backgr_color],[sc.work] |
m2m dword [frame_data.font_color],[sc.work_text] |
m2m dword [frame_data.ext_fr_col],[sc.work_graph] |
m2m dword [frame_data.int_fr_col],[sc.work_3d_light] |
m2m dword [frame_data.int_fr_col],[sc.work_light] |
push dword frame_data |
call [Frame_draw] |
/programs/system/skincfg/trunk/udata.inc |
---|
33,8 → 33,8 |
w_frame dd ? |
w_grab dd ? |
w_work_3d_dark dd ? |
w_work_3d_light dd ? |
w_work_dark dd ? |
w_work_light dd ? |
w_grab_text dd ? |
w_work dd ? |
w_work_button dd ? |