From: Olivier Teulière Date: Mon, 25 Mar 2002 23:36:57 +0000 (+0000) Subject: * Added a win32 interface plugin, developed with Borland C++ Builder. X-Git-Tag: 0.3.0~66 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=8092e418ac7e8b587bee9cf26cd1b5a837d2ae94;p=vlc * Added a win32 interface plugin, developed with Borland C++ Builder. To build the plugin, follow the instructions in INSTALL-win32.txt * Known bugs: - subtitles don't work - a crash occurs when the user exits by pressing 'q' in the vout - when moving the slider, position in the stream updates even if the slider isn't released yet * TODO list: - clean code in menu.cpp - adapt lool's enhancements of the Gtk+ preferences box - write drag-and-drop stuff - and of course, fix known bugs :) * For those of you who can't wait till the next release to test the win32 interface, binary files are available here: http://www.via.ecp.fr/~ipkiss/intfwin/vlc.zip Enjoy! --- diff --git a/INSTALL-win32.txt b/INSTALL-win32.txt index 9865f79d83..3e2183ca40 100644 --- a/INSTALL-win32.txt +++ b/INSTALL-win32.txt @@ -11,14 +11,12 @@ to use the command line arguments. You can obtain a list of these command line arguments by typing 'vlc --help'. It is also sometimes useful to display vlc's debug console. You can do so by running 'vlc -v'. -This feature is at the moment broken. To display vlc's debug messages, -open the menu 'view', select 'messages'. To store a debug log of the current vlc session, you can use 'vlc -vvv --stdout=debug.txt'. If you want to play a DVD, run vlc and click on the Disc option in the interface. You then have to type your drive letter in the 'Device name' -box including the final '\' (eg. 'D:\' if your dvdrom drive is assigned the letter 'D'). +box (eg. 'D:' if your dvdrom drive is assigned the letter 'D'). ( !Warning: you have to be in administrator mode (for now) on Win2k ) @@ -60,8 +58,7 @@ See `./configure --help' for more information. For example if you are cross-compiling from Debian, you can use something along those lines: - make distclean ; CC=i586-mingw32msvc-gcc CFLAGS=-I/usr/i586-mingw32msvc \ - RANLIB=i586-mingw32msvc-ranlib WINDRES=i586-mingw32msvc-windres \ + make distclean ; CC=i586-mingw32msvc-gcc \ ./configure --host=i586-mingw32msvc --target=i586-mingw32msvc \ --build=i386-linux --with-gtk-config-path=/usr/i586-mingw32msvc/bin \ --with-sdl-config-path=/usr/i586-mingw32msvc/bin @@ -95,5 +92,31 @@ If you are using the tools from http://www.libsdl.org/Xmingw32/ you can type som PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH \ make +Building Win32 interface with bcc32 (Borland's compiler) +======================================================== + +[Steps 2 and 3 are temporary] + +1) Compile vlc as usual. +include\defs.h should be generated. + +2) Edit include\defs.h, and add the following lines if necessary: +#define WIN32 +#define MODULE_NAME win32 +#define MODULE_NAME_IS win32 +#define PLUGIN +#define HAVE_DYNAMIC_PLUGINS + +3) Still in defs.h, comment the following line to avoid compilation warnings: +#define PACKAGE "vlc" + +4) From the plugin\win32 directory, use Borland C++ command-line tools +as follows: +bpr2mak intfwin.bpr // Create a makefile from intfwin.bpr +make -fintfwin // It's Borland's make utility ! + +5) This should create a intfwin.so +You can remove any other generated file. + Well done, now you're ready to use vlc! diff --git a/include/common.h b/include/common.h index c9b07cfd36..2b53a94d1c 100644 --- a/include/common.h +++ b/include/common.h @@ -3,7 +3,7 @@ * Collection of useful common types and macros definitions ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: common.h,v 1.88 2002/03/19 04:22:02 ipkiss Exp $ + * $Id: common.h,v 1.89 2002/03/25 23:36:57 ipkiss Exp $ * * Authors: Samuel Hocevar * Vincent Seguin @@ -425,7 +425,7 @@ typedef __int64 off_t; # if defined( __BORLANDC__ ) # undef off_t -# define off_t __int64 +# define off_t unsigned __int64 # endif # ifndef O_NONBLOCK diff --git a/plugins/win32/about.cpp b/plugins/win32/about.cpp new file mode 100644 index 0000000000..d815adf2e1 --- /dev/null +++ b/plugins/win32/about.cpp @@ -0,0 +1,44 @@ +/***************************************************************************** + * about.cpp: The "About" dialog box + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#include +#pragma hdrstop + +#include + +#include "interface.h" + +#include "about.h" +#include "win32_common.h" + +//--------------------------------------------------------------------------- +//#pragma package(smart_init) +#pragma resource "*.dfm" + +//--------------------------------------------------------------------------- +__fastcall TAboutDlg::TAboutDlg( TComponent* Owner ) + : TForm( Owner ) +{ +} +//--------------------------------------------------------------------------- + + diff --git a/plugins/win32/about.dfm b/plugins/win32/about.dfm new file mode 100644 index 0000000000..b76ed6e811 --- /dev/null +++ b/plugins/win32/about.dfm @@ -0,0 +1,418 @@ +object AboutDlg: TAboutDlg + Left = 422 + Top = 159 + BorderStyle = bsDialog + Caption = 'About' + ClientHeight = 509 + ClientWidth = 360 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Icon.Data = { + 0000010001003030000001001800A81C00001600000028000000300000006000 + 00000100180000000000001B0000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000069375900000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000120E0A4011253E0F18000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000F0B + 084143CA08070016430F08040800000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000003127291203174647E8464AE808010840E54039E6390B0C06 + 0E0A1C0000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0070CD0079DD0079DD0070CD0000000000000000000C1008261D6E4647E54547 + E64748E105040039E6393AE53939E63936D33308030100000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000070CD0079DD0079DE007DE40088F9008CFF008CFF0088F9007CE302 + 6EC70B09124641DC4444DF4546E34446E54847E003040040E6403AEA3A3EE33E + 3CE33C39E639080F010801050000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000070CD0079DD0077D90070CB0078D8007BDC007BDC007BDC + 007BDC007BDC007BDD007EE32E232D0804084553F14250F34252ED4449DB4844 + DC4645E208010540E5401C78150D18053CE63C3AE63A39EA393CD83C241A2006 + 0402000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000070CD0079DD007ADF007BDE007BDC0072 + CC005188004877004876004876004876034976054A760B4D7731434221175B42 + 54EC4253EE4252F60B05104250F44252EB4546DA08010539E6392BAA2B080105 + 3CE63C39E7393AE63A39E93939E839081208181C080000000000000000000000 + 000000000000000000000000000000000000000070CD0079DD0079DD007CE300 + 88F90089F90075D2005188004877005188008CFF008CFF008CFF008CFF008CFF + 1092FF2099FF31A0FF1408294840DB4550E1464EEA0C060B0B05084654F64653 + F64453EF080E033AE63A2BAA2B03030339E33939DF3939E639080F083DDB3D24 + 9C24434B3B000000000000000000000000000000000000000000000000000000 + 0063B60085F3008BFE0088F9007FE90088F90080E8005CA0008CFF008CFF008C + FF008CFF008CFF008CFF008CFF048DFF1594FF259BFF35A2FF0C04103F38C754 + 5AF7505BF10C08100801084352F64652F44253F30813053AE63A39E639030403 + 1C521826A1250812010807032454131558150000000000000000000000000000 + 000000000000000000000000000000000000000070CD007CE30079DD00000000 + 7CE30089FA008CFF0089FA008CFF008CFF008CFF008CFF008CFF008CFF098FFF + 1996FF2A9DFF3AA4FF0804103A2AA34E58F74E58F40B0B120803054652F34548 + E64451F305130532CA323AE23A03070308070307040008040139E63939E43931 + B42F5E1347000000000000000000000000000000000000000000000000000000 + 0000000000000000000061B10000000079DD008CFF008CFF008CFF008CFF008C + FF008CFF008CFF008CFF008CFF0E91FF1E98FF2E9FFF3FA6FF040408382BAF4D + 5AEF555AF70F12250501050F04160804074250F3121A123AE93A39E239080803 + 0D2F08010401268C2539E7393DE63D3FE23E0804100000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 79DD008CFF008CFF008CFF008CFF008CFF008CFF008CFF008CFF028CFF1293FF + 239AFF33A1FF43A8FF0802083A2AA3565BF7555AF71714330501050104000801 + 07424FF12828203AEA3A39E639030703182F1008340801040139E7393DE83D39 + E939080400000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000070CD0088F9008CFF008CFF008CFF008C + FF008CFF008CFF008CFF078EFF1795FF279CFF38A3FF48AAFF0808005151F155 + 5AF30804030804000504050800082E358E0E0C1F1D192439E53940E640080400 + 2AA12739E63908020708010539E8393BE93B0804080000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000007CE3008CFF008CFF008CFF058EFD1D96F92398F8269AFA31A0FC42A8FF + 4FAEFF5CB3FF65B7FF0C08084F5AF14E57F50B04080804043639A54647E81C13 + 49363AA70804080F120835953439E7393EE63E39DF3939EA39081105308A2B3F + E73F080601000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000047BDB1D96F92398F82498F83BA0 + F399C1E1B1C9DDBCD4E7CBE0F3D9EDFFDCEEFFDEEFFFCDE8FF080808575BF750 + 58F624125A5057F34845DF4A41E0150E30C55734E3723EC56E33A23D27050105 + 39E43939E63939E6393CE63C14420C3BE03B192A090000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000004 + 04042D88D399C1E1B1C9DDB1C9DCB7CBDBCFD3D7D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFF9FCFF0C08085D61F15B61EF555AF64A4FE13937BB0E0A12DE74 + 39E1733CDE713CDF753AE67541C36B342C231F17141B3AE63A39E7393DE83D39 + E93939DE39000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000001818186893B8C3CCD2D5D5D6D5D5D6D5D5 + D6D6D6D6D6D6D6E3E3E3F1F1F1FFFFFFFFFFFFFFFFFFFFFFFF140C145C5EF668 + 63F75555EA10061CC3673FDF713A0C1104080403080105080007070407D56F36 + DE743EDE72401C200C29452939E63939E73939EA390000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000343434A2B4C2D5D5D6D6D6D6D6D6D6D6D6D6D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFFEFEFF20161C5C5EF6373EAE0E0413E2713DE1763CCD6A3C2A0D + 08A44B2CDE743EBD612F080401030403E1713CDE7239DE713AE1723C22201139 + C13341E641000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000001B1B1B99AEBED5D5D6D5D5D6D5D5 + D6CFD3D7B8CBDBBFD5E7CEE2F3DCEFFFDFF0FFE2F1FFE9F4FF10100C3639A46E + 4540DE7239DE713DE1713C07000784261CDE7639E3743E0812001F0407D86E36 + E3753EE57540E57541DE763CDE733DD26637493C387E2F7B0000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00001B1B1B99AEBFCED3D7B7CBDBB1C9DD99C1E140A2F339A2FA49AAFC59B2FF + 66B8FF74BEFF92CBFFD9ECFF0F0402C66531DE7139E2733D854B1E0A01084D11 + 0DE3733EE1723CDF713ADF753AE1763C1D0A08290708E57140E1763CDE733DC7 + 6B34080408000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000001818187FA5C399C1E13BA0F32498 + F81D96F91091FD1C97FF2C9EFF3CA5FF4DACFF5DB3FF71BBFF8DC8FF9FD0FF08 + 0400080406B95C2EDE7239070B070803014D1615DE723CDE7540E5714030090D + 0504003A120FE67541DE75390808044A0C290000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000707071778C81C92F3058EFD008CFF008CFF1092FF2099FF31A0FF41A7FF + 51AEFF62B5FF72BCFF7BBFFF7BBBF96E9FCD0808080806041D0508E571403E22 + 0C200708080405070407070007080303B05F31DE723967301908010500000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000007CE3008CFF008C + FF048DFF1594FF259BFF35A2FF46A9FF56B0FF66B7FF77BEFF7BBFFF6DAAE300 + 0000000000000000000000080401200C088D4024E17141E57140DF713ADE713E + DE76390801070000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000079DD008CFF008CFF098FFF1996FF2A9DFF3AA4FF4AABFF + 5BB2FF6BB9FF7BBFFF7BBFFF6AA5DD0000000000000000000000000000001D1A + 0C1A0F08110903441912E57140623B1E08020300000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000079DD008CFF008C + FF0E91FF1E98FF2E9FFF3FA6FF4FADFF5FB4FF70BBFF7BBFFF78BAF96299CD00 + 00000000000000000000000000000000000000003914100000005A2411000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000070CD0088F9078EFD2C9CF940A3F850ACFA60B4FC70BCFF + 7DC2FF87C6FF7EC0FF6DAAE30000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000707071A85DD40A2 + F3A0C3E1B7CBDDC6D8E7D4E5F3E2F1FFE5F2FFD9ECFF9FD0FF7AACDD05050500 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000001818187FA5C3B8CBDBD0D4D7D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFAFCFFE2EDF99FB7CD1C1C1C0000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000001B1B1B99AEBFD4D5 + D6D6D6D6D6D6D6E3E3E3F1F1F1FFFFFFFFFFFFFEFEFFD1DAE33E3E3E00000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000001D1D1D7B9BB4CACED1D6D6D6D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFC9D2DD2121210000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000343434A5B5 + C2CFD3D7BFCEDBC9D9E7D7E6F3E6F3FFECF5FFF0F4F9AEBDCD23232300000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000018181887A8C3A6C6E169B3F367B6FA77BEFC88C6FF + 9FD0FFB4CBE33939390000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000040404338C + D749A8F947A9FD54AFFF64B6FF74BDFF7EC0FF76ABDD05050500000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000001F7DCD369FF948AAFF58B1FF69B8FF79BFFF + 78BAF96299CD0000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 003592E34DACFF5DB3FF6DBAFF7BBFFF6DAAE300000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000003890DD51AEFF62B5FF72BCFF7BBFFF + 6AA5DD0000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 003B8FD84C9CE3589FDE69A9E375B6F46299CD00000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000003376B00000000000000000005788B6 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000006CC61A83DD247FCC00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DC71A83DD2686D71F6EB1 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FFFFFFFF0000FFFFFFFFFFFF0000FFFFFE1FDFFF0000FFFFE0078FFF0000FFFE + 000007FF0000FFF0000001FF0000FF80000000FF0000FF000000003F0000FF00 + 0000000F0000FE00000000070000F800000000070000F8000000000F0000FC00 + 000000070000FE00000000070000FF80000000070000FFC0000000070000FFE0 + 000000070000FFE0000000070000FFE0000000070000FFE0000000070000FFF0 + 000000070000FFF0000000030000FFF0000000070000FFF00000000F0000FFF0 + 0000003F0000FFF8000E00FF0000FFF8000F01FF0000FFF8000FD7FF0000FFF8 + 001FFFFF0000FFFC001FFFFF0000FFFC001FFFFF0000FFFC003FFFFF0000FFFC + 003FFFFF0000FFFE003FFFFF0000FFFE007FFFFF0000FFFE007FFFFF0000FFFE + 007FFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF + 01FFFFFF0000FFFF01FFFFFF0000FFFF81FFFFFF0000FFFFC3FFFFFF0000FFFF + FFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000} + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 13 + object Label1: TLabel + Left = 141 + Top = 8 + Width = 77 + Height = 13 + Caption = 'VideoLAN Client' + end + object Label2: TLabel + Left = 5 + Top = 40 + Width = 346 + Height = 13 + Caption = + '(C) Copyright 1996, 1997, 1998, 1999, 2000, 2001 - The VideoLAN ' + + 'Team' + end + object Label21: TLabel + Left = 52 + Top = 424 + Width = 255 + Height = 39 + Caption = + 'This is the VideoLAN Client, a DVD and MPEG player. It can play ' + + 'MPEG and MPEG 2 files from a file or from a network source.' + WordWrap = True + end + object GroupBoxAuthors: TGroupBox + Left = 6 + Top = 64 + Width = 345 + Height = 353 + Caption = 'Authors' + TabOrder = 0 + object Label3: TLabel + Left = 24 + Top = 14 + Width = 171 + Height = 13 + Caption = 'Régis Duchesne ' + end + object Label4: TLabel + Left = 24 + Top = 32 + Width = 181 + Height = 13 + Caption = 'Michel Lespinasse ' + end + object Label5: TLabel + Left = 24 + Top = 51 + Width = 159 + Height = 13 + Caption = 'Olivier Pomel ' + end + object Label6: TLabel + Left = 24 + Top = 69 + Width = 133 + Height = 13 + Caption = 'Pierre Baillet ' + end + object Label7: TLabel + Left = 24 + Top = 87 + Width = 207 + Height = 13 + Caption = 'Jean-Philippe Grimaldi ' + end + object Label8: TLabel + Left = 24 + Top = 106 + Width = 149 + Height = 13 + Caption = 'Andres Krapf ' + end + object Label9: TLabel + Left = 24 + Top = 124 + Width = 194 + Height = 13 + Caption = 'Christophe Massiot ' + end + object Label10: TLabel + Left = 24 + Top = 142 + Width = 173 + Height = 13 + Caption = 'Vincent Seguin ' + end + object Label11: TLabel + Left = 24 + Top = 161 + Width = 165 + Height = 13 + Caption = 'Benoit Steiner ' + end + object Label12: TLabel + Left = 24 + Top = 179 + Width = 241 + Height = 13 + Caption = 'Arnaud de Bossoreille de Ribou ' + end + object Label13: TLabel + Left = 24 + Top = 198 + Width = 186 + Height = 13 + Caption = 'Jean-Marc Dressler ' + end + object Label14: TLabel + Left = 24 + Top = 216 + Width = 171 + Height = 13 + Caption = 'Gaël Hendryckx ' + end + object Label15: TLabel + Left = 24 + Top = 234 + Width = 158 + Height = 13 + Caption = 'Samuel Hocevar ' + end + object Label16: TLabel + Left = 24 + Top = 253 + Width = 178 + Height = 13 + Caption = 'Brieuc Jeunhomme ' + end + object Label17: TLabel + Left = 24 + Top = 271 + Width = 164 + Height = 13 + Caption = 'Michel Kaempf ' + end + object Label18: TLabel + Left = 24 + Top = 289 + Width = 160 + Height = 13 + Caption = 'Stéphane Borel ' + end + object Label19: TLabel + Left = 24 + Top = 308 + Width = 163 + Height = 13 + Caption = 'Renaud Dartus ' + end + object Label20: TLabel + Left = 24 + Top = 326 + Width = 149 + Height = 13 + Caption = 'Henri Fallon ' + end + end + object BitBtnOk: TBitBtn + Left = 7 + Top = 471 + Width = 345 + Height = 25 + Caption = 'OK' + Default = True + ModalResult = 1 + TabOrder = 1 + end +end diff --git a/plugins/win32/about.h b/plugins/win32/about.h new file mode 100644 index 0000000000..f4141c5e3b --- /dev/null +++ b/plugins/win32/about.h @@ -0,0 +1,63 @@ +/***************************************************************************** + * about.h: The "About" dialog box + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#ifndef aboutH +#define aboutH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TAboutDlg : public TForm +{ +__published: // IDE-managed Components + TLabel *Label1; + TLabel *Label2; + TLabel *Label21; + TGroupBox *GroupBoxAuthors; + TLabel *Label3; + TLabel *Label4; + TLabel *Label5; + TLabel *Label6; + TLabel *Label7; + TLabel *Label8; + TLabel *Label9; + TLabel *Label10; + TLabel *Label11; + TLabel *Label12; + TLabel *Label13; + TLabel *Label14; + TLabel *Label15; + TLabel *Label16; + TLabel *Label17; + TLabel *Label18; + TLabel *Label19; + TLabel *Label20; + TBitBtn *BitBtnOk; +private: // User declarations +public: // User declarations + __fastcall TAboutDlg( TComponent* Owner ); +}; +//--------------------------------------------------------------------------- +#endif diff --git a/plugins/win32/control.cpp b/plugins/win32/control.cpp new file mode 100644 index 0000000000..1a0ff337f3 --- /dev/null +++ b/plugins/win32/control.cpp @@ -0,0 +1,150 @@ +/***************************************************************************** + * control.cpp: functions to handle stream control buttons. + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#include + +#include + +#include "stream_control.h" +#include "input_ext-intf.h" + +#include "interface.h" +#include "intf_playlist.h" + +#include "win32_common.h" + +extern struct intf_thread_s *p_intfGlobal; + +/**************************************************************************** + * Control functions: this is where the functions are defined + **************************************************************************** + * These functions are used by toolbuttons callbacks + ****************************************************************************/ +bool ControlBack( TObject *Sender ) +{ + /* FIXME: TODO */ + + return false; +} + + +bool ControlStop( TObject *Sender ) +{ + if( p_input_bank->pp_input[0] != NULL ) + { + /* end playing item */ + p_input_bank->pp_input[0]->b_eof = 1; + + /* update playlist */ + vlc_mutex_lock( &p_main->p_playlist->change_lock ); + + p_main->p_playlist->i_index--; + p_main->p_playlist->b_stopped = 1; + + vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + + } + + return true; +} + + +bool ControlPlay( TObject *Sender ) +{ + if( p_input_bank->pp_input[0] != NULL ) + { + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + p_main->p_playlist->b_stopped = 0; + } + else + { + vlc_mutex_lock( &p_main->p_playlist->change_lock ); + + if( p_main->p_playlist->b_stopped ) + { + if( p_main->p_playlist->i_size ) + { + vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + intf_PlaylistJumpto( p_main->p_playlist, + p_main->p_playlist->i_index ); + } + else + { + vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + p_intfGlobal->p_sys->p_window->MenuOpenFileClick( Sender ); + } + } + else + { + vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + } + + } + + return true; +} + + +bool ControlPause( TObject *Sender ) +{ + if( p_input_bank->pp_input[0] != NULL ) + { + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PAUSE ); + + vlc_mutex_lock( &p_main->p_playlist->change_lock ); + p_main->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + } + + return true; +} + + +bool ControlSlow( TObject *Sender ) +{ + if( p_input_bank->pp_input[0] != NULL ) + { + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_SLOWER ); + + vlc_mutex_lock( &p_main->p_playlist->change_lock ); + p_main->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + } + + return true; +} + + +bool ControlFast( TObject *Sender ) +{ + if( p_input_bank->pp_input[0] != NULL ) + { + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_FASTER ); + + vlc_mutex_lock( &p_main->p_playlist->change_lock ); + p_main->p_playlist->b_stopped = 0; + vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + } + + return true; +} + diff --git a/plugins/win32/control.h b/plugins/win32/control.h new file mode 100644 index 0000000000..0ee1ebd07a --- /dev/null +++ b/plugins/win32/control.h @@ -0,0 +1,29 @@ +/***************************************************************************** + * control.h: prototypes for control functions. + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +bool ControlBack ( TObject *Sender ); +bool ControlStop ( TObject *Sender ); +bool ControlPlay ( TObject *Sender ); +bool ControlPause( TObject *Sender ); +bool ControlSlow ( TObject *Sender ); +bool ControlFast ( TObject *Sender ); + diff --git a/plugins/win32/disc.cpp b/plugins/win32/disc.cpp new file mode 100644 index 0000000000..642372b6df --- /dev/null +++ b/plugins/win32/disc.cpp @@ -0,0 +1,119 @@ +/***************************************************************************** + * disc.cpp: "Open disc" dialog box. + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#include +#pragma hdrstop + +#include + +#include "stream_control.h" +#include "input_ext-intf.h" + +#include "interface.h" +#include "intf_playlist.h" + +#include "win32_common.h" + +#include "disc.h" +//--------------------------------------------------------------------------- +//#pragma package(smart_init) +#pragma resource "*.dfm" + +extern struct intf_thread_s *p_intfGlobal; + +//--------------------------------------------------------------------------- +__fastcall TDiscDlg::TDiscDlg( TComponent* Owner ) + : TForm( Owner ) +{ + char *psz_dvd_device = config_GetPszVariable( "dvd_device" ); + char *psz_vcd_device = config_GetPszVariable( "vcd_device" ); + + if( psz_dvd_device ) + { + EditDevice->Text.sprintf( "%s", psz_dvd_device ); + free( psz_dvd_device ); + } + + if( psz_vcd_device ) + { + EditDevice->Text.sprintf( "%s", psz_vcd_device ); + free( psz_vcd_device ); + } +} +//--------------------------------------------------------------------------- +void __fastcall TDiscDlg::FormShow( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuOpenDisc->Checked = true; + p_intfGlobal->p_sys->p_window->PopupOpenDisc->Checked = true; +} +//--------------------------------------------------------------------------- +void __fastcall TDiscDlg::FormHide( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuOpenDisc->Checked = false; + p_intfGlobal->p_sys->p_window->PopupOpenDisc->Checked = false; +} +//--------------------------------------------------------------------------- +void __fastcall TDiscDlg::BitBtnCancelClick( TObject *Sender ) +{ + Hide(); +} +//--------------------------------------------------------------------------- +void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender ) +{ + AnsiString Device, Source, Method, Title, Chapter; + int i_end = p_main->p_playlist->i_size; + + Hide(); + + Device = EditDevice->Text; + + /* Check which method was activated */ + if( RadioGroupType->ItemIndex == 0 ) + { + Method = "dvd"; + } + else + { + Method = "vcd"; + } + + /* Select title and chapter */ + Title.sprintf( "%d", UpDownTitle->Position ); + Chapter.sprintf( "%d", UpDownChapter->Position ); + + /* Build source name and add it to playlist */ + Source = Method + ":" + Device + "@" + Title + "," + Chapter; + intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, Source.c_str() ); + + /* update the display */ + p_intfGlobal->p_sys->p_playlist->UpdateGrid( p_main->p_playlist ); + + /* stop current item, select added item */ + if( p_input_bank->pp_input[0] != NULL ) + { + p_input_bank->pp_input[0]->b_eof = 1; + } + + intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); +} +//--------------------------------------------------------------------------- + diff --git a/plugins/win32/disc.dfm b/plugins/win32/disc.dfm new file mode 100644 index 0000000000..e579aa11d1 --- /dev/null +++ b/plugins/win32/disc.dfm @@ -0,0 +1,362 @@ +object DiscDlg: TDiscDlg + Left = 503 + Top = 366 + BorderStyle = bsDialog + Caption = 'Open disc' + ClientHeight = 170 + ClientWidth = 258 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Icon.Data = { + 0000010001003030000001001800A81C00001600000028000000300000006000 + 00000100180000000000001B0000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000069375900000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000120E0A4011253E0F18000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000F0B + 084143CA08070016430F08040800000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000003127291203174647E8464AE808010840E54039E6390B0C06 + 0E0A1C0000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0070CD0079DD0079DD0070CD0000000000000000000C1008261D6E4647E54547 + E64748E105040039E6393AE53939E63936D33308030100000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000070CD0079DD0079DE007DE40088F9008CFF008CFF0088F9007CE302 + 6EC70B09124641DC4444DF4546E34446E54847E003040040E6403AEA3A3EE33E + 3CE33C39E639080F010801050000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000070CD0079DD0077D90070CB0078D8007BDC007BDC007BDC + 007BDC007BDC007BDD007EE32E232D0804084553F14250F34252ED4449DB4844 + DC4645E208010540E5401C78150D18053CE63C3AE63A39EA393CD83C241A2006 + 0402000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000070CD0079DD007ADF007BDE007BDC0072 + CC005188004877004876004876004876034976054A760B4D7731434221175B42 + 54EC4253EE4252F60B05104250F44252EB4546DA08010539E6392BAA2B080105 + 3CE63C39E7393AE63A39E93939E839081208181C080000000000000000000000 + 000000000000000000000000000000000000000070CD0079DD0079DD007CE300 + 88F90089F90075D2005188004877005188008CFF008CFF008CFF008CFF008CFF + 1092FF2099FF31A0FF1408294840DB4550E1464EEA0C060B0B05084654F64653 + F64453EF080E033AE63A2BAA2B03030339E33939DF3939E639080F083DDB3D24 + 9C24434B3B000000000000000000000000000000000000000000000000000000 + 0063B60085F3008BFE0088F9007FE90088F90080E8005CA0008CFF008CFF008C + FF008CFF008CFF008CFF008CFF048DFF1594FF259BFF35A2FF0C04103F38C754 + 5AF7505BF10C08100801084352F64652F44253F30813053AE63A39E639030403 + 1C521826A1250812010807032454131558150000000000000000000000000000 + 000000000000000000000000000000000000000070CD007CE30079DD00000000 + 7CE30089FA008CFF0089FA008CFF008CFF008CFF008CFF008CFF008CFF098FFF + 1996FF2A9DFF3AA4FF0804103A2AA34E58F74E58F40B0B120803054652F34548 + E64451F305130532CA323AE23A03070308070307040008040139E63939E43931 + B42F5E1347000000000000000000000000000000000000000000000000000000 + 0000000000000000000061B10000000079DD008CFF008CFF008CFF008CFF008C + FF008CFF008CFF008CFF008CFF0E91FF1E98FF2E9FFF3FA6FF040408382BAF4D + 5AEF555AF70F12250501050F04160804074250F3121A123AE93A39E239080803 + 0D2F08010401268C2539E7393DE63D3FE23E0804100000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 79DD008CFF008CFF008CFF008CFF008CFF008CFF008CFF008CFF028CFF1293FF + 239AFF33A1FF43A8FF0802083A2AA3565BF7555AF71714330501050104000801 + 07424FF12828203AEA3A39E639030703182F1008340801040139E7393DE83D39 + E939080400000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000070CD0088F9008CFF008CFF008CFF008C + FF008CFF008CFF008CFF078EFF1795FF279CFF38A3FF48AAFF0808005151F155 + 5AF30804030804000504050800082E358E0E0C1F1D192439E53940E640080400 + 2AA12739E63908020708010539E8393BE93B0804080000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000007CE3008CFF008CFF008CFF058EFD1D96F92398F8269AFA31A0FC42A8FF + 4FAEFF5CB3FF65B7FF0C08084F5AF14E57F50B04080804043639A54647E81C13 + 49363AA70804080F120835953439E7393EE63E39DF3939EA39081105308A2B3F + E73F080601000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000047BDB1D96F92398F82498F83BA0 + F399C1E1B1C9DDBCD4E7CBE0F3D9EDFFDCEEFFDEEFFFCDE8FF080808575BF750 + 58F624125A5057F34845DF4A41E0150E30C55734E3723EC56E33A23D27050105 + 39E43939E63939E6393CE63C14420C3BE03B192A090000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000004 + 04042D88D399C1E1B1C9DDB1C9DCB7CBDBCFD3D7D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFF9FCFF0C08085D61F15B61EF555AF64A4FE13937BB0E0A12DE74 + 39E1733CDE713CDF753AE67541C36B342C231F17141B3AE63A39E7393DE83D39 + E93939DE39000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000001818186893B8C3CCD2D5D5D6D5D5D6D5D5 + D6D6D6D6D6D6D6E3E3E3F1F1F1FFFFFFFFFFFFFFFFFFFFFFFF140C145C5EF668 + 63F75555EA10061CC3673FDF713A0C1104080403080105080007070407D56F36 + DE743EDE72401C200C29452939E63939E73939EA390000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000343434A2B4C2D5D5D6D6D6D6D6D6D6D6D6D6D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFFEFEFF20161C5C5EF6373EAE0E0413E2713DE1763CCD6A3C2A0D + 08A44B2CDE743EBD612F080401030403E1713CDE7239DE713AE1723C22201139 + C13341E641000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000001B1B1B99AEBED5D5D6D5D5D6D5D5 + D6CFD3D7B8CBDBBFD5E7CEE2F3DCEFFFDFF0FFE2F1FFE9F4FF10100C3639A46E + 4540DE7239DE713DE1713C07000784261CDE7639E3743E0812001F0407D86E36 + E3753EE57540E57541DE763CDE733DD26637493C387E2F7B0000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00001B1B1B99AEBFCED3D7B7CBDBB1C9DD99C1E140A2F339A2FA49AAFC59B2FF + 66B8FF74BEFF92CBFFD9ECFF0F0402C66531DE7139E2733D854B1E0A01084D11 + 0DE3733EE1723CDF713ADF753AE1763C1D0A08290708E57140E1763CDE733DC7 + 6B34080408000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000001818187FA5C399C1E13BA0F32498 + F81D96F91091FD1C97FF2C9EFF3CA5FF4DACFF5DB3FF71BBFF8DC8FF9FD0FF08 + 0400080406B95C2EDE7239070B070803014D1615DE723CDE7540E5714030090D + 0504003A120FE67541DE75390808044A0C290000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000707071778C81C92F3058EFD008CFF008CFF1092FF2099FF31A0FF41A7FF + 51AEFF62B5FF72BCFF7BBFFF7BBBF96E9FCD0808080806041D0508E571403E22 + 0C200708080405070407070007080303B05F31DE723967301908010500000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000007CE3008CFF008C + FF048DFF1594FF259BFF35A2FF46A9FF56B0FF66B7FF77BEFF7BBFFF6DAAE300 + 0000000000000000000000080401200C088D4024E17141E57140DF713ADE713E + DE76390801070000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000079DD008CFF008CFF098FFF1996FF2A9DFF3AA4FF4AABFF + 5BB2FF6BB9FF7BBFFF7BBFFF6AA5DD0000000000000000000000000000001D1A + 0C1A0F08110903441912E57140623B1E08020300000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000079DD008CFF008C + FF0E91FF1E98FF2E9FFF3FA6FF4FADFF5FB4FF70BBFF7BBFFF78BAF96299CD00 + 00000000000000000000000000000000000000003914100000005A2411000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000070CD0088F9078EFD2C9CF940A3F850ACFA60B4FC70BCFF + 7DC2FF87C6FF7EC0FF6DAAE30000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000707071A85DD40A2 + F3A0C3E1B7CBDDC6D8E7D4E5F3E2F1FFE5F2FFD9ECFF9FD0FF7AACDD05050500 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000001818187FA5C3B8CBDBD0D4D7D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFAFCFFE2EDF99FB7CD1C1C1C0000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000001B1B1B99AEBFD4D5 + D6D6D6D6D6D6D6E3E3E3F1F1F1FFFFFFFFFFFFFEFEFFD1DAE33E3E3E00000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000001D1D1D7B9BB4CACED1D6D6D6D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFC9D2DD2121210000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000343434A5B5 + C2CFD3D7BFCEDBC9D9E7D7E6F3E6F3FFECF5FFF0F4F9AEBDCD23232300000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000018181887A8C3A6C6E169B3F367B6FA77BEFC88C6FF + 9FD0FFB4CBE33939390000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000040404338C + D749A8F947A9FD54AFFF64B6FF74BDFF7EC0FF76ABDD05050500000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000001F7DCD369FF948AAFF58B1FF69B8FF79BFFF + 78BAF96299CD0000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 003592E34DACFF5DB3FF6DBAFF7BBFFF6DAAE300000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000003890DD51AEFF62B5FF72BCFF7BBFFF + 6AA5DD0000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 003B8FD84C9CE3589FDE69A9E375B6F46299CD00000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000003376B00000000000000000005788B6 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000006CC61A83DD247FCC00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DC71A83DD2686D71F6EB1 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FFFFFFFF0000FFFFFFFFFFFF0000FFFFFE1FDFFF0000FFFFE0078FFF0000FFFE + 000007FF0000FFF0000001FF0000FF80000000FF0000FF000000003F0000FF00 + 0000000F0000FE00000000070000F800000000070000F8000000000F0000FC00 + 000000070000FE00000000070000FF80000000070000FFC0000000070000FFE0 + 000000070000FFE0000000070000FFE0000000070000FFE0000000070000FFF0 + 000000070000FFF0000000030000FFF0000000070000FFF00000000F0000FFF0 + 0000003F0000FFF8000E00FF0000FFF8000F01FF0000FFF8000FD7FF0000FFF8 + 001FFFFF0000FFFC001FFFFF0000FFFC001FFFFF0000FFFC003FFFFF0000FFFC + 003FFFFF0000FFFE003FFFFF0000FFFE007FFFFF0000FFFE007FFFFF0000FFFE + 007FFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF + 01FFFFFF0000FFFF01FFFFFF0000FFFF81FFFFFF0000FFFFC3FFFFFF0000FFFF + FFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000} + OldCreateOrder = False + OnHide = FormHide + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object LabelDevice: TLabel + Left = 8 + Top = 105 + Width = 63 + Height = 13 + Caption = 'Device name' + end + object GroupBoxPosition: TGroupBox + Left = 96 + Top = 8 + Width = 153 + Height = 81 + Caption = 'Starting position' + TabOrder = 1 + object LabelTitle: TLabel + Left = 16 + Top = 24 + Width = 20 + Height = 13 + Caption = 'Title' + end + object LabelChapter: TLabel + Left = 16 + Top = 52 + Width = 37 + Height = 13 + Caption = 'Chapter' + end + object EditTitle: TEdit + Left = 64 + Top = 20 + Width = 57 + Height = 21 + TabOrder = 0 + Text = '1' + end + object EditChapter: TEdit + Left = 64 + Top = 48 + Width = 57 + Height = 21 + TabOrder = 1 + Text = '1' + end + object UpDownTitle: TUpDown + Left = 121 + Top = 20 + Width = 15 + Height = 21 + Associate = EditTitle + Min = 1 + Max = 32767 + Position = 1 + TabOrder = 2 + Thousands = False + Wrap = False + end + object UpDownChapter: TUpDown + Left = 121 + Top = 48 + Width = 15 + Height = 21 + Associate = EditChapter + Min = 1 + Max = 32767 + Position = 1 + TabOrder = 3 + Thousands = False + Wrap = False + end + end + object RadioGroupType: TRadioGroup + Left = 8 + Top = 8 + Width = 81 + Height = 81 + Caption = 'Disc type' + ItemIndex = 0 + Items.Strings = ( + 'DVD' + 'VCD') + TabOrder = 0 + end + object BitBtnOk: TBitBtn + Left = 8 + Top = 136 + Width = 113 + Height = 25 + Caption = 'OK' + Default = True + ModalResult = 1 + TabOrder = 3 + OnClick = BitBtnOkClick + end + object BitBtnCancel: TBitBtn + Left = 136 + Top = 136 + Width = 113 + Height = 25 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 4 + OnClick = BitBtnCancelClick + end + object EditDevice: TEdit + Left = 88 + Top = 101 + Width = 161 + Height = 21 + TabOrder = 2 + Text = 'F:\' + end +end diff --git a/plugins/win32/disc.h b/plugins/win32/disc.h new file mode 100644 index 0000000000..cc33ea8cd6 --- /dev/null +++ b/plugins/win32/disc.h @@ -0,0 +1,58 @@ +/***************************************************************************** + * disc.h: "Open disc" dialog box. + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#ifndef discH +#define discH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TDiscDlg : public TForm +{ +__published: // IDE-managed Components + TLabel *LabelDevice; + TGroupBox *GroupBoxPosition; + TLabel *LabelTitle; + TLabel *LabelChapter; + TEdit *EditTitle; + TEdit *EditChapter; + TUpDown *UpDownTitle; + TUpDown *UpDownChapter; + TRadioGroup *RadioGroupType; + TBitBtn *BitBtnOk; + TBitBtn *BitBtnCancel; + TEdit *EditDevice; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormHide(TObject *Sender); + void __fastcall BitBtnCancelClick(TObject *Sender); + void __fastcall BitBtnOkClick(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TDiscDlg( TComponent* Owner ); +}; +//--------------------------------------------------------------------------- +#endif diff --git a/plugins/win32/intf_win32.cpp b/plugins/win32/intf_win32.cpp new file mode 100644 index 0000000000..696c8c10c0 --- /dev/null +++ b/plugins/win32/intf_win32.cpp @@ -0,0 +1,232 @@ +/***************************************************************************** + * intf_win32.cpp: Win32 interface plugin for vlc + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teulière + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +/***************************************************************************** + * Preamble + *****************************************************************************/ +#include +#include /* malloc(), free() */ +#include /* ENOMEM */ +#include /* strerror() */ + +#include + +#include "stream_control.h" +#include "input_ext-intf.h" + +#include "interface.h" + +#include "mainframe.h" +#include "menu.h" +#include "win32_common.h" + +struct intf_thread_s *p_intfGlobal; + +/***************************************************************************** + * Local prototypes. + *****************************************************************************/ +static int intf_Open ( intf_thread_t *p_intf ); +static void intf_Close ( intf_thread_t *p_intf ); +static void intf_Run ( intf_thread_t *p_intf ); + +int Win32Manage( void *p_data ); + +/***************************************************************************** + * Functions exported as capabilities. They are declared as static so that + * we don't pollute the namespace too much. + *****************************************************************************/ +void _M( intf_getfunctions )( function_list_t * p_function_list ) +{ + p_function_list->functions.intf.pf_open = intf_Open; + p_function_list->functions.intf.pf_close = intf_Close; + p_function_list->functions.intf.pf_run = intf_Run; +} + +/***************************************************************************** + * intf_Open: initialize interface + *****************************************************************************/ +static int intf_Open( intf_thread_t *p_intf ) +{ + /* Allocate instance and initialize some members */ + p_intf->p_sys = (intf_sys_s *) malloc( sizeof( intf_sys_t ) ); + if( p_intf->p_sys == NULL ) + { + intf_ErrMsg( "intf error: %s", strerror(ENOMEM) ); + return( 1 ); + }; + + p_intfGlobal = p_intf; + + p_intf->p_sys->p_sub = intf_MsgSub(); + + /* Initialize Win32 thread */ + p_intf->p_sys->b_playing = 0; + p_intf->p_sys->b_popup_changed = 0; + p_intf->p_sys->i_playing = -1; + p_intf->p_sys->b_slider_free = 1; + + return( 0 ); +} + +/***************************************************************************** + * intf_Close: destroy interface + *****************************************************************************/ +static void intf_Close( intf_thread_t *p_intf ) +{ + intf_MsgUnsub( p_intf->p_sys->p_sub ); + + /* Destroy structure */ + free( p_intf->p_sys ); +} + +/***************************************************************************** + * intf_Run: main loop + *****************************************************************************/ +static void intf_Run( intf_thread_t *p_intf ) +{ + p_intf->p_sys->p_window = new TMainFrameDlg( NULL ); + p_intf->p_sys->p_playlist = new TPlaylistDlg( NULL ); + p_intf->p_sys->p_messages = new TMessagesDlg( NULL ); + p_intf->p_sys->p_window->ShowModal(); + if( p_intf->p_sys->p_disc ) delete p_intf->p_sys->p_disc; + if( p_intf->p_sys->p_network ) delete p_intf->p_sys->p_network; + if( p_intf->p_sys->p_preferences ) delete p_intf->p_sys->p_preferences; + delete p_intf->p_sys->p_messages; + delete p_intf->p_sys->p_playlist; +} + +/***************************************************************************** + * Win32Manage: manage main thread messages + ***************************************************************************** + * In this function, called approx. 10 times a second, we check what the + * main program wanted to tell us. + *****************************************************************************/ +int Win32Manage( intf_thread_t *p_intf ) +{ + vlc_mutex_lock( &p_intf->change_lock ); + + /* If the "display popup" flag has changed */ + if( p_intf->b_menu_change ) + { + /* FIXME: It would be nice to close the popup when the user left-clicks + elsewhere, or to actualize the position when he right-clicks again, + but i couldn't find a way to close it :-( */ + TPoint MousePos = Mouse->CursorPos; + p_intf->p_sys->p_window->PopupMenuMain->Popup( MousePos.x, MousePos.y ); + p_intf->b_menu_change = 0; + } + + /* Update the log window */ + p_intf->p_sys->p_messages->UpdateLog(); + + /* Update the playlist */ + p_intf->p_sys->p_playlist->Manage( p_intf ); + + if( p_input_bank->pp_input[0] != NULL ) + { + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + + if( !p_input_bank->pp_input[0]->b_die ) + { + /* New input or stream map change */ + if( p_input_bank->pp_input[0]->stream.b_changed ) + { + p_intf->p_sys->p_window->ModeManage(); + SetupMenus( p_intf ); + p_intf->p_sys->b_playing = 1; + } + + /* Manage the slider */ + if( p_input_bank->pp_input[0]->stream.b_seekable && + p_intf->p_sys->b_playing ) + { + TTrackBar * TrackBar = p_intf->p_sys->p_window->TrackBar; + off_t NewValue = TrackBar->Position; + +#define p_area p_input_bank->pp_input[0]->stream.p_selected_area + /* If the user hasn't touched the slider since the last time, + * then the input can safely change it */ + if( NewValue == p_intf->p_sys->OldValue ) + { + /* Update the value */ + TrackBar->Position = p_intf->p_sys->OldValue = + ( (off_t)SLIDER_MAX_VALUE * p_area->i_tell ) / + p_area->i_size; + } + /* Otherwise, send message to the input if the user has + * finished dragging the slider */ + else if( p_intf->p_sys->b_slider_free ) + { + off_t i_seek = ( NewValue * p_area->i_size ) / + (off_t)SLIDER_MAX_VALUE; + + /* release the lock to be able to seek */ + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + input_Seek( p_input_bank->pp_input[0], i_seek ); + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + + /* Update the old value */ + p_intf->p_sys->OldValue = NewValue; + } + + /* Update the display */ +// TrackBar->Invalidate(); + +# undef p_area + } + + if( p_intf->p_sys->i_part != + p_input_bank->pp_input[0]->stream.p_selected_area->i_part ) + { +// p_intf->p_sys->b_chapter_update = 1; + SetupMenus( p_intf ); + } + } + + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + } + else if( p_intf->p_sys->b_playing && !p_intf->b_die ) + { + p_intf->p_sys->p_window->ModeManage(); + p_intf->p_sys->b_playing = 0; + } + + /* Manage core vlc functions through the callback */ + p_intf->pf_manage( p_intf ); + + if( p_intf->b_die ) + { + vlc_mutex_unlock( &p_intf->change_lock ); + + /* Prepare to die, young Skywalker */ + p_intf->p_sys->p_window->ModalResult = mrOk; + delete p_intf->p_sys->p_window; + + /* Just in case */ + return( FALSE ); + } + + vlc_mutex_unlock( &p_intf->change_lock ); + + return( TRUE ); +} + diff --git a/plugins/win32/intfwin.bpf b/plugins/win32/intfwin.bpf new file mode 100644 index 0000000000..24e5c00d88 --- /dev/null +++ b/plugins/win32/intfwin.bpf @@ -0,0 +1,16 @@ +USEUNIT("win32.cpp"); +USEUNIT("intf_win32.cpp"); +USEFORM("mainframe.cpp", MainFrameDlg); +USEFORM("network.cpp", NetworkDlg); +USEFORM("playlist.cpp", PlaylistDlg); +USEFORM("preferences.cpp", PreferencesDlg); +USEFORM("about.cpp", AboutDlg); +USEFORM("disc.cpp", DiscDlg); +USEUNIT("control.cpp"); +USE("win32_common.h", File); +USEUNIT("menu.cpp"); +USEFORM("messages.cpp", MessagesDlg); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + DllEntryPoint \ No newline at end of file diff --git a/plugins/win32/intfwin.bpr b/plugins/win32/intfwin.bpr new file mode 100644 index 0000000000..6427681daa --- /dev/null +++ b/plugins/win32/intfwin.bpr @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count1= +Item0=..\win32;..\..\win32;$(BCB)\include;$(BCB)\include\vcl;..\..\include;..\..\src\misc + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\win32;..\..\win32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + diff --git a/plugins/win32/mainframe.cpp b/plugins/win32/mainframe.cpp new file mode 100644 index 0000000000..38e4d829a9 --- /dev/null +++ b/plugins/win32/mainframe.cpp @@ -0,0 +1,691 @@ +/***************************************************************************** + * mainframe.cpp: Win32 interface plugin for vlc + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teulière + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#include +#pragma hdrstop + +#include + +#include "stream_control.h" +#include "input_ext-intf.h" + +#include "video.h" +#include "video_output.h" + +#include "interface.h" +#include "intf_playlist.h" +#include "intf_eject.h" + +#include "mainframe.h" +#include "menu.h" +#include "control.h" +#include "disc.h" +#include "network.h" +#include "about.h" +#include "preferences.h" +#include "messages.h" +#include "playlist.h" +#include "win32_common.h" + +#include "netutils.h" + +//--------------------------------------------------------------------------- +//#pragma package(smart_init) +#pragma resource "*.dfm" + +extern struct intf_thread_s *p_intfGlobal; +extern int Win32Manage( intf_thread_t *p_intf ); + +//--------------------------------------------------------------------------- +__fastcall TMainFrameDlg::TMainFrameDlg( TComponent* Owner ) + : TForm( Owner ) +{ + Application->ShowHint = true; + Application->OnHint = DisplayHint; + + TimerManage->Interval = INTF_IDLE_SLEEP / 1000; + + TrackBar->Max = SLIDER_MAX_VALUE; + + /* default height */ + ClientHeight = 65; +} +//--------------------------------------------------------------------------- + + +/***************************************************************************** + * Event handlers + ****************************************************************************/ +void __fastcall TMainFrameDlg::TimerManageTimer( TObject *Sender ) +{ + Win32Manage( p_intfGlobal ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::DisplayHint( TObject *Sender ) +{ + StatusBar->SimpleText = GetLongHint( Application->Hint ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::TrackBarChange( TObject *Sender ) +{ + /* This function displays the current date related to the position in + * the stream. It is called whenever the slider changes its value. + * The lock has to be taken before the function is called */ + +// vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + + if( p_input_bank->pp_input[0] != NULL ) + { +#define p_area p_input_bank->pp_input[0]->stream.p_selected_area + char psz_time[ OFFSETTOTIME_MAX_SIZE ]; + off_t Value = TrackBar->Position; + + GroupBoxSlider->Caption = + input_OffsetToTime( p_input_bank->pp_input[0], psz_time, + ( p_area->i_size * Value ) / (off_t)SLIDER_MAX_VALUE ); +#undef p_area + } + +// vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::FormClose( TObject *Sender, + TCloseAction &Action ) +{ + intf_thread_t *p_intf = p_intfGlobal; + + vlc_mutex_lock( &p_intf->change_lock ); + p_intf->b_die = 1; + vlc_mutex_unlock( &p_intf->change_lock ); + + /* we don't destroy the form immediatly */ + Action = caHide; +} +//--------------------------------------------------------------------------- + + +/***************************************************************************** + * Menu callbacks + ****************************************************************************/ +void __fastcall TMainFrameDlg::MenuOpenFileClick( TObject *Sender ) +{ + int i_end = p_main->p_playlist->i_size; + AnsiString FileName; + if( OpenDialog1->Execute() ) + { + /* add the new file to the interface playlist */ + FileName = OpenDialog1->FileName; + intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, + (char*)FileName.c_str() ); + + /* update the plugin display */ + p_intfGlobal->p_sys->p_playlist->UpdateGrid( p_main->p_playlist ); + + /* end current item, select added item */ + if( p_input_bank->pp_input[0] != NULL ) + { + p_input_bank->pp_input[0]->b_eof = 1; + } + + intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); + }; +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::MenuOpenDiscClick( TObject *Sender ) +{ + TDiscDlg *p_disc = p_intfGlobal->p_sys->p_disc; + if( p_disc == NULL ) + { + p_disc = new TDiscDlg( this ); + p_intfGlobal->p_sys->p_disc = p_disc; + } + p_disc->Show(); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::MenuNetworkStreamClick( TObject *Sender ) +{ + TNetworkDlg *p_network = p_intfGlobal->p_sys->p_network; + if( p_network == NULL ) + { + p_network = new TNetworkDlg( this ); + p_intfGlobal->p_sys->p_network = p_network; + } + p_network->Show(); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::MenuExitClick( TObject *Sender ) +{ + Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::MenuFullscreenClick( TObject *Sender ) +{ + if( p_vout_bank->i_count ) + { + vlc_mutex_lock( &p_vout_bank->pp_vout[0]->change_lock ); + + p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE; + + vlc_mutex_unlock( &p_vout_bank->pp_vout[0]->change_lock ); + } +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::MenuPlaylistClick( TObject *Sender ) +{ + TPlaylistDlg *p_playlist = p_intfGlobal->p_sys->p_playlist; + if( p_playlist->Visible ) + { + p_playlist->Hide(); + } + else + { + p_playlist->UpdateGrid( p_main->p_playlist ); + p_playlist->Show(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::MenuMessagesClick( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_messages->Show(); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::MenuPreferencesClick( TObject *Sender ) +{ + TPreferencesDlg *p_preferences = p_intfGlobal->p_sys->p_preferences; + if( p_preferences == NULL ) + { + p_preferences = new TPreferencesDlg( this ); + p_preferences->CreateConfigDialog( "main" ); + p_intfGlobal->p_sys->p_preferences = p_preferences; + } + else + { + p_preferences->Show(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::MenuAboutClick( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_about = new TAboutDlg( this ); + p_intfGlobal->p_sys->p_about->ShowModal(); + delete p_intfGlobal->p_sys->p_about; +} +//--------------------------------------------------------------------------- + + +/***************************************************************************** + * Toolbar callbacks + ****************************************************************************/ +void __fastcall TMainFrameDlg::ToolButtonFileClick( TObject *Sender ) +{ + MenuOpenFileClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonDiscClick( TObject *Sender ) +{ + MenuOpenDiscClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonNetClick( TObject *Sender ) +{ + MenuNetworkStreamClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonPlaylistClick( TObject *Sender ) +{ + MenuPlaylistClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonBackClick( TObject *Sender ) +{ + ControlBack( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonStopClick( TObject *Sender ) +{ + ControlStop( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonPlayClick( TObject *Sender ) +{ + ControlPlay( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonPauseClick( TObject *Sender ) +{ + ControlPause( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonSlowClick( TObject *Sender ) +{ + ControlSlow( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonFastClick( TObject *Sender ) +{ + ControlFast( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonPrevClick( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_playlist->Previous(); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonNextClick( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_playlist->Next(); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ToolButtonEjectClick( TObject *Sender ) +{ + AnsiString Device = ""; + + /* + * Get the active input + * Determine whether we can eject a media, ie it's a VCD or DVD + * If it's neither a VCD nor a DVD, then return + */ + + if( p_main->p_playlist->current.psz_name != NULL ) + { + if( strncmp( p_main->p_playlist->current.psz_name, "dvd", 3 ) + || strncmp( p_main->p_playlist->current.psz_name, "vcd", 3 ) ) + { + /* Determine the device name by omitting the first 4 characters + * and keeping 3 characters */ + Device = strdup( ( p_main->p_playlist->current.psz_name + 4 ) ); + Device = Device.SubString( 1, 2 ); + } + } + + if( Device == "" ) + { + return; + } + + /* If there's a stream playing, we aren't allowed to eject ! */ + if( p_input_bank->pp_input[0] == NULL ) + { + intf_WarnMsg( 4, "intf: ejecting %s", Device.c_str() ); + + intf_Eject( Device.c_str() ); + } +} +//-------------------------------------------------------------------------- + + +/***************************************************************************** + * Popup callbacks + ****************************************************************************/ +void __fastcall TMainFrameDlg::PopupCloseClick( TObject *Sender ) +{ + /* We do nothing, we just need a click on a menu item + * to close the popup. Don't ask me why... */ + return; +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupPlayClick( TObject *Sender ) +{ + ToolButtonPlayClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupPauseClick( TObject *Sender ) +{ + ToolButtonPauseClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupStopClick( TObject *Sender ) +{ + ToolButtonStopClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupBackClick( TObject *Sender ) +{ + ToolButtonBackClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupSlowClick( TObject *Sender ) +{ + ToolButtonSlowClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupFastClick( TObject *Sender ) +{ + ToolButtonFastClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupToggleInterfaceClick( TObject *Sender ) +{ + this->BringToFront(); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupFullscreenClick( TObject *Sender ) +{ + MenuFullscreenClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupNextClick( TObject *Sender ) +{ + ToolButtonNextClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupPrevClick( TObject *Sender ) +{ + ToolButtonPrevClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupJumpClick( TObject *Sender ) +{ + // TODO +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupPlaylistClick( TObject *Sender ) +{ + MenuPlaylistClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupPreferencesClick( TObject *Sender ) +{ + MenuPreferencesClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupExitClick( TObject *Sender ) +{ + MenuExitClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupOpenFileClick( TObject *Sender ) +{ + MenuOpenFileClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupOpenDiscClick( TObject *Sender ) +{ + MenuOpenDiscClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::PopupNetworkStreamClick( TObject *Sender ) +{ + MenuNetworkStreamClick( Sender ); +} +//--------------------------------------------------------------------------- + + +/***************************************************************************** + * Callbacks for DVD/VCD navigation + ****************************************************************************/ +void __fastcall TMainFrameDlg::ButtonTitlePrevClick( TObject *Sender ) +{ + intf_thread_t * p_intf; + input_area_t * p_area; + int i_id; + + p_intf = p_intfGlobal; + i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id - 1; + + /* Disallow area 0 since it is used for video_ts.vob */ + if( i_id > 0 ) + { + p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id]; + input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + + p_intf->p_sys->b_title_update = 1; + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + SetupMenus( p_intf ); + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + } +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ButtonTitleNextClick( TObject *Sender ) +{ + intf_thread_t * p_intf; + input_area_t * p_area; + int i_id; + + p_intf = p_intfGlobal; + i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id + 1; + + if( i_id < p_input_bank->pp_input[0]->stream.i_area_nb ) + { + p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id]; + input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + + p_intf->p_sys->b_title_update = 1; + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + SetupMenus( p_intf ); + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + } +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ButtonChapterPrevClick( TObject *Sender ) +{ + intf_thread_t * p_intf = p_intfGlobal; + input_area_t * p_area; + + p_area = p_input_bank->pp_input[0]->stream.p_selected_area; + + if( p_area->i_part > 0 ) + { + p_area->i_part--; + input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + + p_intf->p_sys->b_chapter_update = 1; + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + SetupMenus( p_intf ); + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + } +} +//--------------------------------------------------------------------------- +void __fastcall TMainFrameDlg::ButtonChapterNextClick( TObject *Sender ) +{ + intf_thread_t * p_intf = p_intfGlobal; + input_area_t * p_area; + + p_area = p_input_bank->pp_input[0]->stream.p_selected_area; + + if( p_area->i_part < p_area->i_part_nb ) + { + p_area->i_part++; + input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); + + p_intf->p_sys->b_chapter_update = 1; + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + SetupMenus( p_intf ); + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + } +} +//--------------------------------------------------------------------------- + + +/***************************************************************************** + * Callback for the 'go!' button + ****************************************************************************/ +void __fastcall TMainFrameDlg::ButtonGoClick( TObject *Sender ) +{ + intf_thread_t *p_intf = p_intfGlobal; + int i_channel; + + i_channel = UpDownChannel->Position; + intf_WarnMsg( 3, "intf info: joining channel %d", i_channel ); + + vlc_mutex_lock( &p_intf->change_lock ); + if( p_input_bank->pp_input[0] != NULL ) + { + /* end playing item */ + p_input_bank->pp_input[0]->b_eof = 1; + + /* update playlist */ + vlc_mutex_lock( &p_main->p_playlist->change_lock ); + + p_main->p_playlist->i_index--; + p_main->p_playlist->b_stopped = 1; + + vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + + /* FIXME: ugly hack to close input and outputs */ + p_intf->pf_manage( p_intf ); + } + + network_ChannelJoin( i_channel ); + + /* FIXME 2 */ + p_main->p_playlist->b_stopped = 0; + p_intf->pf_manage( p_intf ); + + vlc_mutex_unlock( &p_intf->change_lock ); + +// input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); +} +//--------------------------------------------------------------------------- + + +/***************************************************************************** + * ModeManage: actualise the aspect of the interface whenever the input + * changes. + ***************************************************************************** + * The lock has to be taken before you call the function. + *****************************************************************************/ +void __fastcall TMainFrameDlg::ModeManage() +{ + intf_thread_t * p_intf = p_intfGlobal; + TGroupBox * ActiveGB; + int i_Height; + bool b_control; + + /* hide all boxes */ + GroupBoxFile->Visible = false; + GroupBoxNetwork->Visible = false; + GroupBoxDisc->Visible = false; + + /* hide slider */ + GroupBoxSlider->Hide(); + + /* controls unavailable */ + b_control = 0; + + /* show the box related to current input mode */ + if( p_input_bank->pp_input[0] != NULL ) + { + switch( p_input_bank->pp_input[0]->stream.i_method & 0xf0 ) + { + case INPUT_METHOD_FILE: + GroupBoxFile->Visible = true; + ActiveGB = GroupBoxFile; + LabelFileName->Caption = p_input_bank->pp_input[0]->psz_source; + break; + case INPUT_METHOD_DISC: + GroupBoxDisc->Visible = true; + ActiveGB = GroupBoxDisc; + break; + case INPUT_METHOD_NETWORK: + GroupBoxNetwork->Visible = true; + ActiveGB = GroupBoxNetwork; + LabelServer->Caption = p_input_bank->pp_input[0]->psz_source; + if( config_GetIntVariable( "network_channel" ) ) + { + LabelChannel->Visible = true; + } + else + { + LabelChannel->Visible = false; + } + break; + default: + intf_WarnMsg( 3, "intf: can't determine input method" ); + GroupBoxFile->Visible = true; + ActiveGB = GroupBoxFile; + LabelFileName->Caption = p_input_bank->pp_input[0]->psz_source; + break; + } + + i_Height = StatusBar->Height + ActiveGB->Height + 72; + + /* initialize and show slider for seekable streams */ + if( p_input_bank->pp_input[0]->stream.b_seekable ) + { + TrackBar->Position = p_intf->p_sys->OldValue = 0; + GroupBoxSlider->Show(); + i_Height += GroupBoxSlider->Height; + } + + /* resize main window */ + this->Height = i_Height; + + /* control buttons for free pace streams */ + b_control = p_input_bank->pp_input[0]->stream.b_pace_control; + + /* get ready for menu regeneration */ + p_intf->p_sys->b_program_update = 1; + p_intf->p_sys->b_title_update = 1; + p_intf->p_sys->b_chapter_update = 1; + p_intf->p_sys->b_audio_update = 1; + p_intf->p_sys->b_spu_update = 1; + p_intf->p_sys->i_part = 0; + + p_input_bank->pp_input[0]->stream.b_changed = 0; + intf_WarnMsg( 3, "intf: stream has changed, refreshing interface" ); + } + else + { + if( config_GetIntVariable( "network_channel" ) ) + { + GroupBoxNetwork->Visible = true; + LabelChannel->Visible = true; + } + else + { + /* default mode */ + ClientHeight = 65; + + /* unsensitize menus */ + MenuProgram->Enabled = false; + MenuTitle->Enabled = false; + MenuChapter->Enabled = false; + MenuAudio->Enabled = false; + MenuSubtitles->Enabled = false; + PopupNavigation->Enabled = false; + PopupAudio->Enabled = false; + PopupSubtitles->Enabled = false; + } + } + + /* set control items */ + ToolButtonBack->Enabled = false; + ToolButtonStop->Enabled = true; + ToolButtonEject->Enabled = !b_control; + ToolButtonPause->Enabled = b_control; + ToolButtonSlow->Enabled = b_control; + ToolButtonFast->Enabled = b_control; + PopupBack->Enabled = false; + PopupPause->Enabled = b_control; + PopupSlow->Enabled = b_control; + PopupFast->Enabled = b_control; +} + diff --git a/plugins/win32/mainframe.dfm b/plugins/win32/mainframe.dfm new file mode 100644 index 0000000000..20dcdef6af --- /dev/null +++ b/plugins/win32/mainframe.dfm @@ -0,0 +1,1244 @@ +object MainFrameDlg: TMainFrameDlg + Left = 304 + Top = 278 + Width = 535 + Height = 272 + Caption = 'VideoLAN Client (win32 interface)' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Icon.Data = { + 0000010001003030000001000800A80E00001600000028000000300000006000 + 00000100080000000000800A0000000000000000000000010000000000000402 + 04002486D4009CC2E4007CA6C400E4E2E40004528C003CA2F4001C82DC0054B2 + FC003C8EDC00B4CADC00046EC4001C92F40034363400D4D6D400FFFFFF006CAA + E4006CB2F4000476DC0044AAFC009CD2FC00A4B6C4001C6EB4001C9AFC00548A + B4007CC2FC000486F400B4CAE4001416140034A2FC00CCD2D400147ACC006CBA + FC006CA6DC00CCE2F400045EA400349EFC00044A7400FCFEFC0064BAFC005C9E + DC00C4CED4000C92FC00BCD6E400F4F2F4007C9AB4008CCAFC0044A2FC007CBA + FC00CCEAFC001C5E8C000482EC0064B6FC000472D400047EEC002C9EFC00048E + FC001C1E1C001C96FC00CCDAE4000C0A0C00348ED400A4C6E4009CAEBC00248A + E4005CB6FC003492E400BCCEDC003C3E3C00047EE4004CAEFC00ACBECC00447A + A400249EFC008CC6FC003CA6FC00247ECC0074BEFC007CAEDC001C5674001496 + FC00ECF6FC00649ACC00DCEEFC00040604002C8AD400A4C2E40084AAC400145A + 8C0044A2F4001C86DC005CB2FC003C92DC00BCCADC000472CC003C3A3C00E4F2 + FC0054AEFC0074B6F400047ADC004CAAFC009CB6CC00249AFC006C92BC0084C6 + FC00048AFC001C1A1C003CA2FC00CCD2DC001C7ECC0074BAFC0074AADC00D4E6 + F4000462B4000C4E74004C9EE400CCCED4001492FC00C4DAE40094CAFC0044A6 + FC007CBEFC002C628C000476D4000C8EFC0024222400D4DAE4003476B400F4F6 + FC006C9ECC00E4EEFC0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 838383831C1C1C1C838383838383838383838383838383838383838383838383 + 838383838383838383838383838383831C1C1C1C5E12635E1C1C1C8383838383 + 838383838383838383838383838383838383838383838383838383831C1C1C1C + 5E6312456969691A455E1C1C1C83838383838383838383838383838383838383 + 8383838383838383831C1C1C5E127B5E7B63636363636345691A45125E1C1C83 + 8383838383838383838383838383838383838383831C1C1C1C5E126363635E05 + 25252525252572585E6345691A455E1C1C838383838383838383838383838383 + 8383831C1C5E1263451A697B05250569696969692A17244B584F7A5E69696963 + 5E1C83838383838383838383838383838383831C711A69694525252369696969 + 3869383875661D785B344D4825694569695E1C1C838383838383838383838383 + 838383831C5E45121C45696969383869386938383A376B645B206E795B250045 + 691A711C83838383838383838383838383838383831C1C231C63696938696938 + 6938692A17374B46412079796E520012455E1C83838383838383838383838383 + 838383838383831C1C1238386938386938693875661D1361344D7919101C230B + 1C1C838383838383838383838383838383838383838383831C5E696938693869 + 38693850666B135B20797979211C1C1C83838383838383838383838383838383 + 83838383838383831C1C45693869383A17662413465B34342079796E521C8383 + 838383838383838383838383838383838383838383838383831C633A663A0602 + 0A2B22535382312E684A19101C83838383838383838383838383838383838383 + 8383838383838383831C01020A0A0A1E1E042C26262626606053146F54838383 + 838383838383838383838383838383838383838383838383831C67290E1E0E0E + 0E042C2626262626262682656A83838383838383838383838383838383838383 + 8383838383838383831C0D3F0E0E0E0E0E042C262626262626267E4483838383 + 83838383838383838383838383838383838383838383838383836A3F0E0E0E6C + 5D2B22538260602626266C7D8383838383838383838383838383838383838383 + 838383838383838383836A3F6C5D1B025924645B274D77536080477D83838383 + 83838383838383838383838383838383838383838383838383831C0302590C3A + 753A376B465B6E4A141B0D838383838383838383838383838383838383838383 + 83838383838383838383541F0C3838382A661D4B61344D7930813C8383838383 + 8383838383838383838383838383838383838383838383838383831C45386938 + 75661D1308344D7910101C838383838383838383838383838383838383838383 + 83838383838383838383831C126938383A376B645B207979211C838383838383 + 8383838383838383838383838383838383838383838383838383831C6338692A + 17374B463420796E521C83838383838383838383838383838383838383838383 + 83838383838383838383831C5E6938662F615B4D19681910101C838383838383 + 838383838383838383838383838383838383838383838383838383835407593E + 5D2B70608253144E1C8383838383838383838383838383838383838383838383 + 8383838383838383838383831C030A1E0E042C26262682656A83838383838383 + 838383838383838383838383838383838383838383838383838383836A3F0E0E + 0E042C2626267E446A8383838383838383838383838383838383838383838383 + 838383838383838383838383392D740E0E042C2626266C7D8383838383838383 + 838383838383838383838383838383838383838383838383838383831C0D156C + 433B70606080477D838383838383838383838383838383838383838383838383 + 838383838383838383838383831C573E1134794A141B5F6A8383838383838383 + 83838383838383838383838383838383838383838383838383838383831C3D78 + 6461344D796F1C83838383838383838383838383838383838383838383838383 + 838383838383838383838383831C4C24645B347930521C838383838383838383 + 8383838383838383838383838383838383838383838383838383838383831C42 + 465B2079101C8383838383838383838383838383838383838383838383838383 + 83838383838383838383838383831C0946344D79211C83838383838383838383 + 8383838383838383838383838383838383838383838383838383838383831C3D + 73731062521C8383838383838383838383838383838383838383838383838383 + 83838383838383838383838383831C7F0000001C1C8383838383838383838383 + 838383838383838383838383838383838383838383838383838383838383831C + 0B074C4C1C838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383831C0B0701161C8383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 1C1C1C1C83838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 8383838383838383838383838383838383838383838383838383838383838383 + 838383838383838383838383838383838383838383838383838383838383FFFF + FFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFF + FFFFFFFF0000FFFFFC3FFFFF0000FFFFC007FFFF0000FFFC0001FFFF0000FFE0 + 00007FFF0000FE0000001FFF0000F80000000FFF0000F800000003FF0000FC00 + 000003FF0000FE00000007FF0000FF8000000FFF0000FFC000003FFF0000FFC0 + 0000FFFF0000FFE00001FFFF0000FFE00001FFFF0000FFE00001FFFF0000FFE0 + 0003FFFF0000FFF00003FFFF0000FFF00003FFFF0000FFF00007FFFF0000FFF0 + 0007FFFF0000FFF80007FFFF0000FFF8000FFFFF0000FFF8000FFFFF0000FFF8 + 000FFFFF0000FFFC001FFFFF0000FFFC001FFFFF0000FFFC001FFFFF0000FFFC + 003FFFFF0000FFFC003FFFFF0000FFFE003FFFFF0000FFFE007FFFFF0000FFFE + 007FFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF + 01FFFFFF0000FFFF81FFFFFF0000FFFF81FFFFFF0000FFFFC3FFFFFF0000FFFF + FFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000} + Menu = MainMenu1 + OldCreateOrder = False + PopupMenu = PopupMenuMain + ShowHint = True + OnClose = FormClose + PixelsPerInch = 96 + TextHeight = 13 + object ToolBar1: TToolBar + Left = 0 + Top = 0 + Width = 527 + Height = 25 + ButtonHeight = 21 + ButtonWidth = 39 + Caption = 'ToolBar1' + ShowCaptions = True + TabOrder = 0 + object ToolButtonFile: TToolButton + Left = 0 + Top = 2 + Hint = 'Open a file' + Caption = 'File' + ImageIndex = 0 + OnClick = ToolButtonFileClick + end + object ToolButtonDisc: TToolButton + Left = 39 + Top = 2 + Hint = 'Open a DVD or VCD' + Caption = 'Disc' + ImageIndex = 1 + OnClick = ToolButtonDiscClick + end + object ToolButtonNet: TToolButton + Left = 78 + Top = 2 + Hint = 'Open a network stream' + Caption = 'Net' + ImageIndex = 2 + OnClick = ToolButtonNetClick + end + object ToolButtonSep1: TToolButton + Left = 117 + Top = 2 + Width = 8 + Caption = 'ToolButtonSep1' + ImageIndex = 3 + Style = tbsSeparator + end + object ToolButtonBack: TToolButton + Left = 125 + Top = 2 + Caption = 'Back' + Enabled = False + ImageIndex = 3 + OnClick = ToolButtonBackClick + end + object ToolButtonStop: TToolButton + Left = 164 + Top = 2 + Hint = 'Stop stream' + Caption = 'Stop' + Enabled = False + ImageIndex = 4 + OnClick = ToolButtonStopClick + end + object ToolButtonEject: TToolButton + Left = 203 + Top = 2 + Hint = 'Eject disc' + Caption = 'Eject' + ImageIndex = 12 + OnClick = ToolButtonEjectClick + end + object ToolButtonPlay: TToolButton + Left = 242 + Top = 2 + Hint = 'Play stream' + Caption = 'Play' + ImageIndex = 5 + OnClick = ToolButtonPlayClick + end + object ToolButtonPause: TToolButton + Left = 281 + Top = 2 + Hint = 'Pause stream' + Caption = 'Pause' + Enabled = False + ImageIndex = 6 + OnClick = ToolButtonPauseClick + end + object ToolButtonSlow: TToolButton + Left = 320 + Top = 2 + Hint = 'Play slower' + Caption = 'Slow' + Enabled = False + ImageIndex = 7 + OnClick = ToolButtonSlowClick + end + object ToolButtonFast: TToolButton + Left = 359 + Top = 2 + Hint = 'Play faster' + Caption = 'Fast' + Enabled = False + ImageIndex = 8 + OnClick = ToolButtonFastClick + end + object ToolButtonSep2: TToolButton + Left = 398 + Top = 2 + Width = 8 + Caption = 'ToolButtonSep2' + ImageIndex = 9 + Style = tbsSeparator + end + object ToolButtonPlaylist: TToolButton + Left = 406 + Top = 2 + Hint = 'Open playlist' + Caption = 'Playlist' + ImageIndex = 9 + OnClick = ToolButtonPlaylistClick + end + object ToolButtonPrev: TToolButton + Left = 445 + Top = 2 + Hint = 'Previous file' + Caption = 'Prev' + ImageIndex = 10 + OnClick = ToolButtonPrevClick + end + object ToolButtonNext: TToolButton + Left = 484 + Top = 2 + Hint = 'Next file' + Caption = 'Next' + ImageIndex = 11 + OnClick = ToolButtonNextClick + end + end + object StatusBar: TStatusBar + Left = 0 + Top = 207 + Width = 527 + Height = 19 + Panels = <> + ParentShowHint = False + ShowHint = False + SimplePanel = True + end + object GroupBoxFile: TGroupBox + Left = 0 + Top = 65 + Width = 527 + Height = 32 + Align = alTop + TabOrder = 2 + Visible = False + object LabelFileName: TLabel + Left = 2 + Top = 15 + Width = 523 + Height = 15 + Align = alClient + Alignment = taCenter + Caption = 'File read' + end + end + object GroupBoxNetwork: TGroupBox + Left = 0 + Top = 129 + Width = 527 + Height = 40 + Align = alTop + TabOrder = 3 + Visible = False + object LabelChannel: TLabel + Left = 288 + Top = 16 + Width = 42 + Height = 13 + Caption = 'Channel:' + end + object LabelServer: TLabel + Left = 64 + Top = 16 + Width = 52 + Height = 13 + Caption = 'No server !' + end + object EditChannel: TEdit + Left = 336 + Top = 12 + Width = 17 + Height = 21 + TabOrder = 0 + Text = '0' + end + object UpDownChannel: TUpDown + Left = 353 + Top = 12 + Width = 15 + Height = 21 + Associate = EditChannel + Min = 0 + Position = 0 + TabOrder = 1 + Thousands = False + Wrap = False + end + object ButtonGo: TButton + Left = 376 + Top = 10 + Width = 25 + Height = 25 + Caption = 'Go!' + TabOrder = 2 + OnClick = ButtonGoClick + end + end + object GroupBoxDisc: TGroupBox + Left = 0 + Top = 97 + Width = 527 + Height = 32 + Align = alTop + TabOrder = 4 + Visible = False + object LabelDisc: TLabel + Left = 32 + Top = 11 + Width = 21 + Height = 13 + Caption = 'Disc' + end + object LabelTitle: TLabel + Left = 96 + Top = 11 + Width = 23 + Height = 13 + Caption = 'Title:' + end + object LabelChapter: TLabel + Left = 296 + Top = 11 + Width = 40 + Height = 13 + Caption = 'Chapter:' + end + object LabelTitleCurrent: TLabel + Left = 126 + Top = 11 + Width = 9 + Height = 13 + Caption = '---' + end + object LabelChapterCurrent: TLabel + Left = 342 + Top = 11 + Width = 9 + Height = 13 + Caption = '---' + end + object ButtonTitlePrev: TButton + Left = 152 + Top = 8 + Width = 33 + Height = 19 + Hint = 'Jump to previous title' + Caption = 'Prev' + TabOrder = 0 + OnClick = ButtonTitlePrevClick + end + object ButtonTitleNext: TButton + Left = 184 + Top = 8 + Width = 33 + Height = 19 + Hint = 'Jump to next title' + Caption = 'Next' + TabOrder = 1 + OnClick = ButtonTitleNextClick + end + object ButtonChapterPrev: TButton + Left = 368 + Top = 8 + Width = 33 + Height = 19 + Hint = 'Jump to previous chapter' + Caption = 'Prev' + TabOrder = 2 + OnClick = ButtonChapterPrevClick + end + object ButtonChapterNext: TButton + Left = 400 + Top = 8 + Width = 33 + Height = 19 + Hint = 'Jump to next chapter' + Caption = 'Next' + TabOrder = 3 + OnClick = ButtonChapterNextClick + end + end + object GroupBoxSlider: TGroupBox + Left = 0 + Top = 25 + Width = 527 + Height = 40 + Align = alTop + Caption = '0:00:00' + TabOrder = 5 + Visible = False + object TrackBar: TTrackBar + Left = 2 + Top = 15 + Width = 523 + Height = 21 + Align = alTop + Orientation = trHorizontal + Frequency = 1 + Position = 0 + SelEnd = 0 + SelStart = 0 + TabOrder = 0 + TickMarks = tmBottomRight + TickStyle = tsNone + OnChange = TrackBarChange + end + end + object MainMenu1: TMainMenu + Left = 40 + Top = 176 + object MenuFile: TMenuItem + Caption = '&File' + object MenuOpenFile: TMenuItem + Caption = '&Open file...' + Hint = 'Open a file' + ShortCut = 114 + OnClick = MenuOpenFileClick + end + object MenuOpenDisc: TMenuItem + Caption = 'Open &disc...' + Hint = 'Open a DVD or VCD' + ShortCut = 115 + OnClick = MenuOpenDiscClick + end + object MenuNetworkStream: TMenuItem + Caption = '&Network stream...' + Hint = 'Select a network stream' + ShortCut = 116 + OnClick = MenuNetworkStreamClick + end + object N8: TMenuItem + Caption = '-' + Visible = False + end + object MenuEjectDisc: TMenuItem + Caption = '&Eject Disc' + Hint = 'Eject disc' + Visible = False + end + object N1: TMenuItem + Caption = '-' + end + object MenuExit: TMenuItem + Caption = 'E&xit' + Hint = 'Exit the program' + ShortCut = 16465 + OnClick = MenuExitClick + end + end + object MenuView: TMenuItem + Caption = '&View' + object MenuHideinterface: TMenuItem + Caption = '&Hide interface' + Hint = 'Hide the main interface window' + end + object MenuFullscreen: TMenuItem + Caption = '&Fullscreen' + Hint = 'Toggle fullscreen' + OnClick = MenuFullscreenClick + end + object N2: TMenuItem + Caption = '-' + end + object MenuProgram: TMenuItem + Caption = 'Progr&am' + Enabled = False + Hint = 'Select program' + end + object MenuTitle: TMenuItem + Caption = '&Title' + Enabled = False + Hint = 'Select title' + end + object MenuChapter: TMenuItem + Caption = '&Chapter' + Enabled = False + Hint = 'Select chapter' + end + object MenuAngle: TMenuItem + Caption = 'An&gle' + Enabled = False + Hint = 'Select angle' + end + object N3: TMenuItem + Caption = '-' + end + object MenuPlaylist: TMenuItem + Caption = '&Playlist...' + Hint = 'Open the playlist window' + OnClick = MenuPlaylistClick + end + object MenuModules: TMenuItem + Caption = '&Modules...' + Enabled = False + Hint = 'Open the modules window' + end + object MenuMessages: TMenuItem + Caption = 'Me&ssages...' + Hint = 'Open the messages window' + OnClick = MenuMessagesClick + end + end + object MenuSettings: TMenuItem + Caption = '&Settings' + object MenuAudio: TMenuItem + Caption = '&Audio' + Enabled = False + Hint = 'Select audio language' + end + object MenuSubtitles: TMenuItem + Caption = '&Subtitles' + Enabled = False + Hint = 'Select subtitles language' + end + object N4: TMenuItem + Caption = '-' + end + object MenuPreferences: TMenuItem + Caption = '&Preferences...' + Hint = 'Configure the application' + OnClick = MenuPreferencesClick + end + end + object MenuHelp: TMenuItem + Caption = '&Help' + object MenuAbout: TMenuItem + Caption = '&About...' + Hint = 'About this application' + OnClick = MenuAboutClick + end + end + end + object OpenDialog1: TOpenDialog + Filter = 'All Files (*.*)|*.*' + Left = 8 + Top = 176 + end + object ImageListToolbar: TImageList + Height = 32 + Width = 32 + Left = 104 + Top = 176 + Bitmap = { + 494C010102000400040020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000800000002000000001002000000000000040 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000E7000000E700FF00 + 00008400000084000000840000000000000000000000FF00E700FF00E700FF00 + E700FF00E7000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FF00E700FF00 + E70000000000000000000000000000000000000000000000000000000000FF00 + 0000FF00E700FF00E70000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E7000000000000000000000000008400 + 0000000000008400000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000E70084000000FF00 + 0000840000008400000000000000FF00E700FF00E700FF00E700FF00E7000000 + E7000000E7000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF00E700FF00E7000000 + 0000FF00E7000000000000000000000000000000000000000000FF000000FF00 + E700FF00E7000000E700FF00E700000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E7000000000000000000840000000000 + 0000840000000000000084000000840000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000E700FF0000008400 + 0000840000000000000000000000FF00E7000000E7000000E7000000E7000000 + E7000000E7000000E70000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E70000000000FF00 + E700000000000000000000000000000000000000000000000000FF000000FF00 + E7000000E7000000E7000000E700FF00E7000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E7000000000000000000000000008400 + 0000000000008400000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000FF0000008400 + 000000000000FF00E7000000E7000000E7000000E7000000E7000000E7000000 + E7000000E7000000E70000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E70000000000FF00E7000000 + 0000FF00E70000000000FF00E700FF00E700FF00E700FF00E700FF00E7000000 + E7000000E7000000E70000000000FF00E7000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E70042004200AD00 + 2100EF006300FF008400C60021004200A5000000000000000000840000000000 + 0000840000000000000084000000840000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000840000008400 + 00000000E7000000E7000000E7000000E7000000E7000000E700000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 000000000000FF00E700840000000000000000000000840000000000E7000000 + E70000000000000000000000000000000000FF00E70000000000000000000000 + 000000000000000000000000000000000000C6000000C6000000C6000000C600 + 0000C6000000C6000000C6000000C60000000000000000000000840000008400 + 0000840000008400000084000000840000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000940042000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000310063000000000000000000D600C60000000000D600 + C6004200C6000800210021002100000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000FF00E700FF00E700FF00E700FF00E700FF00E700FF00E7000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000DE00E700DE00E700DE00 + E7007B00420008008400DE00E700DE00E7007B004200B5008400DE00E700A500 + 21007B00420018008400000000000000000000000000DE00E700000000000000 + 0000000063000000000018004200100084008400420039002100180063006300 + 8400000000000000000021008400DE0084000000000000000000000000000000 + 000000000000210000000000000052006300000000008400420073000000F700 + 8400000000000000000000000000FF00E700000000007B004200290000000000 + 0000FF00E700000000008400420073000000E70042007300E7006300C6000000 + E700000084007300E700080084002100C6000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FF00 + E700FF00E7000000000000000000000000000000000000000000FF000000FF00 + E700FF00E7000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700CE00A5000000000000000000F700 + E700FF00E700D600E7005A0063000000000000000000DE00E700390063000000 + 0000D600E70000000000000000004200E7004A00210052004200630084007300 + 63007300A500E700A500BD0084008C000000FF00E7005A0021000000C600E700 + 00009C00840042000000080000000000000000000000000000005200E700B500 + 42000000C600BD008400BD008400CE00E70008000000000000009C00E700C600 + E700000000006300E700000000008C00E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FF00E700FF00 + E70000000000000000000000000000000000000000000000000000000000FF00 + 0000FF00E700FF00E70000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF00E700FF00E7000000 + 0000FF00E7000000000000000000000000000000000000000000FF000000FF00 + E700FF00E7000000E700FF00E700000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E700FF000000FF00 + E700FF00E7000000000000000000FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E7000000 + 000000000000FF00E700FF00E700FF00E700FF00E700FF00E700FF00E7000000 + 000000000000FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E7000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E70000000000FF00 + E700000000000000000000000000000000000000000000000000FF000000FF00 + E7000000E7000000E7000000E700FF00E7000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E700FF00E7000000 + E7000000E7000000E70000000000FF00E70000000000FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E70000000000FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF000000FF00 + E7000000E7000000E7000000E700FF00E70000000000FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E70000000000FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E7000000000000000000000000000000 + 000000000000000000000000000000000000000000000000E700000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E70000000000FF00E7000000 + 0000FF00E70000000000FF00E700FF00E700FF00E700FF00E700FF00E7000000 + E7000000E7000000E70000000000FF00E7000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E70000000000FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E70000000000FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E70000000000FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E70000000000FF00E700FF00E700FF00E700FF00E70000000000FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E70000000000FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E70000000000FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E7008400000000000000FF00E7000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF00E7000000E700FF00 + E700000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 000000000000FF00E700840000000000000000000000840000000000E7000000 + E70000000000000000000000000000000000FF00E70000000000000000000000 + 000000000000000000000000000000000000840000000000000000000000FF00 + E700FF00E700FF00E700FF00E700000000008400000000000000840000000000 + 0000840000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FF00E700FF00 + E700FF0000000000000000000000000000000000000000000000000000000000 + 0000FF00E700FF00E70000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FF00E700FF00 + C600FF000000FF00C600FF00C600FF0042000000000000000000000000000000 + 0000000000000000000000000000840000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000E700FF00E7000000 + E700000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 0000FF00E7008400000000000000FF00E700FF00E7000000000084000000FF00 + E70000000000000000000000000000000000FF00E70000000000000000000000 + 0000000000000000000000000000000000008400000000000000000000000000 + 0000FF00E700FF00E700FF00E700000000000000000084000000000000008400 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FF00 + E700FF00E700FF0000000000000000000000000000000000000000000000FF00 + E700FF00E7000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700840000000000000000000000000000000000 + 0000000000000000000084000000840000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF00E7000000E700FF00 + E7000000E7000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 0000FF00E70000000000FF00E7000000000000000000FF00E70000000000FF00 + E70000000000000000000000000000000000FF00E70000000000000000000000 + 0000000000000000000000000000000000008400000000000000000000000000 + 0000FF00E70000000000FF00E700FF00E700FF00E70000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000FF00E700FF00E700FF00E700FF00E700FF00E700FF00E7000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700840000000000000000000000000000000000 + 0000000000000000000000000000840000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000E700FF00E7000000 + E700FF00E7000000E700FF00E7000000E700FF00E7000000E700000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 0000FF00E70000000000FF00E7000000000000000000FF00E70000000000FF00 + E70000000000000000000000000000000000FF00E70000000000000000000000 + 0000000000000000000000000000000000008400000000000000000000000000 + 000000000000FF00E700FF00E700FF00E700FF00E700FF00E700000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000084000000FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700840000000000000000000000000000000000 + 0000000000000000000000000000840000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF00E7000000E700FF00 + E7000000E700FF00E7000000E700FF00E7000000E700FF00E700000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 0000FF00E7008400000000000000FF00E700FF00E7000000000084000000FF00 + E70000000000000000000000000000000000FF00E70000000000000000000000 + 0000000000000000000000000000000000008400000000000000000000000000 + 0000FF00E70000000000FF00E700FF00E700FF00E70000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000084000000840000008400 + 00008400000000000000FF00E700FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000E700FF00E7000000 + E700000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 00000000E7000000E70084000000000000000000000084000000FF00E7000000 + 000000000000000000000000000000000000FF00E70000000000000000000000 + 0000000000000000000000000000000000008400000000000000000000000000 + 000000000000FF00E70000000000FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000E7000000E700FF00E700FF00 + E70084000000FF00000084000000840000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700000000000000E7000000 + E7000000E700FF00E700FF00E700FF00E700FF00E700FF00E70000000000FF00 + E70000000000FF00E70000000000FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000008400000000000000000000000000 + 0000FF00E7000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000840000008400000084000000FF00 + 0000840000000000E7000000E700000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E7000000E7000000E7000000 + E700FF00E700FF00000000000000000000000000000000000000000000000000 + 0000FF00E70000000000FF00E700FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000008400000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000B50000000000 + 0000000000000000E70000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF00E7000000E700FF00 + E700FF00E700FF0000000000000000000000000000000000000000000000FF00 + E70000000000FF00E700FF00E700000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000084000000000000008400 + 00000000000000000000000000000000000000000000FF000000FF000000FF00 + 0000FF000000FF00000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 0000FF00E7008400000000000000FF00E700FF00E7000000000084000000FF00 + E70000000000000000000000000000000000FF00E70000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000084000000FF00 + 000084000000FF00000084000000840000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FF00E700FF00 + E700FF0000000000000000000000000000000000000000000000000000000000 + 0000FF00E700FF00E70000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008400 + 000084000000FF0000008400000084000000FF00000084000000FF0000008400 + 0000FF0000008400000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 0000FF00E70000000000FF00E7000000000000000000FF00E70000000000FF00 + E70000000000000000000000000000000000FF00E70000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FF000000FF00 + 0000FF000000FF000000FF000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FF00 + E700FF00E700FF0000000000000000000000000000000000000000000000FF00 + E700FF00E7000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008400 + 0000840000008400000084000000840000008400000084000000840000008400 + 0000840000008400000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 0000FF00E70000000000FF00E7000000000000000000FF00E70000000000FF00 + E70000000000000000000000000000000000FF00E70000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000E7000000E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000FF00E700FF00E700FF00E700FF00E700FF00E700FF00E7000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000084000000000000008400 + 0000840000000000000084000000840000000000000084000000000000008400 + 0000000000008400000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 0000FF00E7008400000000000000FF00E700FF00E7000000000084000000FF00 + E70000000000000000000000000000000000FF00E70000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000000E7000000 + E7000000E7000000E7000000E7000000E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000840000008400 + 0000000000008400000000000000000000008400000000000000840000000000 + 0000840000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FF00E7000000000000000000000000000000 + 00000000E7000000E70084000000000000000000000084000000FF00E7000000 + 000000000000000000000000000000000000FF00E70000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000000E7000000 + E7000000E7000000E7000000E700FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000840000008400000084000000FF00 + E700000000000000000084000000840000000000000084000000000000008400 + 0000000000008400000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700000000000000E7000000 + E7000000E700FF00E700FF00E700FF00E700FF00E700FF00E70000000000FF00 + E70000000000FF00E70000000000FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + E7000000E700FF00E700FF00E700FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000840000000000000000000000FF00 + E700FF00E7000000000000000000000000008400000000000000840000000000 + 0000840000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E7000000E7000000E7000000 + E700FF00E700FF00000000000000000000000000000000000000000000000000 + 0000FF00E70000000000FF00E700FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FF00 + E700FF00E700FF00E700FF00E700000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008400000000000000FF00E7000000 + 0000FF00E700FF00E70000000000840000000000000084000000000000008400 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FF00E7000000E700FF00 + E700FF00E700FF0000000000000000000000000000000000000000000000FF00 + E70000000000FF00E700FF00E700000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000FF00E7000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E7000000000084000000FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E70000000000FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E70000000000FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E70000000000FF00E700FF00E700FF00E700FF00E70000000000FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E70000000000FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E70000000000FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E70000000000FF00E700FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E70000000000FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E70000000000FF00E7000000E7000000E7000000 + E700FF00E700FF000000FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E70000000000FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E70000000000FF00E700000000000000E7000000 + E7000000E700FF00E700FF00E700FF00E7000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E7000000 + 000000000000FF00E700FF00E700FF00E700FF00E700FF00E700FF00E7000000 + 000000000000FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00E700FF00 + E700FF00E700FF00E700FF00E700FF00E700FF00E7000000000000000000FF00 + E700FF00E700FF000000FF00E700FF00E700424D3E000000000000003E000000 + 2800000080000000200000000100010000000000000200000000000000000000 + 000000000000000000000000FFFFFF00FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00 + FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00 + FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00 + FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00FFFFFFFFFFF81FFFFFFFFF00FFFFFF00 + FFFFFFFFFFE007FFFFFFFF00FFFFFF00FFFFFFFFFF87C1FFFFFFFF00FFFFFF00 + FFFFFFFFFF4FE2FFFFFFFF00FFFFFF00FF001FFFFF17C0FFFFFFFF00FFFFFF00 + FF000FFFFE2FC07FFFFFFF00FFFFFF00FF0007FFFE54007FFFFFFF00FFFFFF00 + FF0003FFFCF8023FFFFFFF00FFFFFF00FF0001FFFCF00F3FFFFFFF00FFFFFF00 + FF0000FFFCF18F3FFFFFFF00FFFFFF00FF001FFFFCF18F3FFFFFFF00FFFFFF00 + FF001FFFFCF00F3FFFFFFF00FFFFFF00FF001FFFFC401F3FFFFFFF00FFFFFF00 + FF8FF1FFFE002A7FFFFFFF00FFFFFF00FFFFF9FFFE03F47FFFFFFF00FFFFFF00 + FFFF75FFFF03E8FFFFFFFF00FFFFFF00FFFF8FFFFF47F2FFFFFFFF00FFFFFF00 + FFFFFFFFFF83E1FFFFFFFF00FFFFFF00FFFFFFFFFFE007FFFFFFFF00FFFFFF00 + FFFFFFFFFFF81FFFFFFFFF00FFFFFF00FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00 + FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00 + FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00FFFFFFFFFFFFFFFFFFFFFF00FFFFFF00 + FFFFFFFFFFFFFFFF00000000FFFFFF0000000000000000000000000000000000 + 000000000000} + end + object PopupMenuMain: TPopupMenu + AutoPopup = False + Left = 72 + Top = 176 + object PopupClose: TMenuItem + Caption = '&Close this popup' + OnClick = PopupCloseClick + end + object N9: TMenuItem + Caption = '-' + end + object PopupPlay: TMenuItem + Caption = '&Play' + OnClick = PopupPlayClick + end + object PopupPause: TMenuItem + Caption = 'Pause' + OnClick = PopupPauseClick + end + object PopupStop: TMenuItem + Caption = 'Stop' + OnClick = PopupStopClick + end + object PopupBack: TMenuItem + Caption = 'Back' + OnClick = PopupBackClick + end + object PopupSlow: TMenuItem + Caption = 'Slow' + OnClick = PopupSlowClick + end + object PopupFast: TMenuItem + Caption = 'Fast' + OnClick = PopupFastClick + end + object N5: TMenuItem + Caption = '-' + end + object PopupToggleInterface: TMenuItem + Caption = 'Toggle &Interface' + OnClick = PopupToggleInterfaceClick + end + object PopupFullscreen: TMenuItem + Caption = '&Fullscreen' + OnClick = PopupFullscreenClick + end + object N6: TMenuItem + Caption = '-' + end + object PopupNext: TMenuItem + Caption = 'Next' + OnClick = PopupNextClick + end + object PopupPrev: TMenuItem + Caption = 'Prev' + OnClick = PopupPrevClick + end + object PopupJump: TMenuItem + Caption = '&Jump...' + OnClick = PopupJumpClick + end + object PopupProgram: TMenuItem + Caption = 'Program' + end + object PopupNavigation: TMenuItem + Caption = 'Navigation' + end + object PopupAudio: TMenuItem + Caption = 'Audio' + end + object PopupSubtitles: TMenuItem + Caption = 'Subtitles' + end + object PopupFile: TMenuItem + Caption = 'File' + object PopupOpenFile: TMenuItem + Caption = 'Open file...' + OnClick = PopupOpenFileClick + end + object PopupOpenDisc: TMenuItem + Caption = 'Open disc...' + OnClick = PopupOpenDiscClick + end + object PopupNetworkStream: TMenuItem + Caption = 'Network stream...' + OnClick = PopupNetworkStreamClick + end + end + object PopupPlaylist: TMenuItem + Caption = 'Playlist...' + OnClick = PopupPlaylistClick + end + object PopupPreferences: TMenuItem + Caption = 'Preferences...' + OnClick = PopupPreferencesClick + end + object N7: TMenuItem + Caption = '-' + end + object PopupExit: TMenuItem + Caption = 'E&xit' + OnClick = PopupExitClick + end + end + object TimerManage: TTimer + OnTimer = TimerManageTimer + Left = 136 + Top = 176 + end +end diff --git a/plugins/win32/mainframe.h b/plugins/win32/mainframe.h new file mode 100644 index 0000000000..04f537653e --- /dev/null +++ b/plugins/win32/mainframe.h @@ -0,0 +1,202 @@ +/***************************************************************************** + * mainframe.h: Prototype for main window + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + + +#ifndef mainframeH +#define mainframeH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TMainFrameDlg : public TForm +{ +__published: // IDE-managed Components + TToolBar *ToolBar1; + TToolButton *ToolButtonFile; + TToolButton *ToolButtonDisc; + TToolButton *ToolButtonNet; + TToolButton *ToolButtonSep1; + TToolButton *ToolButtonBack; + TToolButton *ToolButtonStop; + TToolButton *ToolButtonPlay; + TToolButton *ToolButtonPause; + TToolButton *ToolButtonSlow; + TToolButton *ToolButtonFast; + TToolButton *ToolButtonSep2; + TToolButton *ToolButtonPlaylist; + TToolButton *ToolButtonPrev; + TToolButton *ToolButtonNext; + TMainMenu *MainMenu1; + TMenuItem *MenuFile; + TMenuItem *MenuOpenFile; + TMenuItem *MenuOpenDisc; + TMenuItem *MenuNetworkStream; + TMenuItem *N1; + TMenuItem *MenuExit; + TMenuItem *MenuView; + TMenuItem *MenuHideinterface; + TMenuItem *MenuFullscreen; + TMenuItem *N2; + TMenuItem *MenuTitle; + TMenuItem *MenuChapter; + TMenuItem *MenuAngle; + TMenuItem *N3; + TMenuItem *MenuPlaylist; + TMenuItem *MenuModules; + TMenuItem *MenuMessages; + TMenuItem *MenuSettings; + TMenuItem *MenuAudio; + TMenuItem *MenuSubtitles; + TMenuItem *N4; + TMenuItem *MenuPreferences; + TMenuItem *MenuHelp; + TMenuItem *MenuAbout; + TOpenDialog *OpenDialog1; + TImageList *ImageListToolbar; + TPopupMenu *PopupMenuMain; + TMenuItem *PopupPlay; + TMenuItem *PopupPause; + TMenuItem *PopupStop; + TMenuItem *PopupBack; + TMenuItem *PopupSlow; + TMenuItem *PopupFast; + TMenuItem *N5; + TMenuItem *PopupToggleInterface; + TMenuItem *PopupFullscreen; + TMenuItem *N6; + TMenuItem *PopupNext; + TMenuItem *PopupPrev; + TMenuItem *PopupJump; + TMenuItem *PopupNavigation; + TMenuItem *PopupProgram; + TMenuItem *PopupAudio; + TMenuItem *PopupSubtitles; + TMenuItem *PopupFile; + TMenuItem *PopupPlaylist; + TMenuItem *PopupPreferences; + TMenuItem *N7; + TMenuItem *PopupExit; + TToolButton *ToolButtonEject; + TStatusBar *StatusBar; + TGroupBox *GroupBoxFile; + TLabel *LabelFileName; + TGroupBox *GroupBoxNetwork; + TEdit *EditChannel; + TUpDown *UpDownChannel; + TLabel *LabelChannel; + TLabel *LabelServer; + TGroupBox *GroupBoxDisc; + TMenuItem *N8; + TMenuItem *MenuEjectDisc; + TMenuItem *MenuProgram; + TLabel *LabelDisc; + TLabel *LabelTitle; + TButton *ButtonTitlePrev; + TButton *ButtonTitleNext; + TButton *ButtonChapterPrev; + TButton *ButtonChapterNext; + TLabel *LabelChapter; + TLabel *LabelTitleCurrent; + TLabel *LabelChapterCurrent; + TButton *ButtonGo; + TGroupBox *GroupBoxSlider; + TTrackBar *TrackBar; + TTimer *TimerManage; + TMenuItem *PopupOpenFile; + TMenuItem *PopupOpenDisc; + TMenuItem *PopupNetworkStream; + TMenuItem *PopupClose; + TMenuItem *N9; + void __fastcall TimerManageTimer( TObject *Sender ); + void __fastcall TrackBarChange( TObject *Sender ); + void __fastcall FormClose( TObject *Sender, TCloseAction &Action ); + void __fastcall MenuOpenFileClick( TObject *Sender ); + void __fastcall MenuOpenDiscClick( TObject *Sender ); + void __fastcall MenuNetworkStreamClick( TObject *Sender ); + void __fastcall MenuExitClick( TObject *Sender ); + void __fastcall MenuFullscreenClick( TObject *Sender ); + void __fastcall MenuPlaylistClick( TObject *Sender ); + void __fastcall MenuMessagesClick( TObject *Sender ); + void __fastcall MenuPreferencesClick( TObject *Sender ); + void __fastcall MenuAboutClick( TObject *Sender ); + void __fastcall ToolButtonFileClick( TObject *Sender ); + void __fastcall ToolButtonDiscClick( TObject *Sender ); + void __fastcall ToolButtonNetClick( TObject *Sender ); + void __fastcall ToolButtonPlaylistClick( TObject *Sender ); + void __fastcall ToolButtonBackClick( TObject *Sender ); + void __fastcall ToolButtonStopClick( TObject *Sender ); + void __fastcall ToolButtonPlayClick( TObject *Sender ); + void __fastcall ToolButtonPauseClick( TObject *Sender ); + void __fastcall ToolButtonSlowClick( TObject *Sender ); + void __fastcall ToolButtonFastClick( TObject *Sender ); + void __fastcall ToolButtonPrevClick( TObject *Sender ); + void __fastcall ToolButtonNextClick( TObject *Sender ); + void __fastcall ToolButtonEjectClick( TObject *Sender ); + void __fastcall PopupCloseClick( TObject *Sender ); + void __fastcall PopupPlayClick( TObject *Sender ); + void __fastcall PopupPauseClick( TObject *Sender ); + void __fastcall PopupStopClick( TObject *Sender ); + void __fastcall PopupBackClick( TObject *Sender ); + void __fastcall PopupSlowClick( TObject *Sender ); + void __fastcall PopupFastClick( TObject *Sender ); + void __fastcall PopupToggleInterfaceClick( TObject *Sender ); + void __fastcall PopupFullscreenClick( TObject *Sender ); + void __fastcall PopupNextClick( TObject *Sender ); + void __fastcall PopupPrevClick( TObject *Sender ); + void __fastcall PopupJumpClick( TObject *Sender ); + void __fastcall PopupPlaylistClick( TObject *Sender ); + void __fastcall PopupPreferencesClick( TObject *Sender ); + void __fastcall PopupExitClick( TObject *Sender ); + void __fastcall PopupOpenFileClick( TObject *Sender ); + void __fastcall PopupOpenDiscClick( TObject *Sender ); + void __fastcall PopupNetworkStreamClick( TObject *Sender ); + void __fastcall ButtonTitlePrevClick( TObject *Sender ); + void __fastcall ButtonTitleNextClick( TObject *Sender ); + void __fastcall ButtonChapterPrevClick( TObject *Sender ); + void __fastcall ButtonChapterNextClick( TObject *Sender ); + void __fastcall ButtonGoClick( TObject *Sender ); +private: // User declarations +public: // User declarations + __fastcall TMainFrameDlg( TComponent* Owner ); + void __fastcall DisplayHint( TObject *Sender ); + void __fastcall ModeManage(); + void __fastcall MenuProgramClick( TObject *Sender ); + void __fastcall MenuAudioClick( TObject *Sender ); + void __fastcall MenuSubtitleClick( TObject *Sender ); + void __fastcall MenuTitleClick( TObject *Sender ); + void __fastcall MenuChapterClick( TObject *Sender ); + void __fastcall PopupProgramClick( TObject *Sender ); + void __fastcall PopupAudioClick( TObject *Sender ); + void __fastcall PopupSubtitleClick( TObject *Sender ); + void __fastcall PopupNavigationClick( TObject *Sender ); +}; +//--------------------------------------------------------------------------- +#endif diff --git a/plugins/win32/menu.cpp b/plugins/win32/menu.cpp new file mode 100644 index 0000000000..c2f514f956 --- /dev/null +++ b/plugins/win32/menu.cpp @@ -0,0 +1,815 @@ +/***************************************************************************** + * menu.cpp: functions to handle menu items + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#include +//#pragma hdrstop + +#include + +#include "stream_control.h" +#include "input_ext-intf.h" + +#include "interface.h" +#include "intf_playlist.h" + +#include "menu.h" +#include "win32_common.h" + + +/**************************************************************************** + * Local Prototypes + ****************************************************************************/ +extern struct intf_thread_s *p_intfGlobal; + +static TMenuItem *Index2Item( TMenuItem *, int, bool ); +static int Item2Index( TMenuItem *, TMenuItem * ); +static void __fastcall LangChange( TMenuItem *, TMenuItem *, TMenuItem *, int ); +static void __fastcall ProgramChange( TMenuItem *, TMenuItem * ); + +static void __fastcall RadioMenu( TMenuItem *, AnsiString, + int, int, TNotifyEvent ); +static void __fastcall ProgramMenu( TMenuItem *, pgrm_descriptor_t *, + TNotifyEvent ); +static void __fastcall LanguageMenu( TMenuItem *t, es_descriptor_t *, + int, TNotifyEvent ); +static void __fastcall NavigationMenu( TMenuItem *, TNotifyEvent ); + + +static TMenuItem *Index2Item( TMenuItem *Root, int i_index, bool SingleColumn ) +{ + if( SingleColumn || ( i_index < 20 ) ) + { + return Root->Items[i_index]; + } + else + { + return Root->Items[i_index / 10]->Items[i_index % 10]; + } +} + +static int Item2Index( TMenuItem *Root, TMenuItem *Item ) +{ + if( Item->Parent == Root ) + { + return Item->MenuIndex; + } + else + { + return( 10 * Item->Parent->MenuIndex + Item->MenuIndex ); + } +} + + +/**************************************************************************** + * LangChange: change audio or subtitles languages + **************************************************************************** + * Toggle the language, and update the selected menuitems. + ****************************************************************************/ +static void __fastcall LangChange( TMenuItem *RootCurrent, TMenuItem *Item, + TMenuItem *RootOther, int i_cat ) +{ + intf_thread_t * p_intf = p_intfGlobal; + es_descriptor_t * p_es; + es_descriptor_t * p_es_old; + int i_index; + + /* find the selected ES */ + i_index = Item2Index( RootCurrent, Item ) - 1; + if( i_index < 0 ) + { + /* 'None' was selected */ + p_es = NULL; + } + else + { + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + p_es = p_input_bank->pp_input[0]->stream.pp_es[i_index]; + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + } + + /* find the current ES */ + if( i_cat == AUDIO_ES ) + { + p_es_old = p_intf->p_sys->p_audio_es_old; + p_intf->p_sys->p_audio_es_old = p_es; + } + else + { + p_es_old = p_intf->p_sys->p_spu_es_old; + p_intf->p_sys->p_spu_es_old = p_es; + } + + /* exchange them */ + input_ToggleES( p_input_bank->pp_input[0], p_es_old, false ); + input_ToggleES( p_input_bank->pp_input[0], p_es, true ); + + Item->Checked = true; + Index2Item( RootOther, i_index + 1, true )->Checked = true; +} + + +/**************************************************************************** + * ProgramChange: change the program + **************************************************************************** + * Toggle the program, and update the selected menuitems. + ****************************************************************************/ +static void __fastcall ProgramChange( TMenuItem *Item, TMenuItem *RootOther ) +{ + intf_thread_t * p_intf = p_intfGlobal; + int i_program = Item->Tag; + + /* toggle the program */ + input_ChangeProgram( p_input_bank->pp_input[0], (u16)i_program ); + + /* check selected menu items */ + Item->Checked = true; + Index2Item( RootOther, i_program - 1, true )->Checked = true; + + /* update audio/subtitles menus */ + p_intf->p_sys->b_audio_update = 1; + p_intf->p_sys->b_spu_update = 1; + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + SetupMenus( p_intf ); + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + p_intf->p_sys->b_audio_update = 0; + p_intf->p_sys->b_spu_update = 0; + + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); +} + + +/**************************************************************************** + * TMainFrameDlg::*Click: callbacks for the menuitems + **************************************************************************** + * These functions need to be in a class, or we won't be able to pass them + * as arguments (since TNotifyEvent uses __closure) + ****************************************************************************/ + + /* + * Audio + */ + +void __fastcall TMainFrameDlg::MenuAudioClick( TObject *Sender ) +{ + LangChange( MenuAudio, (TMenuItem *)Sender, PopupAudio, AUDIO_ES ); +} + +void __fastcall TMainFrameDlg::PopupAudioClick( TObject *Sender ) +{ + LangChange( PopupAudio, (TMenuItem *)Sender, MenuAudio, AUDIO_ES ); +} + +/* + * Subtitles + */ + +void __fastcall TMainFrameDlg::MenuSubtitleClick( TObject *Sender ) +{ + LangChange( MenuSubtitles, (TMenuItem *)Sender, PopupSubtitles, SPU_ES ); +} + +void __fastcall TMainFrameDlg::PopupSubtitleClick( TObject *Sender ) +{ + LangChange( PopupSubtitles, (TMenuItem *)Sender, MenuSubtitles, SPU_ES ); +} + +/* + * Program + */ + +void __fastcall TMainFrameDlg::MenuProgramClick( TObject *Sender ) +{ + ProgramChange( (TMenuItem *)Sender, PopupProgram ); +} + +void __fastcall TMainFrameDlg::PopupProgramClick( TObject *Sender ) +{ + ProgramChange( (TMenuItem *)Sender, MenuProgram ); +} + +/* + * Navigation + */ + +void __fastcall TMainFrameDlg::PopupNavigationClick( TObject *Sender ) +{ + TMenuItem * Item = (TMenuItem *)Sender; + TMenuItem * ItemTitle; + input_area_t * p_area; + int i_title = DATA2TITLE( Item->Tag ); + int i_chapter = DATA2CHAPTER( Item->Tag ); + + p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_title]; + p_area->i_part = i_chapter; + + input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + + Item->Checked = true; + ItemTitle = Index2Item( MenuTitle, i_title - 1, false ); + if( ItemTitle->Checked ) + { + /* same title, new chapter */ + Index2Item( MenuChapter, i_chapter - 1, false )->Checked = true; + } + else + { + /* new title => we must rebuild the chapter menu */ + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + RadioMenu( MenuChapter, "Chapter", + p_input_bank->pp_input[0]->stream.p_selected_area->i_part_nb, + i_chapter, MenuChapterClick ); + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + } + + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); +} + +/* + * Title + */ + +void __fastcall TMainFrameDlg::MenuTitleClick( TObject *Sender ) +{ + TMenuItem * Item = (TMenuItem *)Sender; + TMenuItem * ItemTitle; + int i_title = Item->Tag; + + input_ChangeArea( p_input_bank->pp_input[0], + p_input_bank->pp_input[0]->stream.pp_areas[i_title] ); + Item->Checked = true; + ItemTitle = Index2Item( PopupNavigation, i_title - 1, false ); + Index2Item( ItemTitle, 0, false )->Checked = true; + + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); +} + +/* + * Chapter + */ + +void __fastcall TMainFrameDlg::MenuChapterClick( TObject *Sender ) +{ + TMenuItem * Item = (TMenuItem *)Sender; + TMenuItem * ItemTitle; + input_area_t * p_area; + int i_title; + int i_chapter = Item->Tag; + + p_area = p_input_bank->pp_input[0]->stream.p_selected_area; + p_area->i_part = i_chapter; + + input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); + + i_title = p_input_bank->pp_input[0]->stream.p_selected_area->i_id; + ItemTitle = Index2Item( PopupNavigation, i_title - 1, false ); + Index2Item( ItemTitle, i_chapter - 1, false )->Checked = true; + + input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); +} + + +/**************************************************************************** + * Functions to generate menus + ****************************************************************************/ + +/***************************************************************************** + * RadioMenu: update interactive menus of the interface + ***************************************************************************** + * Sets up menus with information from input + * Warning: since this function is designed to be called by management + * function, the interface lock has to be taken + *****************************************************************************/ +static void __fastcall RadioMenu( TMenuItem * Root, AnsiString ItemName, + int i_nb, int i_selected, + TNotifyEvent MenuItemClick ) +{ + TMenuItem * ItemGroup; + TMenuItem * Item; + TMenuItem * ItemActive; + AnsiString Name; + int i_item; + + /* remove previous menu */ + Root->Enabled = false; + Root->Clear(); + + ItemActive = NULL; + + for( i_item = 0; i_item < i_nb; i_item++ ) + { + /* we group titles/chapters in packets of ten for small screens */ + if( ( i_item % 10 == 0 ) && ( i_nb > 20 ) ) + { + if( i_item != 0 ) + { + Root->Add( ItemGroup ); + } + + Name.sprintf( "%ss %d to %d", ItemName, i_item + 1, i_item + 10 ); + ItemGroup = new TMenuItem( Root ); + ItemGroup->Hint = Name; + + /* set the accelerator character */ + Name.Insert( "&", Name.Length() - 1 ); + ItemGroup->Caption = Name; + } + + Name.sprintf( "%s %d", ItemName, i_item + 1 ); + Item = new TMenuItem( Root ); + Item->RadioItem = true; + Item->Hint = Name; + + /* set the accelerator character */ + Name.Insert( "&", Name.Length() ); + Item->Caption = Name; + + /* FIXME: temporary hack to save i_item with the Item + * It will be used in the callback. */ + Item->Tag = i_item + 1; + + if( i_selected == i_item + 1 ) + { + ItemActive = Item; + } + + /* setup signal handling */ + Item->OnClick = MenuItemClick; + + if( i_nb > 20 ) + { + ItemGroup->Add( Item ); + } + else + { + Root->Add( Item ); + } + } + +// if( ( i_nb > 20 ) && ( i_item % 10 ) ) ? + if( i_nb > 20 ) + { + Root->Add( ItemGroup ); + } + + /* check currently selected chapter */ + if( ItemActive != NULL ) + { + ItemActive->Checked = true; + } + + /* be sure that menu is enabled, if there are several items */ + if( i_nb > 1 ) + { + Root->Enabled = true; + } +} + + +/***************************************************************************** + * ProgramMenu: update the programs menu of the interface + ***************************************************************************** + * Builds the program menu according to what have been found in the PAT + * by the input. Useful for multi-programs streams such as DVB ones. + *****************************************************************************/ +static void __fastcall ProgramMenu( TMenuItem * Root, + pgrm_descriptor_t * p_pgrm, + TNotifyEvent MenuItemClick ) +{ + TMenuItem * Item; + TMenuItem * ItemActive; + AnsiString Name; + int i; + + /* remove previous menu */ + Root->Clear(); + Root->Enabled = false; + + ItemActive = NULL; + + /* create a set of program buttons and append them to the container */ + for( i = 0; i < p_input_bank->pp_input[0]->stream.i_pgrm_number; i++ ) + { + Name.sprintf( "id %d", + p_input_bank->pp_input[0]->stream.pp_programs[i]->i_number ); + + Item = new TMenuItem( Root ); + Item->Caption = Name; + Item->Hint = Name; + Item->RadioItem = true; + Item->OnClick = MenuItemClick; + + /* FIXME: temporary hack to save the program id with the Item + * It will be used in the callback. */ + Item->Tag = i + 1; + + if( p_pgrm == p_input_bank->pp_input[0]->stream.pp_programs[i] ) + { + /* don't lose Item when we append into menu */ + ItemActive = Item; + } + + /* Add the item to the submenu */ + Root->Add( Item ); + } + + /* check currently selected program */ + if( ItemActive != NULL ) + { + ItemActive->Checked = true; + } + + /* be sure that menu is enabled if more than 1 program */ + if( p_input_bank->pp_input[0]->stream.i_pgrm_number > 1 ) + { + Root->Enabled = true; + } +} + + +/***************************************************************************** + * LanguageMenus: update interactive menus of the interface + ***************************************************************************** + * Sets up menus with information from input: + * - languages + * - sub-pictures + * Warning: since this function is designed to be called by management + * function, the interface lock has to be taken + *****************************************************************************/ +static void __fastcall LanguageMenu( TMenuItem * Root, es_descriptor_t * p_es, + int i_cat, TNotifyEvent MenuItemClick ) +{ + TMenuItem * Separator; + TMenuItem * Item; + TMenuItem * ItemActive; + AnsiString Name; + int i_item; + int i; + + /* remove previous menu */ + Root->Clear(); + Root->Enabled = false; + + /* special case for "off" item */ + Name = "None"; + Item = new TMenuItem( Root ); + Item->RadioItem = true; + Item->Hint = Name; + Item->Caption = Name; + Item->OnClick = MenuItemClick; + Root->Add( Item ); + + /* separator item */ + Separator = new TMenuItem( Root ); + Separator->Caption = "-"; + Root->Add( Separator ); + + ItemActive = NULL; + i_item = 0; + + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + +#define ES p_input_bank->pp_input[0]->stream.pp_es[i] + /* create a set of language buttons and append them to the Root */ + for( i = 0; i < p_input_bank->pp_input[0]->stream.i_es_number; i++ ) + { + if( ( ES->i_cat == i_cat ) && + ( !ES->p_pgrm || + ES->p_pgrm == + p_input_bank->pp_input[0]->stream.p_selected_program ) ) + { + i_item++; + Name = p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc; + if( Name.IsEmpty() ) + { + Name.sprintf( "Language %d", i_item ); + } + + Item = new TMenuItem( Root ); + Item->RadioItem = true; + Item->Hint = Name; + Item->Caption = Name; + + if( p_es == p_input_bank->pp_input[0]->stream.pp_es[i] ) + { + /* don't lose Item when we append into menu */ + ItemActive = Item; + } + + /* setup signal hanling */ + Item->OnClick = MenuItemClick; + Root->Add( Item ); + } + } +#undef ES + + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + + /* check currently selected item */ + if( ItemActive != NULL ) + { + ItemActive->Checked = true; + } + + /* be sure that menu is enabled if non empty */ + if( i_item > 0 ) + { + Root->Enabled = true; + } +} + + +/***************************************************************************** + * NavigationMenu: sets menus for titles and chapters selection + ***************************************************************************** + * Generates two types of menus: + * -simple list of titles + * -cascaded lists of chapters for each title + *****************************************************************************/ +static void __fastcall NavigationMenu( TMenuItem * Root, + TNotifyEvent MenuItemClick ) +{ + TMenuItem * TitleGroup; + TMenuItem * TitleItem; + TMenuItem * ItemActive; + TMenuItem * ChapterGroup; + TMenuItem * ChapterItem; + AnsiString Name; + int i_title; + int i_chapter; + int i_title_nb; + int i_chapter_nb; + + + /* remove previous menu */ + Root->Enabled = false; + Root->Clear(); + + ItemActive = NULL; + i_title_nb = p_input_bank->pp_input[0]->stream.i_area_nb; + + /* loop on titles */ + for( i_title = 1; i_title < i_title_nb; i_title++ ) + { + /* we group titles in packets of ten for small screens */ + if( ( i_title % 10 == 1 ) && ( i_title_nb > 20 ) ) + { + if( i_title != 1 ) + { + Root->Add( TitleGroup ); + } + + Name.sprintf( "%d - %d", i_title, i_title + 9 ); + TitleGroup = new TMenuItem( Root ); + TitleGroup->RadioItem = true; + TitleGroup->Hint = Name; + TitleGroup->Caption = Name; + } + + Name.sprintf( "Title %d (%d)", i_title, + p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb ); + + { + TitleItem = new TMenuItem( Root ); + TitleItem->RadioItem = true; + TitleItem->Hint = Name; + TitleItem->Caption = Name; + + i_chapter_nb = + p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb; + + /* loop on chapters */ + for( i_chapter = 0; i_chapter < i_chapter_nb; i_chapter++ ) + { + /* we group chapters in packets of ten for small screens */ + if( ( i_chapter % 10 == 0 ) && ( i_chapter_nb > 20 ) ) + { + if( i_chapter != 0 ) + { + TitleItem->Add( ChapterGroup ); + } + + Name.sprintf( "%d - %d", i_chapter + 1, i_chapter + 10 ); + ChapterGroup = new TMenuItem( TitleItem ); + ChapterGroup->RadioItem = true; + ChapterGroup->Hint = Name; + ChapterGroup->Caption = Name; + } + + Name.sprintf( "Chapter %d", i_chapter + 1 ); + + ChapterItem = new TMenuItem( TitleItem ); + ChapterItem->RadioItem = true; + ChapterItem->Hint = Name; + ChapterItem->Caption = Name; + + /* FIXME: temporary hack to save i_title and i_chapter with + * ChapterItem, since we will need them in the callback */ + ChapterItem->Tag = (int)POS2DATA( i_title, i_chapter + 1 ); + +#define p_area p_input_bank->pp_input[0]->stream.pp_areas[i_title] + if( ( p_area == + p_input_bank->pp_input[0]->stream.p_selected_area ) && + ( p_area->i_part == i_chapter + 1 ) ) + { + ItemActive = ChapterItem; + } +#undef p_area + + /* setup signal hanling */ + ChapterItem->OnClick = MenuItemClick; + + if( i_chapter_nb > 20 ) + { + ChapterGroup->Add( ChapterItem ); + } + else + { + TitleItem->Add( ChapterItem ); + } + } + + if( i_chapter_nb > 20 ) + { + TitleItem->Add( ChapterGroup ); + } + + if( p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb + > 1 ) + { + /* be sure that menu is sensitive */ + Root->Enabled = true; + } + } + + if( i_title_nb > 20 ) + { + TitleGroup->Add( TitleItem ); + } + else + { + Root->Add( TitleItem ); + } + } + + if( i_title_nb > 20 ) + { + Root->Add( TitleGroup ); + } + + /* Default selected chapter */ + if( ItemActive != NULL ) + { + ItemActive->Checked = true; + } + + /* be sure that menu is sensitive */ + Root->Enabled = true; +} + + +/***************************************************************************** + * SetupMenus: function that generates title/chapter/audio/subpic + * menus with help from preceding functions + *****************************************************************************/ +int __fastcall SetupMenus( intf_thread_t * p_intf ) +{ + TMainFrameDlg * p_window = p_intf->p_sys->p_window; + es_descriptor_t * p_audio_es; + es_descriptor_t * p_spu_es; + int i; + + p_intf->p_sys->b_chapter_update |= p_intf->p_sys->b_title_update; + p_intf->p_sys->b_audio_update |= p_intf->p_sys->b_title_update | + p_intf->p_sys->b_program_update; + p_intf->p_sys->b_spu_update |= p_intf->p_sys->b_title_update | + p_intf->p_sys->b_program_update; + + if( p_intf->p_sys->b_program_update ) + { + pgrm_descriptor_t * p_pgrm; + + if( p_input_bank->pp_input[0]->stream.p_new_program ) + { + p_pgrm = p_input_bank->pp_input[0]->stream.p_new_program; + } + else + { + p_pgrm = p_input_bank->pp_input[0]->stream.p_selected_program; + } + + ProgramMenu( p_window->MenuProgram, p_pgrm, + p_window->MenuProgramClick ); + ProgramMenu( p_window->PopupProgram, p_pgrm, + p_window->PopupProgramClick ); + + p_intf->p_sys->b_program_update = 0; + } + + if( p_intf->p_sys->b_title_update ) + { + RadioMenu( p_window->MenuTitle, "Title", +//why "-1" ? + p_input_bank->pp_input[0]->stream.i_area_nb - 1, + p_input_bank->pp_input[0]->stream.p_selected_area->i_id, + p_window->MenuTitleClick ); + + AnsiString CurrentTitle; + CurrentTitle.sprintf( "%d", + p_input_bank->pp_input[0]->stream.p_selected_area->i_id ); + p_window->LabelTitleCurrent->Caption = CurrentTitle; + + p_intf->p_sys->b_title_update = 0; + } + + if( p_intf->p_sys->b_chapter_update ) + { + RadioMenu( p_window->MenuChapter, "Chapter", + p_input_bank->pp_input[0]->stream.p_selected_area->i_part_nb, + p_input_bank->pp_input[0]->stream.p_selected_area->i_part, + p_window->MenuChapterClick ); + + NavigationMenu( p_window->PopupNavigation, + p_window->PopupNavigationClick ); + + AnsiString CurrentChapter; + CurrentChapter.sprintf( "%d", + p_input_bank->pp_input[0]->stream.p_selected_area->i_part ); + p_window->LabelChapterCurrent->Caption = CurrentChapter; + + p_intf->p_sys->i_part = + p_input_bank->pp_input[0]->stream.p_selected_area->i_part; + + p_intf->p_sys->b_chapter_update = 0; + } + + /* look for selected ES */ + p_audio_es = NULL; + p_spu_es = NULL; + + for( i = 0; i < p_input_bank->pp_input[0]->stream.i_selected_es_number; i++ ) + { + if( p_input_bank->pp_input[0]->stream.pp_selected_es[i]->i_cat + == AUDIO_ES ) + { + p_audio_es = p_input_bank->pp_input[0]->stream.pp_selected_es[i]; + p_intfGlobal->p_sys->p_audio_es_old = p_audio_es; + } + + if( p_input_bank->pp_input[0]->stream.pp_selected_es[i]->i_cat + == SPU_ES ) + { + p_spu_es = p_input_bank->pp_input[0]->stream.pp_selected_es[i]; + p_intfGlobal->p_sys->p_spu_es_old = p_spu_es; + } + } + + vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); + + /* audio menus */ + if( p_intf->p_sys->b_audio_update ) + { + LanguageMenu( p_window->MenuAudio, p_audio_es, AUDIO_ES, + p_window->MenuAudioClick ); + LanguageMenu( p_window->PopupAudio, p_audio_es, AUDIO_ES, + p_window->PopupAudioClick ); + + p_intf->p_sys->b_audio_update = 0; + } + + /* sub picture menus */ + if( p_intf->p_sys->b_spu_update ) + { + LanguageMenu( p_window->PopupSubtitles, p_spu_es, SPU_ES, + p_window->PopupSubtitleClick ); + LanguageMenu( p_window->MenuSubtitles, p_spu_es, SPU_ES, + p_window->MenuSubtitleClick ); + + p_intf->p_sys->b_spu_update = 0; + } + + vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); + + return true; +} + + + diff --git a/plugins/win32/menu.h b/plugins/win32/menu.h new file mode 100644 index 0000000000..ef84a92769 --- /dev/null +++ b/plugins/win32/menu.h @@ -0,0 +1,34 @@ +/***************************************************************************** + * menu.h: prototypes for menu functions + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +struct intf_thread_s; + +int __fastcall SetupMenus( struct intf_thread_s * ); + +/***************************************************************************** + * Convert user_data structures to title and chapter information + *****************************************************************************/ +#define DATA2TITLE( data ) ( (int)((long)(data)) >> 16 ) +#define DATA2CHAPTER( data ) ( (int)((long)(data)) & 0xffff ) +#define POS2DATA( title, chapter ) ( NULL + ( ((title) << 16) \ + | ((chapter) & 0xffff)) ) + diff --git a/plugins/win32/messages.cpp b/plugins/win32/messages.cpp new file mode 100644 index 0000000000..29669154a0 --- /dev/null +++ b/plugins/win32/messages.cpp @@ -0,0 +1,99 @@ +/***************************************************************************** + * messages.cpp: log window. + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#include +#pragma hdrstop + +#include + +#include "interface.h" + +#include "win32_common.h" +#include "messages.h" + +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" + +extern struct intf_thread_s *p_intfGlobal; + +//--------------------------------------------------------------------------- +__fastcall TMessagesDlg::TMessagesDlg( TComponent* Owner ) + : TForm( Owner ) +{ + Icon = p_intfGlobal->p_sys->p_window->Icon; +} +//--------------------------------------------------------------------------- +void __fastcall TMessagesDlg::ButtonOKClick( TObject *Sender ) +{ + Hide(); +} +//--------------------------------------------------------------------------- +void __fastcall TMessagesDlg::FormHide( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuMessages->Checked = false; +} +//--------------------------------------------------------------------------- +void __fastcall TMessagesDlg::FormShow( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuMessages->Checked = true; +} +//--------------------------------------------------------------------------- +void __fastcall TMessagesDlg::UpdateLog() +{ + intf_subscription_t *p_sub = p_intfGlobal->p_sys->p_sub; + int i_start; + int i_stop; + + vlc_mutex_lock( p_sub->p_lock ); + i_stop = *p_sub->pi_stop; + vlc_mutex_unlock( p_sub->p_lock ); + + if( p_sub->i_start != i_stop ) + { + for( i_start = p_sub->i_start; + i_start != i_stop; + i_start = (i_start+1) % INTF_MSG_QSIZE ) + { + /* Append all messages to log window */ + switch( p_sub->p_msg[i_start].i_type ) + { + case INTF_MSG_ERR: + RichEditMessages->SelAttributes->Color = clRed; + break; + case INTF_MSG_WARN: + RichEditMessages->SelAttributes->Color = clBlack; + break; + default: + RichEditMessages->SelAttributes->Color = clBlue; + break; + } + + RichEditMessages->Lines->Add( p_sub->p_msg[i_start].psz_msg ); + } + + vlc_mutex_lock( p_sub->p_lock ); + p_sub->i_start = i_start; + vlc_mutex_unlock( p_sub->p_lock ); + } +} +//--------------------------------------------------------------------------- diff --git a/plugins/win32/messages.dfm b/plugins/win32/messages.dfm new file mode 100644 index 0000000000..5f9c13af9a --- /dev/null +++ b/plugins/win32/messages.dfm @@ -0,0 +1,40 @@ +object MessagesDlg: TMessagesDlg + Left = 325 + Top = 160 + Width = 440 + Height = 502 + Caption = 'Messages' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clPurple + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + OnHide = FormHide + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object RichEditMessages: TRichEdit + Left = 0 + Top = 0 + Width = 432 + Height = 424 + Align = alTop + Anchors = [akLeft, akTop, akRight, akBottom] + ReadOnly = True + ScrollBars = ssBoth + TabOrder = 0 + WantReturns = False + end + object ButtonOK: TButton + Left = 144 + Top = 437 + Width = 145 + Height = 25 + Anchors = [akBottom] + Caption = 'OK' + TabOrder = 1 + OnClick = ButtonOKClick + end +end diff --git a/plugins/win32/messages.h b/plugins/win32/messages.h new file mode 100644 index 0000000000..ff81032889 --- /dev/null +++ b/plugins/win32/messages.h @@ -0,0 +1,46 @@ +/***************************************************************************** + * messages.h: log window + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#ifndef messagesH +#define messagesH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TMessagesDlg : public TForm +{ +__published: // IDE-managed Components + TRichEdit *RichEditMessages; + TButton *ButtonOK; + void __fastcall ButtonOKClick( TObject *Sender ); + void __fastcall FormHide( TObject *Sender ); + void __fastcall FormShow( TObject *Sender ); +private: // User declarations +public: // User declarations + __fastcall TMessagesDlg( TComponent* Owner ); + void __fastcall UpdateLog(); +}; +//--------------------------------------------------------------------------- +#endif diff --git a/plugins/win32/network.cpp b/plugins/win32/network.cpp new file mode 100644 index 0000000000..094df14c01 --- /dev/null +++ b/plugins/win32/network.cpp @@ -0,0 +1,176 @@ +/***************************************************************************** + * network.cpp: the "network" dialog box + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#include +#pragma hdrstop + +#include + +#include "stream_control.h" +#include "input_ext-intf.h" + +#include "interface.h" +#include "intf_playlist.h" + +#include "network.h" +#include "win32_common.h" + +#include "netutils.h" + +//--------------------------------------------------------------------------- +//#pragma package(smart_init) +#pragma resource "*.dfm" + +extern struct intf_thread_s *p_intfGlobal; + +//--------------------------------------------------------------------------- +__fastcall TNetworkDlg::TNetworkDlg( TComponent* Owner ) + : TForm( Owner ) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TNetworkDlg::FormShow( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuNetworkStream->Checked = true; + p_intfGlobal->p_sys->p_window->PopupNetworkStream->Checked = true; +} +//--------------------------------------------------------------------------- +void __fastcall TNetworkDlg::FormHide( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuNetworkStream->Checked = false; + p_intfGlobal->p_sys->p_window->PopupNetworkStream->Checked = false; +} +//--------------------------------------------------------------------------- +void __fastcall TNetworkDlg::BitBtnCancelClick( TObject *Sender ) +{ + Hide(); +} +//--------------------------------------------------------------------------- +void __fastcall TNetworkDlg::CheckBoxBroadcastClick( TObject *Sender ) +{ + ComboBoxBroadcast->Enabled = NOT( ComboBoxBroadcast->Enabled ); +} +//--------------------------------------------------------------------------- +void __fastcall TNetworkDlg::CheckBoxChannelClick( TObject *Sender ) +{ + LabelAddress->Enabled = NOT( LabelAddress->Enabled ); + ComboBoxAddress->Enabled = NOT( ComboBoxAddress->Enabled ); + LabelPort->Enabled = NOT( LabelPort->Enabled ); + EditPort->Enabled = NOT( EditPort->Enabled ); + UpDownPort->Enabled = NOT( UpDownPort->Enabled ); + CheckBoxBroadcast->Enabled = NOT( CheckBoxBroadcast->Enabled ); + ComboBoxBroadcast->Enabled = ( NOT( ComboBoxBroadcast->Enabled ) && + CheckBoxBroadcast->Checked ); + ComboBoxChannel->Enabled = NOT( ComboBoxChannel->Enabled ); + LabelPortCS->Enabled = NOT( LabelPortCS->Enabled ); + EditPortCS->Enabled = NOT( EditPortCS->Enabled ); + UpDownPortCS->Enabled = NOT( UpDownPortCS->Enabled ); +} +//--------------------------------------------------------------------------- +void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender ) +{ + AnsiString Source, Protocol, Server; + boolean_t b_channel; + boolean_t b_broadcast; + unsigned int i_port; + int i_end = p_main->p_playlist->i_size; + + Hide(); + Server = ComboBoxAddress->Text; + + /* select added item */ + if( p_input_bank->pp_input[0] != NULL ) + { + p_input_bank->pp_input[0]->b_eof = 1; + } + + /* Check which protocol was activated */ + switch( RadioGroupProtocol->ItemIndex ) + { + case 0: + Protocol = "udp"; + break; + case 1: + intf_ErrMsg( "intf error: rtp protocol not yet implemented" ); + return; + case 2: + Protocol = "http"; + break; + } + + /* Manage channel server */ + b_channel = CheckBoxChannel->Checked ? TRUE : FALSE; + config_PutIntVariable( "network_channel", b_channel ); + if( b_channel ) + { + AnsiString Channel = ComboBoxChannel->Text; + unsigned int i_channel_port = UpDownPortCS->Position; + + if( p_main->p_channel == NULL ) + { + network_ChannelCreate(); + } + + config_PutPszVariable( "channel_server", Channel.c_str() ); + if( i_channel_port < 65536 ) + { + config_PutIntVariable( "channel_port", i_channel_port ); + } + + p_intfGlobal->p_sys->b_playing = 1; + } + else + { + /* Get the port number and make sure it will not + * overflow 5 characters */ + i_port = UpDownPort->Position; + if( i_port > 65535 ) + { + intf_ErrMsg( "intf error: invalid port %i", i_port ); + } + + /* do we have a broadcast address */ + b_broadcast = CheckBoxBroadcast->Checked ? TRUE : FALSE; + if( b_broadcast ) + { + AnsiString Broadcast = ComboBoxBroadcast->Text; + + /* Build source name */ + Source = Protocol + "://" + Server + "@:" + IntToStr( i_port ) + + "/" + Broadcast; + } + else + { + /* Build source name */ + Source = Protocol + "://" + Server + "@:" + IntToStr( i_port ); + } + + intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, Source.c_str() ); + + /* update the display */ + p_intfGlobal->p_sys->p_playlist->UpdateGrid( p_main->p_playlist ); + + intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 ); + } +} +//--------------------------------------------------------------------------- + diff --git a/plugins/win32/network.dfm b/plugins/win32/network.dfm new file mode 100644 index 0000000000..44604142de --- /dev/null +++ b/plugins/win32/network.dfm @@ -0,0 +1,412 @@ +object NetworkDlg: TNetworkDlg + Left = 368 + Top = 266 + BorderStyle = bsDialog + Caption = 'Open network' + ClientHeight = 209 + ClientWidth = 386 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Icon.Data = { + 0000010001003030000001001800A81C00001600000028000000300000006000 + 00000100180000000000001B0000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000069375900000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000120E0A4011253E0F18000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000F0B + 084143CA08070016430F08040800000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000003127291203174647E8464AE808010840E54039E6390B0C06 + 0E0A1C0000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0070CD0079DD0079DD0070CD0000000000000000000C1008261D6E4647E54547 + E64748E105040039E6393AE53939E63936D33308030100000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000070CD0079DD0079DE007DE40088F9008CFF008CFF0088F9007CE302 + 6EC70B09124641DC4444DF4546E34446E54847E003040040E6403AEA3A3EE33E + 3CE33C39E639080F010801050000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000070CD0079DD0077D90070CB0078D8007BDC007BDC007BDC + 007BDC007BDC007BDD007EE32E232D0804084553F14250F34252ED4449DB4844 + DC4645E208010540E5401C78150D18053CE63C3AE63A39EA393CD83C241A2006 + 0402000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000070CD0079DD007ADF007BDE007BDC0072 + CC005188004877004876004876004876034976054A760B4D7731434221175B42 + 54EC4253EE4252F60B05104250F44252EB4546DA08010539E6392BAA2B080105 + 3CE63C39E7393AE63A39E93939E839081208181C080000000000000000000000 + 000000000000000000000000000000000000000070CD0079DD0079DD007CE300 + 88F90089F90075D2005188004877005188008CFF008CFF008CFF008CFF008CFF + 1092FF2099FF31A0FF1408294840DB4550E1464EEA0C060B0B05084654F64653 + F64453EF080E033AE63A2BAA2B03030339E33939DF3939E639080F083DDB3D24 + 9C24434B3B000000000000000000000000000000000000000000000000000000 + 0063B60085F3008BFE0088F9007FE90088F90080E8005CA0008CFF008CFF008C + FF008CFF008CFF008CFF008CFF048DFF1594FF259BFF35A2FF0C04103F38C754 + 5AF7505BF10C08100801084352F64652F44253F30813053AE63A39E639030403 + 1C521826A1250812010807032454131558150000000000000000000000000000 + 000000000000000000000000000000000000000070CD007CE30079DD00000000 + 7CE30089FA008CFF0089FA008CFF008CFF008CFF008CFF008CFF008CFF098FFF + 1996FF2A9DFF3AA4FF0804103A2AA34E58F74E58F40B0B120803054652F34548 + E64451F305130532CA323AE23A03070308070307040008040139E63939E43931 + B42F5E1347000000000000000000000000000000000000000000000000000000 + 0000000000000000000061B10000000079DD008CFF008CFF008CFF008CFF008C + FF008CFF008CFF008CFF008CFF0E91FF1E98FF2E9FFF3FA6FF040408382BAF4D + 5AEF555AF70F12250501050F04160804074250F3121A123AE93A39E239080803 + 0D2F08010401268C2539E7393DE63D3FE23E0804100000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 79DD008CFF008CFF008CFF008CFF008CFF008CFF008CFF008CFF028CFF1293FF + 239AFF33A1FF43A8FF0802083A2AA3565BF7555AF71714330501050104000801 + 07424FF12828203AEA3A39E639030703182F1008340801040139E7393DE83D39 + E939080400000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000070CD0088F9008CFF008CFF008CFF008C + FF008CFF008CFF008CFF078EFF1795FF279CFF38A3FF48AAFF0808005151F155 + 5AF30804030804000504050800082E358E0E0C1F1D192439E53940E640080400 + 2AA12739E63908020708010539E8393BE93B0804080000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000007CE3008CFF008CFF008CFF058EFD1D96F92398F8269AFA31A0FC42A8FF + 4FAEFF5CB3FF65B7FF0C08084F5AF14E57F50B04080804043639A54647E81C13 + 49363AA70804080F120835953439E7393EE63E39DF3939EA39081105308A2B3F + E73F080601000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000047BDB1D96F92398F82498F83BA0 + F399C1E1B1C9DDBCD4E7CBE0F3D9EDFFDCEEFFDEEFFFCDE8FF080808575BF750 + 58F624125A5057F34845DF4A41E0150E30C55734E3723EC56E33A23D27050105 + 39E43939E63939E6393CE63C14420C3BE03B192A090000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000004 + 04042D88D399C1E1B1C9DDB1C9DCB7CBDBCFD3D7D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFF9FCFF0C08085D61F15B61EF555AF64A4FE13937BB0E0A12DE74 + 39E1733CDE713CDF753AE67541C36B342C231F17141B3AE63A39E7393DE83D39 + E93939DE39000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000001818186893B8C3CCD2D5D5D6D5D5D6D5D5 + D6D6D6D6D6D6D6E3E3E3F1F1F1FFFFFFFFFFFFFFFFFFFFFFFF140C145C5EF668 + 63F75555EA10061CC3673FDF713A0C1104080403080105080007070407D56F36 + DE743EDE72401C200C29452939E63939E73939EA390000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000343434A2B4C2D5D5D6D6D6D6D6D6D6D6D6D6D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFFEFEFF20161C5C5EF6373EAE0E0413E2713DE1763CCD6A3C2A0D + 08A44B2CDE743EBD612F080401030403E1713CDE7239DE713AE1723C22201139 + C13341E641000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000001B1B1B99AEBED5D5D6D5D5D6D5D5 + D6CFD3D7B8CBDBBFD5E7CEE2F3DCEFFFDFF0FFE2F1FFE9F4FF10100C3639A46E + 4540DE7239DE713DE1713C07000784261CDE7639E3743E0812001F0407D86E36 + E3753EE57540E57541DE763CDE733DD26637493C387E2F7B0000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00001B1B1B99AEBFCED3D7B7CBDBB1C9DD99C1E140A2F339A2FA49AAFC59B2FF + 66B8FF74BEFF92CBFFD9ECFF0F0402C66531DE7139E2733D854B1E0A01084D11 + 0DE3733EE1723CDF713ADF753AE1763C1D0A08290708E57140E1763CDE733DC7 + 6B34080408000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000001818187FA5C399C1E13BA0F32498 + F81D96F91091FD1C97FF2C9EFF3CA5FF4DACFF5DB3FF71BBFF8DC8FF9FD0FF08 + 0400080406B95C2EDE7239070B070803014D1615DE723CDE7540E5714030090D + 0504003A120FE67541DE75390808044A0C290000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000707071778C81C92F3058EFD008CFF008CFF1092FF2099FF31A0FF41A7FF + 51AEFF62B5FF72BCFF7BBFFF7BBBF96E9FCD0808080806041D0508E571403E22 + 0C200708080405070407070007080303B05F31DE723967301908010500000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000007CE3008CFF008C + FF048DFF1594FF259BFF35A2FF46A9FF56B0FF66B7FF77BEFF7BBFFF6DAAE300 + 0000000000000000000000080401200C088D4024E17141E57140DF713ADE713E + DE76390801070000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000079DD008CFF008CFF098FFF1996FF2A9DFF3AA4FF4AABFF + 5BB2FF6BB9FF7BBFFF7BBFFF6AA5DD0000000000000000000000000000001D1A + 0C1A0F08110903441912E57140623B1E08020300000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000079DD008CFF008C + FF0E91FF1E98FF2E9FFF3FA6FF4FADFF5FB4FF70BBFF7BBFFF78BAF96299CD00 + 00000000000000000000000000000000000000003914100000005A2411000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000070CD0088F9078EFD2C9CF940A3F850ACFA60B4FC70BCFF + 7DC2FF87C6FF7EC0FF6DAAE30000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000707071A85DD40A2 + F3A0C3E1B7CBDDC6D8E7D4E5F3E2F1FFE5F2FFD9ECFF9FD0FF7AACDD05050500 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000001818187FA5C3B8CBDBD0D4D7D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFAFCFFE2EDF99FB7CD1C1C1C0000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000001B1B1B99AEBFD4D5 + D6D6D6D6D6D6D6E3E3E3F1F1F1FFFFFFFFFFFFFEFEFFD1DAE33E3E3E00000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000001D1D1D7B9BB4CACED1D6D6D6D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFC9D2DD2121210000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000343434A5B5 + C2CFD3D7BFCEDBC9D9E7D7E6F3E6F3FFECF5FFF0F4F9AEBDCD23232300000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000018181887A8C3A6C6E169B3F367B6FA77BEFC88C6FF + 9FD0FFB4CBE33939390000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000040404338C + D749A8F947A9FD54AFFF64B6FF74BDFF7EC0FF76ABDD05050500000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000001F7DCD369FF948AAFF58B1FF69B8FF79BFFF + 78BAF96299CD0000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 003592E34DACFF5DB3FF6DBAFF7BBFFF6DAAE300000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000003890DD51AEFF62B5FF72BCFF7BBFFF + 6AA5DD0000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 003B8FD84C9CE3589FDE69A9E375B6F46299CD00000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000003376B00000000000000000005788B6 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000006CC61A83DD247FCC00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DC71A83DD2686D71F6EB1 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FFFFFFFF0000FFFFFFFFFFFF0000FFFFFE1FDFFF0000FFFFE0078FFF0000FFFE + 000007FF0000FFF0000001FF0000FF80000000FF0000FF000000003F0000FF00 + 0000000F0000FE00000000070000F800000000070000F8000000000F0000FC00 + 000000070000FE00000000070000FF80000000070000FFC0000000070000FFE0 + 000000070000FFE0000000070000FFE0000000070000FFE0000000070000FFF0 + 000000070000FFF0000000030000FFF0000000070000FFF00000000F0000FFF0 + 0000003F0000FFF8000E00FF0000FFF8000F01FF0000FFF8000FD7FF0000FFF8 + 001FFFFF0000FFFC001FFFFF0000FFFC001FFFFF0000FFFC003FFFFF0000FFFC + 003FFFFF0000FFFE003FFFFF0000FFFE007FFFFF0000FFFE007FFFFF0000FFFE + 007FFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF + 01FFFFFF0000FFFF01FFFFFF0000FFFF81FFFFFF0000FFFFC3FFFFFF0000FFFF + FFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000} + OldCreateOrder = False + OnHide = FormHide + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object RadioGroupProtocol: TRadioGroup + Left = 8 + Top = 8 + Width = 89 + Height = 97 + Caption = 'Protocol' + ItemIndex = 0 + Items.Strings = ( + 'TS' + 'RTP' + 'HTTP') + TabOrder = 0 + end + object GroupBoxServer: TGroupBox + Left = 104 + Top = 8 + Width = 273 + Height = 97 + Caption = 'Server' + TabOrder = 1 + object LabelAddress: TLabel + Left = 16 + Top = 20 + Width = 38 + Height = 13 + Caption = 'Address' + end + object LabelPort: TLabel + Left = 16 + Top = 46 + Width = 19 + Height = 13 + Caption = 'Port' + end + object CheckBoxBroadcast: TCheckBox + Left = 16 + Top = 72 + Width = 73 + Height = 17 + Caption = 'Broadcast' + TabOrder = 0 + OnClick = CheckBoxBroadcastClick + end + object EditPort: TEdit + Left = 96 + Top = 42 + Width = 145 + Height = 21 + TabOrder = 1 + Text = '1234' + end + object ComboBoxAddress: TComboBox + Left = 96 + Top = 16 + Width = 161 + Height = 21 + ItemHeight = 13 + TabOrder = 2 + Text = '138.195.131.10' + end + object ComboBoxBroadcast: TComboBox + Left = 96 + Top = 70 + Width = 161 + Height = 21 + Enabled = False + ItemHeight = 13 + TabOrder = 3 + Text = '138.195.143.255' + end + object UpDownPort: TUpDown + Left = 241 + Top = 42 + Width = 15 + Height = 21 + Associate = EditPort + Min = 0 + Max = 32767 + Position = 1234 + TabOrder = 4 + Thousands = False + Wrap = False + end + end + object GroupBoxChannels: TGroupBox + Left = 8 + Top = 112 + Width = 369 + Height = 57 + Caption = 'Channels' + TabOrder = 2 + object LabelPortCS: TLabel + Left = 268 + Top = 26 + Width = 19 + Height = 13 + Caption = 'Port' + Enabled = False + end + object CheckBoxChannel: TCheckBox + Left = 8 + Top = 24 + Width = 97 + Height = 17 + Caption = 'Channel server' + TabOrder = 0 + OnClick = CheckBoxChannelClick + end + object ComboBoxChannel: TComboBox + Left = 112 + Top = 22 + Width = 137 + Height = 21 + Enabled = False + ItemHeight = 13 + TabOrder = 1 + Text = '138.195.156.232' + end + object EditPortCS: TEdit + Left = 296 + Top = 22 + Width = 41 + Height = 21 + Enabled = False + TabOrder = 2 + Text = '6 010' + end + object UpDownPortCS: TUpDown + Left = 337 + Top = 22 + Width = 15 + Height = 21 + Associate = EditPortCS + Enabled = False + Min = 0 + Max = 32767 + Position = 6010 + TabOrder = 3 + Wrap = False + end + end + object BitBtnOk: TBitBtn + Left = 8 + Top = 176 + Width = 177 + Height = 25 + Caption = 'OK' + Default = True + ModalResult = 1 + TabOrder = 3 + OnClick = BitBtnOkClick + end + object BitBtnCancel: TBitBtn + Left = 200 + Top = 176 + Width = 177 + Height = 25 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 4 + OnClick = BitBtnCancelClick + end +end diff --git a/plugins/win32/network.h b/plugins/win32/network.h new file mode 100644 index 0000000000..d268b7488b --- /dev/null +++ b/plugins/win32/network.h @@ -0,0 +1,68 @@ +/***************************************************************************** + * network.h: the "network" dialog box + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#ifndef networkH +#define networkH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- + +#define NOT( var ) ( (var) ? false : true ) + +class TNetworkDlg : public TForm +{ +__published: // IDE-managed Components + TRadioGroup *RadioGroupProtocol; + TGroupBox *GroupBoxServer; + TLabel *LabelAddress; + TLabel *LabelPort; + TCheckBox *CheckBoxBroadcast; + TEdit *EditPort; + TComboBox *ComboBoxAddress; + TComboBox *ComboBoxBroadcast; + TUpDown *UpDownPort; + TGroupBox *GroupBoxChannels; + TLabel *LabelPortCS; + TCheckBox *CheckBoxChannel; + TComboBox *ComboBoxChannel; + TEdit *EditPortCS; + TUpDown *UpDownPortCS; + TBitBtn *BitBtnOk; + TBitBtn *BitBtnCancel; + void __fastcall FormShow( TObject *Sender ); + void __fastcall FormHide( TObject *Sender ); + void __fastcall BitBtnCancelClick(TObject *Sender); + void __fastcall CheckBoxBroadcastClick( TObject *Sender ); + void __fastcall CheckBoxChannelClick( TObject *Sender ); + void __fastcall BitBtnOkClick(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TNetworkDlg( TComponent* Owner ); +}; +//--------------------------------------------------------------------------- +#endif diff --git a/plugins/win32/playlist.cpp b/plugins/win32/playlist.cpp new file mode 100644 index 0000000000..30eac76678 --- /dev/null +++ b/plugins/win32/playlist.cpp @@ -0,0 +1,379 @@ +/***************************************************************************** + * playlist.cpp: Interface for the playlist dialog + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#include +#pragma hdrstop + +#include + +#include "stream_control.h" +#include "input_ext-intf.h" + +#include "interface.h" +#include "intf_playlist.h" +#include "win32_common.h" + +#include "playlist.h" +//--------------------------------------------------------------------------- +//#pragma package(smart_init) +#pragma resource "*.dfm" + +extern struct intf_thread_s *p_intfGlobal; + +//--------------------------------------------------------------------------- +__fastcall TPlaylistDlg::TPlaylistDlg( TComponent* Owner ) + : TForm( Owner ) +{ + Icon = p_intfGlobal->p_sys->p_window->Icon; +} +//--------------------------------------------------------------------------- +char * __fastcall TPlaylistDlg::rindex( char *s, char c ) +{ + char *ref = s; + + s = s + strlen( s ) - 2; + while( ( s > ref ) && ( *s != c ) ) + { + s--; + } + if( *s == c ) + { + return( s ); + } + else + { + return( NULL ); + } +} +//--------------------------------------------------------------------------- + + +/***************************************************************************** + * Event handlers + ****************************************************************************/ +void __fastcall TPlaylistDlg::FormShow( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuPlaylist->Checked = true; + p_intfGlobal->p_sys->p_window->PopupPlaylist->Checked = true; +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::FormHide( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuPlaylist->Checked = false; + p_intfGlobal->p_sys->p_window->PopupPlaylist->Checked = false; +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::BitBtnOkClick( TObject *Sender ) +{ + Hide(); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::ListViewPlaylistDblClick( TObject *Sender ) +{ + TListItem *Item; + TListItem *ItemStart; + TItemStates Focused; + + /* search the selected item */ + if( ListViewPlaylist->SelCount > 0 ) + { + if( ListViewPlaylist->SelCount == 1 ) + { + Item = ListViewPlaylist->Selected; + } + else + { + Focused << isFocused; + ItemStart = ListViewPlaylist->Items->Item[0]; + + Item = ListViewPlaylist->GetNextItem( ItemStart, sdAll, Focused ); + } + + /* stop current item, select the good one */ + if( ( p_input_bank->pp_input[0] != NULL ) && + ( Item->Index != p_intfGlobal->p_sys->i_playing ) ) + { + /* FIXME: temporary hack */ + p_input_bank->pp_input[0]->b_eof = 1; + } + intf_PlaylistJumpto( p_main->p_playlist, Item->Index - 1 ); + } +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::ListViewPlaylistKeyDown( TObject *Sender, + WORD &Key, TShiftState Shift ) +{ + /* 'suppr' or 'backspace' */ + if( ( Key == VK_DELETE ) || ( Key == VK_BACK ) ) + { + MenuDeleteSelectedClick( Sender ); + } + + /* 'enter' */ + if( Key == VK_RETURN ) + { + PopupPlayClick( Sender ); + } +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::ListViewPlaylistCustomDrawItem( + TCustomListView *Sender, TListItem *Item, TCustomDrawState State, + bool &DefaultDraw) +{ + TRect Rect = Item->DisplayRect( drBounds ); + + /* set the background color */ + if( Item->Index == p_intfGlobal->p_sys->i_playing ) + { + Sender->Canvas->Brush->Color = clRed; + } + else + { + Sender->Canvas->Brush->Color = clWhite; + } + + Sender->Canvas->FillRect( Rect ); +} +//--------------------------------------------------------------------------- + + +/***************************************************************************** + * Menu callbacks + ****************************************************************************/ +void __fastcall TPlaylistDlg::MenuAddFileClick( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuOpenFileClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::MenuAddDiscClick( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuOpenDiscClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::MenuAddNetClick( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuNetworkStreamClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::MenuAddUrlClick( TObject *Sender ) +{ + /* TODO */ +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::MenuDeleteSelectedClick( TObject *Sender ) +{ + /* user wants to delete a file in the queue */ + int i_pos; + playlist_t *p_playlist = p_main->p_playlist; + + /* lock the struct */ + vlc_mutex_lock( &p_intfGlobal->change_lock ); + + /* delete the items from the last to the first */ + for( i_pos = p_playlist->i_size - 1; i_pos >= 0; i_pos-- ) + { + if( ListViewPlaylist->Items->Item[i_pos]->Selected ) + { + DeleteItem( i_pos ); + } + } + + /* Rebuild the ListView */ + UpdateGrid( p_playlist ); + + vlc_mutex_unlock( &p_intfGlobal->change_lock ); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::MenuDeleteAllClick( TObject *Sender ) +{ + int i_pos; + playlist_t *p_playlist = p_main->p_playlist; + + /* lock the struct */ + vlc_mutex_lock( &p_intfGlobal->change_lock ); + + /* delete the items from the last to the first */ + for( i_pos = p_playlist->i_size - 1; i_pos >= 0; i_pos-- ) + { + DeleteItem( i_pos ); + } + + /* Rebuild the ListView */ + UpdateGrid( p_playlist ); + + vlc_mutex_unlock( &p_intfGlobal->change_lock ); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::MenuSelectionInvertClick( TObject *Sender ) +{ +#define NOT( var ) ( (var) ? false : true ) + int i_pos; + playlist_t *p_playlist = p_main->p_playlist; + TListItems *Items = ListViewPlaylist->Items; + + /* delete the items from the last to the first */ + for( i_pos = p_playlist->i_size - 1; i_pos >= 0; i_pos-- ) + { + Items->Item[i_pos]->Selected = NOT( Items->Item[i_pos]->Selected ); + } +#undef NOT +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::MenuSelectionCropClick( TObject *Sender ) +{ + MenuSelectionInvertClick( Sender ); + MenuDeleteSelectedClick( Sender ); +} +//--------------------------------------------------------------------------- + + +/***************************************************************************** + * Popup callbacks + ****************************************************************************/ +void __fastcall TPlaylistDlg::PopupPlayClick( TObject *Sender ) +{ + ListViewPlaylistDblClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::PopupInvertSelectionClick( TObject *Sender ) +{ + MenuSelectionInvertClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::PopupCropSelectionClick( TObject *Sender ) +{ + MenuSelectionCropClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::PopupDeleteSelectedClick( TObject *Sender ) +{ + MenuDeleteSelectedClick( Sender ); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::PopupDeleteAllClick( TObject *Sender ) +{ + MenuDeleteAllClick( Sender ); +} +//--------------------------------------------------------------------------- + + +/***************************************************************************** + * Useful functions, needed by the event handlers + ****************************************************************************/ +void __fastcall TPlaylistDlg::UpdateGrid( playlist_t * p_playlist ) +{ + int i_dummy; + char *FileName; + TListItem *Item; + + ListViewPlaylist->Items->BeginUpdate(); + + /* Clear the list... */ + ListViewPlaylist->Items->Clear(); + + /* ...and rebuild it */ + for( i_dummy = 0; i_dummy < p_playlist->i_size; i_dummy++ ) + { +#ifdef WIN32 + /* Position of the last '\' in the string */ + FileName = rindex( p_playlist->p_item[i_dummy].psz_name, '\\' ); +#else + /* Position of the last '/' in the string */ + FileName = rindex( p_playlist->p_item[i_dummy].psz_name, '/' ); +#endif + if( ( FileName == NULL ) || ( *(FileName + 1) == '\0' ) ) + { + FileName = p_playlist->p_item[i_dummy].psz_name; + } + else + { + /* Skip leading '\' or '/' */ + FileName++; + } + + Item = ListViewPlaylist->Items->Add(); + Item->Caption = FileName; + Item->SubItems->Add( "no info" ); + } + /* TODO: Set background color ? */ + + ListViewPlaylist->Items->EndUpdate(); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::Manage( intf_thread_t * p_intf ) +{ + playlist_t *p_playlist = p_main->p_playlist ; + + vlc_mutex_lock( &p_playlist->change_lock ); + + if( p_intf->p_sys->i_playing != p_playlist->i_index ) + { + p_intf->p_sys->i_playing = p_playlist->i_index; + + /* update the background color */ + UpdateGrid( p_playlist ); + } + + vlc_mutex_unlock( &p_playlist->change_lock ); +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::DeleteItem( int i_pos ) +{ + intf_PlaylistDelete( p_main->p_playlist, i_pos ); + + /* are we deleting the current played stream */ + if( p_intfGlobal->p_sys->i_playing == i_pos ) + { + /* next ! */ + p_input_bank->pp_input[0]->b_eof = 1; + /* this has to set the slider to 0 */ + + /* step minus one */ + p_intfGlobal->p_sys->i_playing-- ; + + vlc_mutex_lock( &p_main->p_playlist->change_lock ); + p_main->p_playlist->i_index-- ; + vlc_mutex_unlock( &p_main->p_playlist->change_lock ); + } +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::Previous() +{ + if( p_input_bank->pp_input[0] != NULL ) + { + /* FIXME: temporary hack */ + intf_PlaylistPrev( p_main->p_playlist ); + intf_PlaylistPrev( p_main->p_playlist ); + p_input_bank->pp_input[0]->b_eof = 1; + } +} +//--------------------------------------------------------------------------- +void __fastcall TPlaylistDlg::Next() +{ + if( p_input_bank->pp_input[0] != NULL ) + { + /* FIXME: temporary hack */ + p_input_bank->pp_input[0]->b_eof = 1; + } +} +//--------------------------------------------------------------------------- + diff --git a/plugins/win32/playlist.dfm b/plugins/win32/playlist.dfm new file mode 100644 index 0000000000..0e8c535f36 --- /dev/null +++ b/plugins/win32/playlist.dfm @@ -0,0 +1,133 @@ +object PlaylistDlg: TPlaylistDlg + Left = 447 + Top = 197 + Width = 335 + Height = 436 + Caption = 'Playlist' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Menu = MainMenuPlaylist + OldCreateOrder = False + OnHide = FormHide + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object BitBtnOk: TBitBtn + Left = 76 + Top = 356 + Width = 176 + Height = 25 + Anchors = [akBottom] + Caption = 'OK' + ModalResult = 1 + TabOrder = 0 + OnClick = BitBtnOkClick + end + object ListViewPlaylist: TListView + Left = 11 + Top = 10 + Width = 305 + Height = 331 + Anchors = [akTop, akBottom] + Columns = < + item + Caption = 'Filename' + Width = 200 + end + item + Alignment = taCenter + Caption = 'Duration' + Width = 100 + end> + HideSelection = False + MultiSelect = True + ReadOnly = True + RowSelect = True + PopupMenu = PopupMenuPlaylist + TabOrder = 1 + ViewStyle = vsReport + OnCustomDrawItem = ListViewPlaylistCustomDrawItem + OnDblClick = ListViewPlaylistDblClick + OnKeyDown = ListViewPlaylistKeyDown + end + object MainMenuPlaylist: TMainMenu + Left = 24 + Top = 352 + object MenuAdd: TMenuItem + Caption = '&Add' + object MenuAddFile: TMenuItem + Caption = '&File' + OnClick = MenuAddFileClick + end + object MenuAddDisc: TMenuItem + Caption = '&Disc' + OnClick = MenuAddDiscClick + end + object MenuAddNet: TMenuItem + Caption = '&Network' + OnClick = MenuAddNetClick + end + object MenuAddUrl: TMenuItem + Caption = '&Url' + Enabled = False + OnClick = MenuAddUrlClick + end + end + object MenuDelete: TMenuItem + Caption = '&Delete' + object MenuDeleteAll: TMenuItem + Caption = '&All' + OnClick = MenuDeleteAllClick + end + object MenuDeleteSelected: TMenuItem + Caption = '&Selected' + OnClick = MenuDeleteSelectedClick + end + end + object MenuSelection: TMenuItem + Caption = '&Selection' + object MenuSelectionCrop: TMenuItem + Caption = '&Crop' + OnClick = MenuSelectionCropClick + end + object MenuSelectionInvert: TMenuItem + Caption = '&Invert' + OnClick = MenuSelectionInvertClick + end + end + end + object PopupMenuPlaylist: TPopupMenu + Left = 272 + Top = 352 + object PopupPlay: TMenuItem + Caption = '&Play' + OnClick = PopupPlayClick + end + object N1: TMenuItem + Caption = '-' + end + object PopupInvertSelection: TMenuItem + Caption = '&Invert selection' + OnClick = PopupInvertSelectionClick + end + object PopupCropSelection: TMenuItem + Caption = '&Crop selection' + OnClick = PopupCropSelectionClick + end + object N2: TMenuItem + Caption = '-' + end + object PopupDeleteSelected: TMenuItem + Caption = '&Delete selected' + OnClick = PopupDeleteSelectedClick + end + object PopupDeleteAll: TMenuItem + Caption = 'Delete &all' + OnClick = PopupDeleteAllClick + end + end +end diff --git a/plugins/win32/playlist.h b/plugins/win32/playlist.h new file mode 100644 index 0000000000..3b9e932968 --- /dev/null +++ b/plugins/win32/playlist.h @@ -0,0 +1,96 @@ +/***************************************************************************** + * playlist.h: Interface for the playlist dialog + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#ifndef playlistH +#define playlistH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include + +struct playlist_s; +struct intf_thread_s; + +//--------------------------------------------------------------------------- +class TPlaylistDlg : public TForm +{ +__published: // IDE-managed Components + TBitBtn *BitBtnOk; + TMainMenu *MainMenuPlaylist; + TMenuItem *MenuAdd; + TMenuItem *MenuAddFile; + TMenuItem *MenuAddDisc; + TMenuItem *MenuAddNet; + TMenuItem *MenuAddUrl; + TMenuItem *MenuDelete; + TMenuItem *MenuDeleteAll; + TMenuItem *MenuDeleteSelected; + TMenuItem *MenuSelection; + TMenuItem *MenuSelectionCrop; + TMenuItem *MenuSelectionInvert; + TListView *ListViewPlaylist; + TPopupMenu *PopupMenuPlaylist; + TMenuItem *PopupPlay; + TMenuItem *N1; + TMenuItem *PopupDeleteAll; + TMenuItem *PopupDeleteSelected; + TMenuItem *N2; + TMenuItem *PopupInvertSelection; + TMenuItem *PopupCropSelection; + void __fastcall FormShow( TObject *Sender ); + void __fastcall FormHide( TObject *Sender ); + void __fastcall BitBtnOkClick( TObject *Sender ); + void __fastcall ListViewPlaylistDblClick( TObject *Sender ); + void __fastcall ListViewPlaylistKeyDown( TObject *Sender, WORD &Key, + TShiftState Shift ); + void __fastcall ListViewPlaylistCustomDrawItem( TCustomListView *Sender, + TListItem *Item, TCustomDrawState State, bool &DefaultDraw ); + void __fastcall MenuAddFileClick( TObject *Sender ); + void __fastcall MenuAddDiscClick( TObject *Sender ); + void __fastcall MenuAddNetClick( TObject *Sender ); + void __fastcall MenuAddUrlClick( TObject *Sender ); + void __fastcall MenuDeleteSelectedClick( TObject *Sender ); + void __fastcall MenuDeleteAllClick( TObject *Sender ); + void __fastcall MenuSelectionInvertClick( TObject *Sender ); + void __fastcall MenuSelectionCropClick( TObject *Sender ); + void __fastcall PopupPlayClick( TObject *Sender ); + void __fastcall PopupInvertSelectionClick( TObject *Sender ); + void __fastcall PopupCropSelectionClick( TObject *Sender ); + void __fastcall PopupDeleteSelectedClick( TObject *Sender ); + void __fastcall PopupDeleteAllClick( TObject *Sender ); +private: // User declarations + char * __fastcall rindex( char *s, char c ); +public: // User declarations + __fastcall TPlaylistDlg( TComponent* Owner ); + void __fastcall UpdateGrid( struct playlist_s * p_playlist ); + void __fastcall Manage( struct intf_thread_s * p_intf ); + void __fastcall DeleteItem( int i_pos ); + void __fastcall Previous(); + void __fastcall Next(); +}; +//--------------------------------------------------------------------------- +#endif diff --git a/plugins/win32/preferences.cpp b/plugins/win32/preferences.cpp new file mode 100644 index 0000000000..c4b5dc3d74 --- /dev/null +++ b/plugins/win32/preferences.cpp @@ -0,0 +1,560 @@ +/***************************************************************************** + * preferences.h: the "Preferences" dialog box + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#include +#pragma hdrstop + +#include + +#include "interface.h" + +#include "preferences.h" +#include "win32_common.h" + +//--------------------------------------------------------------------------- +//#pragma package(smart_init) +#pragma resource "*.dfm" + +extern struct intf_thread_s *p_intfGlobal; + +/**************************************************************************** + * Functions to help components creation + ****************************************************************************/ +__fastcall TGroupBoxPref::TGroupBoxPref( TComponent* Owner, + module_config_t *p_config_arg ) : TGroupBox( Owner ) +{ + p_config = p_config_arg; + Caption = p_config->psz_text; +} +//--------------------------------------------------------------------------- +TListView * __fastcall TGroupBoxPref::CreateListView( TWinControl *Parent, + int Left, int Width, int Top, int Height, TViewStyle ViewStyle ) +{ + TListView *ListView = new TListView( Parent ); + ListView->Parent = Parent; + ListView->ViewStyle = ViewStyle; + ListView->Left = Left; + ListView->Width = Width; + ListView->Top = Top; + ListView->Height = Height; + return ListView; +} +//--------------------------------------------------------------------------- +TButton * __fastcall TGroupBoxPref::CreateButton( TWinControl *Parent, + int Left, int Width, int Top, int Height, AnsiString Caption ) +{ + TButton *Button = new TButton( Parent ); + Button->Parent = Parent; + Button->Left = Left; + Button->Width = Width; + Button->Top = Top; + Button->Height = Height; + Button->Caption = Caption; + return Button; +} +//--------------------------------------------------------------------------- +TCheckBox * __fastcall TGroupBoxPref::CreateCheckBox( TWinControl *Parent, + int Left, int Width, int Top, int Height, AnsiString Caption ) +{ + TCheckBox *CheckBox = new TCheckBox( Parent ); + CheckBox->Parent = Parent; + CheckBox->Left = Left; + CheckBox->Width = Width; + CheckBox->Top = Top; + CheckBox->Height = Height; + CheckBox->Caption = Caption; + return CheckBox; +} +//--------------------------------------------------------------------------- +TLabel * __fastcall TGroupBoxPref::CreateLabel( TWinControl *Parent, + int Left, int Width, int Top, int Height, AnsiString Caption, + bool WordWrap ) +{ + TLabel *Label = new TLabel( Parent ); + Label->Parent = Parent; + Label->Caption = Caption; + Label->Left = Left; + Label->Width = Width; + Label->Top = Top; + Label->Height = Height; + Label->WordWrap = WordWrap; + return Label; +} +//--------------------------------------------------------------------------- +TEdit * __fastcall TGroupBoxPref::CreateEdit( TWinControl *Parent, + int Left, int Width, int Top, int Height, AnsiString Text ) +{ + TEdit *Edit = new TEdit( Parent ); + Edit->Parent = Parent; + Edit->Left = Left; + Edit->Width = Width; + Edit->Top = Top; + Edit->Height = Height; + Edit->Text = Text; + return Edit; +} +//--------------------------------------------------------------------------- +TUpDown * __fastcall TGroupBoxPref::CreateUpDown( TWinControl *Parent, + int Min, int Max, int Position, bool Thousands ) +{ + TUpDown *UpDown = new TUpDown( Parent ); + UpDown->Parent = Parent; + UpDown->Min = Min; + UpDown->Max = Max; + UpDown->Position = Position; + UpDown->Thousands = Thousands; + return UpDown; +} + + +/**************************************************************************** + * GroupBox for plugin management + ****************************************************************************/ +__fastcall TGroupBoxPlugin::TGroupBoxPlugin( TComponent* Owner, + module_config_t *p_config ) : TGroupBoxPref( Owner, p_config ) +{ + /* init listview */ + ListView = CreateListView( this, 16, 164, 24, 160, vsReport ); + ListView->Columns->Add(); + ListView->Columns->Items[0]->Width = 160; + ListView->Columns->Items[0]->Caption = "Name";//p_config->psz_text; + ListView->OnSelectItem = ListViewSelectItem; + + /* init description label */ + LabelDesc = CreateLabel( this, 230, 225, 50, 52, + p_config->psz_longtext, true ); + + /* init hint label */ + LabelHint = CreateLabel( this, 230, 225, 135, 13, "", false ); + + /* init configure button */ + ButtonConfig = CreateButton( this, 16, 70, 192, 25, "Configure" ); + ButtonConfig->Enabled = false; + + /* init select button */ + ButtonSelect = CreateButton( this, 110, 70, 192, 25, "Select" ); + ButtonSelect->OnClick = ButtonSelectClick; + + /* init 'Selected' label */ + LabelSelected = CreateLabel( this, 230, 45, 198, 13, "Selected", false ); + + /* init 'Selected' edit */ + Edit = CreateEdit( this, 280, 164, 194, 21, "" ); + vlc_mutex_lock( p_config->p_lock ); + Edit->Text = p_config->psz_value ? p_config->psz_value : ""; + vlc_mutex_unlock( p_config->p_lock ); + Edit->OnChange = EditChange; + + Height = 233; +}; +//--------------------------------------------------------------------------- +void __fastcall TGroupBoxPlugin::ListViewSelectItem( TObject *Sender, + TListItem *Item, bool Selected ) +{ + module_t *p_module; + AnsiString Name; + + Name = Item->Caption; + if( Name != "" ) + { + /* look for plugin 'Name' */ + for( p_module = p_module_bank->first ; + p_module != NULL ; + p_module = p_module->next ) + { + if( !strcmp( p_module->psz_name, Name.c_str() ) ) + { + ModuleSelected = p_module; + LabelHint->Caption = p_module->psz_longname ? + p_module->psz_longname : ""; + ButtonConfig->Enabled = p_module->i_config_items ? true : false; + + break; + } + } + } +} +//--------------------------------------------------------------------------- +void __fastcall TGroupBoxPlugin::ButtonSelectClick( TObject *Sender ) +{ + if( !ModuleSelected ) return; + Edit->Text = ModuleSelected->psz_name; +} +//--------------------------------------------------------------------------- +void __fastcall TGroupBoxPlugin::ButtonConfigClick( TObject *Sender ) +{ + /* FIWME: TODO */ +} +//--------------------------------------------------------------------------- +void __fastcall TGroupBoxPlugin::EditChange( TObject *Sender ) +{ + TEdit *Edit = (TEdit *)Sender; + p_config->psz_value = Edit->Text.c_str(); +} + + +/**************************************************************************** + * GroupBox for string management + ****************************************************************************/ +__fastcall TGroupBoxString::TGroupBoxString( TComponent* Owner, + module_config_t *p_config ) : TGroupBoxPref( Owner, p_config ) +{ + /* init description label */ + LabelDesc = CreateLabel( this, 230, 225, 24, 26, + p_config->psz_longtext, true ); + + /* init edit */ + Edit = CreateEdit( this, 16, 164, 24, 21, "" ); + vlc_mutex_lock( p_config->p_lock ); + Edit->Text = p_config->psz_value ? p_config->psz_value : ""; + vlc_mutex_unlock( p_config->p_lock ); + Edit->OnChange = EditChange; + + /* vertical alignment */ + Height = LabelDesc->Height + 24; + LabelDesc->Top = Top + ( Height - LabelDesc->Height ) / 2 + 4; + Edit->Top = Top + ( Height - Edit->Height ) / 2 + 4; +}; +//--------------------------------------------------------------------------- +void __fastcall TGroupBoxString::EditChange( TObject *Sender ) +{ + TEdit *Edit = (TEdit *)Sender; + p_config->psz_value = Edit->Text.c_str(); +} + + +/**************************************************************************** + * GroupBox for integer management + ****************************************************************************/ +__fastcall TGroupBoxInteger::TGroupBoxInteger( TComponent* Owner, + module_config_t *p_config ) : TGroupBoxPref( Owner, p_config ) +{ + /* init description label */ + LabelDesc = CreateLabel( this, 230, 225, 19, 26, + p_config->psz_longtext, true ); + + /* init edit */ + Edit = CreateEdit( this, 16, 148, 24, 21, "" ); + Edit->OnChange = EditChange; + + /* init updown */ + UpDown = CreateUpDown( this, -1, 32767, p_config->i_value, false ); + UpDown->Associate = Edit; + + /* vertical alignment */ + Height = LabelDesc->Height + 24; + LabelDesc->Top = Top + ( Height - LabelDesc->Height ) / 2 + 4; + Edit->Top = Top + ( Height - Edit->Height ) / 2 + 4; +}; +//--------------------------------------------------------------------------- +void __fastcall TGroupBoxInteger::EditChange( TObject *Sender ) +{ + TEdit *Edit = (TEdit *)Sender; + p_config->i_value = StrToInt( Edit->Text ); +} + + +/**************************************************************************** + * GroupBox for boolean management + ****************************************************************************/ +__fastcall TGroupBoxBool::TGroupBoxBool( TComponent* Owner, + module_config_t *p_config ) : TGroupBoxPref( Owner, p_config ) +{ + /* init description label */ + LabelDesc = CreateLabel( this, 230, 225, 19, 26, + p_config->psz_longtext, true ); + + /* init checkbox */ + CheckBox = CreateCheckBox( this, 16, 184, 28, 17, p_config->psz_text ); + CheckBox->Checked = p_config->i_value; + CheckBox->OnClick = CheckBoxClick; + + /* vertical alignment */ + Height = LabelDesc->Height + 24; + LabelDesc->Top = Top + ( Height - LabelDesc->Height ) / 2 + 4; + CheckBox->Top = Top + ( Height - CheckBox->Height ) / 2 + 4; +}; +//--------------------------------------------------------------------------- +void __fastcall TGroupBoxBool::CheckBoxClick( TObject *Sender ) +{ + TCheckBox *CheckBox = (TCheckBox *)Sender; + p_config->i_value = CheckBox->Checked ? 1 : 0; +} + + +/**************************************************************************** + * Callbacks for the dialog + ****************************************************************************/ +//--------------------------------------------------------------------------- +__fastcall TPreferencesDlg::TPreferencesDlg( TComponent* Owner ) + : TForm( Owner ) +{ + Icon = p_intfGlobal->p_sys->p_window->Icon; +} +//--------------------------------------------------------------------------- +void __fastcall TPreferencesDlg::FormClose( TObject *Sender, + TCloseAction &Action ) +{ + Action = caHide; +} +//--------------------------------------------------------------------------- +void __fastcall TPreferencesDlg::FormShow( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuPreferences->Checked = true; + p_intfGlobal->p_sys->p_window->PopupPreferences->Checked = true; +} +//--------------------------------------------------------------------------- +void __fastcall TPreferencesDlg::FormHide( TObject *Sender ) +{ + p_intfGlobal->p_sys->p_window->MenuPreferences->Checked = false; + p_intfGlobal->p_sys->p_window->PopupPreferences->Checked = false; +} + + +/**************************************************************************** + * CreateConfigDialog: dynamically creates the configuration dialog + * box from all the configuration data provided by the selected module. + ****************************************************************************/ +#define ADD_PANEL \ +{ \ + Panel = new TPanel( this ); \ + Panel->Parent = ScrollBox; \ + Panel->Caption = ""; \ + Panel->BevelOuter = bvNone; \ + Panel->Height = 12; \ +} + +void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name ) +{ + bool config_dialog; + module_t *p_module; + module_t *p_module_plugins; + int i, j; + + TTabSheet *TabSheet; + TScrollBox *ScrollBox; + TPanel *Panel; + TGroupBoxPlugin *GroupBoxPlugin; + TGroupBoxString *GroupBoxString; + TGroupBoxInteger *GroupBoxInteger; + TGroupBoxBool *GroupBoxBool; + TListItem *ListItem; + + /* Check if the dialog box is already opened, if so this will save us + * quite a bit of work. (the interface will be destroyed when you actually + * close the main window, but remember that it is only hidden if you + * clicked on the action buttons). This trick also allows us not to + * duplicate identical dialog windows. */ + + /* FIXME: we must find a way of really checking whether the dialog + * box is already opened */ + config_dialog = false; + + if( config_dialog ) + { + /* Yeah it was open */ + Show(); + return; + } + + /* Look for the selected module */ + for( p_module = p_module_bank->first ; p_module != NULL ; + p_module = p_module->next ) + { + + if( psz_module_name && !strcmp( psz_module_name, p_module->psz_name ) ) + break; + } + if( !p_module ) return; + + /* + * We found it, now we can start building its configuration interface + */ + + /* Enumerate config options and add corresponding config boxes */ + for( i = 0; i < p_module->i_config_lines; i++ ) + { + switch( p_module->p_config[i].i_type ) + { + case MODULE_CONFIG_HINT_CATEGORY: + + /* create a new tabsheet. */ + TabSheet = new TTabSheet( this ); + TabSheet->PageControl = PageControlPref; + TabSheet->Caption = p_module->p_config[i].psz_text; + TabSheet->Visible = true; + + /* pack a scrollbox into the tabsheet */ + ScrollBox = new TScrollBox( this ); + ScrollBox->Parent = TabSheet; + ScrollBox->Align = alClient; + ScrollBox->BorderStyle = bsNone; + ScrollBox->HorzScrollBar->Tracking = true; + ScrollBox->VertScrollBar->Tracking = true; + + break; + + case MODULE_CONFIG_ITEM_PLUGIN: + + /* add new groupbox for the config option */ + GroupBoxPlugin = new TGroupBoxPlugin( this, &p_module->p_config[i] ); + GroupBoxPlugin->Parent = ScrollBox; + + /* add panel as separator */ + ADD_PANEL; + + /* build a list of available plugins */ + for( p_module_plugins = p_module_bank->first ; + p_module_plugins != NULL ; + p_module_plugins = p_module_plugins->next ) + { + if( p_module_plugins->i_capabilities & + ( 1 << p_module->p_config[i].i_value ) ) + { + ListItem = GroupBoxPlugin->ListView->Items->Add(); + ListItem->Caption = p_module_plugins->psz_name; + } + } + + break; + + case MODULE_CONFIG_ITEM_FILE: + + case MODULE_CONFIG_ITEM_STRING: + + /* add new groupbox for the config option */ + GroupBoxString = new TGroupBoxString( this, &p_module->p_config[i] ); + GroupBoxString->Parent = ScrollBox; + + /* add panel as separator */ + ADD_PANEL; + + break; + + case MODULE_CONFIG_ITEM_INTEGER: + + /* add new groupbox for the config option */ + GroupBoxInteger = new TGroupBoxInteger( this, &p_module->p_config[i] ); + GroupBoxInteger->Parent = ScrollBox; + + /* add panel as separator */ + ADD_PANEL; + + break; + + case MODULE_CONFIG_ITEM_BOOL: + + /* add new groupbox for the config option */ + GroupBoxBool = new TGroupBoxBool( this, &p_module->p_config[i] ); + GroupBoxBool->Parent = ScrollBox; + + /* add panel as separator */ + ADD_PANEL; + + break; + } + } + + /* Reorder groupboxes inside the tabsheets */ + for( i = 0; i < PageControlPref->PageCount; i++ ) + { + /* get scrollbox from the tabsheet */ + ScrollBox = (TScrollBox *)PageControlPref->Pages[i]->Controls[0]; + + for( j = ScrollBox->ControlCount - 1; j >= 0 ; j-- ) + { + ScrollBox->Controls[j]->Align = alTop; + } + } + + /* set active tabsheet + * FIXME: i don't know why, but both lines are necessary */ + PageControlPref->ActivePageIndex = 1; + PageControlPref->ActivePageIndex = 0; + + /* Ok, job done successfully. Let's keep a reference to the dialog box*/ + /* FIXME: TODO */ + + /* we want this ref to be destroyed if the object is destroyed */ + /* FIXME: TODO */ + + Show(); +} +#undef ADD_PANEL +//--------------------------------------------------------------------------- +void __fastcall TPreferencesDlg::ButtonOkClick( TObject *Sender ) +{ + ButtonApplyClick( Sender ); + Hide(); +} +//--------------------------------------------------------------------------- +void __fastcall TPreferencesDlg::ButtonApplyClick( TObject *Sender ) +{ + TScrollBox *ScrollBox; + TGroupBoxPref *GroupBox; + int i, j; + + for( i = 0; i < PageControlPref->PageCount; i++ ) + { + /* get scrollbox from the tabsheet */ + ScrollBox = (TScrollBox *)PageControlPref->Pages[i]->Controls[0]; + + for( j = 0; j < ScrollBox->ControlCount ; j++ ) + { + /* skip the panels */ + if( ScrollBox->Controls[j]->InheritsFrom( __classid( TGroupBoxPref ) ) ) + { + GroupBox = (TGroupBoxPref *)ScrollBox->Controls[j]; + SaveValue( GroupBox->p_config ); + } + } + } +} +//--------------------------------------------------------------------------- +void __fastcall TPreferencesDlg::ButtonSaveClick( TObject *Sender ) +{ + ButtonApplyClick( Sender ); + config_SaveConfigFile( NULL ); +} +//--------------------------------------------------------------------------- +void __fastcall TPreferencesDlg::ButtonCancelClick( TObject *Sender ) +{ + Hide(); +} +//--------------------------------------------------------------------------- +void __fastcall TPreferencesDlg::SaveValue( module_config_t *p_config ) +{ + switch( p_config->i_type ) + { + case MODULE_CONFIG_ITEM_STRING: + case MODULE_CONFIG_ITEM_FILE: + case MODULE_CONFIG_ITEM_PLUGIN: + config_PutPszVariable( p_config->psz_name, p_config->psz_value ); + break; + case MODULE_CONFIG_ITEM_INTEGER: + case MODULE_CONFIG_ITEM_BOOL: + config_PutIntVariable( p_config->psz_name, p_config->i_value ); + break; + } +} +//--------------------------------------------------------------------------- + diff --git a/plugins/win32/preferences.dfm b/plugins/win32/preferences.dfm new file mode 100644 index 0000000000..81de0fc21c --- /dev/null +++ b/plugins/win32/preferences.dfm @@ -0,0 +1,293 @@ +object PreferencesDlg: TPreferencesDlg + Left = 309 + Top = 124 + Width = 522 + Height = 582 + Caption = 'Preferences' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Icon.Data = { + 0000010001003030000001001800A81C00001600000028000000300000006000 + 00000100180000000000001B0000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000069375900000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000120E0A4011253E0F18000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000F0B + 084143CA08070016430F08040800000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000003127291203174647E8464AE808010840E54039E6390B0C06 + 0E0A1C0000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0070CD0079DD0079DD0070CD0000000000000000000C1008261D6E4647E54547 + E64748E105040039E6393AE53939E63936D33308030100000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000070CD0079DD0079DE007DE40088F9008CFF008CFF0088F9007CE302 + 6EC70B09124641DC4444DF4546E34446E54847E003040040E6403AEA3A3EE33E + 3CE33C39E639080F010801050000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000070CD0079DD0077D90070CB0078D8007BDC007BDC007BDC + 007BDC007BDC007BDD007EE32E232D0804084553F14250F34252ED4449DB4844 + DC4645E208010540E5401C78150D18053CE63C3AE63A39EA393CD83C241A2006 + 0402000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000070CD0079DD007ADF007BDE007BDC0072 + CC005188004877004876004876004876034976054A760B4D7731434221175B42 + 54EC4253EE4252F60B05104250F44252EB4546DA08010539E6392BAA2B080105 + 3CE63C39E7393AE63A39E93939E839081208181C080000000000000000000000 + 000000000000000000000000000000000000000070CD0079DD0079DD007CE300 + 88F90089F90075D2005188004877005188008CFF008CFF008CFF008CFF008CFF + 1092FF2099FF31A0FF1408294840DB4550E1464EEA0C060B0B05084654F64653 + F64453EF080E033AE63A2BAA2B03030339E33939DF3939E639080F083DDB3D24 + 9C24434B3B000000000000000000000000000000000000000000000000000000 + 0063B60085F3008BFE0088F9007FE90088F90080E8005CA0008CFF008CFF008C + FF008CFF008CFF008CFF008CFF048DFF1594FF259BFF35A2FF0C04103F38C754 + 5AF7505BF10C08100801084352F64652F44253F30813053AE63A39E639030403 + 1C521826A1250812010807032454131558150000000000000000000000000000 + 000000000000000000000000000000000000000070CD007CE30079DD00000000 + 7CE30089FA008CFF0089FA008CFF008CFF008CFF008CFF008CFF008CFF098FFF + 1996FF2A9DFF3AA4FF0804103A2AA34E58F74E58F40B0B120803054652F34548 + E64451F305130532CA323AE23A03070308070307040008040139E63939E43931 + B42F5E1347000000000000000000000000000000000000000000000000000000 + 0000000000000000000061B10000000079DD008CFF008CFF008CFF008CFF008C + FF008CFF008CFF008CFF008CFF0E91FF1E98FF2E9FFF3FA6FF040408382BAF4D + 5AEF555AF70F12250501050F04160804074250F3121A123AE93A39E239080803 + 0D2F08010401268C2539E7393DE63D3FE23E0804100000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 79DD008CFF008CFF008CFF008CFF008CFF008CFF008CFF008CFF028CFF1293FF + 239AFF33A1FF43A8FF0802083A2AA3565BF7555AF71714330501050104000801 + 07424FF12828203AEA3A39E639030703182F1008340801040139E7393DE83D39 + E939080400000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000070CD0088F9008CFF008CFF008CFF008C + FF008CFF008CFF008CFF078EFF1795FF279CFF38A3FF48AAFF0808005151F155 + 5AF30804030804000504050800082E358E0E0C1F1D192439E53940E640080400 + 2AA12739E63908020708010539E8393BE93B0804080000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000007CE3008CFF008CFF008CFF058EFD1D96F92398F8269AFA31A0FC42A8FF + 4FAEFF5CB3FF65B7FF0C08084F5AF14E57F50B04080804043639A54647E81C13 + 49363AA70804080F120835953439E7393EE63E39DF3939EA39081105308A2B3F + E73F080601000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000047BDB1D96F92398F82498F83BA0 + F399C1E1B1C9DDBCD4E7CBE0F3D9EDFFDCEEFFDEEFFFCDE8FF080808575BF750 + 58F624125A5057F34845DF4A41E0150E30C55734E3723EC56E33A23D27050105 + 39E43939E63939E6393CE63C14420C3BE03B192A090000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000004 + 04042D88D399C1E1B1C9DDB1C9DCB7CBDBCFD3D7D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFF9FCFF0C08085D61F15B61EF555AF64A4FE13937BB0E0A12DE74 + 39E1733CDE713CDF753AE67541C36B342C231F17141B3AE63A39E7393DE83D39 + E93939DE39000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000001818186893B8C3CCD2D5D5D6D5D5D6D5D5 + D6D6D6D6D6D6D6E3E3E3F1F1F1FFFFFFFFFFFFFFFFFFFFFFFF140C145C5EF668 + 63F75555EA10061CC3673FDF713A0C1104080403080105080007070407D56F36 + DE743EDE72401C200C29452939E63939E73939EA390000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000343434A2B4C2D5D5D6D6D6D6D6D6D6D6D6D6D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFFEFEFF20161C5C5EF6373EAE0E0413E2713DE1763CCD6A3C2A0D + 08A44B2CDE743EBD612F080401030403E1713CDE7239DE713AE1723C22201139 + C13341E641000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000001B1B1B99AEBED5D5D6D5D5D6D5D5 + D6CFD3D7B8CBDBBFD5E7CEE2F3DCEFFFDFF0FFE2F1FFE9F4FF10100C3639A46E + 4540DE7239DE713DE1713C07000784261CDE7639E3743E0812001F0407D86E36 + E3753EE57540E57541DE763CDE733DD26637493C387E2F7B0000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00001B1B1B99AEBFCED3D7B7CBDBB1C9DD99C1E140A2F339A2FA49AAFC59B2FF + 66B8FF74BEFF92CBFFD9ECFF0F0402C66531DE7139E2733D854B1E0A01084D11 + 0DE3733EE1723CDF713ADF753AE1763C1D0A08290708E57140E1763CDE733DC7 + 6B34080408000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000001818187FA5C399C1E13BA0F32498 + F81D96F91091FD1C97FF2C9EFF3CA5FF4DACFF5DB3FF71BBFF8DC8FF9FD0FF08 + 0400080406B95C2EDE7239070B070803014D1615DE723CDE7540E5714030090D + 0504003A120FE67541DE75390808044A0C290000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000707071778C81C92F3058EFD008CFF008CFF1092FF2099FF31A0FF41A7FF + 51AEFF62B5FF72BCFF7BBFFF7BBBF96E9FCD0808080806041D0508E571403E22 + 0C200708080405070407070007080303B05F31DE723967301908010500000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000007CE3008CFF008C + FF048DFF1594FF259BFF35A2FF46A9FF56B0FF66B7FF77BEFF7BBFFF6DAAE300 + 0000000000000000000000080401200C088D4024E17141E57140DF713ADE713E + DE76390801070000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000079DD008CFF008CFF098FFF1996FF2A9DFF3AA4FF4AABFF + 5BB2FF6BB9FF7BBFFF7BBFFF6AA5DD0000000000000000000000000000001D1A + 0C1A0F08110903441912E57140623B1E08020300000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000079DD008CFF008C + FF0E91FF1E98FF2E9FFF3FA6FF4FADFF5FB4FF70BBFF7BBFFF78BAF96299CD00 + 00000000000000000000000000000000000000003914100000005A2411000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000070CD0088F9078EFD2C9CF940A3F850ACFA60B4FC70BCFF + 7DC2FF87C6FF7EC0FF6DAAE30000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000707071A85DD40A2 + F3A0C3E1B7CBDDC6D8E7D4E5F3E2F1FFE5F2FFD9ECFF9FD0FF7AACDD05050500 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000001818187FA5C3B8CBDBD0D4D7D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFAFCFFE2EDF99FB7CD1C1C1C0000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000001B1B1B99AEBFD4D5 + D6D6D6D6D6D6D6E3E3E3F1F1F1FFFFFFFFFFFFFEFEFFD1DAE33E3E3E00000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000001D1D1D7B9BB4CACED1D6D6D6D5D5D6E2E2E3F0F0F1FEFEFF + FEFEFFFEFEFFC9D2DD2121210000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000343434A5B5 + C2CFD3D7BFCEDBC9D9E7D7E6F3E6F3FFECF5FFF0F4F9AEBDCD23232300000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000018181887A8C3A6C6E169B3F367B6FA77BEFC88C6FF + 9FD0FFB4CBE33939390000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000040404338C + D749A8F947A9FD54AFFF64B6FF74BDFF7EC0FF76ABDD05050500000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000001F7DCD369FF948AAFF58B1FF69B8FF79BFFF + 78BAF96299CD0000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 003592E34DACFF5DB3FF6DBAFF7BBFFF6DAAE300000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000003890DD51AEFF62B5FF72BCFF7BBFFF + 6AA5DD0000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 003B8FD84C9CE3589FDE69A9E375B6F46299CD00000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000003376B00000000000000000005788B6 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000006CC61A83DD247FCC00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DC71A83DD2686D71F6EB1 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000000000FFFF + FFFFFFFF0000FFFFFFFFFFFF0000FFFFFE1FDFFF0000FFFFE0078FFF0000FFFE + 000007FF0000FFF0000001FF0000FF80000000FF0000FF000000003F0000FF00 + 0000000F0000FE00000000070000F800000000070000F8000000000F0000FC00 + 000000070000FE00000000070000FF80000000070000FFC0000000070000FFE0 + 000000070000FFE0000000070000FFE0000000070000FFE0000000070000FFF0 + 000000070000FFF0000000030000FFF0000000070000FFF00000000F0000FFF0 + 0000003F0000FFF8000E00FF0000FFF8000F01FF0000FFF8000FD7FF0000FFF8 + 001FFFFF0000FFFC001FFFFF0000FFFC001FFFFF0000FFFC003FFFFF0000FFFC + 003FFFFF0000FFFE003FFFFF0000FFFE007FFFFF0000FFFE007FFFFF0000FFFE + 007FFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF + 01FFFFFF0000FFFF01FFFFFF0000FFFF81FFFFFF0000FFFFC3FFFFFF0000FFFF + FFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000} + OldCreateOrder = False + OnClose = FormClose + OnHide = FormHide + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object PageControlPref: TPageControl + Left = 8 + Top = 8 + Width = 497 + Height = 497 + TabOrder = 1 + end + object ButtonApply: TButton + Left = 146 + Top = 520 + Width = 105 + Height = 25 + Caption = 'Apply' + TabOrder = 0 + OnClick = ButtonApplyClick + end + object ButtonSave: TButton + Left = 265 + Top = 520 + Width = 105 + Height = 25 + Caption = 'Save' + TabOrder = 2 + OnClick = ButtonSaveClick + end + object ButtonOK: TButton + Left = 26 + Top = 520 + Width = 105 + Height = 25 + Caption = 'OK' + TabOrder = 3 + OnClick = ButtonOkClick + end + object ButtonCancel: TButton + Left = 386 + Top = 520 + Width = 105 + Height = 25 + Caption = 'Cancel' + TabOrder = 4 + OnClick = ButtonCancelClick + end +end diff --git a/plugins/win32/preferences.h b/plugins/win32/preferences.h new file mode 100644 index 0000000000..fc0c12ec1f --- /dev/null +++ b/plugins/win32/preferences.h @@ -0,0 +1,123 @@ +/***************************************************************************** + * preferences.h: the "Preferences" dialog box + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#ifndef preferencesH +#define preferencesH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TGroupBoxPref : public TGroupBox +{ +public: + __fastcall TGroupBoxPref( TComponent* Owner, module_config_t *p_config_arg ); + module_config_t *p_config; + TListView * __fastcall CreateListView( TWinControl *Parent, + int Left, int Width, int Top, int Height, TViewStyle ViewStyle ); + TButton * __fastcall CreateButton( TWinControl *Parent, + int Left, int Width, int Top, int Height, AnsiString Caption ); + TCheckBox * __fastcall CreateCheckBox( TWinControl *Parent, + int Left, int Width, int Top, int Height, AnsiString Caption ); + TLabel * __fastcall CreateLabel( TWinControl *Parent, + int Left, int Width, int Top, int Height, AnsiString Caption, + bool WordWrap ); + TEdit * __fastcall CreateEdit( TWinControl *Parent, + int Left, int Width, int Top, int Height, AnsiString Text ); + TUpDown * __fastcall CreateUpDown( TWinControl *Parent, + int Min, int Max, int Position, bool Thousands ); +}; +//--------------------------------------------------------------------------- +class TGroupBoxPlugin : public TGroupBoxPref +{ +public: + __fastcall TGroupBoxPlugin( TComponent* Owner, module_config_t *p_config ); + TListView *ListView; + TButton *ButtonConfig; + TButton *ButtonSelect; + TLabel *LabelDesc; + TLabel *LabelHint; + TLabel *LabelSelected; + TEdit *Edit; + module_t *ModuleSelected; + void __fastcall ListViewSelectItem( TObject *Sender, TListItem *Item, + bool Selected ); + void __fastcall ButtonSelectClick( TObject *Sender ); + void __fastcall ButtonConfigClick( TObject *Sender ); + void __fastcall EditChange( TObject *Sender ); +}; +//--------------------------------------------------------------------------- +class TGroupBoxString : public TGroupBoxPref +{ +public: + __fastcall TGroupBoxString( TComponent* Owner, module_config_t *p_config ); + TLabel *LabelDesc; + TEdit *Edit; + void __fastcall EditChange( TObject *Sender ); +}; +//--------------------------------------------------------------------------- +class TGroupBoxInteger : public TGroupBoxPref +{ +public: + __fastcall TGroupBoxInteger( TComponent* Owner, module_config_t *p_config ); + TLabel *LabelDesc; + TEdit *Edit; + TUpDown *UpDown; + void __fastcall EditChange( TObject *Sender ); +}; +//--------------------------------------------------------------------------- +class TGroupBoxBool : public TGroupBoxPref +{ +public: + __fastcall TGroupBoxBool( TComponent* Owner, module_config_t *p_config ); + TLabel *LabelDesc; + TCheckBox *CheckBox; + void __fastcall CheckBoxClick( TObject *Sender ); +}; +//--------------------------------------------------------------------------- +class TPreferencesDlg : public TForm +{ +__published: // IDE-managed Components + TPageControl *PageControlPref; + TButton *ButtonApply; + TButton *ButtonSave; + TButton *ButtonOK; + TButton *ButtonCancel; + void __fastcall FormShow( TObject *Sender ); + void __fastcall FormHide( TObject *Sender ); + void __fastcall ButtonOkClick( TObject *Sender ); + void __fastcall ButtonApplyClick( TObject *Sender ); + void __fastcall ButtonSaveClick( TObject *Sender ); + void __fastcall ButtonCancelClick( TObject *Sender ); + void __fastcall FormClose( TObject *Sender, TCloseAction &Action ); +private: // User declarations +public: // User declarations + __fastcall TPreferencesDlg( TComponent* Owner ); + void __fastcall CreateConfigDialog( char *psz_module_name ); + void __fastcall SaveValue( module_config_t *p_config ); +}; +//--------------------------------------------------------------------------- +#endif diff --git a/plugins/win32/win32.cpp b/plugins/win32/win32.cpp index e41689917a..3167bad3b6 100644 --- a/plugins/win32/win32.cpp +++ b/plugins/win32/win32.cpp @@ -2,9 +2,8 @@ * win32.cpp : Win32 interface plugin for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: win32.cpp,v 1.1 2002/01/21 00:52:07 sam Exp $ * - * Authors: + * Authors: Olivier Teulière * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,14 +26,14 @@ #include /* malloc(), free() */ #include -extern "C" -{ #include +#include "win32.h" /* Borland specific */ + /***************************************************************************** * Capabilities defined in the other files. *****************************************************************************/ -void _M( intf_getfunctions )( function_list_t * p_function_list ); +void _M( intf_getfunctions ) ( function_list_t * p_function_list ); /***************************************************************************** * Build configuration tree. @@ -43,7 +42,7 @@ MODULE_CONFIG_START MODULE_CONFIG_STOP MODULE_INIT_START - SET_DESCRIPTION( "Win32 interface" ) + SET_DESCRIPTION( "Win32 interface module" ) ADD_CAPABILITY( INTF, 100 ) ADD_SHORTCUT( "win32" ) MODULE_INIT_STOP @@ -55,4 +54,3 @@ MODULE_ACTIVATE_STOP MODULE_DEACTIVATE_START MODULE_DEACTIVATE_STOP -} /* extern "C" */ diff --git a/plugins/win32/win32.h b/plugins/win32/win32.h new file mode 100644 index 0000000000..47f5e29233 --- /dev/null +++ b/plugins/win32/win32.h @@ -0,0 +1,31 @@ +/***************************************************************************** + * win32.h : Win32 interface plugin for vlc + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teulière + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +/***************************************************************************** + * Exported interface functions. + *****************************************************************************/ +extern "C" __declspec(dllexport) + int __VLC_SYMBOL( InitModule ) ( module_t *p_module ); +extern "C" __declspec(dllexport) + int __VLC_SYMBOL( ActivateModule ) ( module_t *p_module ); +extern "C" __declspec(dllexport) + int __VLC_SYMBOL( DeactivateModule ) ( module_t *p_module ); diff --git a/plugins/win32/win32_common.h b/plugins/win32/win32_common.h new file mode 100644 index 0000000000..3d6bee564f --- /dev/null +++ b/plugins/win32/win32_common.h @@ -0,0 +1,89 @@ +/***************************************************************************** + * win32_common.h: private win32 interface description + ***************************************************************************** + * Copyright (C) 2002 VideoLAN + * + * Authors: Olivier Teuliere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + *****************************************************************************/ + +#include "about.h" +#include "disc.h" +#include "mainframe.h" +#include "menu.h" +#include "messages.h" +#include "network.h" +#include "playlist.h" +#include "preferences.h" + +typedef struct es_descriptor_s es_descriptor_t; + +/***************************************************************************** + * The TrackBar is graduated from 0 to SLIDER_MAX_VALUE. + * SLIDER_MAX_VALUE is set to the higher acceptable value (2^31 - 1), in order + * to obtain the best precision in date calculation + *****************************************************************************/ +#define SLIDER_MAX_VALUE 2147483647 + +/***************************************************************************** + * intf_sys_t: description and status of Win32 interface + *****************************************************************************/ +typedef struct intf_sys_s +{ + /* special actions */ + boolean_t b_playing; + boolean_t b_popup_changed; /* display popup menu ? */ + boolean_t b_slider_free; /* slider status */ + + /* menus handlers */ + boolean_t b_program_update; /* do we need to update programs + menu */ + boolean_t b_title_update; /* do we need to update title menus */ + boolean_t b_chapter_update; /* do we need to update chapter + menus */ + boolean_t b_audio_update; /* do we need to update audio menus */ + boolean_t b_spu_update; /* do we need to update spu menus */ + + /* windows and widgets */ + TMainFrameDlg * p_window; /* main window */ + TPlaylistDlg * p_playlist; /* playlist */ + TPopupMenu * p_popup; /* popup menu */ + TAboutDlg * p_about; /* about window */ + TDiscDlg * p_disc; /* disc selection window */ + TNetworkDlg * p_network; /* network stream window */ + TPreferencesDlg * p_preferences; /* preferences window */ + + /* The slider */ + off_t OldValue; /* previous value */ + + /* The messages window */ + TMessagesDlg * p_messages; /* messages window */ + intf_subscription_t*p_sub; /* interface subscription */ + + /* Playlist management */ + int i_playing; /* playlist selected item */ + + /* The window labels for DVD mode */ + TLabel * p_label_title; + TLabel * p_label_chapter; + int i_part; /* current chapter */ + + /* Language information */ + es_descriptor_t * p_audio_es_old; + es_descriptor_t * p_spu_es_old; + +} intf_sys_t; + diff --git a/share/vlc48x48.ico b/share/vlc48x48.ico new file mode 100644 index 0000000000..8c62276a38 Binary files /dev/null and b/share/vlc48x48.ico differ