Subversion Repositories Kolibri OS

Rev

Rev 5002 | Rev 5009 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5002 Rev 5007
Line 14... Line 14...
14
include '../../../../develop/libraries/box_lib/load_lib.mac'
14
include '../../../../develop/libraries/box_lib/load_lib.mac'
15
include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
15
include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
16
include '../../../../dll.inc'
16
include '../../../../dll.inc'
Line 17... Line 17...
17
 
17
 
18
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
18
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
Line 19... Line 19...
19
caption db 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 17.07.14',0 ;¯®¤¯¨áì ®ª­ 
19
caption db 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 18.07.14',0 ;¯®¤¯¨áì ®ª­ 
20
 
20
 
21
struct FileInfoBlock
21
struct FileInfoBlock
22
	Function dd ?
22
	Function dd ?
Line 31... Line 31...
31
run_file_70 FileInfoBlock
31
run_file_70 FileInfoBlock
32
image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
32
image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
Line 33... Line 33...
33
 
33
 
34
fn_toolbar db 'toolbar.png',0
34
fn_toolbar db 'toolbar.png',0
35
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
35
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
36
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*5
36
IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*6
Line 37... Line 37...
37
image_data_toolbar dd 0
37
image_data_toolbar dd 0
Line 38... Line 38...
38
 
38
 
Line 135... Line 135...
135
	mcall 12,1
135
	mcall 12,1
Line 136... Line 136...
136
 
136
 
137
	; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
137
	; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
138
	xor eax,eax
138
	xor eax,eax
139
	mov ebx,(20 shl 16)+480
139
	mov ebx,(20 shl 16)+480
140
	mov ecx,(20 shl 16)+410
140
	mov ecx,(20 shl 16)+540
141
	mov edx,[sc.work]
141
	mov edx,[sc.work]
142
	or  edx,(3 shl 24)+0x10000000+0x20000000
142
	or  edx,(3 shl 24)+0x30000000
143
	mov edi,caption
143
	mov edi,caption
Line 144... Line 144...
144
	int 0x40
144
	int 0x40
145
 
145
 
Line 165... Line 165...
165
 
165
 
166
	mov ebx,(110 shl 16)+20
166
	mov ebx,(110 shl 16)+20
167
	mov edx,7
167
	mov edx,7
Line -... Line 168...
-
 
168
	int 0x40
-
 
169
 
-
 
170
	mov ebx,(135 shl 16)+20
-
 
171
	mov edx,8
168
	int 0x40
172
	int 0x40
169
 
173
 
170
	; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
174
	; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
171
	mov eax,7
175
	mov eax,7
172
	mov ebx,[image_data_toolbar]
176
	mov ebx,[image_data_toolbar]
Line 185... Line 189...
185
	add edx,(30 shl 16) ;
189
	add edx,(30 shl 16) ;
186
	int 0x40
190
	int 0x40
187
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
191
	add ebx,IMAGE_TOOLBAR_ICON_SIZE
188
	add edx,(25 shl 16) ;
192
	add edx,(25 shl 16) ;
189
	int 0x40
193
	int 0x40
-
 
194
	;add ebx,IMAGE_TOOLBAR_ICON_SIZE
-
 
195
	;add edx,(25 shl 16) ;
-
 
196
	;int 0x40
Line 190... Line 197...
190
 
197
 
191
	; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
198
	; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
Line 192... Line 199...
192
	stdcall [buf2d_draw], buf_0
199
	stdcall [buf2d_draw], buf_0
Line 226... Line 233...
226
	@@:
233
	@@:
227
	cmp ah,7
234
	cmp ah,7
228
	jne @f
235
	jne @f
229
		call but_2
236
		call but_2
230
	@@:
237
	@@:
-
 
238
	cmp ah,8
-
 
239
	jne @f
-
 
240
		call but_3
-
 
241
	@@:
231
	cmp ah,1
242
	cmp ah,1
232
	jne still
243
	jne still
233
.exit:
244
.exit:
234
	stdcall [buf2d_delete],buf_0
245
	stdcall [buf2d_delete],buf_0
235
	stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
246
	stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
Line 239... Line 250...
239
 
250
 
240
 
251
 
241
align 4
252
align 4
242
but_new_file:
253
but_new_file:
243
	mov dword[open_file_size],0
254
	mov dword[open_file_size],0
Line 244... Line 255...
244
	call draw_file
255
	call draw_file_1
245
	ret
256
	ret
246
 
257
 
Line 299... Line 310...
299
	;add ebx,dword[open_file]
310
	;add ebx,dword[open_file]
300
	;mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
311
	;mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
301
	stdcall [exif_get_app1], [open_file],h_app1
312
	stdcall [exif_get_app1], [open_file],h_app1
302
	mcall 71,1,openfile_path
313
	mcall 71,1,openfile_path
Line 303... Line 314...
303
 
314
 
304
	call draw_file
315
	call draw_file_1
305
	.end_open_file:
316
	.end_open_file:
306
	popad
317
	popad
Line 307... Line 318...
307
	ret
318
	ret
308
 
319
 
309
align 4
320
align 4
310
draw_file:
321
draw_file_1:
311
pushad
322
pushad
312
	stdcall [buf2d_clear], buf_0, [buf_0.color]
323
	stdcall [buf2d_clear], buf_0, [buf_0.color]
Line 313... Line 324...
313
	cmp dword[open_file_size],0
324
	cmp dword[open_file_size],0
314
	je .open_file
325
	je .open_file
315
 
326
 
316
	mov eax,1
327
	mov eax,1
317
	mov ebx,1
328
	mov ebx,1
318
	.cycle_0:
329
	.cycle_0:
319
		stdcall [exif_get_app1_tag], [h_app1],eax,txt_buf,80
330
		stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
320
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
331
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
321
		inc eax
332
		inc eax
Line 322... Line 333...
322
		add ebx,10
333
		add ebx,10
323
		cmp byte[txt_buf],0
334
		cmp byte[txt_buf],0
324
		jne .cycle_0
335
		jne .cycle_0
325
 
336
 
Line 326... Line 337...
326
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
337
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
327
	stdcall [exif_get_app1_child], [h_app1],h_child,0x8769 ;0x8825
338
	stdcall [exif_get_app1_child], h_app1,h_child,0x8769
328
	cmp dword[h_child],0
339
	cmp dword[h_child],0
329
	je @f
340
	je .no_found_child
330
 
341
 
331
	mov eax,1
342
	mov eax,1
332
	sub ebx,5
343
	sub ebx,5
333
	.cycle_1:
344
	.cycle_1:
334
		stdcall [exif_get_app1_child_tag], [h_app1],[h_child],eax,txt_buf,80
345
		stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
Line 335... Line 346...
335
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
346
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
-
 
347
		inc eax
-
 
348
		add ebx,10
-
 
349
		cmp byte[txt_buf],0
-
 
350
		jne .cycle_1
-
 
351
 
-
 
352
	jmp @f
-
 
353
	.no_found_child:
-
 
354
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
-
 
355
		jmp @f
-
 
356
	.open_file:
-
 
357
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
-
 
358
	@@:
-
 
359
	stdcall [buf2d_draw], buf_0
-
 
360
popad
-
 
361
	ret
-
 
362
 
-
 
363
align 4
-
 
364
draw_file_2:
-
 
365
pushad
-
 
366
	stdcall [buf2d_clear], buf_0, [buf_0.color]
-
 
367
	cmp dword[open_file_size],0
-
 
368
	je .open_file
-
 
369
 
-
 
370
	mov eax,1
-
 
371
	mov ebx,1
-
 
372
	.cycle_0:
-
 
373
		stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
-
 
374
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
-
 
375
		inc eax
-
 
376
		add ebx,10
-
 
377
		cmp byte[txt_buf],0
-
 
378
		jne .cycle_0
-
 
379
 
-
 
380
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8825
-
 
381
	stdcall [exif_get_app1_child], h_app1,h_child,0x8825
-
 
382
	cmp dword[h_child],0
-
 
383
	je .no_found_child
-
 
384
 
-
 
385
	mov eax,1
-
 
386
	sub ebx,5
-
 
387
	.cycle_1:
-
 
388
		stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
-
 
389
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
-
 
390
		inc eax
-
 
391
		add ebx,10
-
 
392
		cmp byte[txt_buf],0
-
 
393
		jne .cycle_1
-
 
394
 
-
 
395
	jmp @f
-
 
396
	.no_found_child:
-
 
397
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
-
 
398
		jmp @f
-
 
399
	.open_file:
-
 
400
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
-
 
401
	@@:
-
 
402
	stdcall [buf2d_draw], buf_0
-
 
403
popad
-
 
404
	ret
-
 
405
 
-
 
406
align 4
-
 
407
draw_file_3:
-
 
408
pushad
-
 
409
	stdcall [buf2d_clear], buf_0, [buf_0.color]
-
 
410
	cmp dword[open_file_size],0
-
 
411
	je .open_file
-
 
412
 
-
 
413
	mov eax,1
-
 
414
	mov ebx,1
-
 
415
	.cycle_0:
-
 
416
		stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
-
 
417
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
-
 
418
		inc eax
-
 
419
		add ebx,10
-
 
420
		cmp byte[txt_buf],0
-
 
421
		jne .cycle_0
-
 
422
 
-
 
423
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
-
 
424
	stdcall [exif_get_app1_child], h_app1,h_child,0x8769
-
 
425
	cmp dword[h_child],0
-
 
426
	je .no_found_child
-
 
427
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0xa005
-
 
428
	stdcall [exif_get_app1_child], h_child,h_child,0xa005
-
 
429
	cmp dword[h_child],0
-
 
430
	je .no_found_child
-
 
431
 
-
 
432
	mov eax,1
-
 
433
	sub ebx,5
-
 
434
	.cycle_1:
-
 
435
		stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
-
 
436
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
-
 
437
		inc eax
-
 
438
		add ebx,10
-
 
439
		cmp byte[txt_buf],0
336
		inc eax
440
		jne .cycle_1
337
		add ebx,10
441
 
338
		cmp byte[txt_buf],0
442
	jmp @f
339
		jne .cycle_1
443
	.no_found_child:
340
 
444
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
Line 376... Line 480...
376
	popad
480
	popad
377
	ret
481
	ret
Line 378... Line 482...
378
 
482
 
379
align 4
483
align 4
380
but_1:
484
but_1:
381
	stdcall [exif_get_app1_tag], [h_app1],1,txt_buf,80
-
 
382
	notify_window_run txt_buf	
485
	call draw_file_1 ;®á­®¢­ ï ¨­ä®à¬ æ¨ï
Line 383... Line 486...
383
	ret
486
	ret
384
 
487
 
385
align 4
488
align 4
-
 
489
but_2:
-
 
490
	call draw_file_2 ;¨­ä®à¬ æ¨ï ¯® GPS
386
but_2:
491
	ret
-
 
492
 
-
 
493
align 4
387
	stdcall [exif_get_app1_tag], [h_app1],2,txt_buf,80
494
but_3:
Line 388... Line 495...
388
	notify_window_run txt_buf
495
	call draw_file_3 ;¥é¥ ª ª ï-â® ¨­ä®à¬ æ¨ï ...
389
	ret
496
	ret
390
 
497
 
Line 543... Line 650...
543
align 4
650
align 4
544
import_exif: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
651
import_exif: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
545
	exif_get_app1 dd sz_exif_get_app1
652
	exif_get_app1 dd sz_exif_get_app1
546
	exif_get_app1_tag dd sz_exif_get_app1_tag
653
	exif_get_app1_tag dd sz_exif_get_app1_tag
547
	exif_get_app1_child dd sz_exif_get_app1_child
654
	exif_get_app1_child dd sz_exif_get_app1_child
548
	exif_get_app1_child_tag dd sz_exif_get_app1_child_tag
-
 
549
dd 0,0
655
dd 0,0
550
	sz_exif_get_app1 db 'exif_get_app1',0
656
	sz_exif_get_app1 db 'exif_get_app1',0
551
	sz_exif_get_app1_tag db 'exif_get_app1_tag',0
657
	sz_exif_get_app1_tag db 'exif_get_app1_tag',0
552
	sz_exif_get_app1_child db 'exif_get_app1_child',0
658
	sz_exif_get_app1_child db 'exif_get_app1_child',0
553
	sz_exif_get_app1_child_tag db 'exif_get_app1_child_tag',0
-
 
554
	;exif_get_image_160_120
659
	;exif_get_image_160_120
Line 555... Line 660...
555
 
660
 
Line 556... Line 661...
556
sc system_colors 
661
sc system_colors 
Line 561... Line 666...
561
align 4
666
align 4
562
buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
667
buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
563
	dw 5 ;+4 left
668
	dw 5 ;+4 left
564
	dw 31 ;+6 top
669
	dw 31 ;+6 top
565
.w: dd 456 ;+8 w
670
.w: dd 456 ;+8 w
566
.h: dd 350 ;+12 h
671
.h: dd 480 ;+12 h
567
.color: dd 0xffffd0 ;+16 color
672
.color: dd 0xffffd0 ;+16 color
568
	db 24 ;+20 bit in pixel
673
	db 24 ;+20 bit in pixel
Line 569... Line 674...
569
 
674
 
570
align 4
675
align 4
Line 575... Line 680...
575
	dd 128 ;+8 w
680
	dd 128 ;+8 w
576
	dd 144 ;+12 h
681
	dd 144 ;+12 h
577
	dd 0 ;+16 color
682
	dd 0 ;+16 color
578
	db 24 ;+20 bit in pixel
683
	db 24 ;+20 bit in pixel
Line 579... Line 684...
579
 
684
 
580
h_app1  dd 0 ;㪠§ â¥«ì ­  § £®«®¢®ª £« ¢­ëå ⥣®¢
685
h_app1  dd 0,0,0 ;áâàãªâãà  ¤«ï § £®«®¢ª  £« ¢­ëå ⥣®¢
581
h_child dd 0 ;㪠§ â¥«ì ­  § £®«®¢®ª ¤®ç¥à­¨å ⥣®¢
686
h_child dd 0,0,0 ;áâàãªâãà  ¤«ï § £®«®¢ª  ¤®ç¥à­¨å ⥣®¢
-
 
687
txt_openfile db 'Žâªà®©â¥ ä ©« ¨§®¡à ¦¥­¨ï ¢ ä®à¬ â¥ *.jpg.',0
582
txt_openfile db 'Žâªà®©â¥ ä ©« ¨§®¡à ¦¥­¨ï ¢ ä®à¬ â¥ *.jpg.',0
688
txt_nochild  db 'ˆ­ä®à¬ æ¨ï ¯® í⮩ ª­®¯ª¥ ­¥ ­ ©¤¥­ .',0
Line 583... Line 689...
583
txt_buf rb 80
689
txt_buf rb 80
584
 
690
 
585
i_end:
691
i_end: