Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5006 → Rev 5007

/programs/develop/libraries/exif/examples/viev_exif.asm
16,7 → 16,7
include '../../../../dll.inc'
 
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 17.07.14',0 ;¯®¤¯¨áì ®ª­ 
caption db 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 18.07.14',0 ;¯®¤¯¨áì ®ª­ 
 
struct FileInfoBlock
Function dd ?
33,7 → 33,7
 
fn_toolbar db 'toolbar.png',0
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*5
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*6
image_data_toolbar dd 0
 
IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©«  á ¨§®¡à ¦¥­¨¥¬
137,9 → 137,9
; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
xor eax,eax
mov ebx,(20 shl 16)+480
mov ecx,(20 shl 16)+410
mov ecx,(20 shl 16)+540
mov edx,[sc.work]
or edx,(3 shl 24)+0x10000000+0x20000000
or edx,(3 shl 24)+0x30000000
mov edi,caption
int 0x40
 
167,6 → 167,10
mov edx,7
int 0x40
 
mov ebx,(135 shl 16)+20
mov edx,8
int 0x40
 
; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
mov eax,7
mov ebx,[image_data_toolbar]
187,6 → 191,9
add ebx,IMAGE_TOOLBAR_ICON_SIZE
add edx,(25 shl 16) ;
int 0x40
;add ebx,IMAGE_TOOLBAR_ICON_SIZE
;add edx,(25 shl 16) ;
;int 0x40
 
; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
stdcall [buf2d_draw], buf_0
228,6 → 235,10
jne @f
call but_2
@@:
cmp ah,8
jne @f
call but_3
@@:
cmp ah,1
jne still
.exit:
241,7 → 252,7
align 4
but_new_file:
mov dword[open_file_size],0
call draw_file
call draw_file_1
ret
 
align 4
301,13 → 312,13
stdcall [exif_get_app1], [open_file],h_app1
mcall 71,1,openfile_path
 
call draw_file
call draw_file_1
.end_open_file:
popad
ret
 
align 4
draw_file:
draw_file_1:
pushad
stdcall [buf2d_clear], buf_0, [buf_0.color]
cmp dword[open_file_size],0
316,7 → 327,7
mov eax,1
mov ebx,1
.cycle_0:
stdcall [exif_get_app1_tag], [h_app1],eax,txt_buf,80
stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
inc eax
add ebx,10
324,14 → 335,14
jne .cycle_0
 
;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
stdcall [exif_get_app1_child], [h_app1],h_child,0x8769 ;0x8825
stdcall [exif_get_app1_child], h_app1,h_child,0x8769
cmp dword[h_child],0
je @f
je .no_found_child
 
mov eax,1
sub ebx,5
.cycle_1:
stdcall [exif_get_app1_child_tag], [h_app1],[h_child],eax,txt_buf,80
stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
inc eax
add ebx,10
339,6 → 350,9
jne .cycle_1
 
jmp @f
.no_found_child:
stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
jmp @f
.open_file:
stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
@@:
347,6 → 361,96
ret
 
align 4
draw_file_2:
pushad
stdcall [buf2d_clear], buf_0, [buf_0.color]
cmp dword[open_file_size],0
je .open_file
 
mov eax,1
mov ebx,1
.cycle_0:
stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
inc eax
add ebx,10
cmp byte[txt_buf],0
jne .cycle_0
 
;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8825
stdcall [exif_get_app1_child], h_app1,h_child,0x8825
cmp dword[h_child],0
je .no_found_child
 
mov eax,1
sub ebx,5
.cycle_1:
stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
inc eax
add ebx,10
cmp byte[txt_buf],0
jne .cycle_1
 
jmp @f
.no_found_child:
stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
jmp @f
.open_file:
stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
@@:
stdcall [buf2d_draw], buf_0
popad
ret
 
align 4
draw_file_3:
pushad
stdcall [buf2d_clear], buf_0, [buf_0.color]
cmp dword[open_file_size],0
je .open_file
 
mov eax,1
mov ebx,1
.cycle_0:
stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
inc eax
add ebx,10
cmp byte[txt_buf],0
jne .cycle_0
 
;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
stdcall [exif_get_app1_child], h_app1,h_child,0x8769
cmp dword[h_child],0
je .no_found_child
;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0xa005
stdcall [exif_get_app1_child], h_child,h_child,0xa005
cmp dword[h_child],0
je .no_found_child
 
mov eax,1
sub ebx,5
.cycle_1:
stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
inc eax
add ebx,10
cmp byte[txt_buf],0
jne .cycle_1
 
jmp @f
.no_found_child:
stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
jmp @f
.open_file:
stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
@@:
stdcall [buf2d_draw], buf_0
popad
ret
 
align 4
but_save_file:
pushad
copy_path open_dialog_name,communication_area_default_path,file_name,0
378,16 → 482,19
 
align 4
but_1:
stdcall [exif_get_app1_tag], [h_app1],1,txt_buf,80
notify_window_run txt_buf
call draw_file_1 ;®á­®¢­ ï ¨­ä®à¬ æ¨ï
ret
 
align 4
but_2:
stdcall [exif_get_app1_tag], [h_app1],2,txt_buf,80
notify_window_run txt_buf
call draw_file_2 ;¨­ä®à¬ æ¨ï ¯® GPS
ret
 
align 4
but_3:
call draw_file_3 ;¥é¥ ª ª ï-â® ¨­ä®à¬ æ¨ï ...
ret
 
;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
align 4
OpenDialog_data:
545,12 → 652,10
exif_get_app1 dd sz_exif_get_app1
exif_get_app1_tag dd sz_exif_get_app1_tag
exif_get_app1_child dd sz_exif_get_app1_child
exif_get_app1_child_tag dd sz_exif_get_app1_child_tag
dd 0,0
sz_exif_get_app1 db 'exif_get_app1',0
sz_exif_get_app1_tag db 'exif_get_app1_tag',0
sz_exif_get_app1_child db 'exif_get_app1_child',0
sz_exif_get_app1_child_tag db 'exif_get_app1_child_tag',0
;exif_get_image_160_120
 
sc system_colors
563,7 → 668,7
dw 5 ;+4 left
dw 31 ;+6 top
.w: dd 456 ;+8 w
.h: dd 350 ;+12 h
.h: dd 480 ;+12 h
.color: dd 0xffffd0 ;+16 color
db 24 ;+20 bit in pixel
 
577,9 → 682,10
dd 0 ;+16 color
db 24 ;+20 bit in pixel
 
h_app1 dd 0 ;㪠§ â¥«ì ­  § £®«®¢®ª £« ¢­ëå ⥣®¢
h_child dd 0 ;㪠§ â¥«ì ­  § £®«®¢®ª ¤®ç¥à­¨å ⥣®¢
h_app1 dd 0,0,0 ;áâàãªâãà  ¤«ï § £®«®¢ª  £« ¢­ëå ⥣®¢
h_child dd 0,0,0 ;áâàãªâãà  ¤«ï § £®«®¢ª  ¤®ç¥à­¨å ⥣®¢
txt_openfile db 'Žâªà®©â¥ ä ©« ¨§®¡à ¦¥­¨ï ¢ ä®à¬ â¥ *.jpg.',0
txt_nochild db 'ˆ­ä®à¬ æ¨ï ¯® í⮩ ª­®¯ª¥ ­¥ ­ ©¤¥­ .',0
txt_buf rb 80
 
i_end: