shots saved in format *.png

git-svn-id: svn://kolibrios.org@6763 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2016-11-26 14:22:34 +00:00
parent 5a7b1ac4fe
commit a64d63f213
3 changed files with 216 additions and 442 deletions

View File

@ -34,7 +34,6 @@ pusha
bt word [ch6.flags],1
jnc @f
mov eax,[cur_number]
;mov ebx,4
movsx ebx,byte [sign_n]
push ebx
call int_to_str
@ -45,117 +44,46 @@ pusha
jmp .next
.str_end:
;;;;clean memory
mcall SF_SYS_MISC, SSF_MEM_FREE, [sf_buf.bmp_header]
mov ecx,dword [sf_buf.bmp_header]
mov ebx,13
mov eax,68
mcall
;create image struct
movsx ebx,word[scr_buf.width]
movsx edx,word[scr_buf.height]
stdcall [img_create], ebx, edx, Image.bpp24
mov [sf_buf.bmp_area],eax
test eax,eax
jz @f
;copy foto to image buffer
mov edi,[eax+Image.Data]
mov esi,[scr_buf.ptr]
movsx ecx,word[scr_buf.width]
movsx edx,word[scr_buf.height]
imul ecx,edx
imul ecx,3
rep movsb
; ‚ëç¨á«ï¥¬, ᪮«ìª® ¡ ©â ­ã¦­® ¯à¨¡ ¢«ïâì ª ª ¦¤®© áâப¥,
; ç⮡ë á«¥¤ãîé ï ¡ë«  ¢ëà ¢­¥­  ­  4 ¡ ©â .
; <EFBFBD>¥§ã«ìâ â ¯®¬¥é ¥¬ ¢ edi.
;encode image
stdcall [img_encode], eax, LIBIMG_FORMAT_PNG, 0
test eax,eax
jz @f
xor edx,edx
movzx eax,word [scr_buf.width] ; eax = è¨à¨­  ª à⨭ª¨
lea eax,[eax*3] ; eax = ¡ ©â ­  áâப㠪 à⨭ª¨
mov ebx,4 ; ebx = 4
mov edi,ebx ; edi = 4
div ebx ; eax = ¡ ©â ­  áâப㠪 à⨭ª¨ div 4 edx = ¡ ©â... mod 4
sub edi,edx ; edi = ª®«¨ç¥á⢮ ¡ ©â
test edx,edx
jnz @f
xor edi,edi
@@:
mov [sf_buf.bmp_header],eax
mov [sf_buf.end],ecx
@@:
stdcall [img_destroy], [sf_buf.bmp_area]
; ¢ë¤¥«ï¥¬ ¯ ¬ïâì
; mov ecx,[scr_buf.end_ptr]
; mov [sf_buf.bmp_header],ecx
; add ecx,0x36
; mov [sf_buf.bmp_area],ecx
movsx ebx,word [scr_buf.width]
movsx edx,word [scr_buf.height]
;imul ebx,edx
lea ebx,[ebx*3]
add ebx,edi
imul ebx,edx
mov ecx,ebx
; mov [sf_buf.end],ecx
add ecx,0x36
mov ebx,12
mov eax,68
mcall
mov [sf_buf.bmp_header],eax
add eax,0x36
mov [sf_buf.bmp_area],eax
add eax,ecx
sub eax,0x36
mov [sf_buf.end],eax
; push edi
; § ¯®«­ï¥¬ áâàãªâãàã ¤«ï á®åà ­¥­¨ï ä ©« 
mov ebp,fs_struc
mov [ebp],dword 2
mov [ebp],dword SSF_CREATE_FILE
mov eax,[sf_buf.bmp_header]
mov ebx,[sf_buf.end]
sub ebx,eax
mov [ebp+12],ebx
mov ecx,[sf_buf.end]
mov [ebp+12],ecx ;file size
mov [ebp+16],eax
mov [ebp+21],dword file_name
; § ¯®«­ï¥¬ § £®«®¢®ª bmp
mov ebp,[sf_buf.bmp_header]
mov [ebp],word 'BM'
mov ebx,[sf_buf.end]
sub ebx,[sf_buf.bmp_area]
mov [ebp+34],ebx ; à §¬¥à ª à⨭ª¨
mov [ebp+10],dword 0x36 ; à §¬¥à § £®«®¢ª 
add ebx,0x36
mov [ebp+2],ebx ; à §¬¥à ä ©« 
mov [ebp+14],dword 0x28
movzx eax,word [scr_buf.width]
mov [ebp+18],eax ; £®à¨§®­â «ì­ë© à §¬¥à
movzx eax,word [scr_buf.height]
mov [ebp+22],eax ; ¢¥à⨪«ì­ë© à §¬¥à
mov [ebp+26],word 1
mov [ebp+28],word 24
; á®å࠭塞
mov esi,[scr_buf.ptr]
mov edi,[sf_buf.end]
movzx edx,word [scr_buf.height]
movzx ebx,word [scr_buf.width]
lea ebx,[ebx*3]
mov ecx,ebx
test ebx,11b
jz @f
shr ebx,2
inc ebx
shl ebx,2
@@:
mov eax,ebx
sub eax,ecx
cld
align 4
.next_str:
sub edi,ebx
mov ecx,ebx
shr ecx,2
rep movsd
sub edi,ebx
sub esi,eax
dec edx
jnz .next_str
draw_status saving
mov eax,70
mov ebx,fs_struc
mcall
draw_status saving
mcall SF_FILE, fs_struc
test eax,eax
jne save_error

View File

@ -1,34 +1,38 @@
;
; Screenshooter for Kolibri
;
;---------------------------------------------------------------------
; €¢â®à ¯à®£à ¬¬ë …¢â¨å®¢ Œ ªá¨¬ (Maxxxx32)
;
; 26.11.16 - IgorA á­¨¬ª¨ á®åà ­ïîâìáï ¢ ä®à¬ â¥ *.png
; 02.11.10 - ˆá¯®«ì§ã¥âáï checkbox ¢¥àᨨ 2
;
; version: 1.2
; last update: 08/09/2010
; written by: Marat Zakiyanov aka Mario79, aka Mario
; changes: select path for save with OpenDialog,
; bag fix for threads stacks
;---------------------------------------------------------------------
; 01.06.09 - Š®¬¯®­¥­âë ¡¥àãâìáï ¨§ á¨á⥬­®© ¡¨¡«¨®â¥ª¨ <Lrz>
; €¢â®à ¯à®£à ¬¬ë …¢â¨å®¢ Œ ªá¨¬ (Maxxxx32)
; 24.07.2008 <Lrz> ®¡­®¢«¥­ editbox
; 01.06.09 - <Lrz> ª®¬¯®­¥­âë ¡¥àãâìáï ¨§ á¨á⥬­®© ¡¨¡«¨®â¥ª¨
; 24.07.08 - <Lrz> ®¡­®¢«¥­ editbox
; 01.02.07 - ®¡­®¢«ñ­ editbox
; 31.01.07 - ¢áñ ⥯¥àì à¨áã¥âáï ®â­®á¨â¥«ì­® ª«¨¥­â᪮© ®¡« áâ¨
; 02.11.10 - ˆá¯®«ì§ã¥âáï checkbox ¢¥àᨨ 2
format binary as ""
title equ 'Screenshooter v 1.2' ; ‡ £®«®¢®ª ®ª­ 
include '../../develop/libraries/box_lib/load_lib.mac'
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
;include '../../develop/examples/editbox/trunk/editbox.inc'
include '../../config.inc' ;for nightbuild
include '../../proc32.inc'
include '../../macros.inc'
include '../../KOSfuncs.inc'
include '../../develop/libraries/libs-dev/libimg/libimg.inc'
include 'txtbut.inc'
include 'label.inc'
include 'textwork.inc'
include 'scrshoot.mac'
;include 'macros.inc' ; ¢áâ ¢«ï¥¬ ¬ ªà®áë
; meos_header cmdstr ; ¢áâ ¢«ï¥¬ § £®«®¢®ª ¯à®£à ¬¬ë
use32
org 0x0
db 'MENUET01'
@ -40,8 +44,10 @@ use32
dd cmdstr
dd cur_dir_path
include '../../dll.inc'
align 4
@use_library
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
use_txt_button ; |
use_label ; |-- GUI ª®¬¯®­¥­âë ¨ ­¥ª®â®àë¥ ¯à®æ¥¤ãàë
use_text_work ; /
@ -54,26 +60,12 @@ include 'lang.inc'
macro get_sys_colors col_buf
{
;mov eax,48
push 48
pop eax
;mov ebx,3
push 3
pop ebx
;mov ecx,col_buf
push col_buf
pop ecx
;mov edx,40
push 40
pop edx
mcall
mcall SF_STYLE_SETTINGS, SSF_GET_COLORS, col_buf, 40
}
;--- ­ ç «® ¯à®£à ¬¬ë ---
align 4
start:
;sys_load_library library_name, cur_dir_path, library_path, system_path, \
;err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i
load_libraries l_libs_start,end_l_libs
@ -83,9 +75,7 @@ load_libraries l_libs_start,end_l_libs
test eax,eax
jz close
;;;;;;;;;;;;;;;; init memory 68/11
mov eax,68
mov ebx,11
mcall
mcall SF_SYS_MISC, SSF_HEAP_INIT
test eax,eax
jz close
@ -112,31 +102,21 @@ load_libraries l_libs_start,end_l_libs
jnz @b
;OpenDialog initialisation
push dword OpenDialog_data
call [OpenDialog_Init]
stdcall [OpenDialog_Init], OpenDialog_data
; prepare for PathShow
push dword PathShow_data_1
call [PathShow_prepare]
stdcall [PathShow_prepare], PathShow_data_1
;---------------------------------------------------------------------
;mov al,[gs:1280*4*1024]
; ãáâ ­ ¢«¨¢ ¥¬ ipc ¡ãää¥à
push 60
pop eax
;mov ebx,1
xor ebx,ebx
inc ebx
mov ecx,app_ipc
mov edx,32
mcall
mcall SF_IPC,, app_ipc, 32
push 66 ; ãáâ ­ ¢«¨¢ ¥¬ £«®¡ «ì­ãî £®àïçãî ª« ¢¨èã
pop eax
push eax
mov ebx,4
; ãáâ ­ ¢«¨¢ ¥¬ £«®¡ «ì­ãî £®àïçãî ª« ¢¨èã
mov cl,55 ; 55 - PrintScrn
xor edx,edx
mcall
mcall SF_KEYBOARD, SSF_SET_SYS_HOTKEY
mov ebx,app
call get_slot_n
@ -156,7 +136,6 @@ red:
txt_but_set_sys_color buttons,buttons_end,sc ; \
labels_set_sys_color labels,labels_end,sc ; |
check_boxes_set_sys_color2 check_boxes,check_boxes_end,sc; |
; check_boxes_set_sys_color check_boxes,check_boxes_end,sc ; |
edit_boxes_set_sys_color editboxes,editboxes_end,sc ; /
get_screen_prop scr ; ¯®«ãç ¥¬ ¨­ä®à¬ æ¨î ®¡ íªà ­¥
@ -181,8 +160,8 @@ red:
jmp close
;------------------------------------------------------------------------------
draw_window_direct:
mcall 12,1
mcall 14
mcall SF_REDRAW, SSF_BEGIN_DRAW
mcall SF_GET_SCREEN_SIZE
; eax = [xsize]*65536 + [ysize]
mov ebx,eax
shr ebx,17
@ -195,13 +174,12 @@ draw_window_direct:
sub ecx,50
shl ecx,16
mov cx,100
xor eax,eax
xor esi,esi
mcall ,,,0x34ffffff,,grab_text
mcall SF_CREATE_WINDOW,,,0x34ffffff,,grab_text
mcall 4,<10,30>,0x90000000,saving
mcall SF_DRAW_TEXT, <10,30>,0x90000000,saving
mcall 12,2
mcall SF_REDRAW, SSF_END_DRAW
ret
;------------------------------------------------------------------------------
no_boot:
@ -221,17 +199,10 @@ key:
jmp still
@@:
; key_edit_boxes editboxes,editboxes_end
; push dword edit1
; call [edit_box_key]
push dword edit2
call [edit_box_key]
push dword edit3
call [edit_box_key]
push dword edit4
call [edit_box_key]
; stdcall [edit_box_key], edit1
stdcall [edit_box_key], edit2
stdcall [edit_box_key], edit3
stdcall [edit_box_key], edit4
jmp still
button:
@ -245,30 +216,12 @@ mouse:
cmp eax,[slot_n]
jne still
;----------------------------------
; push dword edit1
; call [edit_box_mouse]
push dword edit2
call [edit_box_mouse]
push dword edit3
call [edit_box_mouse]
push dword edit4
call [edit_box_mouse]
; stdcall [edit_box_mouse], edit1
stdcall [edit_box_mouse], edit2
stdcall [edit_box_mouse], edit3
stdcall [edit_box_mouse], edit4
;----------------------------------
checkboxes_mouse2 check_boxes,check_boxes_end
; push dword ch1
; call [check_box_mouse]
; push dword ch2
; call [check_box_mouse]
; push dword ch3
; call [check_box_mouse]
; push dword ch4
; call [check_box_mouse]
; push dword ch5
; call [check_box_mouse]
; push dword ch6
; call [check_box_mouse]
; push dword use_rect
; call [check_box_mouse]
;-----------------------------------
; mouse_check_boxes check_boxes,check_boxes_end
; mouse_edit_boxes editboxes,editboxes_end
@ -301,10 +254,7 @@ p_close:
bt dword [flags],3
jnc @f
mov eax,18
mov ebx,eax
mov ecx,[set_rect_window_pid]
mcall
mcall SF_SYSTEM, SSF_TERMINATE_THREAD_ID, [set_rect_window_pid]
@@:
close:
@ -313,7 +263,7 @@ close:
;---------------------------------------------------------------------
draw_PathShow:
pusha
mcall 13,<4,302>,<35,15>,0xffffff
mcall SF_DRAW_RECT, <4,302>, <35,15>, 0xffffff
; draw for PathShow
push dword PathShow_data_1
call [PathShow_draw]
@ -326,7 +276,6 @@ draw_window:
start_draw_window ; ­ ç «® ¯¥à¥à¨á®¢ª¨
; ®¯à¥¤¥«ï¥¬ ®ª­®
get_skin_height
mov ebx,100*65536+320
mov ecx,100*65536+220
add cx,ax
mov edx,[sc.work]
@ -334,31 +283,25 @@ start_draw_window ;
xor esi,esi
;xor edi,edi
mov edi,grab_text
xor eax,eax
mcall
mcall SF_CREATE_WINDOW, 100*65536+320
mov eax,47 ; ¢ë¢®¤¨¬ ç¨á«  ¢ ®ª­®
mov bx,4
shl ebx,16
; ¢ë¢®¤¨¬ ç¨á«  ¢ ®ª­®
mov ebx,4 shl 16
movsx ecx,word [scr.width] ; è¨à¨­  íªà ­ 
mov dx,95
shl edx,16
mov edx,95 shl 16
mov dx,[label1.top]
push dx
mov esi,[sc.work_text]
mcall
mcall SF_DRAW_NUMBER
movsx ecx,word [scr.height] ; ¢ëá®â  íªà ­ 
mov dx,[label2.top]
mcall
mov bx,2
shl ebx,16
mov ebx,2 shl 16
movsx ecx,word [scr.bitspp] ; ¡¨â ­  ¯¨ªá¥«ì
mov dx,240
shl edx,16
mov edx,240 shl 16
pop dx
mcall
mov bx,6
shl ebx,16
mov ebx,6 shl 16
mov ecx,[scr.bytesps] ; ¡ ©â ­  áâபã
mov dx,[label2.top]
mcall
@ -369,14 +312,10 @@ start_draw_window ;
draw_labels labels,labels_end ; ¬¥âª¨
; draw_edit_boxes editboxes,editboxes_end ; edit_box
;------ show check editbox -----------
; push dword edit1
; call [edit_box_draw]
push dword edit2
call [edit_box_draw]
push dword edit3
call [edit_box_draw]
push dword edit4
call [edit_box_draw]
; stdcall [edit_box_draw], edit1
stdcall [edit_box_draw], edit2
stdcall [edit_box_draw], edit3
stdcall [edit_box_draw], edit4
;------ end check all editbox -------
call draw_PathShow
@ -384,20 +323,6 @@ start_draw_window ;
draw_txt_buttons buttons,buttons_end ; ª­®¯ª¨
; draw_check_boxes check_boxes,check_boxes_end ; ä« ¦ª¨
;------ check all checkbox ---------
; push dword ch1
; call [check_box_draw]
; push dword ch2
; call [check_box_draw]
; push dword ch3
; call [check_box_draw]
; push dword ch4
; call [check_box_draw]
; push dword ch5
; call [check_box_draw]
; push dword ch6
; call [check_box_draw]
; push dword use_rect
; call [check_box_draw]
checkboxes_draw2 check_boxes,check_boxes_end
@ -461,15 +386,13 @@ shoot:
call [OpenDialog_data.draw_window]
; invoke OpenDialog
push dword OpenDialog_data
call [OpenDialog_Start]
stdcall [OpenDialog_Start], OpenDialog_data
cmp [OpenDialog_data.status],1
je .1
ret
.1:
; prepare for PathShow
push dword PathShow_data_1
call [PathShow_prepare]
stdcall [PathShow_prepare], PathShow_data_1
call [OpenDialog_data.draw_window]
@ -488,10 +411,7 @@ ret
;--- ¯®«ãç¨âì ¯ ¬ïâì ¤«ï á­¨¬ª  ---
get_mem_for_shoot:
;clean memory
mov ecx,dword [scr_buf.ptr]
mov ebx,13
mov eax,68
mcall
mcall SF_SYS_MISC, SSF_MEM_FREE, [scr_buf.ptr]
bt dword [use_rect.flags],1 ; ä®âª âì ®¡« áâì íªà ­ 
jc .use_area
@ -506,9 +426,7 @@ get_mem_for_shoot:
imul ecx,ebx
lea ecx,[ecx*3]
; add ecx,i_end
mov ebx,12
mov eax,68
mcall
mcall SF_SYS_MISC, SSF_MEM_ALLOC
mov [scr_buf.ptr],eax
add eax,ecx
mov [scr_buf.end_ptr],ecx
@ -519,12 +437,9 @@ show_scr_window:
pusha
bt dword [flags],0
jnc @f
mov eax,51
xor ebx,ebx
inc ebx
mov ecx,scr_window
mov edx,i_end_tread-512
mcall
mcall SF_CREATE_THREAD,, scr_window, i_end_tread-512
@@:
popa
ret
@ -542,35 +457,26 @@ draw_number:
mov edi,sign_n_input
call zstr_to_int
mov [sign_n],al
mov eax,13
mov ebx,150*65536+96
mov cx,[label9.top]
shl ecx,16
mov cx,10
mov edx,[sc.work]
mcall
mov eax,47
mcall SF_DRAW_RECT, 150*65536+96
movsx bx,byte [sign_n]
shl ebx,16
mov ecx,[cur_number]
mov dx,150
shl edx,16
mov edx,150 shl 16
mov dx,[label9.top]
mov esi,[sc.work_text]
mcall
mcall SF_DRAW_NUMBER,, [cur_number]
ret
;--- ¯à®æ¥¤ãà , § ¯ã᪠îé ï ¯®â®ª  ¢â®áꥬª¨ ---
start_autoshoot:
bts dword [flags],1
jc @f
mov eax,51
;mov ebx,1
xor ebx,ebx
inc ebx
mov ecx,autoshoot
mov edx,i_end_tread
mcall
mcall SF_CREATE_THREAD,, autoshoot, i_end_tread
@@:
ret
@ -587,12 +493,8 @@ autoshoot:
.next:
bt dword [flags],1
jnc close
mov eax,60
mov ebx,2
mov ecx,[app.pid]
mov edx,messages.draw_number
mov esi,2
mcall
mcall SF_IPC, SSF_SEND_MESSAGE, [app.pid], messages.draw_number
call shoot
jmp autoshoot.next
.close:
@ -601,17 +503,12 @@ autoshoot:
;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ áâப¨ á®áâ®ï­¨ï ---
; (¤®«¦­  ¢ë§ë¢ âìáï ¯®â®ª®¬ £« ¢­®£® ®ª­ )
dr_st:
mov eax,38 ; ®â१®ª
mov ebx,0*65536+310
mov ecx,198*65536+198
mov edx,[sc.work_graph]
mcall
mcall SF_DRAW_LINE, 0*65536+310, 198*65536+198, [sc.work_graph]
mov eax,13 ; ¯®«®áª 
mov bx,310
mov ecx,199*65536+15
mov edx,[sc.work]
mcall
mcall SF_DRAW_RECT ; ¯®«®áª 
mov edi,status
call draw_label
@ -621,17 +518,15 @@ ret
; ¢å®¤ ebx - ¡ãää¥à 1024 ¡ ©â
; ¢ë室 ecx - ­®¬¥à á«®â 
get_slot_n:
mov eax,9
xor ecx,ecx
dec ecx
mcall
mcall SF_THREAD_INFO
mov edx,[ebx+30]
xor ecx,ecx
@@:
mov eax,9
inc ecx
mcall
mcall SF_THREAD_INFO
cmp [ebx+30],edx
je @f
jmp @b
@ -646,15 +541,13 @@ one_shoot:
;--- ¯à®æ¥¤à , § ¯ã᪠îé ï ¯®â®ª, á®åà ­ïî騩 á­¨¬®ª ---
save_shoot:
; invoke OpenDialog
push dword OpenDialog_data
call [OpenDialog_Start]
stdcall [OpenDialog_Start], OpenDialog_data
cmp [OpenDialog_data.status],1
je .1
ret
.1:
; prepare for PathShow
push dword PathShow_data_1
call [PathShow_prepare]
stdcall [PathShow_prepare], PathShow_data_1
call draw_PathShow
@ -666,11 +559,9 @@ save_shoot:
bt dword [flags],1
jc .running
mov eax,51
;mov ebx,1
xor ebx,ebx
inc ebx
mcall
mcall SF_CREATE_THREAD
.running:
ret
@ -680,12 +571,8 @@ one_shoot_thread:
activ_window
bt dword [ch1.flags],1 ; ¬¨­¨¬¨§¨à®¢ âì ®ª­® ?
jnc @f
mov eax,60
mov ebx,2
mov ecx,[app.pid]
mov edx,messages.min_window
mov esi,2
mcall
mcall SF_IPC, SSF_SEND_MESSAGE, [app.pid], messages.min_window
@@:
call shoot
btr dword [flags],2
@ -694,12 +581,8 @@ one_shoot_thread:
;--- ¯à®æ¥¤ãà , ®â¯à ¢«ïîé ï £« ¢­®¬ã ®ª­ã á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥
; áâப¨ á®áâ®ï­¨ï ---
send_draw_status:
mov eax,60
mov ebx,2
mov ecx,[app.pid]
mov edx,messages.draw_status
mov esi,2
mcall
mcall SF_IPC, SSF_SEND_MESSAGE, [app.pid], messages.draw_status
ret
;--- ¯®â®ª, á®åà ­ï ä ©« ---
@ -714,34 +597,24 @@ save_shoot_thread:
show_set_rect_window:
bts dword [flags],3
jc @f
mov eax,51
xor ebx,ebx
inc ebx
mov ecx,set_rect_window
mov edx,set_rect_window_esp
mcall
mcall SF_CREATE_THREAD,, set_rect_window, set_rect_window_esp
mov [set_rect_window_pid],eax
ret
@@:
mov eax,18
mov ebx,eax
mov ecx,[set_rect_window_pid]
mcall
mcall SF_SYSTEM, SSF_TERMINATE_THREAD_ID, [set_rect_window_pid]
btr dword [flags],3
ret
;--- ¯®«ã祭¨¥ ¨­ä®à¬ æ¨¨ ®¡  ªâ¨¢­®¬ ®ª­¥ ---
get_active_window_info:
mov eax,18
mov ebx,7
mcall
mcall SF_SYSTEM, SSF_GET_ACTIVE_WINDOW
mov ecx,eax
mov eax,9
mov ebx,active_app
mcall
mcall SF_THREAD_INFO, active_app
ret
;====================================================================
@ -779,6 +652,9 @@ err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i
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
library03 l_libs system_dir_LibImg+9, cur_dir_path, library_path, system_dir_LibImg, \
err_message_found_lib3, head_f_l, import_libimg, err_message_import3, head_f_i
end_l_libs:
;---------------------------------------------------------------------
editboxes:
@ -958,11 +834,11 @@ communication_area_default_pach:
Filter:
dd Filter.end - Filter
.1:
db 'BMP',0
db 'PNG',0
.end:
db 0
start_temp_file_name: db '1.bmp',0
start_temp_file_name: db '1.png',0
;---------------------------------------------------------------------
sign_n_input:
@ -979,7 +855,7 @@ mouse_flag: dd 0x0
align 4
ed_buffer:
.1: db '/sys/1.bmp',0
.1: db '/sys/1.png',0
;rb 287
.2:
db '100',0
@ -1061,26 +937,13 @@ set_rect_window_esp:
mouse_dd rd 1
;---------------------------------------------------------------------
align 4
cur_dir_path:
rb 4096
;---------------------------------------------------------------------
library_path:
rb 4096
;---------------------------------------------------------------------
temp_dir_pach:
rb 4096
;---------------------------------------------------------------------
text_work_area:
rb 1024
;---------------------------------------------------------------------
fname_buf:
rb 4096
;---------------------------------------------------------------------
procinfo:
rb 1024
;---------------------------------------------------------------------
filename_area:
rb 256
cur_dir_path rb 4096
library_path rb 4096
temp_dir_pach rb 4096
text_work_area rb 1024
fname_buf rb 4096
procinfo rb 1024
filename_area rb 256
;---------------------------------------------------------------------
rb 1024
i_end_tread:

View File

@ -16,18 +16,10 @@ set_rect_window:
.key:
get_key
push dword rect_input.left
call [edit_box_key]
push dword rect_input.top
call [edit_box_key]
push dword rect_input.width
call [edit_box_key]
push dword rect_input.height
call [edit_box_key]
; key_edit_boxes rect_input,rect_input_end
stdcall [edit_box_key], rect_input.left
stdcall [edit_box_key], rect_input.top
stdcall [edit_box_key], rect_input.width
stdcall [edit_box_key], rect_input.height
call read_rect
call draw_rect_on_screen
@ -50,57 +42,33 @@ set_rect_window:
cmp eax,[set_rect_window_slot]
jne .still
push dword rect_input.left
call [edit_box_mouse]
push dword rect_input.top
call [edit_box_mouse]
push dword rect_input.width
call [edit_box_mouse]
push dword rect_input.height
call [edit_box_mouse]
stdcall [edit_box_mouse], rect_input.left
stdcall [edit_box_mouse], rect_input.top
stdcall [edit_box_mouse], rect_input.width
stdcall [edit_box_mouse], rect_input.height
;;;;;;;;;;;;;;;;;;;;;;
push dword use_rect_active_window
call [check_box_mouse]
; mouse_edit_boxes rect_input,rect_input_end
; mouse_check_boxes riw_check_boxes,riw_check_boxes_end
stdcall [check_box_mouse], use_rect_active_window
jmp .still
.draw_window:
start_draw_window
xor eax,eax
mov ebx,100*65536+250
mov ecx,100*65536+130
mov edx,[sc.work]
add edx,0x33000000
mov edi,riw_grab_text
xor esi,esi
mcall
mcall SF_CREATE_WINDOW, 100*65536+250, 100*65536+130
draw_labels rect_input_labels,rect_input_labels_end
push dword rect_input.left
call [edit_box_draw]
push dword rect_input.top
call [edit_box_draw]
push dword rect_input.width
call [edit_box_draw]
push dword rect_input.height
call [edit_box_draw]
stdcall [edit_box_draw], rect_input.left
stdcall [edit_box_draw], rect_input.top
stdcall [edit_box_draw], rect_input.width
stdcall [edit_box_draw], rect_input.height
;;;;;;;;;;;;;;;;;;;;;;
push dword use_rect_active_window
call [check_box_draw]
; draw_edit_boxes rect_input,rect_input_end
; draw_check_boxes riw_check_boxes,riw_check_boxes_end
stdcall [check_box_draw], use_rect_active_window
call read_rect
call draw_rect_on_screen
@ -169,11 +137,8 @@ ret
draw_rect_on_screen:
mov eax,13
mov ebx,150*65536+80
mov ecx,5*65536+60
xor edx,edx
mcall
mcall SF_DRAW_RECT, 150*65536+80, 5*65536+60
;movzx eax,word [rect.left]
;mul word [scr.width]
@ -214,9 +179,7 @@ draw_rect_on_screen:
pop bx
pop cx
mov edx,0xffffff
mov eax,13
mcall
mcall SF_DRAW_RECT,,,0xffffff
ret
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@ -225,16 +188,33 @@ ret
system_dir_Boxlib db '/sys/lib/box_lib.obj',0
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
system_dir_LibImg db '/sys/lib/libimg.obj',0
if lang eq ru
head_f_i:
head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
err_message_found_lib1 db 'box_lib.obj - ­¥ ­ ©¤¥­ !',0
err_message_found_lib2 db 'proc_lib.obj - ­¥ ­ ©¤¥­ !',0
err_message_found_lib3 db 'libimg.obj - ­¥ ­ ©¤¥­ !',0
err_message_import1 db 'box_lib.obj - ®è¨¡ª  ¨¬¯®àâ !',0
err_message_import2 db 'proc_lib.obj - ®è¨¡ª  ¨¬¯®àâ !',0
err_message_import3 db 'libimg.obj - ®è¨¡ª  ¨¬¯®àâ !',0
else
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_found_lib3 db 'libimg.obj - Not found!',0
err_message_import1 db 'box_lib.obj - Wrong import!',0
err_message_import2 db 'proc_lib.obj - Wrong import!',0
err_message_import3 db 'libimg.obj - Wrong import!',0
end if
;---------------------------------------------------------------------
align 4
ProcLib_import:
@ -252,51 +232,24 @@ Box_lib_import:
;init_lib dd a_init
;version_lib dd a_version
edit_box_draw dd aEdit_box_draw
edit_box_key dd aEdit_box_key
edit_box_mouse dd aEdit_box_mouse
;version_ed dd aVersion_ed
init_checkbox dd aInit_checkbox
check_box_draw dd aCheck_box_draw
check_box_mouse dd aCheck_box_mouse
;version_ch dd aVersion_ch
;check_box_draw dd aCheck_box_draw
;check_box_mouse dd aCheck_box_mouse
;version_ch dd aVersion_ch
option_box_draw dd aOption_box_draw
option_box_mouse dd aOption_box_mouse
;version_op dd aVersion_op
;scrollbar_ver_draw dd aScrollbar_ver_draw
;scrollbar_ver_mouse dd aScrollbar_ver_mouse
;scrollbar_hor_draw dd aScrollbar_hor_draw
;scrollbar_hor_mouse dd aScrollbar_hor_mouse
;version_scrollbar dd aVersion_scrollbar
;dinamic_button_draw dd aDbutton_draw
;dinamic_button_mouse dd aDbutton_mouse
;version_dbutton dd aVersion_dbutton
;menu_bar_draw dd aMenu_bar_draw
;menu_bar_mouse dd aMenu_bar_mouse
;menu_bar_activate dd aMenu_bar_activate
;version_menu_bar dd aVersion_menu_bar
;FileBrowser_draw dd aFileBrowser_draw
;FileBrowser_mouse dd aFileBrowser_mouse
;FileBrowser_key dd aFileBrowser_key
;Version_FileBrowser dd aVersion_FileBrowser
PathShow_prepare dd sz_PathShow_prepare
PathShow_draw dd sz_PathShow_draw
;Version_path_show dd szVersion_path_show
dd 0
dd 0
dd 0,0
;a_init db 'lib_init',0
;a_version db 'version',0
@ -312,69 +265,99 @@ aCheck_box_draw db 'check_box_draw2',0
aCheck_box_mouse db 'check_box_mouse2',0
;aVersion_ch db 'version_ch2',0
;aCheck_box_draw db 'check_box_draw',0
;aCheck_box_mouse db 'check_box_mouse',0
;aVersion_ch db 'version_ch',0
aOption_box_draw db 'option_box_draw',0
aOption_box_mouse db 'option_box_mouse',0
;aVersion_op db 'version_op',0
;aScrollbar_ver_draw db 'scrollbar_v_draw',0
;aScrollbar_ver_mouse db 'scrollbar_v_mouse',0
;aScrollbar_hor_draw db 'scrollbar_h_draw',0
;aScrollbar_hor_mouse db 'scrollbar_h_mouse',0
;aVersion_scrollbar db 'version_scrollbar',0
;aDbutton_draw db 'dbutton_draw',0
;aDbutton_mouse db 'dbutton_mouse',0
;aVersion_dbutton db 'version_dbutton',0
;aMenu_bar_draw db 'menu_bar_draw',0
;aMenu_bar_mouse db 'menu_bar_mouse',0
;aMenu_bar_activate db 'menu_bar_activate',0
;aVersion_menu_bar db 'version_menu_bar',0
;aFileBrowser_draw db 'FileBrowser_draw',0
;aFileBrowser_mouse db 'FileBrowser_mouse',0
;aFileBrowser_key db 'FileBrowser_key',0
;aVersion_FileBrowser db 'version_FileBrowser',0
sz_PathShow_prepare db 'PathShow_prepare',0
sz_PathShow_draw db 'PathShow_draw',0
;szVersion_path_show db 'version_PathShow',0
;---------------------------------------------------------------------
align 4
import_libimg:
dd alib_init1
img_is_img dd aimg_is_img
img_info dd aimg_info
img_from_file dd aimg_from_file
img_to_file dd aimg_to_file
img_from_rgb dd aimg_from_rgb
img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
img_encode dd aimg_encode
img_create dd aimg_create
img_destroy dd aimg_destroy
img_destroy_layer dd aimg_destroy_layer
img_count dd aimg_count
img_lock_bits dd aimg_lock_bits
img_unlock_bits dd aimg_unlock_bits
img_flip dd aimg_flip
img_flip_layer dd aimg_flip_layer
img_rotate dd aimg_rotate
img_rotate_layer dd aimg_rotate_layer
img_draw dd aimg_draw
dd 0,0
alib_init1 db 'lib_init',0
aimg_is_img db 'img_is_img',0
aimg_info db 'img_info',0
aimg_from_file db 'img_from_file',0
aimg_to_file db 'img_to_file',0
aimg_from_rgb db 'img_from_rgb',0
aimg_to_rgb db 'img_to_rgb',0
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0
aimg_encode db 'img_encode',0
aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
aimg_destroy_layer db 'img_destroy_layer',0
aimg_count db 'img_count',0
aimg_lock_bits db 'img_lock_bits',0
aimg_unlock_bits db 'img_unlock_bits',0
aimg_flip db 'img_flip',0
aimg_flip_layer db 'img_flip_layer',0
aimg_rotate db 'img_rotate',0
aimg_rotate_layer db 'img_rotate_layer',0
aimg_draw db 'img_draw',0
;---------------------------------------------------------------------
;width,left,top,color,shift_color,focus_border_color,\
; blur_border_color,text_color,max,text,mouse_variable,flags,size,pos
rect_input:
.left edit_box 35,95,5, cl_white,0,0,0,5,rect_input_buffer.left,mouse_dd1,ed_figure_only+ed_focus
.top edit_box 35,95,25,cl_white,0,0,0,5,rect_input_buffer.top,mouse_dd1,ed_figure_only
.width edit_box 35,95,45,cl_white,0,0,0,5,rect_input_buffer.width,mouse_dd1,ed_figure_only
.left edit_box 35,95,5, cl_white,0,0,0,5,rect_input_buffer.left, mouse_dd1,ed_figure_only+ed_focus
.top edit_box 35,95,25,cl_white,0,0,0,5,rect_input_buffer.top, mouse_dd1,ed_figure_only
.width edit_box 35,95,45,cl_white,0,0,0,5,rect_input_buffer.width, mouse_dd1,ed_figure_only
.height edit_box 35,95,65,cl_white,0,0,0,5,rect_input_buffer.height,mouse_dd1,ed_figure_only
rect_input_end:
mouse_dd1 rd 1
rect_input_labels:
.left label 10,10,0,rect_input_labels_text.left
.top label 10,30,0,rect_input_labels_text.top
.width label 10,50,0,rect_input_labels_text.width
.left label 10,10,0,rect_input_labels_text.left
.top label 10,30,0,rect_input_labels_text.top
.width label 10,50,0,rect_input_labels_text.width
.height label 10,70,0,rect_input_labels_text.height
rect_input_labels_end:
rect_input_labels_text:
if lang eq ru
.left db 'Žâáâ㯠᫥¢ :',0
.top db 'Žâáâ㯠ᢥàåã:',0
.width db '˜¨à¨­ :',0
.height db '‚ëá®â :',0
else
.left db 'Left:',0
.top db 'Top:',0
.width db 'Width:',0
.height db 'Height:',0
end if
riw_check_boxes:
use_rect_active_window check_box2 (10 shl 16)+10,(85 shl 16) +10,5,cl_white,0,0,\
riw_check_boxes_text, ch_flag_bottom
riw_check_boxes_end:
riw_check_boxes_text:
db 'ˆá¯®«ì§®¢ âì ®¡« áâì  ªâ¨¢­®£® ®ª­ ',0
if lang eq ru
riw_check_boxes_text db 'ˆá¯®«ì§®¢ âì ®¡« áâì  ªâ¨¢­®£® ®ª­ ',0
riw_grab_text db 'Š®®à¤¨­ âë ¨ à §¬¥àë ®¡« áâ¨:',0
else
riw_check_boxes_text db 'Use area of the active window',0
riw_grab_text db 'Coordinates and size of the field:',0
end if