Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8346 → Rev 7835

/programs/other/kpack/trunk/const_var.inc
69,7 → 69,8
OpenDialog_Init dd aOpenDialog_Init
OpenDialog_Start dd aOpenDialog_Start
;OpenDialog__Version dd aOpenDialog_Version
dd 0,0
dd 0
dd 0
aOpenDialog_Init db 'OpenDialog_init',0
aOpenDialog_Start db 'OpenDialog_start',0
;aOpenDialog_Version db 'Version_OpenDialog',0
84,7 → 85,8
check_box_draw dd aCheck_box_draw
check_box_mouse dd aCheck_box_mouse
 
dd 0,0
dd 0
dd 0
 
aEdit_box_draw db 'edit_box',0
aEdit_box_key db 'edit_box_key',0
95,6 → 97,15
aCheck_box_mouse db 'check_box_mouse2',0
 
;---------------------------------------------------------------------
head_f_i:
head_f_l db 'System error',0
 
err_message_found_lib1 db 'box_lib.obj - Not found!',0
err_message_found_lib2 db 'proc_lib.obj - Not found!',0
 
err_message_import1 db 'box_lib.obj - Wrong import!',0
err_message_import2 db 'proc_lib.obj - Wrong import!',0
 
system_dir_Boxlib db '/sys/lib/box_lib.obj',0
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
;---------------------------------------------------------------------
101,9 → 112,11
align 4
l_libs_start:
 
library01 l_libs system_dir_Boxlib+9, library_path, system_dir_Boxlib, Box_lib_import
library01 l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \
err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i
 
library02 l_libs system_dir_ProcLib+9, library_path, system_dir_ProcLib, ProcLib_import
library02 l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
 
load_lib_end:
;---------------------------------------------------------------------
/programs/other/kpack/trunk/kpack.asm
23,16 → 23,15
dd cur_dir_path
;---------------------------------------------------------------------
include '../../../config.inc' ;for nightbuild
include '../../../KOSfuncs.inc'
include '../../../macros.inc'
include '../../../gui_patterns.inc'
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../../load_lib.mac'
include '../../../develop/libraries/box_lib/load_lib.mac'
@use_library
 
START:
mcall SF_SYS_MISC,SSF_HEAP_INIT
mcall SF_SET_EVENTS_MASK,0x80000027
mcall 68,11
mcall 40,0x80000027
 
load_libraries l_libs_start,load_lib_end
cmp eax,-1
131,7 → 130,7
call draw_window
;--------------------------------------
still:
mcall SF_WAIT_EVENT
mcall 10
dec eax
jz red
 
183,11 → 182,11
exit:
xor eax,eax
dec eax
mcall ;SF_TERMINATE_PROCESS
mcall
;*********************************************************************
button:
; button pressed
mcall SF_GET_BUTTON
mcall 17
xchg al,ah
cmp al,7
jz but7
319,7 → 318,7
ret
;*********************************************************************
key:
mcall SF_GET_KEY
mcall 2
 
push dword edit1
call [edit_box_key]
409,7 → 408,7
neg ecx
mov esi,ecx
pop edi
mcall SF_DRAW_TEXT,,0xB0000000,edi
mcall 4,,0xB0000000,edi
add ebx,16
add edi,80
cmp edi,message_cur_pos
419,20 → 418,20
;*********************************************************************
draw_log_area:
DrawRectangle 5, LOG_Y, WIN_W-12, LOG_H, [sc.work_graph]
mcall SF_DRAW_RECT, <6,WIN_W-13>, <LOG_Y+1,LOG_H-1>, 0xFFFfff
mcall 13, <6,WIN_W-13>, <LOG_Y+1,LOG_H-1>, 0xFFFfff
DrawRectangle3D 6, LOG_Y+1, WIN_W-13, LOG_H-1, 0xDEDEDE, [sc.work_graph]
ret
;*********************************************************************
draw_window:
; start redraw
mcall SF_REDRAW,SSF_BEGIN_DRAW
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,40
mcall 12,1
mcall 48,3,sc,40
;--------------------------------------
edit_boxes_set_sys_color edit1,editboxes_end,sc
check_boxes_set_sys_color2 check1,check1_end,sc
;--------------------------------------
; define window
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
mcall 48,4
 
mov ecx,100 shl 16 + WIN_H
add ecx, eax
441,8 → 440,8
add edx,34000000h
xor esi,esi
xor edi,edi
mcall SF_CREATE_WINDOW,<250,WIN_W+10>,,,,caption_str
mcall SF_THREAD_INFO,procinfo,-1
mcall 0,<250,WIN_W+10>,,,,caption_str
mcall 9,procinfo,-1
mov eax,[procinfo+70] ;status of window
test eax,100b
458,7 → 457,7
call draw_editbox
; end redraw
.end:
mcall SF_REDRAW,SSF_END_DRAW
mcall 12,2
ret
;*********************************************************************
draw_editbox:
495,7 → 494,7
draw_buttons:
; define compress button
mov cx,18
mcall SF_DEFINE_BUTTON,<WIN_W - RIGHT_BTN_W - 5, RIGHT_BTN_W>, <3, 20>,2,[sc.work_button]
mcall 8,<WIN_W - RIGHT_BTN_W - 5, RIGHT_BTN_W>, <3, 20>,2,[sc.work_button]
; uncompress button
inc edx
add ecx,LINE_H shl 16
507,10 → 506,10
mov ecx,[sc.work_button_text]
or ecx,0x90000000
mov edx,aQuestion
mcall SF_DRAW_TEXT,<WIN_W-19, LINE_H*2+5>
mcall 4,<WIN_W-19, LINE_H*2+5>
pop esi
; define Path button
mcall SF_DEFINE_BUTTON,<6,64>,<LINE_H*2+3,20>,4
mcall 8,<6,64>,<LINE_H*2+3,20>,4
; text on Path button
mov ebx,8 shl 16+5
mov al,4