Subversion Repositories Kolibri OS

Rev

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

  1. #define MEMSIZE 4096 * 50
  2.  
  3. //===================================================//
  4. //                                                   //
  5. //                       LIB                         //
  6. //                                                   //
  7. //===================================================//
  8.  
  9. #include "../lib/fs.h"
  10. #include "../lib/list_box.h"
  11. #include "../lib/gui.h"
  12. #include "../lib/random.h"
  13. #include "../lib/kfont.h"
  14.  
  15. #include "../lib/obj/libio.h"
  16. #include "../lib/obj/libimg.h"
  17. #include "../lib/obj/libini.h"
  18. #include "../lib/obj/proc_lib.h"
  19. #include "../lib/obj/box_lib.h"
  20.  
  21. #include "../lib/patterns/simple_open_dialog.h"
  22.  
  23. //===================================================//
  24. //                                                   //
  25. //                       DATA                        //
  26. //                                                   //
  27. //===================================================//
  28.  
  29. //simple open dialog data
  30. char default_dir[] = "/rd/1";
  31. od_filter filter2 = { 15, "MP3\0WAV\0XM\0\0" };
  32.  
  33. #define ABOUT_MESSAGE "Pixie Player v2.92 Final
  34.  
  35.      A tiny music folder player.
  36.      Supports MP3, WAV, XM audio file formats.
  37.  
  38. Hot keys:
  39.  Open file: O key
  40.  Play/Stop: Space or P key
  41.  Start playing selected file: Enter
  42.  Goto next/previous track: Ctrl + Left/Right
  43.  Change sound volume: Left/Right key
  44.  Remove from the list: Delete
  45.  Permanently delete file: Shift + Delete
  46.  Show file info: I
  47.  Repeat: R
  48.  Shuffle: S
  49.  Mute: M
  50.  
  51. kolibri-n.org & aspero.pro"
  52.  
  53. scroll_bar scroll1 = { 5,200,398,44,0,2,115,15,0,0xeeeeee,0xBBBbbb,0xeeeeee,
  54.         0,0,0,0,0,0,0,0,0,0,0,0,0,1,1};
  55.  
  56. proc_info Form;
  57. llist list;
  58.  
  59. char pixie_ini_path[4096];
  60. char work_folder[4096];
  61. char current_filename[256];
  62.  
  63. enum {
  64.         BUTTON_WINDOW_CLOSE = 1,
  65.         BUTTON_WINDOW_MINIMIZE,
  66.         BUTTON_WINDOW_REDUCE,
  67.         BUTTON_PLAYBACK_PLAY_PAUSE = 10,
  68.         BUTTON_PLAYBACK_PREV,
  69.         BUTTON_PLAYBACK_NEXT,
  70.         BUTTON_REPEAT,
  71.         BUTTON_SHUFFLE,
  72.         BUTTON_OPEN_DIALOG,
  73.         BUTTON_SHOW_VOLUME
  74. };
  75.  
  76. int player_run_id;
  77. int notify_run_id;
  78.  
  79. bool repeat;
  80. bool shuffle;
  81.  
  82. int current_playing_file_n=0;
  83.  
  84. word win_x_normal, win_y_normal;
  85. word win_x_small, win_y_small;
  86.  
  87. byte window_mode;
  88. enum {
  89.         WINDOW_MODE_NORMAL,
  90.         WINDOW_MODE_SMALL
  91. };
  92.  
  93. byte playback_mode;
  94. enum {
  95.         PLAYBACK_MODE_STOPED,
  96.         PLAYBACK_MODE_PLAYING
  97. };
  98.  
  99. #define LAST_FOLDER_EXISTS 1
  100.  
  101. //===================================================//
  102. //                                                   //
  103. //                       CODE                        //
  104. //                                                   //
  105. //===================================================//
  106.  
  107. #include "get_files_list.h"
  108. #include "settings.h"
  109.  
  110. void LoadLibraries()
  111. {
  112.         load_dll(boxlib, #box_lib_init,0);
  113.         load_dll(libio, #libio_init,1);
  114.         load_dll(libimg, #libimg_init,1);
  115.         load_dll(libini, #lib_init,1);
  116.         load_dll(Proc_lib, #OpenDialog_init,0);
  117.         OpenDialog_init stdcall (#o_dialog);
  118. }
  119.  
  120. void main()
  121. {
  122.         list.SetFont(8, 16, 13);
  123.         LoadLibraries();
  124.         LoadIniConfig();
  125.         if (!param) {
  126.                 notify("'Pixie Player\nPress O key to open MP3/WAV/XM file' -St");
  127.                 if (work_folder) param=LAST_FOLDER_EXISTS;
  128.         }
  129.         kfont.init(DEFAULT_FONT);      
  130.         SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
  131.         loop()
  132.         {
  133.           WaitEventTimeout(10);
  134.           switch(EAX & 0xFF) {
  135.                 case evMouse:
  136.                         if (!CheckActiveProcess(Form.ID)) break;
  137.                         mouse.get();
  138.                         scrollbar_v_mouse (#scroll1);
  139.                         if (list.first != scroll1.position)
  140.                         {
  141.                                 list.first = scroll1.position;
  142.                                 DrawPlayList();
  143.                                 break;
  144.                         }
  145.                         if (list.MouseOver(mouse.x, mouse.y))
  146.                         {
  147.                                 if (mouse.vert) && (list.MouseScroll(mouse.vert)) DrawPlayList();
  148.                                 if (mouse.dblclick) EventStartPlayingSelectedItem();
  149.                                 if (mouse.down) && (mouse.key&MOUSE_LEFT)
  150.                                         && (list.ProcessMouse(mouse.x, mouse.y)) DrawPlayList();
  151.                                 if (mouse.down) && (mouse.key&MOUSE_RIGHT) EventShowAbout();
  152.                         }
  153.                         if(mouse.key&MOUSE_LEFT) && (mouse.x<14)
  154.                                 && (window_mode == WINDOW_MODE_SMALL) EventDragWindow();
  155.                         break;
  156.                 case evButton:
  157.                         switch(GetButtonID()) {
  158.                                 case BUTTON_WINDOW_CLOSE: EventExitApp(); break;
  159.                                 case BUTTON_WINDOW_MINIMIZE: MinimizeWindow(); break;
  160.                                 case BUTTON_WINDOW_REDUCE: EventChangeWindowMode(); break;
  161.                                 case BUTTON_PLAYBACK_PREV: EventPlaybackPrevious();     break;
  162.                                 case BUTTON_PLAYBACK_NEXT: EventPlaybackNext(); break;
  163.                                 case BUTTON_PLAYBACK_PLAY_PAUSE: EventPlayAndPause(); break;
  164.                                 case BUTTON_REPEAT: EventRepeatClick(); break;
  165.                                 case BUTTON_SHUFFLE: EventShuffleClick(); break;
  166.                                 case BUTTON_OPEN_DIALOG: EventFileDialogOpen(); break;
  167.                                 case BUTTON_SHOW_VOLUME: RunProgram("/sys/@VOLUME", NULL); break;
  168.                         }
  169.                         break;   
  170.                 case evKey:
  171.                         GetKeys();
  172.                         if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) {
  173.                                 if (key_scancode==SCAN_CODE_LEFT) EventPlaybackPrevious();
  174.                                 if (key_scancode==SCAN_CODE_RIGHT) EventPlaybackNext();
  175.                                 break;
  176.                         }
  177.                         if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT) {
  178.                                 if (key_scancode==SCAN_CODE_DEL) EventPermanentlyDeleteFile();
  179.                                 break;
  180.                         }
  181.                         if (key_scancode==SCAN_CODE_KEY_O) EventFileDialogOpen();
  182.                         if (key_scancode==SCAN_CODE_KEY_M) RunProgram("/sys/@VOLUME", "m");
  183.                         if (key_scancode==SCAN_CODE_KEY_R) EventRepeatClick();
  184.                         if (key_scancode==SCAN_CODE_KEY_S) EventShuffleClick();
  185.                         if (key_scancode==SCAN_CODE_KEY_I) EventShowTagInfo();
  186.                         if (key_scancode==SCAN_CODE_RIGHT) RunProgram("/sys/@VOLUME", "+");
  187.                         if (key_scancode==SCAN_CODE_LEFT)  RunProgram("/sys/@VOLUME", "-");
  188.                         if (key_scancode==SCAN_CODE_ENTER) EventStartPlayingSelectedItem();
  189.                         if (key_scancode==SCAN_CODE_DEL) EventRemoveItemFromList();
  190.                         if (key_scancode==SCAN_CODE_KEY_P)||(key_scancode==SCAN_CODE_SPACE) EventPlayAndPause();
  191.                         if (key_scancode==SCAN_CODE_F1) EventShowAbout();
  192.                         if (list.ProcessKey(key_scancode)) DrawPlayList();
  193.                         break;
  194.                 case evReDraw:
  195.                         if (window_mode == WINDOW_MODE_NORMAL)
  196.                                 DefineDragableWindow(win_x_normal, win_y_normal, skin.w - 1, skin.h + list.h-1);
  197.                         if (window_mode == WINDOW_MODE_SMALL)
  198.                                 DefineDragableWindow(win_x_small, win_y_small, WIN_W_SMALL, WIN_H_SMALL);
  199.                         draw_window();
  200.                         if (param[0]) {
  201.                                 if (param==LAST_FOLDER_EXISTS) EventOpenFolder(NULL);
  202.                                 else EventOpenFolder(#param);
  203.                                 param[0] = NULL;
  204.                         }
  205.                         break;
  206.                 default:
  207.                         EventCheckSongFinished();
  208.           }
  209.   }
  210. }
  211.  
  212.  
  213. void DrawPlayList()
  214. {
  215.         int i;
  216.         int yyy;
  217.         int kfont_width;
  218.         char temp_filename[4096];
  219.         dword text_color, bg_color;
  220.         for (i=0; i<list.visible; i++;)
  221.         {
  222.                 strcpy(#temp_filename, files_mas[i + list.first] * 304 + buf + 72);
  223.                 temp_filename[strrchr(#temp_filename, '.')-1] = '\0';
  224.                
  225.                 yyy = i*list.item_h+list.y;
  226.                
  227.                 //this is selected file
  228.                 if (list.cur_y - list.first == i)
  229.                 {
  230.                         if (i>=list.count) continue;
  231.                         bg_color = theme.color_list_active_bg;
  232.                         text_color = theme.color_list_text;
  233.                 }
  234.                 //this is not selected file
  235.                 else
  236.                 {
  237.                         if (i>=list.count) continue;
  238.                         bg_color = theme.color_list_bg;
  239.                         text_color = theme.color_list_text;
  240.                 }
  241.                 //this is cur_y playing file
  242.                 if (i + list.first == current_playing_file_n)
  243.                 && (playback_mode == PLAYBACK_MODE_PLAYING)
  244.                 {
  245.                         text_color = theme.color_list_active_text;
  246.                 }
  247.                 DrawBar(list.x, yyy, list.w, list.item_h, bg_color);
  248.                 kfont_width = kfont.WriteIntoWindow(6, yyy+list.text_y, bg_color,
  249.                         text_color, list.font_type, #temp_filename);
  250.                 if (kfont_width>skin.w-15) DrawBar(skin.w-1, yyy, 1, list.item_h, theme.color_list_border);
  251.         }
  252.         DrawBar(list.x,list.visible * list.item_h + list.y, list.w,
  253.                 -list.visible * list.item_h + list.h, theme.color_list_bg);
  254.         DrawScroller();
  255. }
  256.  
  257.  
  258. void draw_window() {
  259.         GetProcessInfo(#Form, SelfInfo);
  260.         DrawTopPanel();
  261.         IF (Form.status_window>=2) return;
  262.         if (window_mode == WINDOW_MODE_NORMAL)
  263.         {
  264.                 DrawPlayList();
  265.                 DrawRectangle(0, skin.h-1, skin.w-1, list.h+1, theme.color_list_border);
  266.         }
  267. }
  268.  
  269. void DrawTopPanel()
  270. {
  271.         int kfont_width;
  272.         int button_y;
  273.         //Mode depended
  274.         if (window_mode == WINDOW_MODE_NORMAL)
  275.         {
  276.                 button_y = 46;
  277.                 img_draw stdcall(skin.image, 0, 0, skin.w, skin.h, 0, 0);
  278.                 if (playback_mode != PLAYBACK_MODE_STOPED)
  279.                         img_draw stdcall(skin.image, 47, button_y, 41, 21, skin.w+1, WIN_H_SMALL+1);
  280.                 if (repeat)
  281.                         img_draw stdcall(skin.image, 217, button_y+2, 17,17,skin.w+43, WIN_H_SMALL+1);
  282.                 if (shuffle)
  283.                         img_draw stdcall(skin.image, 236, button_y+2, 17,17, skin.w+62, WIN_H_SMALL+1);
  284.  
  285.                 if (!work_folder) DrawPixieTitle("Pixie");
  286.                 else DrawPixieTitle(#work_folder + strrchr(#work_folder, '/'));
  287.                 kfont_width = kfont.WriteIntoWindow(8, 24, theme.color_top_panel_bg,
  288.                         theme.color_top_panel_song_name, list.font_type, #current_filename);
  289.                 if (kfont_width>skin.w-15) DrawBar(skin.w-1, 24, 1, list.item_h, theme.color_list_border);
  290.                 //Playing control buttons
  291.                 DefineHiddenButton(7, button_y, 38, 20, BUTTON_PLAYBACK_PREV);
  292.                 DefineHiddenButton(48, button_y, 38, 20, BUTTON_PLAYBACK_PLAY_PAUSE);
  293.                 DefineHiddenButton(87, button_y, 38, 20, BUTTON_PLAYBACK_NEXT);
  294.                 //Window control buttons
  295.                 DefineHiddenButton(Form.width - 27, 1, 26, 15, BUTTON_WINDOW_CLOSE);
  296.                 DefineHiddenButton(Form.width - 55, 1, 26, 15, BUTTON_WINDOW_MINIMIZE);
  297.                 DefineHiddenButton(Form.width - 83, 1, 26, 15, BUTTON_WINDOW_REDUCE);
  298.                 //Other buttons
  299.                 DefineHiddenButton(218, button_y+3, 17, 16, BUTTON_REPEAT);
  300.                 DefineHiddenButton(237, button_y+3, 17, 16, BUTTON_SHUFFLE);
  301.                 DefineHiddenButton(270, button_y+3, 17, 16, BUTTON_OPEN_DIALOG);
  302.                 DefineHiddenButton(289, button_y+3, 17, 16, BUTTON_SHOW_VOLUME);
  303.         }
  304.         else if (window_mode == WINDOW_MODE_SMALL)
  305.         {
  306.                 button_y = 7;
  307.                 img_draw stdcall(skin.image, 0, 0, WIN_W_SMALL, WIN_H_SMALL, skin.w-1, 0);
  308.                 if (playback_mode != PLAYBACK_MODE_STOPED)
  309.                         img_draw stdcall(skin.image, 46, button_y-1, 27, 19, skin.w+83, WIN_H_SMALL+1);
  310.                 DefineHiddenButton(0, 0, WIN_W_SMALL, WIN_H_SMALL, 99 + BT_NOFRAME);
  311.                 //Playing control buttons
  312.                 DefineHiddenButton(20, button_y, 24, 16, BUTTON_PLAYBACK_PREV);
  313.                 DefineHiddenButton(46, button_y, 24, 16, BUTTON_PLAYBACK_PLAY_PAUSE);
  314.                 DefineHiddenButton(72, button_y, 24, 16, BUTTON_PLAYBACK_NEXT);
  315.                 //Window control buttons
  316.                 DefineHiddenButton(Form.width - 20, 1, 19, 13, BUTTON_WINDOW_CLOSE);
  317.                 DefineHiddenButton(Form.width - 20, 16, 19, 13, BUTTON_WINDOW_REDUCE);
  318.         }
  319. }
  320.  
  321.  
  322. void DrawScroller()
  323. {
  324.         scroll1.max_area = list.count;
  325.         scroll1.cur_area = list.visible;
  326.         scroll1.position = list.first;
  327.         scroll1.all_redraw = 0;
  328.         scroll1.start_x = skin.w - scroll1.size_x-1;
  329.         scroll1.start_y = list.y-1;
  330.         scroll1.size_y = list.h+2;
  331.         if (list.count > list.visible) scrollbar_v_draw(#scroll1);
  332. }
  333.  
  334. void DrawPixieTitle(dword _title)
  335. {
  336.         kfont.WriteIntoWindow(8, 5, theme.color_top_panel_bg,
  337.                 theme.color_top_panel_folder_name, list.font_type, _title);
  338. }
  339.  
  340. //===================================================//
  341. //                                                   //
  342. //                     EVENTS                        //
  343. //                                                   //
  344. //===================================================//
  345.  
  346.  
  347. void EventOpenFolder(dword _open_path)
  348. {
  349.         if (!_open_path)
  350.         {
  351.                 OpenDirectory(#work_folder);
  352.         }
  353.         else
  354.         {
  355.                 strcpy(#work_folder, _open_path);
  356.                 work_folder[strrchr(#work_folder, '/')-1]='\0';
  357.                 OpenDirectory(#work_folder);
  358.                 SetOpenedFileFirst(_open_path);
  359.         }
  360.         list.SetSizes(1, skin.h, skin.w-1, 22*15, 22);
  361.         if (list.count <= list.visible)
  362.         {
  363.                 list.h = list.count * list.item_h;
  364.                 list.visible = list.count;
  365.                 list.w -= 1;
  366.         }
  367.         else
  368.         {
  369.                 list.w -= scroll1.size_x;
  370.         }
  371.         if (window_mode==WINDOW_MODE_NORMAL) MoveSize(OLD, OLD, OLD, skin.h + list.h);
  372.         list.KeyHome();
  373.         current_playing_file_n=0;
  374.         EventStopPlaying();
  375.         if (_open_path) EventStartPlaying();   
  376. }
  377.  
  378.  
  379. void EventStopPlaying()
  380. {
  381.         if (player_run_id) player_run_id = KillProcess(player_run_id);
  382.         if (notify_run_id) notify_run_id = KillProcess(notify_run_id);
  383.         playback_mode = PLAYBACK_MODE_STOPED;
  384.         DrawTopPanel();
  385.         DrawPlayList();
  386. }
  387.  
  388.  
  389. void EventStartPlaying()
  390. {
  391.         word i;
  392.         char item_path[4096];
  393.         char notify_message[512];
  394.         EventStopPlaying();
  395.         if (current_playing_file_n >= list.count) {
  396.                 current_playing_file_n = list.count-1;
  397.                 return;
  398.         }
  399.         if (current_playing_file_n < 0) {
  400.                 current_playing_file_n = 0;
  401.                 return;
  402.         }
  403.         playback_mode = PLAYBACK_MODE_PLAYING;
  404.         strlcpy(#current_filename, GetPlayingItemName(), sizeof(current_filename));
  405.         sprintf(#item_path,"-h %s/%s",#work_folder,#current_filename);
  406.         current_filename[strrchr(#current_filename, '.')-1] = '\0';
  407.         DrawPlayList();
  408.         DrawTopPanel();
  409.         player_run_id = RunProgram("/sys/media/ac97snd", #item_path);  
  410.         sprintf(#notify_message,"'Now playing:\n%s' -St",#current_filename);
  411.         if (!repeat) && (window_mode==WINDOW_MODE_SMALL)
  412.         {
  413.                 for (i=2; i<strlen(#notify_message)-6; i++)
  414.                 {
  415.                         //replace ' char to avoid @notify misunderstood
  416.                         if (notify_message[i]=='\'') notify_message[i]=96;
  417.                 }
  418.                 notify_run_id = notify(#notify_message);
  419.         }
  420. }
  421.  
  422.  
  423. void EventPlayAndPause()
  424. {
  425.         if (playback_mode == PLAYBACK_MODE_PLAYING)
  426.         {
  427.                 playback_mode = PLAYBACK_MODE_STOPED;
  428.                 EventStopPlaying();
  429.         }
  430.         else
  431.         {
  432.                 playback_mode = PLAYBACK_MODE_PLAYING;
  433.                 EventStartPlaying();
  434.         }
  435. }
  436.  
  437.  
  438. void EventChangeWindowMode()
  439. {
  440.         if (window_mode == WINDOW_MODE_NORMAL)
  441.         {
  442.                 window_mode = WINDOW_MODE_SMALL;
  443.                 win_x_normal = Form.left;
  444.                 win_y_normal = Form.top;
  445.                 MoveSize(OLD, OLD, WIN_W_SMALL-1, WIN_H_SMALL-1);
  446.                 MoveSize(OLD, win_y_small, OLD, OLD);
  447.                 MoveSize(win_x_small, OLD, OLD, OLD);
  448.         }
  449.         else
  450.         {
  451.                 window_mode = WINDOW_MODE_NORMAL;
  452.                 win_x_small = Form.left;
  453.                 win_y_small = Form.top;
  454.                 MoveSize(win_x_normal, win_y_normal, skin.w -1 ,skin.h + list.h);
  455.         }
  456. }
  457.  
  458. void EventExitApp()
  459. {
  460.         EventStopPlaying();
  461.         SaveIniConfig();
  462.         ExitProcess();
  463. }
  464.  
  465. void EventPlaybackPrevious()
  466. {
  467.         if (shuffle) current_playing_file_n = random(list.count);
  468.         else current_playing_file_n--;
  469.         EventStartPlaying();
  470. }
  471.  
  472. void EventPlaybackNext()
  473. {
  474.         if (shuffle) current_playing_file_n = random(list.count);
  475.         else current_playing_file_n++;
  476.         EventStartPlaying();
  477. }
  478.  
  479. void EventStartPlayingSelectedItem()
  480. {
  481.         current_playing_file_n=list.cur_y;
  482.         EventStartPlaying();
  483. }
  484.  
  485. void EventFileDialogOpen()
  486. {
  487.         OpenDialog_start stdcall (#o_dialog);
  488.         if (o_dialog.status==1) EventOpenFolder(#openfile_path);
  489. }
  490.  
  491. void EventCheckSongFinished()
  492. {
  493.         if (playback_mode == PLAYBACK_MODE_PLAYING)
  494.         && (!GetProcessSlot(player_run_id)) {
  495.                 if (repeat) EventStartPlaying();
  496.                 else EventPlaybackNext();
  497.         }
  498. }
  499.  
  500. void EventRepeatClick()
  501. {
  502.         repeat ^= 1;
  503.         DrawTopPanel();
  504. }
  505.  
  506. void EventShuffleClick()
  507. {
  508.         shuffle ^= 1;
  509.         DrawTopPanel();
  510. }
  511.  
  512. void EventRemoveItemFromList()
  513. {
  514.         int i;
  515.         if (list.cur_y == current_playing_file_n) EventStopPlaying();
  516.         for (i=list.cur_y; i<list.count; i++) files_mas[i] = files_mas[i+1];
  517.         list.count--;
  518.         if (list.cur_y <= current_playing_file_n) current_playing_file_n--;
  519.         list.CheckDoesValuesOkey();
  520.         if (list.count <= list.visible)
  521.         {
  522.                 list.h = list.count * list.item_h;
  523.                 list.visible = list.count;
  524.                 if (window_mode==WINDOW_MODE_NORMAL) MoveSize(OLD, OLD, OLD, skin.h + list.h);
  525.         }
  526.         else DrawPlayList();
  527. }
  528.  
  529. void EventPermanentlyDeleteFile()
  530. {
  531.         char item_path[4096];
  532.         sprintf(#item_path,"%s/%s",#work_folder,GetSelectedItemName());
  533.         DeleteFile(#item_path);
  534.         EventRemoveItemFromList();
  535. }
  536.  
  537. void EventShowAbout()
  538. {
  539.         CreateThread(#ShowAboutThread,#menu_stak+4092);
  540. }
  541.  
  542. void ShowAboutThread()
  543. {
  544.         proc_info pop_up;
  545.         loop() switch(WaitEvent())
  546.         {
  547.                 case evButton:
  548.                         ExitProcess();
  549.                         break;
  550.                 case evKey:
  551.                         GetKeys();
  552.                         if (key_scancode == SCAN_CODE_ESC) ExitProcess();
  553.                         break;
  554.                 case evReDraw:
  555.                         DefineDragableWindow(150, 200, 400, 368);
  556.                         GetProcessInfo(#pop_up, SelfInfo);
  557.  
  558.                         DrawBar(0, 0, pop_up.width, pop_up.height, theme.color_top_panel_bg);
  559.                         DrawRectangle(0, 0, pop_up.width, pop_up.height, theme.color_list_border);
  560.  
  561.                         DefineHiddenButton(pop_up.width - 27, 1, 26, 15, BUTTON_WINDOW_CLOSE);
  562.                         img_draw stdcall(skin.image, pop_up.width-28, 0, 28, 18, skin.w - 29, 0);
  563.                         DrawCaptButton(pop_up.width-10-80, pop_up.height - 34, 80, 24, 2,
  564.                           theme.color_list_active_bg, theme.color_top_panel_song_name, "Cool");
  565.                        
  566.                         WriteTextLines(10, 10, 0x90, theme.color_top_panel_song_name, ABOUT_MESSAGE, 19);
  567.                         DrawIcon32(10, 48, theme.color_top_panel_bg, 65);
  568.  
  569.         }
  570. }
  571.  
  572. /*
  573. struct {
  574.         char tag[4];
  575.         char title[60];
  576.         char artist[60];
  577.         char album[60];
  578.         char speed;
  579.         char genre[30];
  580.         char start_time[6];
  581.         char end_time[6];
  582. } tag11;
  583.  
  584. struct {
  585.         char tag[3];
  586.         char title[30];
  587.         char artist[30];
  588.         char album[30];
  589.         char year[4];
  590.         char comment[30];
  591.         unsigned char genre; //https://www.w3.org/People/Bos/MP3tag/mp3tag.c
  592. } tag10;
  593. */
  594.  
  595. void EventShowTagInfo()
  596. {
  597.         char item_path[4096];
  598.         sprintf(#item_path,"%s/%s",#work_folder,GetSelectedItemName());
  599.         RunProgram("/sys/media/mp3info", #item_path);
  600. }
  601.  
  602.  
  603. stop:
  604.  
  605. char menu_stak[4096];