Subversion Repositories Kolibri OS

Rev

Rev 6314 | Rev 8262 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. use32
  2.         org 0x0
  3.         db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
  4.         dd 1, start, i_end, mem, stacktop, 0, sys_path
  5.  
  6. include '../../../../macros.inc'
  7. include '../../../../proc32.inc'
  8. include '../../../../KOSfuncs.inc'
  9. include '../../../../load_img.inc'
  10. include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
  11.  
  12. @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
  13. caption db 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 11.03.16',0 ;¯®¤¯¨áì ®ª­ 
  14.  
  15. run_file_70 FileInfoBlock
  16.  
  17. fn_toolbar db 'toolbar.png',0
  18. IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
  19. image_data_toolbar dd 0
  20.  
  21. memory_file_size dd 512*1024 ;à §¬¥à ¯ ¬ï⨠¤«ï ®âªàëâ¨ï ä ©«®¢ (¢ ­ ç «¥ 512 Kb, ­® ¬®¦¥â 㢥«¨ç¨¢ âáï ¯à¨ ­¥®¡å®¤¨¬®áâ¨)
  22.  
  23. align 4
  24. start:
  25.         load_libraries l_libs_start,l_libs_end
  26.         ;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
  27.         mov     ebp,lib_0
  28.         cmp     dword [ebp+ll_struc_size-4],0
  29.         jz      @f
  30.                 mcall SF_TERMINATE_PROCESS
  31.         @@:
  32.         mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
  33.         mcall SF_SET_EVENTS_MASK,0xC0000027
  34.         stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
  35.  
  36.         stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
  37.         stdcall [buf2d_create], buf_thumb
  38.  
  39.         load_image_file 'font8x9.bmp', image_data_toolbar
  40.         stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
  41.         stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
  42.         stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
  43.         stdcall [buf2d_convert_text_matrix], buf_1
  44.  
  45.         load_image_file fn_toolbar, image_data_toolbar
  46.  
  47.         stdcall mem.Alloc,[memory_file_size]
  48.         mov dword[open_file],eax
  49.        
  50.         call but_new_file
  51.  
  52. align 4
  53. red_win:
  54.         call draw_window
  55.  
  56. align 4
  57. still:
  58.         mcall SF_WAIT_EVENT
  59.  
  60.         cmp al,1
  61.         jz red_win
  62.         cmp al,2
  63.         jz key
  64.         cmp al,3
  65.         jz button
  66.         cmp al,6 ;¬ëèì
  67.         jne @f
  68.                 jmp mouse
  69.         @@:
  70.         jmp still
  71.  
  72. align 4
  73. draw_window:
  74. pushad
  75.         mcall SF_REDRAW,SSF_BEGIN_DRAW
  76.  
  77.         ; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
  78.         mov edx,[sc.work]
  79.         or  edx,(3 shl 24)+0x30000000
  80.         mov edi,caption
  81.         mcall SF_CREATE_WINDOW, (20 shl 16)+590, (20 shl 16)+540
  82.  
  83.         ; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
  84.         mov esi,[sc.work_button]
  85.         mcall SF_DEFINE_BUTTON, (5 shl 16)+20, (5 shl 16)+20, 3
  86.  
  87.         mov ebx,(30 shl 16)+20
  88.         mov edx,4
  89.         int 0x40
  90.  
  91.         mov ebx,(55 shl 16)+20
  92.         mov edx,5
  93.         int 0x40
  94.  
  95.         mov ebx,(85 shl 16)+20
  96.         mov edx,6
  97.         int 0x40
  98.  
  99.         mov ebx,(110 shl 16)+20
  100.         mov edx,7
  101.         int 0x40
  102.  
  103.         mov ebx,(135 shl 16)+20
  104.         mov edx,8
  105.         int 0x40
  106.  
  107.         mov ebx,(160 shl 16)+20
  108.         mov edx,9
  109.         int 0x40
  110.  
  111.         ; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
  112.         mcall SF_PUT_IMAGE, [image_data_toolbar], (16 shl 16)+16, (7 shl 16)+7 ;icon new
  113.  
  114.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  115.         add edx,(25 shl 16) ;icon open
  116.         int 0x40
  117.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  118.         add edx,(25 shl 16) ;icon save
  119.         int 0x40
  120.  
  121.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  122.         add edx,(30 shl 16) ;app1 text
  123.         int 0x40
  124.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  125.         add edx,(25 shl 16) ;app1 gps
  126.         int 0x40
  127.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  128.         add edx,(25 shl 16) ;app2 text
  129.         int 0x40
  130.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  131.         add edx,(25 shl 16) ;app2 thumbnail
  132.         int 0x40
  133.  
  134.         ; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
  135.         stdcall [buf2d_draw], buf_0
  136.  
  137.         mcall SF_REDRAW,SSF_END_DRAW
  138. popad
  139.         ret
  140.  
  141. align 4
  142. key:
  143.         mcall SF_GET_KEY
  144.         jmp still
  145.  
  146. align 4
  147. mouse:
  148.  
  149.         jmp still
  150.  
  151. align 4
  152. button:
  153.         mcall SF_GET_BUTTON
  154.         cmp ah,3
  155.         jne @f
  156.                 call but_new_file
  157.         @@:
  158.         cmp ah,4
  159.         jne @f
  160.                 call but_open_file
  161.         @@:
  162.         cmp ah,5
  163.         jne @f
  164.                 call but_save_file
  165.         @@:
  166.         cmp ah,6
  167.         jne @f
  168.                 call draw_file_1 ;®á­®¢­ ï ¨­ä®à¬ æ¨ï
  169.         @@:
  170.         cmp ah,7
  171.         jne @f
  172.                 call draw_file_2 ;¨­ä®à¬ æ¨ï ¯® GPS
  173.         @@:
  174.         cmp ah,8
  175.         jne @f
  176.                 call draw_file_3 ;¨­ä®à¬ æ¨ï app2
  177.         @@:
  178.         cmp ah,9
  179.         jne @f
  180.                 call draw_file_4
  181.         @@:
  182.         cmp ah,1
  183.         jne still
  184. .exit:
  185.         stdcall [buf2d_delete],buf_0
  186.         stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
  187.         stdcall [buf2d_delete],buf_thumb
  188.         stdcall mem.Free,[image_data_toolbar]
  189.         stdcall mem.Free,[open_file]
  190.         mcall SF_TERMINATE_PROCESS
  191.  
  192.  
  193. align 4
  194. but_new_file:
  195.         mov dword[open_file_size],0
  196.         call draw_file_1
  197.         ret
  198.  
  199. align 4
  200. open_file dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
  201. open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«  (¤®«¦¥­ ¡ëâì ­¥ ¡®«ìè¥ memory_file_size)
  202.  
  203. align 4
  204. but_open_file:
  205.         pushad
  206.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  207.         mov [OpenDialog_data.type],0
  208.         stdcall [OpenDialog_Start],OpenDialog_data
  209.         cmp [OpenDialog_data.status],2
  210.         je .end_open_file
  211.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  212.  
  213.         mov [run_file_70.Function], SSF_GET_INFO
  214.         mov [run_file_70.Position], 0
  215.         mov [run_file_70.Flags], 0
  216.         mov dword[run_file_70.Count], 0
  217.         m2m [run_file_70.Buffer], [open_file]
  218.         mov byte[run_file_70+20], 0
  219.         mov dword[run_file_70.FileName], openfile_path
  220.         mcall SF_FILE,run_file_70
  221.         cmp eax,0
  222.         jne .end_open_file
  223.  
  224.         mov eax,[open_file]
  225.         mov ebx,[eax+32] ;dword[eax+32] - à §¬¥à ®âªà뢠¥¬®£® ä ©« 
  226.         mov [open_file_size],ebx ;ebx - à §¬¥à ®âªà뢠¥¬®£® ä ©« 
  227.         ;memory_file_size - à §¬¥à ¢ë¤¥«¥­­®© ¯ ¬ï⨠¤«ï ä ©« 
  228.         cmp [memory_file_size],ebx
  229.         jge @f
  230.                 ;㢥«¨ç¨¢ ¥¬ ¯ ¬ïâì ¥á«¨ ­¥ 墠⨫®
  231.                 mov [memory_file_size],ebx
  232.                 stdcall mem.ReAlloc, [open_file],ebx
  233.                 mov [open_file],eax
  234.         @@:
  235.  
  236.         mov [run_file_70.Function], SSF_READ_FILE
  237.         mov [run_file_70.Position], 0
  238.         mov [run_file_70.Flags], 0
  239.         m2m dword[run_file_70.Count], dword[open_file_size]
  240.         m2m dword[run_file_70.Buffer],dword[open_file]
  241.         mov byte[run_file_70+20], 0
  242.         mov dword[run_file_70.FileName], openfile_path
  243.         mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  244.         cmp ebx,0xffffffff
  245.         je .end_open_file
  246.  
  247.         mov [open_file_size],ebx
  248.         ;add ebx,dword[open_file]
  249.         ;mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
  250.         stdcall [exif_get_app1], [open_file],h_app1
  251.         mcall SF_SET_CAPTION,1,openfile_path
  252.  
  253.         call draw_file_1
  254.         .end_open_file:
  255.         popad
  256.         ret
  257.  
  258. ;description:
  259. ; ¨­ä®à¬ æ¨ï exif ¨§ app1
  260. ; ⥪áâ®¢ë¥ ¨ ç¨á«®¢ë¥ ¤ ­­ë¥
  261. align 4
  262. draw_file_1:
  263. pushad
  264.         stdcall [buf2d_clear], buf_0, [buf_0.color]
  265.         cmp dword[open_file_size],0
  266.         je .open_file
  267.  
  268.         mov eax,1
  269.         mov ebx,1
  270.         .cycle_0:
  271.                 stdcall [exif_get_tag], h_app1,eax,txt_buf,80
  272.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
  273.                 inc eax
  274.                 add ebx,10
  275.                 cmp byte[txt_buf],0
  276.                 jne .cycle_0
  277.  
  278.         ;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
  279.         stdcall [exif_get_child], h_app1,h_child,0x8769
  280.         cmp dword[h_child],0
  281.         je .no_found_child
  282.  
  283.         mov eax,1
  284.         sub ebx,5
  285.         .cycle_1:
  286.                 stdcall [exif_get_tag], h_child,eax,txt_buf,80
  287.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
  288.                 inc eax
  289.                 add ebx,10
  290.                 cmp byte[txt_buf],0
  291.                 jne .cycle_1
  292.  
  293.         jmp @f
  294.         .no_found_child:
  295.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
  296.                 jmp @f
  297.         .open_file:
  298.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
  299.         @@:
  300.         stdcall [buf2d_draw], buf_0
  301. popad
  302.         ret
  303.  
  304. ;description:
  305. ; ¨­ä®à¬ æ¨ï exif ¨§ app1
  306. ; ¤ ­­ë¥ ® gps
  307. align 4
  308. draw_file_2:
  309. pushad
  310.         stdcall [buf2d_clear], buf_0, [buf_0.color]
  311.         cmp dword[open_file_size],0
  312.         je .open_file
  313.  
  314.         mov eax,1
  315.         mov ebx,1
  316.         .cycle_0:
  317.                 stdcall [exif_get_tag], h_app1,eax,txt_buf,80
  318.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
  319.                 inc eax
  320.                 add ebx,10
  321.                 cmp byte[txt_buf],0
  322.                 jne .cycle_0
  323.  
  324.         ;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8825
  325.         stdcall [exif_get_child], h_app1,h_child,0x8825
  326.         cmp dword[h_child],0
  327.         je .no_found_child
  328.  
  329.         mov eax,1
  330.         sub ebx,5
  331.         .cycle_1:
  332.                 stdcall [exif_get_tag], h_child,eax,txt_buf,80
  333.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
  334.                 inc eax
  335.                 add ebx,10
  336.                 cmp byte[txt_buf],0
  337.                 jne .cycle_1
  338.  
  339.         jmp @f
  340.         .no_found_child:
  341.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
  342.                 jmp @f
  343.         .open_file:
  344.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
  345.         @@:
  346.         stdcall [buf2d_draw], buf_0
  347. popad
  348.         ret
  349.  
  350. ;description:
  351. ; ¨­ä®à¬ æ¨ï exif ¨§ app2
  352. ; ⥪áâ®¢ë¥ ¨ ç¨á«®¢ë¥ ¤ ­­ë¥
  353. align 4
  354. draw_file_3:
  355. pushad
  356.         stdcall [buf2d_clear], buf_0, [buf_0.color]
  357.         cmp dword[open_file_size],0
  358.         je .open_file
  359.  
  360.         mov eax,1
  361.         mov ebx,1
  362.         .cycle_0:
  363.                 stdcall [exif_get_tag], h_app1,eax,txt_buf,80
  364.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
  365.                 inc eax
  366.                 add ebx,10
  367.                 cmp byte[txt_buf],0
  368.                 jne .cycle_0
  369.  
  370.         ;­ å®¤¨¬ app2
  371.         stdcall [exif_get_app2], h_app1,h_child
  372.         cmp dword[h_child],0
  373.         je .no_found_child
  374.  
  375.         mov eax,1 ;25
  376.         sub ebx,5
  377.         .cycle_1:
  378.                 stdcall [exif_get_tag], h_child,eax,txt_buf,80
  379.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
  380.                 inc eax
  381.                 add ebx,10
  382.                 cmp byte[txt_buf],0
  383.                 jne .cycle_1
  384.  
  385.         jmp @f
  386.         .no_found_child:
  387.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
  388.                 jmp @f
  389.         .open_file:
  390.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
  391.         @@:
  392.         stdcall [buf2d_draw], buf_0
  393. popad
  394.         ret
  395.  
  396. ;description:
  397. ; ¨­ä®à¬ æ¨ï exif ¨§ app2
  398. ; ª à⨭ª  ¤«ï ª ¬¥à Nikon
  399. align 4
  400. draw_file_4:
  401. pushad
  402.         stdcall [buf2d_clear], buf_0, [buf_0.color]
  403.         cmp dword[open_file_size],0
  404.         je .open_file
  405.  
  406.         ;¢ë¢®¤¨¬ ®¡éãî ¨­ä®à¬ æ¨î ¯® á­¨¬ªã:
  407.         ;0x010f - Manufacturer of digicam
  408.         ;0x0110 - Model
  409.         ;0x0132 - Modify date
  410.         mov ebx,3
  411.         stdcall [exif_get_tag_id], h_app1,0x010f,txt_buf,80
  412.         stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
  413.         add ebx,10
  414.         stdcall [exif_get_tag_id], h_app1,0x0110,txt_buf,80
  415.         stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
  416.         add ebx,10
  417.         stdcall [exif_get_tag_id], h_app1,0x0132,txt_buf,80
  418.         stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
  419.         add ebx,20
  420.  
  421.         ;­ å®¤¨¬ app2
  422.         stdcall [exif_get_app2], h_app1,h_child
  423.         cmp dword[h_child],0
  424.         je .no_found_child
  425.  
  426.         ;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
  427.         ;0x0011 - Preview IFD
  428.         stdcall [exif_get_child], h_child,h_child,0x0011
  429.         cmp dword[h_child],0
  430.         je .no_found_child
  431.  
  432.         ;0x0202 - Preview Image Length
  433.         stdcall [exif_get_child], h_child,h_child_siz,0x0202
  434.         cmp dword[h_child_siz],0
  435.         je .no_found_child
  436.        
  437.         ;0x0201 - Preview Image Start
  438.         stdcall [exif_get_child], h_child,h_child,0x0201
  439.         cmp dword[h_child],0
  440.         je .no_found_child
  441.  
  442.         stdcall [img_decode],dword[h_child],dword[h_child_siz],0
  443.         cmp dword[eax+4],1
  444.         jl .no_found_child
  445.         cmp dword[eax+8],1
  446.         jl .no_found_child
  447.         mov ebx,eax
  448.         stdcall [buf2d_resize],buf_thumb,[eax+4],[eax+8],1
  449.         ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
  450.         stdcall [img_to_rgb2],ebx,[buf_thumb]
  451.         stdcall [img_destroy],ebx ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à ebx
  452.  
  453.         mov ebx,43
  454.         stdcall [buf2d_draw_text], buf_0, buf_1,txt_thumb,3,ebx,0xb000
  455.         add ebx,10
  456.         stdcall [buf2d_bit_blt], buf_0, 0,ebx, buf_thumb ;à¨á㥬 ¨§®¡à ¦¥­¨¥
  457.         jmp @f
  458.  
  459.         .no_found_child:
  460.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,ebx,0xb000
  461.                 jmp @f
  462.         .open_file:
  463.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
  464.         @@:
  465.         stdcall [buf2d_draw], buf_0
  466. popad
  467.         ret
  468.  
  469. align 4
  470. but_save_file:
  471.         pushad
  472.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  473.         mov [OpenDialog_data.type],1
  474.         stdcall [OpenDialog_Start],OpenDialog_data
  475.         cmp [OpenDialog_data.status],2
  476.         je .end_save_file
  477.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  478.  
  479.         mov [run_file_70.Function], SSF_CREATE_FILE
  480.         mov [run_file_70.Position], 0
  481.         mov [run_file_70.Flags], 0
  482.  
  483. if 1 ;áâ ¢¨¬ 1 ¥á«¨ á®åà ­ï¥âáï ¢á¥ ¨§®¡à ¦¥­¨¥
  484.         mov ebx, dword[open_file]
  485.         mov [run_file_70.Buffer], ebx
  486.         mov ebx,[open_file_size]
  487. end if
  488. if 0 ;áâ ¢¨¬ 1 ¥á«¨ á®åà ­ï¥âáï í᪨§ ¨§®¡à ¦¥­¨ï
  489.         ;­ å®¤¨¬ app2
  490.         stdcall [exif_get_app2], h_app1,h_child
  491.         cmp dword[h_child],0
  492.         je .end_save_file
  493.         ;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
  494.         stdcall [exif_get_child], h_child,h_child,0x0011
  495.         cmp dword[h_child],0
  496.         je .end_save_file
  497.         stdcall [exif_get_child], h_child,h_child,0x0201
  498.         cmp dword[h_child],0
  499.         je .end_save_file
  500.  
  501.         mov ebx,dword[h_child] ;dword[open_file]
  502.         mov [run_file_70.Buffer], ebx
  503.         mov ebx,dword[h_child_siz] ;à §¬¥à í᪨§  ¨§®¡à ¦¥­¨ï
  504. end if
  505.         mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
  506.         mov byte[run_file_70+20], 0
  507.         mov dword[run_file_70.FileName], openfile_path
  508.         mcall SF_FILE,run_file_70 ;á®å࠭塞 ä ©«
  509.         ;cmp ebx,0xffffffff
  510.         ;je .end_save_file
  511.         ; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
  512.  
  513.         .end_save_file:
  514.         popad
  515.         ret
  516.  
  517. ;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
  518. align 4
  519. OpenDialog_data:
  520. .type                   dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
  521. .procinfo               dd procinfo     ;+4
  522. .com_area_name          dd communication_area_name      ;+8
  523. .com_area               dd 0    ;+12
  524. .opendir_path           dd plugin_path  ;+16
  525. .dir_default_path       dd default_dir ;+20
  526. .start_path             dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
  527. .draw_window            dd draw_window  ;+28
  528. .status                 dd 0    ;+32
  529. .openfile_path          dd openfile_path        ;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
  530. .filename_area          dd filename_area        ;+40
  531. .filter_area            dd Filter
  532. .x:
  533. .x_size                 dw 420 ;+48 ; Window X size
  534. .x_start                dw 10 ;+50 ; Window X position
  535. .y:
  536. .y_size                 dw 320 ;+52 ; Window y size
  537. .y_start                dw 10 ;+54 ; Window Y position
  538.  
  539. default_dir db '/rd/1',0
  540.  
  541. communication_area_name:
  542.         db 'FFFFFFFF_open_dialog',0
  543. open_dialog_name:
  544.         db 'opendial',0
  545. communication_area_default_path:
  546.         db '/rd/1/File managers/',0
  547.  
  548. Filter:
  549. dd Filter.end - Filter ;.1
  550. .1:
  551. db 'JPG',0
  552. db 'JPEG',0
  553. .end:
  554. db 0
  555.  
  556.  
  557.  
  558. head_f_i:
  559. head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
  560.  
  561. system_dir_0 db '/sys/lib/'
  562. lib_name_0 db 'proc_lib.obj',0
  563. err_message_found_lib_0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,0
  564. err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
  565.  
  566. system_dir_1 db '/sys/lib/'
  567. lib_name_1 db 'libimg.obj',0
  568. err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
  569. err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
  570.  
  571. system_dir_2 db '/sys/lib/'
  572. lib_name_2 db 'buf2d.obj',0
  573. err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
  574. err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
  575.  
  576. system_dir_3 db '/sys/lib/'
  577. lib_name_3 db 'exif.obj',0
  578. err_msg_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'exif.obj',39,0
  579. err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'exif',39,0
  580.  
  581. l_libs_start:
  582.         lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
  583.                 err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
  584.         lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
  585.                 err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
  586.         lib_2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\
  587.                 err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
  588.         lib_3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\
  589.                 err_msg_found_lib_3,head_f_l,import_exif,err_msg_import_3,head_f_i
  590. l_libs_end:
  591.  
  592. align 4
  593. import_libimg:
  594.         dd alib_init1
  595.         img_is_img  dd aimg_is_img
  596.         img_info    dd aimg_info
  597.         img_from_file dd aimg_from_file
  598.         img_to_file dd aimg_to_file
  599.         img_from_rgb dd aimg_from_rgb
  600.         img_to_rgb  dd aimg_to_rgb
  601.         img_to_rgb2 dd aimg_to_rgb2
  602.         img_decode  dd aimg_decode
  603.         img_encode  dd aimg_encode
  604.         img_create  dd aimg_create
  605.         img_destroy dd aimg_destroy
  606.         img_destroy_layer dd aimg_destroy_layer
  607.         img_count   dd aimg_count
  608.         img_lock_bits dd aimg_lock_bits
  609.         img_unlock_bits dd aimg_unlock_bits
  610.         img_flip    dd aimg_flip
  611.         img_flip_layer dd aimg_flip_layer
  612.         img_rotate  dd aimg_rotate
  613.         img_rotate_layer dd aimg_rotate_layer
  614.         img_draw    dd aimg_draw
  615.  
  616.         dd 0,0
  617.         alib_init1   db 'lib_init',0
  618.         aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
  619.         aimg_info    db 'img_info',0
  620.         aimg_from_file db 'img_from_file',0
  621.         aimg_to_file db 'img_to_file',0
  622.         aimg_from_rgb db 'img_from_rgb',0
  623.         aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
  624.         aimg_to_rgb2 db 'img_to_rgb2',0
  625.         aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
  626.         aimg_encode  db 'img_encode',0
  627.         aimg_create  db 'img_create',0
  628.         aimg_destroy db 'img_destroy',0
  629.         aimg_destroy_layer db 'img_destroy_layer',0
  630.         aimg_count   db 'img_count',0
  631.         aimg_lock_bits db 'img_lock_bits',0
  632.         aimg_unlock_bits db 'img_unlock_bits',0
  633.         aimg_flip    db 'img_flip',0
  634.         aimg_flip_layer db 'img_flip_layer',0
  635.         aimg_rotate  db 'img_rotate',0
  636.         aimg_rotate_layer db 'img_rotate_layer',0
  637.         aimg_draw    db 'img_draw',0
  638.  
  639. align 4
  640. proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  641.         OpenDialog_Init dd aOpenDialog_Init
  642.         OpenDialog_Start dd aOpenDialog_Start
  643. dd 0,0
  644.         aOpenDialog_Init db 'OpenDialog_init',0
  645.         aOpenDialog_Start db 'OpenDialog_start',0
  646.  
  647. align 4
  648. import_buf2d:
  649.         init dd sz_init
  650.         buf2d_create dd sz_buf2d_create
  651.         buf2d_create_f_img dd sz_buf2d_create_f_img
  652.         buf2d_clear dd sz_buf2d_clear
  653.         buf2d_draw dd sz_buf2d_draw
  654.         buf2d_delete dd sz_buf2d_delete
  655.         buf2d_resize dd sz_buf2d_resize
  656.         buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
  657.         buf2d_bit_blt dd sz_buf2d_bit_blt
  658.         buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
  659.         buf2d_draw_text dd sz_buf2d_draw_text
  660.         dd 0,0
  661.         sz_init db 'lib_init',0
  662.         sz_buf2d_create db 'buf2d_create',0
  663.         sz_buf2d_create_f_img db 'buf2d_create_f_img',0
  664.         sz_buf2d_clear db 'buf2d_clear',0
  665.         sz_buf2d_draw db 'buf2d_draw',0
  666.         sz_buf2d_delete db 'buf2d_delete',0
  667.         sz_buf2d_resize db 'buf2d_resize',0
  668.         sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
  669.         sz_buf2d_bit_blt db 'buf2d_bit_blt',0
  670.         sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
  671.         sz_buf2d_draw_text db 'buf2d_draw_text',0
  672.  
  673. align 4
  674. import_exif: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  675.         exif_get_app1 dd sz_exif_get_app1
  676.         exif_get_app2 dd sz_exif_get_app2
  677.         exif_get_tag dd sz_exif_get_tag
  678.         exif_get_tag_id dd sz_exif_get_tag_id
  679.         exif_get_child dd sz_exif_get_child
  680.  
  681. dd 0,0
  682.         sz_exif_get_app1 db 'exif_get_app1',0
  683.         sz_exif_get_app2 db 'exif_get_app2',0
  684.         sz_exif_get_tag db 'exif_get_tag',0
  685.         sz_exif_get_tag_id db 'exif_get_tag_id',0
  686.         sz_exif_get_child db 'exif_get_child',0
  687.  
  688.  
  689. sc system_colors
  690.  
  691. align 16
  692. procinfo process_information
  693.  
  694. align 4
  695. buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  696.         dw 5 ;+4 left
  697.         dw 31 ;+6 top
  698. .w: dd 570 ;+8 w
  699. .h: dd 480 ;+12 h
  700. .color: dd 0xffffd0 ;+16 color
  701.         db 24 ;+20 bit in pixel
  702.  
  703. align 4
  704. buf_1:
  705.         dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  706.         dw 25 ;+4 left
  707.         dw 25 ;+6 top
  708.         dd 128 ;+8 w
  709.         dd 144 ;+12 h
  710.         dd 0 ;+16 color
  711.         db 24 ;+20 bit in pixel
  712.  
  713. align 4
  714. buf_thumb:
  715.         dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  716.         dw 0 ;+4 left
  717.         dw 0 ;+6 top
  718.         dd 120 ;+8 w
  719.         dd 100 ;+12 h
  720.         dd 0 ;+16 color
  721.         db 24 ;+20 bit in pixel
  722.  
  723. h_app1  rb 14 ;áâàãªâãà  ¤«ï § £®«®¢ª  £« ¢­ëå ⥣®¢
  724. h_child rb 14 ;áâàãªâãà  ¤«ï § £®«®¢ª  ¤®ç¥à­¨å ⥣®¢
  725. h_child_siz rb 14
  726.  
  727. txt_openfile db 'Žâªà®©â¥ ä ©« ¨§®¡à ¦¥­¨ï ¢ ä®à¬ â¥ *.jpg.',0
  728. txt_thumb db 'â® í᪨§ ¨§®¡à ¦¥­¨ï ¨§ ¤ ­­ëå app2.',0
  729. txt_nochild  db 'ˆ­ä®à¬ æ¨ï ¯® í⮩ ª­®¯ª¥ ­¥ ­ ©¤¥­ .',0
  730. txt_buf rb 80
  731.  
  732. align 16
  733. i_end:
  734.         rb 2048
  735. stacktop:
  736.         sys_path rb 1024
  737.         file_name rb 4096
  738.         plugin_path rb 4096
  739.         openfile_path rb 4096
  740.         filename_area rb 256
  741. mem:
  742.