home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 October / PCWorld_2005-10_cd.bin / software / temacd / bsplayer / bsplayer136.825.exe / sdk / bsp.pas < prev   
Pascal/Delphi Source File  |  2005-09-05  |  8KB  |  295 lines

  1. ////////////////////////////////////////////////////////////////////
  2. // BSPlayer API v 1.1
  3. //
  4. // To get BSPlayer window handle use:
  5. // bsp_hand:=FindWindow('BSPlayer',nil);
  6. //
  7. // then you can send messages, for ex. to get current version:
  8. // bsp_ver := SendMessage(bsp_hand,WM_BSP_CMD,BSP_GETVERSION,0);
  9. ////////////////////////////////////////////////////////////////////
  10. unit bsp;
  11.  
  12. interface
  13.  
  14. uses messages;
  15.  
  16. const
  17.     WM_BSP_CMD = WM_USER+2;
  18.  
  19.     // bsp_ver := SendMessage(bsp_hand,WM_BSP_CMD,BSP_GETVERSION,0);
  20.     // available in BSPlayer version 0.84.484+
  21.     //
  22.     // Return player version
  23.     // format will be XX.YY.ZZZZ -> $XXYYZZZZ
  24.     // for 0.84.484 -> $00840484
  25.     BSP_GETVERSION = $10000;
  26.  
  27.     // mov_len := SendMessage(bsp_hand,WM_BSP_CMD,BSP_GetMovLen,0);
  28.     // available in BSPlayer version 0.84.484+
  29.     //
  30.     // Return moive length in msec
  31.     BSP_GetMovLen  = $10100;
  32.  
  33.     // mov_pos := SendMessage(bsp_hand,WM_BSP_CMD,BSP_GetMovPos,0);
  34.     // available in BSPlayer version 0.84.484+
  35.     //
  36.     // Return current movie position in msec
  37.     BSP_GetMovPos  = $10101;
  38.  
  39.     // status := SendMessage(bsp_hand,WM_BSP_CMD,BSP_GetStatus,0);
  40.     // available in BSPlayer version 0.84.484+
  41.     //
  42.     // Return player status
  43.     // 0 - STOP
  44.     // 1 - PAUSE
  45.     // 2 - PLAY
  46.     // 4 - No movie open
  47.     BSP_GetStatus  = $10102;
  48.  
  49.     // SendMessage(bsp_hand,WM_BSP_CMD,BSP_Seek,t);
  50.     // t is time in msec
  51.     // available in BSPlayer version 0.84.484+
  52.     //
  53.     // Seek to specified position
  54.     BSP_Seek       = $10103;
  55.  
  56.  
  57.     // SendMessage(bsp_hand,WM_BSP_CMD,BSP_SetVol,vol);
  58.     // vol is volume in range 0-24
  59.     // available in BSPlayer version 0.84.484+
  60.     //
  61.     // Set volume
  62.     BSP_SetVol     = $10104;
  63.  
  64.     // vol := SendMessage(bsp_hand,WM_BSP_CMD,BSP_GetVol,0);
  65.     // available in BSPlayer version 0.84.484+
  66.     //
  67.     //Get volume in range 0-24
  68.     BSP_GetVol     = $10105;
  69.  
  70.     // v1.00+
  71.     // all this messages with WM_COPYDATA message can be called from plugins like this:
  72.     //
  73.     // var buf:array[0..MAX_PATH] of char;
  74.     // SendMessage(bsp_hand,WM_BSP_CMD,BSP_GetSkin,Lparam(@buf));
  75.     //
  76.     // SendMessage(bsp_hand,WM_BSP_CMD,BSP_SetSkin,LParam(Pchar('SkinName')));
  77.  
  78.  
  79.     // cds:TCOPYDATASTRUCT;
  80.     //                                           
  81.     // cds.dwData:=BSP_SetSkin;
  82.     // cds.lpData:=Pchar('skin_name');
  83.     // cds.cbData:=strlen(cds.lpData)+1;
  84.     // SendMessage(bsp_hand,WM_COPYDATA,0,lParam(@cds));
  85.     // available in BSPlayer version 0.84.484+
  86.     //
  87.     // Set new skin
  88.     BSP_SetSkin    = $10106;
  89.  
  90.     // cds:TCOPYDATASTRUCT;
  91.     // buf:array[0..MAX_PATH-1] of char;
  92.     // adr:pointer;
  93.     //
  94.     // adr:=@buf;
  95.     // cds.dwData:=BSP_GetSkin;
  96.     // cds.lpData:=@adr;
  97.     // cds.cbData:=4;
  98.     // SendMessage(bsp_hand,WM_COPYDATA,appHWND,lParam(@cds));
  99.     // available in BSPlayer version 0.84.484+
  100.     //
  101.     // appHWND is calling application window handle
  102.     //
  103.     // Get current skin, skin name will be copied to buf
  104.     BSP_GetSkin    = $10107;
  105.  
  106.  
  107.     // cds:TCOPYDATASTRUCT;
  108.     //
  109.     // cds.dwData:=BSP_OpenFile;
  110.     // cds.lpData:=Pchar('file.avi');
  111.     // cds.cbData:=strlen(cds.lpData)+1;
  112.     // SendMessage(bsp_hand,WM_COPYDATA,0,lParam(@cds));
  113.     // available in BSPlayer version 0.84.484+
  114.     //
  115.     // Open file
  116.     BSP_OpenFile    = $10108;
  117.  
  118.     // cds:TCOPYDATASTRUCT;
  119.     //
  120.     // cds.dwData:=BSP_LoadSub;
  121.     // cds.lpData:=Pchar('subtitles.sub');
  122.     // cds.cbData:=strlen(cds.lpData)+1;
  123.     // SendMessage(bsp_hand,WM_COPYDATA,0,lParam(@cds));
  124.     // available in BSPlayer version 0.84.484+
  125.     //
  126.     // Load subtitles
  127.     BSP_LoadSub    = $10109;
  128.  
  129.     // cds:TCOPYDATASTRUCT;
  130.     //
  131.     // cds.dwData:=BSP_LoadAudio;
  132.     // cds.lpData:=Pchar('file.mp3');
  133.     // cds.cbData:=strlen(cds.lpData)+1;
  134.     // SendMessage(bsp_hand,WM_COPYDATA,0,lParam(@cds));
  135.     // available in BSPlayer version 0.84.484+
  136.     //
  137.     // Load external audio file
  138.     BSP_LoadAudio    = $1010A;
  139.  
  140.     // cds:TCOPYDATASTRUCT;
  141.     // buf:array[0..MAX_PATH-1] of char;
  142.     // adr:pointer;
  143.     //
  144.     // adr:=@buf;
  145.     // cds.dwData:=BSP_GetFileName;
  146.     // cds.lpData:=@adr;
  147.     // cds.cbData:=4;
  148.     // SendMessage(bsp_hand,WM_COPYDATA,appHWND,lParam(@cds));
  149.     // available in BSPlayer version 0.84.484+
  150.     //
  151.     // appHWND is calling application window handle
  152.     // File name will be copied to buf
  153.     //
  154.     // Get open file name
  155.     BSP_GetFileName  = $1010B;
  156.  
  157.     // cds:TCOPYDATASTRUCT;
  158.     //
  159.     // cds.dwData:=BSP_LoadPlaylist;
  160.     // cds.lpData:=Pchar('file.bsl');
  161.     // cds.cbData:=strlen(cds.lpData)+1;
  162.     // SendMessage(bsp_hand,WM_COPYDATA,0,lParam(@cds));
  163.     // available in BSPlayer version 1.00.800+
  164.     //
  165.     // Load playlist
  166.     BSP_LoadPlaylist = $1010C;
  167.     
  168.     // cds:TCOPYDATASTRUCT;
  169.     //
  170.     // cds.dwData:=BSP_LoadPlaylistInt;
  171.     // cds.lpData:=Pchar('file.bls');
  172.     // cds.cbData:=strlen(cds.lpData)+1;
  173.     // SendMessage(bsp_hand,WM_COPYDATA,0,lParam(@cds));
  174.     // available in BSPlayer version 1.00.800+
  175.     //
  176.     // Load playlist in internal format
  177.     BSP_LoadPlaylistInt = $1010D;
  178.  
  179.     // Other commands
  180.     
  181.     BSP_ExitFScreen=0;
  182.     BSP_VolUp=1;
  183.     BSP_VolDown=2;
  184.     BSP_DeDynUp=3;
  185.     BSP_DeDynPreUp=4;
  186.     BSP_DeDynDown=5;
  187.     BSP_DeDynPreDown=6;
  188.     BSP_Preferences=7;
  189.     BSP_FrmCapture=8;
  190.     BSP_Frm2=9;
  191.     BSP_FS_Switch=10;
  192.     BSP_SubsEnDi=11;
  193.     BSP_Skins=12;
  194.     BSP_AStrmVolCyc=13;
  195.     BSP_Rew=14;
  196.     BSP_Forw=15;
  197.     BSP_SubCorInc=16;
  198.     BSP_SubCorDec=17;
  199.     BSP_SubCorIncS=18;
  200.     BSP_SubCorDecS=19;
  201.     BSP_Play=20;
  202.     BSP_Pause=21;
  203.     BSP_Stop=22;
  204.     BSP_ViewChp=23;
  205.     BSP_VBlankSwitch=24;
  206.     BSP_Prev=25;
  207.     BSP_PrevCh=26;
  208.     BSP_PrevCD=27;
  209.     BSP_Next=28;
  210.     BSP_NextCh=29;
  211.     BSP_NextCD=30;
  212.     BSP_ATop=31;
  213.     BSP_OvrTop=32;
  214.     BSP_AspCyc=33;
  215.     BSP_PlayList=34;
  216.     BSP_Mute=35;
  217.     BSP_JumpToTime=36;
  218.     BSP_Zoom50=37;
  219.     BSP_Zoom100=38;
  220.     BSP_Zoom200=39;
  221.     BSP_AspOrg=40;
  222.     BSP_Asp169=41;
  223.     BSP_Asp43=42;
  224.     BSP_AspAnamorph=43;
  225.     BSP_MovieMode=44;
  226.     BSP_VInf=45;
  227.     BSP_PanIn=46;
  228.     BSP_PanOut=47;
  229.     BSP_ZoomIn=48;
  230.     BSP_ZoomOut=49;
  231.     BSP_MoveLeft=50;
  232.     BSP_MoveRight=51;
  233.     BSP_MoveUp=52;
  234.     BSP_MoveDown=53;
  235.     BSP_FRSizeLeft=54;
  236.     BSP_FRSizeRight=55;
  237.     BSP_FRSizeUp=56;
  238.     BSP_FRSizeDown=57;
  239.     BSP_ResetMov=58;
  240.     BSP_HideCtrl=59;
  241.     BSP_EQ=60;
  242.     BSP_OpenAud=61;
  243.     BSP_OpenSub=62;
  244.     BSP_OpenMov=63;
  245.     BSP_PanScan=64;
  246.     BSP_CusPanScan=65;
  247.     BSP_DeskMode=66;
  248.     BSP_AddBk=67;
  249.     BSP_EditBK=68;
  250.     BSP_SkinRefr=69;
  251.     BSP_About=70;
  252.     BSP_CycleAS=71;
  253.     BSP_CycleSub=72;
  254.     BSP_IncPBRate=73;
  255.     BSP_DecPBRate=74;
  256.     BSP_IncPP=75;
  257.     BSP_DecPP=76;
  258.     BSP_Exit=77;
  259.     BSP_CloseM=78;
  260.     BSP_JumpF=79;
  261.     BSP_JumpB=80;
  262.     BSP_ChBordEx=81;
  263.     BSP_CycleVid=82;
  264.     BSP_IncFnt=83;
  265.     BSP_DecFnt=84;
  266.     BSP_IncBri=85;
  267.     BSP_DecBri=86;
  268.     BSP_MovSubUp=87;
  269.     BSP_MovSubDown=88;
  270.     BSP_SHTime=89;
  271.  
  272.     BSP_IncBriHW=90;
  273.     BSP_DecBriHW=91;
  274.     BSP_IncConHW=92;
  275.     BSP_DecConHW=93;
  276.     BSP_IncHueHW=94;
  277.     BSP_DecHueHW=95;
  278.     BSP_IncSatHW=96;
  279.     BSP_DecSatHW=97;
  280.     BSP_ShowHWClr=98;
  281.     BSP_IncMovWin=99;
  282.     BSP_DecMovWin=100;
  283.     BSP_IncPBRate1=101;
  284.     BSP_DecPBRate1=102;
  285.     BSP_SWRepeat=103;
  286.     BSP_SWDispFmt=104;
  287.     BSP_FastForw=105;
  288.     BSP_FastRew=106;
  289.     BSP_OpenURL=107;
  290.  
  291.  
  292. implementation
  293.  
  294. end.
  295.