Subversion Repositories Kolibri OS

Rev

Rev 6313 | Rev 6322 | 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 10.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_app1_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_app1_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_app1_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_app1_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_app1_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_app1_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_app1_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_app1_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.         mov eax,1
  407.         mov ebx,1
  408.  
  409.         ;­ å®¤¨¬ app2
  410.         stdcall [exif_get_app2], h_app1,h_child
  411.         cmp dword[h_child],0
  412.         je .no_found_child
  413.         ;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
  414.         stdcall [exif_get_app1_child], h_child,h_child,0x0011
  415.         cmp dword[h_child],0
  416.         je .no_found_child
  417.  
  418.         stdcall [exif_get_app1_child], h_child,h_child_siz,0x0202
  419.         cmp dword[h_child_siz],0
  420.         je .no_found_child
  421.        
  422.         stdcall [exif_get_app1_child], h_child,h_child,0x0201
  423.         cmp dword[h_child],0
  424.         je .no_found_child
  425.  
  426.         ;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à ebx
  427.         stdcall [img_decode],dword[h_child],dword[h_child_siz],0
  428.         cmp dword[eax+4],1
  429.         jl .no_found_child
  430.         cmp dword[eax+8],1
  431.         jl .no_found_child
  432.         mov ebx,eax
  433.         stdcall [buf2d_resize],buf_thumb,[eax+4],[eax+8],1
  434.         ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
  435.         stdcall [img_to_rgb2],ebx,[buf_thumb]
  436.         ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à ebx
  437.         stdcall [img_destroy],ebx
  438.  
  439.         stdcall [buf2d_bit_blt], buf_0, 0,15, buf_thumb ;à¨á㥬 ¨§®¡à ¦¥­¨¥
  440.         stdcall [buf2d_draw_text], buf_0, buf_1,txt_thumb,3,3,0xb000
  441.         jmp @f
  442.  
  443.         .no_found_child:
  444.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_nochild,3,3,0xb000
  445.                 jmp @f
  446.         .open_file:
  447.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
  448.         @@:
  449.         stdcall [buf2d_draw], buf_0
  450. popad
  451.         ret
  452.  
  453. align 4
  454. but_save_file:
  455.         pushad
  456.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  457.         mov [OpenDialog_data.type],1
  458.         stdcall [OpenDialog_Start],OpenDialog_data
  459.         cmp [OpenDialog_data.status],2
  460.         je .end_save_file
  461.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  462.  
  463.         mov [run_file_70.Function], SSF_CREATE_FILE
  464.         mov [run_file_70.Position], 0
  465.         mov [run_file_70.Flags], 0
  466.  
  467. if 1 ;áâ ¢¨¬ 1 ¥á«¨ á®åà ­ï¥âáï ¢á¥ ¨§®¡à ¦¥­¨¥
  468.         mov ebx, dword[open_file]
  469.         mov [run_file_70.Buffer], ebx
  470.         mov ebx,[open_file_size]
  471. end if
  472. if 0 ;áâ ¢¨¬ 1 ¥á«¨ á®åà ­ï¥âáï í᪨§ ¨§®¡à ¦¥­¨ï
  473.         ;­ å®¤¨¬ app2
  474.         stdcall [exif_get_app2], h_app1,h_child
  475.         cmp dword[h_child],0
  476.         je .end_save_file
  477.         ;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
  478.         stdcall [exif_get_app1_child], h_child,h_child,0x0011
  479.         cmp dword[h_child],0
  480.         je .end_save_file
  481.         stdcall [exif_get_app1_child], h_child,h_child,0x0201
  482.         cmp dword[h_child],0
  483.         je .end_save_file
  484.  
  485.         mov ebx,dword[h_child] ;dword[open_file]
  486.         mov [run_file_70.Buffer], ebx
  487.         mov ebx,dword[h_child_siz] ;à §¬¥à í᪨§  ¨§®¡à ¦¥­¨ï
  488. end if
  489.         mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
  490.         mov byte[run_file_70+20], 0
  491.         mov dword[run_file_70.FileName], openfile_path
  492.         mcall SF_FILE,run_file_70 ;á®å࠭塞 ä ©«
  493.         ;cmp ebx,0xffffffff
  494.         ;je .end_save_file
  495.         ; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
  496.  
  497.         .end_save_file:
  498.         popad
  499.         ret
  500.  
  501. ;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
  502. align 4
  503. OpenDialog_data:
  504. .type                   dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
  505. .procinfo               dd procinfo     ;+4
  506. .com_area_name          dd communication_area_name      ;+8
  507. .com_area               dd 0    ;+12
  508. .opendir_path           dd plugin_path  ;+16
  509. .dir_default_path       dd default_dir ;+20
  510. .start_path             dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
  511. .draw_window            dd draw_window  ;+28
  512. .status                 dd 0    ;+32
  513. .openfile_path          dd openfile_path        ;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
  514. .filename_area          dd filename_area        ;+40
  515. .filter_area            dd Filter
  516. .x:
  517. .x_size                 dw 420 ;+48 ; Window X size
  518. .x_start                dw 10 ;+50 ; Window X position
  519. .y:
  520. .y_size                 dw 320 ;+52 ; Window y size
  521. .y_start                dw 10 ;+54 ; Window Y position
  522.  
  523. default_dir db '/rd/1',0
  524.  
  525. communication_area_name:
  526.         db 'FFFFFFFF_open_dialog',0
  527. open_dialog_name:
  528.         db 'opendial',0
  529. communication_area_default_path:
  530.         db '/rd/1/File managers/',0
  531.  
  532. Filter:
  533. dd Filter.end - Filter ;.1
  534. .1:
  535. db 'JPG',0
  536. db 'JPEG',0
  537. .end:
  538. db 0
  539.  
  540.  
  541.  
  542. head_f_i:
  543. head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
  544.  
  545. system_dir_0 db '/sys/lib/'
  546. lib_name_0 db 'proc_lib.obj',0
  547. err_message_found_lib_0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,0
  548. err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
  549.  
  550. system_dir_1 db '/sys/lib/'
  551. lib_name_1 db 'libimg.obj',0
  552. err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
  553. err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
  554.  
  555. system_dir_2 db '/sys/lib/'
  556. lib_name_2 db 'buf2d.obj',0
  557. err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
  558. err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
  559.  
  560. system_dir_3 db '/sys/lib/'
  561. lib_name_3 db 'exif.obj',0
  562. err_msg_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'exif.obj',39,0
  563. err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'exif',39,0
  564.  
  565. l_libs_start:
  566.         lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
  567.                 err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
  568.         lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
  569.                 err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
  570.         lib_2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\
  571.                 err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
  572.         lib_3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\
  573.                 err_msg_found_lib_3,head_f_l,import_exif,err_msg_import_3,head_f_i
  574. l_libs_end:
  575.  
  576. align 4
  577. import_libimg:
  578.         dd alib_init1
  579.         img_is_img  dd aimg_is_img
  580.         img_info    dd aimg_info
  581.         img_from_file dd aimg_from_file
  582.         img_to_file dd aimg_to_file
  583.         img_from_rgb dd aimg_from_rgb
  584.         img_to_rgb  dd aimg_to_rgb
  585.         img_to_rgb2 dd aimg_to_rgb2
  586.         img_decode  dd aimg_decode
  587.         img_encode  dd aimg_encode
  588.         img_create  dd aimg_create
  589.         img_destroy dd aimg_destroy
  590.         img_destroy_layer dd aimg_destroy_layer
  591.         img_count   dd aimg_count
  592.         img_lock_bits dd aimg_lock_bits
  593.         img_unlock_bits dd aimg_unlock_bits
  594.         img_flip    dd aimg_flip
  595.         img_flip_layer dd aimg_flip_layer
  596.         img_rotate  dd aimg_rotate
  597.         img_rotate_layer dd aimg_rotate_layer
  598.         img_draw    dd aimg_draw
  599.  
  600.         dd 0,0
  601.         alib_init1   db 'lib_init',0
  602.         aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
  603.         aimg_info    db 'img_info',0
  604.         aimg_from_file db 'img_from_file',0
  605.         aimg_to_file db 'img_to_file',0
  606.         aimg_from_rgb db 'img_from_rgb',0
  607.         aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
  608.         aimg_to_rgb2 db 'img_to_rgb2',0
  609.         aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
  610.         aimg_encode  db 'img_encode',0
  611.         aimg_create  db 'img_create',0
  612.         aimg_destroy db 'img_destroy',0
  613.         aimg_destroy_layer db 'img_destroy_layer',0
  614.         aimg_count   db 'img_count',0
  615.         aimg_lock_bits db 'img_lock_bits',0
  616.         aimg_unlock_bits db 'img_unlock_bits',0
  617.         aimg_flip    db 'img_flip',0
  618.         aimg_flip_layer db 'img_flip_layer',0
  619.         aimg_rotate  db 'img_rotate',0
  620.         aimg_rotate_layer db 'img_rotate_layer',0
  621.         aimg_draw    db 'img_draw',0
  622.  
  623. align 4
  624. proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  625.         OpenDialog_Init dd aOpenDialog_Init
  626.         OpenDialog_Start dd aOpenDialog_Start
  627. dd 0,0
  628.         aOpenDialog_Init db 'OpenDialog_init',0
  629.         aOpenDialog_Start db 'OpenDialog_start',0
  630.  
  631. align 4
  632. import_buf2d:
  633.         init dd sz_init
  634.         buf2d_create dd sz_buf2d_create
  635.         buf2d_create_f_img dd sz_buf2d_create_f_img
  636.         buf2d_clear dd sz_buf2d_clear
  637.         buf2d_draw dd sz_buf2d_draw
  638.         buf2d_delete dd sz_buf2d_delete
  639.         buf2d_resize dd sz_buf2d_resize
  640.         buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
  641.         buf2d_bit_blt dd sz_buf2d_bit_blt
  642.         buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
  643.         buf2d_draw_text dd sz_buf2d_draw_text
  644.         dd 0,0
  645.         sz_init db 'lib_init',0
  646.         sz_buf2d_create db 'buf2d_create',0
  647.         sz_buf2d_create_f_img db 'buf2d_create_f_img',0
  648.         sz_buf2d_clear db 'buf2d_clear',0
  649.         sz_buf2d_draw db 'buf2d_draw',0
  650.         sz_buf2d_delete db 'buf2d_delete',0
  651.         sz_buf2d_resize db 'buf2d_resize',0
  652.         sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
  653.         sz_buf2d_bit_blt db 'buf2d_bit_blt',0
  654.         sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
  655.         sz_buf2d_draw_text db 'buf2d_draw_text',0
  656.  
  657. align 4
  658. import_exif: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  659.         exif_get_app1 dd sz_exif_get_app1
  660.         exif_get_app1_tag dd sz_exif_get_app1_tag
  661.         exif_get_app1_child dd sz_exif_get_app1_child
  662.         exif_get_app2 dd sz_exif_get_app2
  663. dd 0,0
  664.         sz_exif_get_app1 db 'exif_get_app1',0
  665.         sz_exif_get_app1_tag db 'exif_get_app1_tag',0
  666.         sz_exif_get_app1_child db 'exif_get_app1_child',0
  667.         sz_exif_get_app2 db 'exif_get_app2',0
  668.  
  669. sc system_colors
  670.  
  671. align 16
  672. procinfo process_information
  673.  
  674. align 4
  675. buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  676.         dw 5 ;+4 left
  677.         dw 31 ;+6 top
  678. .w: dd 570 ;+8 w
  679. .h: dd 480 ;+12 h
  680. .color: dd 0xffffd0 ;+16 color
  681.         db 24 ;+20 bit in pixel
  682.  
  683. align 4
  684. buf_1:
  685.         dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  686.         dw 25 ;+4 left
  687.         dw 25 ;+6 top
  688.         dd 128 ;+8 w
  689.         dd 144 ;+12 h
  690.         dd 0 ;+16 color
  691.         db 24 ;+20 bit in pixel
  692.  
  693. align 4
  694. buf_thumb:
  695.         dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  696.         dw 0 ;+4 left
  697.         dw 0 ;+6 top
  698.         dd 120 ;+8 w
  699.         dd 100 ;+12 h
  700.         dd 0 ;+16 color
  701.         db 24 ;+20 bit in pixel
  702.  
  703. h_app1  rb 14 ;áâàãªâãà  ¤«ï § £®«®¢ª  £« ¢­ëå ⥣®¢
  704. h_child rb 14 ;áâàãªâãà  ¤«ï § £®«®¢ª  ¤®ç¥à­¨å ⥣®¢
  705. h_child_siz rb 14
  706.  
  707. txt_openfile db 'Žâªà®©â¥ ä ©« ¨§®¡à ¦¥­¨ï ¢ ä®à¬ â¥ *.jpg.',0
  708. txt_thumb db 'â® í᪨§ ¨§®¡à ¦¥­¨ï ¨§ ¤ ­­ëå app2.',0
  709. txt_nochild  db 'ˆ­ä®à¬ æ¨ï ¯® í⮩ ª­®¯ª¥ ­¥ ­ ©¤¥­ .',0
  710. txt_buf rb 80
  711.  
  712. align 16
  713. i_end:
  714.         rb 2048
  715. stacktop:
  716.         sys_path rb 1024
  717.         file_name rb 4096
  718.         plugin_path rb 4096
  719.         openfile_path rb 4096
  720.         filename_area rb 256
  721. mem:
  722.