]> git.sesse.net Git - vlc/commitdiff
* added a wxwindows interface using the wxWindows cross-platform GUI framework.
authorGildas Bazin <gbazin@videolan.org>
Mon, 18 Nov 2002 13:02:16 +0000 (13:02 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 18 Nov 2002 13:02:16 +0000 (13:02 +0000)
   The interface is quite basic for now but should be functional anyway.
   (you need to have wxWindows >= 2.3.0 installed to use this plugin)

18 files changed:
configure.ac.in
modules/LIST
modules/Makefile.am
modules/gui/wxwindows/.cvsignore [new file with mode: 0644]
modules/gui/wxwindows/Modules.am [new file with mode: 0644]
modules/gui/wxwindows/bitmaps/disc.xpm [new file with mode: 0644]
modules/gui/wxwindows/bitmaps/file.xpm [new file with mode: 0644]
modules/gui/wxwindows/bitmaps/net.xpm [new file with mode: 0644]
modules/gui/wxwindows/bitmaps/next.xpm [new file with mode: 0644]
modules/gui/wxwindows/bitmaps/pause.xpm [new file with mode: 0644]
modules/gui/wxwindows/bitmaps/play.xpm [new file with mode: 0644]
modules/gui/wxwindows/bitmaps/playlist.xpm [new file with mode: 0644]
modules/gui/wxwindows/bitmaps/previous.xpm [new file with mode: 0644]
modules/gui/wxwindows/bitmaps/stop.xpm [new file with mode: 0644]
modules/gui/wxwindows/interface.cpp [new file with mode: 0644]
modules/gui/wxwindows/timer.cpp [new file with mode: 0644]
modules/gui/wxwindows/wxwindows.cpp [new file with mode: 0644]
modules/gui/wxwindows/wxwindows.h [new file with mode: 0644]

index 041238097230bf7240f9ba6763475fdbe86ca81e..68849d3c8892108af265c9b1243206d31b4b32a1 100644 (file)
@@ -125,6 +125,8 @@ case "x${target_os}" in
         # add ws2_32 for closesocket, select, recv
         CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
         CPPFLAGS="${CPPFLAGS_save}"
+        CXXFLAGS_save="${CXXFLAGS_save} -fvtable-thunks";
+        CXXFLAGS="${CXXFLAGS_save}"
         LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows"
         LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
         LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
@@ -413,7 +415,7 @@ AC_CACHE_CHECK([if \$CC accepts -Wall -Winline],
      AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)])
 if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
     CFLAGS_save="-Wall -Winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
-    CXXFLAGS_save="-Wall -Winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
+    CXXFLAGS_save="-Wall ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
     OBJCFLAGS_save="-Wall -Winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
 else
     AC_CACHE_CHECK([if \$CC accepts -wall -winline],
@@ -1956,6 +1958,46 @@ developement tools or remove the --enable-gnome option])
     CPPFLAGS="${CPPFLAGS_save}"
   fi])
 
+dnl
+dnl  wxWindows module
+dnl
+AC_ARG_ENABLE(wxwindows,
+  [  --enable-wxwindows      wxWindows support (default enabled)])
+if test "x${enable_wxwindows}" != "xno"
+then
+  WXWINDOWS_PATH="${PATH}"
+  AC_ARG_WITH(wx-config-path,
+    [    --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
+    [ if test "x${with_wx_config_path}" != "xno"
+      then
+        WXWINDOWS_PATH="${with_wx_config_path}:${PATH}"
+      fi ])
+  # look for wx-config
+  AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH})
+  if test "x${WX_CONFIG}" != "xno"
+  then
+    if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
+    then
+      AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-wxwindows.])
+    fi
+    CXXFLAGS_wxwindows="${CXXFLAGS_wxwindows} `${WX_CONFIG} --cflags`"
+    LDFLAGS_wxwindows="${LDFLAGS_wxwindows} `${WX_CONFIG} --libs`"
+    # now look for the wx.h header
+    CPPFLAGS="${save_CPPFLAGS} ${CXXFLAGS_wxwindows}"
+    ac_cv_wx_headers=yes
+    AC_CHECK_HEADERS(wx/wx.h, , [
+      ac_cv_wx_headers=no
+      echo "Cannot find wxWindows development headers."
+    ])
+    if test "x${ac_cv_wx_headers}" = "xyes"
+    then
+      PLUGINS="${PLUGINS} wxwindows"
+      ALIASES="${ALIASES} wxvlc"
+    fi
+    CPPFLAGS="${save_CPPFLAGS}"
+  fi
+fi
+
 dnl
 dnl  Qt module
 dnl
index c10f0255d142afe9caae22e2bd4c181c871e419b..03252459cea5d8d709ebd45ee60908626a32d7c4 100644 (file)
@@ -1,5 +1,5 @@
 List of vlc plugins
-$Id: LIST,v 1.3 2002/10/23 23:17:45 gbazin Exp $
+$Id: LIST,v 1.4 2002/11/18 13:02:16 gbazin Exp $
 
  * a52_system: input module for A52 decapsulation.
 
@@ -143,6 +143,8 @@ $Id: LIST,v 1.3 2002/10/23 23:17:45 gbazin Exp $
 
  * waveout: simple audio output module for Windows.
 
+ * wxwindows: interface module using the cross-platform wxWindows library.
+
  * x11: video output module using the X11 API.
 
  * xvideo: video output module using the XVideo API.
index 9e69819f2d640fb2b5132cafc5e77cf00cfb0cd6..f55e9835f082713e924e659cf5f1cc434a9ddacf 100644 (file)
@@ -46,6 +46,7 @@ EXTRA_DIST = \
        gui/qnx/Modules.am \
        gui/qt/Modules.am \
        gui/win32/Modules.am \
+       gui/wxwindows/Modules.am \
        misc/Modules.am \
        misc/dummy/Modules.am \
        misc/logger/Modules.am \
diff --git a/modules/gui/wxwindows/.cvsignore b/modules/gui/wxwindows/.cvsignore
new file mode 100644 (file)
index 0000000..ec96903
--- /dev/null
@@ -0,0 +1,2 @@
+.deps
+.dirstamp
diff --git a/modules/gui/wxwindows/Modules.am b/modules/gui/wxwindows/Modules.am
new file mode 100644 (file)
index 0000000..c181d6d
--- /dev/null
@@ -0,0 +1,18 @@
+SOURCES_wxwindows = \
+       modules/gui/wxwindows/wxwindows.cpp \
+       modules/gui/wxwindows/interface.cpp \
+       modules/gui/wxwindows/timer.cpp
+
+noinst_HEADERS += \
+       modules/gui/wxwindows/wxwindows.h
+
+EXTRA_DIST += \
+       modules/gui/wxwindows/bitmaps/file.xpm \
+       modules/gui/wxwindows/bitmaps/disc.xpm \
+       modules/gui/wxwindows/bitmaps/net.xpm \
+       modules/gui/wxwindows/bitmaps/stop.xpm \
+       modules/gui/wxwindows/bitmaps/play.xpm \
+       modules/gui/wxwindows/bitmaps/pause.xpm \
+       modules/gui/wxwindows/bitmaps/playlist.xpm \
+       modules/gui/wxwindows/bitmaps/previous.xpm \
+       modules/gui/wxwindows/bitmaps/next.xpm
diff --git a/modules/gui/wxwindows/bitmaps/disc.xpm b/modules/gui/wxwindows/bitmaps/disc.xpm
new file mode 100644 (file)
index 0000000..012444a
--- /dev/null
@@ -0,0 +1,165 @@
+/* XPM */
+static char * disc_xpm[] = {
+"24 24 138 2",
+"      c None",
+".     c #000000",
+"+     c #AEB3B3",
+"@     c #C6C9CD",
+"#     c #D7D4DF",
+"$     c #ECDEF3",
+"%     c #E7CBE9",
+"&     c #D9B5D3",
+"*     c #B1B7A5",
+"=     c #B0B8AD",
+"-     c #B3B9B6",
+";     c #C1C6C8",
+">     c #D5D3DC",
+",     c #E5CAE6",
+"'     c #E0BBD7",
+")     c #E1ADC2",
+"!     c #E3ACA3",
+"~     c #CAC1A4",
+"{     c #C5C7AC",
+"]     c #B7BEAF",
+"^     c #ADB4AF",
+"/     c #BDC2C3",
+"(     c #D1D0D8",
+"_     c #E5C7E4",
+":     c #E0B6D1",
+"<     c #E7A9B4",
+"[     c #EDCDB6",
+"}     c #D6CFAE",
+"|     c #DFA79F",
+"1     c #DDBFAA",
+"2     c #CFC5A9",
+"3     c #C1C4AC",
+"4     c #B2BAAF",
+"5     c #B6BBBB",
+"6     c #CDCED4",
+"7     c #E4C4E1",
+"8     c #E0AFC7",
+"9     c #EABCAE",
+"0     c #E1D6B6",
+"a     c #C7CCAE",
+"b     c #A2AB9A",
+"c     c #E3ABC0",
+"d     c #E6A3A7",
+"e     c #DFBAA8",
+"f     c #BDC2AE",
+"g     c #E2BFDC",
+"h     c #E7D6B8",
+"i     c #ACB6A6",
+"j     c #9DA89F",
+"k     c #D9AFCF",
+"l     c #E1B4D2",
+"m     c #E2B0CB",
+"n     c #E4A9BB",
+"o     c #E2B2A6",
+"p     c #6A6A6A",
+"q     c #0D0D0D",
+"r     c #A6B1A3",
+"s     c #98A29C",
+"t     c #8F9796",
+"u     c #7E8485",
+"v     c #E8C6E7",
+"w     c #E5C2E3",
+"x     c #E3BDDD",
+"y     c #E1B6D5",
+"z     c #8B9092",
+"A     c #979EA2",
+"B     c #A0A7AE",
+"C     c #E7D3ED",
+"D     c #E8D1ED",
+"E     c #E8CEEC",
+"F     c #E9CCEB",
+"G     c #A7AEB7",
+"H     c #B2B6C5",
+"I     c #BABCCE",
+"J     c #BFBED3",
+"K     c #E9DFF0",
+"L     c #E1D2F7",
+"M     c #CAC7D2",
+"N     c #C5C4CD",
+"O     c #BFBFC7",
+"P     c #B8B9C0",
+"Q     c #AEAFB6",
+"R     c #D5A8E1",
+"S     c #D8B2E9",
+"T     c #D9B8ED",
+"U     c #DBBDF0",
+"V     c #DCBFF1",
+"W     c #A4A6AC",
+"X     c #A8AAAF",
+"Y     c #A0A6A8",
+"Z     c #989E9C",
+"`     c #A1A89E",
+" .    c #B1B6A1",
+"..    c #C08CAD",
+"+.    c #CC90B5",
+"@.    c #D394CA",
+"#.    c #D6A2DB",
+"$.    c #CFA7DF",
+"%.    c #989F9B",
+"&.    c #ACB3A0",
+"*.    c #B9B9A4",
+"=.    c #D0B8A8",
+"-.    c #C5B5B8",
+";.    c #B6BBAD",
+">.    c #E3D7B5",
+",.    c #DDB4A9",
+"'.    c #CB89AC",
+").    c #C891B5",
+"!.    c #D18DB7",
+"~.    c #A1A798",
+"{.    c #BDB9A5",
+"].    c #CAB5B7",
+"^.    c #B8B1B1",
+"/.    c #C2C8B2",
+"(.    c #E1BFAF",
+"_.    c #DB929A",
+":.    c #BE82A6",
+"<.    c #C891B4",
+"[.    c #C78BB0",
+"}.    c #BCB6A1",
+"|.    c #CDB6B7",
+"1.    c #C0B4B5",
+"2.    c #B1B1AA",
+"3.    c #CAD1B4",
+"4.    c #E2C1B0",
+"5.    c #DBA8A3",
+"6.    c #D28AA9",
+"7.    c #B77EA2",
+"8.    c #BD89A9",
+"9.    c #C9AFAF",
+"0.    c #D0D6B5",
+"a.    c #E2BFAF",
+"b.    c #C684A7",
+"c.    c #ACAAA6",
+"d.    c #BDC3B0",
+"e.    c #D2D7B5",
+"f.    c #E2BFAE",
+"g.    c #DBB6A8",
+"                                                ",
+"                                                ",
+"                                                ",
+"                  . . . . . .                   ",
+"              . . + @ # $ % & . .               ",
+"            . * = - ; > $ , ' ) ! .             ",
+"          . ~ { ] ^ / ( $ _ : < [ } .           ",
+"        . | 1 2 3 4 5 6 $ 7 8 9 0 a b .         ",
+"        . c d e 2 f ^ @ $ g < h a i j .         ",
+"      . k l m n o 2 p q q p [ a r s t u .       ",
+"      . v w x y m p .     . p j t z A B .       ",
+"      . C D E F v q         q A G H I J .       ",
+"      . K K K K K q         q L L L L L .       ",
+"      . M N O P Q p .     . p R S T U V .       ",
+"      . W X Y Z `  .p q q p ..+.@.#.R $..       ",
+"        . %.` &.*.=.-.;.>.,.'...).!.@..         ",
+"        . ~. .{.=.].^./.>.(._.:...<.[..         ",
+"          . }.=.|.1.2.3.>.4.5.6.7.8..           ",
+"            . 9.-.^.;.0.>.a.,._.b..             ",
+"              . . c.d.e.>.f.g.. .               ",
+"                  . . . . . .                   ",
+"                                                ",
+"                                                ",
+"                                                "};
diff --git a/modules/gui/wxwindows/bitmaps/file.xpm b/modules/gui/wxwindows/bitmaps/file.xpm
new file mode 100644 (file)
index 0000000..9ea2954
--- /dev/null
@@ -0,0 +1,81 @@
+/* XPM */
+static char * file_xpm[] = {
+"24 24 54 1",
+"      c None",
+".     c #000000",
+"+     c #0B0B0B",
+"@     c #A4946F",
+"#     c #131313",
+"$     c #FEFEF7",
+"%     c #FFFFFF",
+"&     c #C0B59C",
+"*     c #D5CEBD",
+"=     c #C4BAA2",
+"-     c #EFEDE7",
+";     c #C5BBA4",
+">     c #C5BBA3",
+",     c #E9E5DC",
+"'     c #D4CDBC",
+")     c #AD9E7D",
+"!     c #A99A77",
+"~     c #DAD4C5",
+"{     c #F1EEE8",
+"]     c #B5A88A",
+"^     c #AFA281",
+"/     c #A59671",
+"(     c #D5CDBC",
+"_     c #EBE8E0",
+":     c #ECE8E0",
+"<     c #CBC2AD",
+"[     c #B9AD91",
+"}     c #B8AC8F",
+"|     c #AA9B78",
+"1     c #F3F1EC",
+"2     c #C7BDA6",
+"3     c #B7AA8D",
+"4     c #B5A98B",
+"5     c #B4A789",
+"6     c #AB9C7B",
+"7     c #D7D1C1",
+"8     c #B7AB8E",
+"9     c #B6A98C",
+"0     c #B8AB8E",
+"a     c #685E46",
+"b     c #B3A688",
+"c     c #B1A484",
+"d     c #A89975",
+"e     c #938463",
+"f     c #D2CAB8",
+"g     c #B4A788",
+"h     c #CFC7B3",
+"i     c #AEA07F",
+"j     c #A79875",
+"k     c #7D7155",
+"l     c #C1B69D",
+"m     c #A79774",
+"n     c #8B7D5E",
+"o     c #A0906C",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"              ..        ",
+"           +..@@.       ",
+"    ..  .#.@@@@$$%...   ",
+"   .@@..@@@@$$$$..&*.   ",
+"   .@@@@@$$$$$..=-;@.   ",
+"    .@@$$$$$..>,')!@.   ",
+"    .@@$$$..~{~]]^/@.   ",
+"     .@$$.(_:<[})|@@.   ",
+"     .@@$.12[3456@@@.   ",
+"      .@$.78]90)@@@a.   ",
+"      .@@.*]b9cd@e..    ",
+"       .@.f]]g|@..      ",
+"       .@.h4ijk.        ",
+"        ..lmn..         ",
+"        ..o..           ",
+"         ..             ",
+"                        ",
+"                        ",
+"                        "};
diff --git a/modules/gui/wxwindows/bitmaps/net.xpm b/modules/gui/wxwindows/bitmaps/net.xpm
new file mode 100644 (file)
index 0000000..e29bc60
--- /dev/null
@@ -0,0 +1,57 @@
+/* XPM */
+static char * net_xpm[] = {
+"24 24 30 1",
+"      c None",
+".     c #272727",
+"+     c #888888",
+"@     c #B0A5BA",
+"#     c #7E6792",
+"$     c #3C284D",
+"%     c #B8B0C1",
+"&     c #87709D",
+"*     c #70518A",
+"=     c #6C4C85",
+"-     c #65477C",
+";     c #513663",
+">     c #856E99",
+",     c #4B365F",
+"'     c #573E6D",
+")     c #483259",
+"!     c #372544",
+"~     c #4B335C",
+"{     c #776684",
+"]     c #A898B5",
+"^     c #857991",
+"/     c #8A759B",
+"(     c #747474",
+"_     c #9C89AA",
+":     c #4D3663",
+"<     c #A095AC",
+"[     c #65477E",
+"}     c #7A5695",
+"|     c #826A97",
+"1     c #412D52",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"           .            ",
+"          .+            ",
+"         .@#..$         ",
+"        .%&**=-;.       ",
+"         .>*.$,--.      ",
+"       .  ..   $').     ",
+"      .    .    !'.     ",
+"     ..          ~!     ",
+"     !{          !.     ",
+"     .].    .    .      ",
+"     .^/.   (.  .       ",
+"      ._=:!.<[.         ",
+"       !:**}|=*.        ",
+"         1!.=-.         ",
+"            ..          ",
+"            .           ",
+"                        ",
+"                        ",
+"                        ",
+"                        "};
diff --git a/modules/gui/wxwindows/bitmaps/next.xpm b/modules/gui/wxwindows/bitmaps/next.xpm
new file mode 100644 (file)
index 0000000..5182ba9
--- /dev/null
@@ -0,0 +1,79 @@
+/* XPM */
+static char * next_xpm[] = {
+"24 24 52 1",
+"      c None",
+".     c #000000",
+"+     c #F7F7F7",
+"@     c #CBD6CA",
+"#     c #BECEBA",
+"$     c #E7EFE7",
+"%     c #ACC8A9",
+"&     c #EBF2EA",
+"*     c #77A16E",
+"=     c #E3EBE2",
+"-     c #709867",
+";     c #F8F8F7",
+">     c #F1F5F0",
+",     c #ECF2EB",
+"'     c #E5EEE3",
+")     c #E0EBDF",
+"!     c #D8E6D6",
+"~     c #C6D9C2",
+"{     c #C5D7C3",
+"]     c #B2CBB0",
+"^     c #AAC7A8",
+"/     c #0F1308",
+"(     c #DDE6DB",
+"_     c #AEC8AD",
+":     c #ABC7A8",
+"<     c #AAC6A7",
+"[     c #A8C6A5",
+"}     c #ADC8AD",
+"|     c #A8C7A8",
+"1     c #A5C4A3",
+"2     c #7F9F76",
+"3     c #D6E1D4",
+"4     c #ABC7AA",
+"5     c #A7C5A4",
+"6     c #A9C7A6",
+"7     c #AFC8AD",
+"8     c #A4C3A2",
+"9     c #6B9060",
+"0     c #E4ECE3",
+"a     c #A7B6A2",
+"b     c #698D60",
+"c     c #6B9063",
+"d     c #445B2C",
+"e     c #9FB79B",
+"f     c #9FB199",
+"g     c #5B7950",
+"h     c #95A88F",
+"i     c #9FAF99",
+"j     c #789171",
+"k     c #506B46",
+"l     c #889D7F",
+"m     c #475E3E",
+"                        ",
+"                        ",
+"                        ",
+"        .        ....   ",
+"        ..       .+@.   ",
+"        .#.      .$%.   ",
+"        .&*.     .$%.   ",
+" ........=%-.    .$%.   ",
+" .;>,')!~{]^-/   .$%.   ",
+" .(_:::<[^}|12.  .$%.   ",
+" .34[5[6:%^:789. .0%.   ",
+" .abccccccccccbd..ec.   ",
+" .fgggggggggggd. .hg.   ",
+" .iggggggggggd.  .hg.   ",
+" .jkkkkkkgggd.   .hg.   ",
+" ........kgd.    .hg.   ",
+"        .kd.     .hg.   ",
+"        .d.      .hg.   ",
+"        ..       .lm.   ",
+"        .        ....   ",
+"                        ",
+"                        ",
+"                        ",
+"                        "};
diff --git a/modules/gui/wxwindows/bitmaps/pause.xpm b/modules/gui/wxwindows/bitmaps/pause.xpm
new file mode 100644 (file)
index 0000000..4abba32
--- /dev/null
@@ -0,0 +1,75 @@
+/* XPM */
+static char * pause_xpm[] = {
+"24 24 48 1",
+"      c None",
+".     c #000000",
+"+     c #C1D6BD",
+"@     c #AEC5A8",
+"#     c #A6BFA0",
+"$     c #778E6F",
+"%     c #6B8661",
+"&     c #6C8562",
+"*     c #65815C",
+"=     c #BDD3B8",
+"-     c #AEC8AD",
+";     c #ABC7AA",
+">     c #698D60",
+",     c #5B7950",
+"'     c #506B46",
+")     c #BFD4BB",
+"!     c #ABC7A8",
+"~     c #A8C6A5",
+"{     c #6B9063",
+"]     c #C2D7BE",
+"^     c #A7C5A4",
+"/     c #AAC6A7",
+"(     c #A9C7A6",
+"_     c #8CA782",
+":     c #B1CDAE",
+"<     c #B4CEB1",
+"[     c #B0CAAD",
+"}     c #AAC7A8",
+"|     c #ACC8A9",
+"1     c #445B2C",
+"2     c #77A16E",
+"3     c #B2CBB0",
+"4     c #ADC8AD",
+"5     c #709867",
+"6     c #A8C7A8",
+"7     c #A5C4A3",
+"8     c #AFC8AD",
+"9     c #0F1308",
+"0     c #7F9F76",
+"a     c #A4C3A2",
+"b     c #6B9060",
+"c     c #F3F3F3",
+"d     c #C9DBC7",
+"e     c #9FB79B",
+"f     c #95A88F",
+"g     c #889D7F",
+"h     c #C7D3C6",
+"i     c #475E3E",
+"                        ",
+"                        ",
+"       .........        ",
+"       .+@#$%&*.        ",
+"       .=-;>,,'.        ",
+"       .)!~{,,'.        ",
+"       .]!^{,,'.        ",
+"       .]!~{,,'.        ",
+"       .]/({,,'.        ",
+"   .....]~!{,,'.....    ",
+"    ._:<[}|{,,,''1.     ",
+"     .2|34}{,,,,1.      ",
+"      .5}6!{,,,1.       ",
+"       .578{,,1.        ",
+"        90a{,1.         ",
+"         .b>1.          ",
+"          .1.           ",
+"           .            ",
+"   .................    ",
+"   .cddddddeffffffg.    ",
+"   .h||||||{,,,,,,i.    ",
+"   .................    ",
+"                        ",
+"                        "};
diff --git a/modules/gui/wxwindows/bitmaps/play.xpm b/modules/gui/wxwindows/bitmaps/play.xpm
new file mode 100644 (file)
index 0000000..e30a059
--- /dev/null
@@ -0,0 +1,68 @@
+/* XPM */
+static char * play_xpm[] = {
+"24 24 41 1",
+"      c None",
+".     c #000000",
+"+     c #8CA782",
+"@     c #B1CDAE",
+"#     c #77A16E",
+"$     c #B4CEB1",
+"%     c #ACC8A9",
+"&     c #709867",
+"*     c #C1D6BD",
+"=     c #BDD3B8",
+"-     c #BFD4BB",
+";     c #C2D7BE",
+">     c #B0CAAD",
+",     c #B2CBB0",
+"'     c #AAC7A8",
+")     c #0F1308",
+"!     c #AEC5A8",
+"~     c #AEC8AD",
+"{     c #ABC7A8",
+"]     c #AAC6A7",
+"^     c #A8C6A5",
+"/     c #ADC8AD",
+"(     c #A8C7A8",
+"_     c #A5C4A3",
+":     c #7F9F76",
+"<     c #A6BFA0",
+"[     c #ABC7AA",
+"}     c #A7C5A4",
+"|     c #A9C7A6",
+"1     c #AFC8AD",
+"2     c #A4C3A2",
+"3     c #6B9060",
+"4     c #778E6F",
+"5     c #698D60",
+"6     c #6B9063",
+"7     c #445B2C",
+"8     c #6B8661",
+"9     c #5B7950",
+"0     c #6C8562",
+"a     c #65815C",
+"b     c #506B46",
+"                        ",
+"                        ",
+"                        ",
+"           .            ",
+"           ..           ",
+"           .+.          ",
+"           .@#.         ",
+"    ........$%&.        ",
+"    .*=-;;;;>,'&)       ",
+"    .!~{{{]^'/(_:.      ",
+"    .<[^}^|{%'{123.     ",
+"    .45666666666657.    ",
+"    .8999999999997.     ",
+"    .099999999997.      ",
+"    .abbbbbb9997.       ",
+"    ........b97.        ",
+"           .b7.         ",
+"           .7.          ",
+"           ..           ",
+"           .            ",
+"                        ",
+"                        ",
+"                        ",
+"                        "};
diff --git a/modules/gui/wxwindows/bitmaps/playlist.xpm b/modules/gui/wxwindows/bitmaps/playlist.xpm
new file mode 100644 (file)
index 0000000..8d97287
--- /dev/null
@@ -0,0 +1,201 @@
+/* XPM */
+static char * playlist_xpm[] = {
+"24 24 174 2",
+"      c None",
+".     c #000000",
+"+     c #FDFDFD",
+"@     c #F5F5F5",
+"#     c #F6F6F6",
+"$     c #D0D0D0",
+"%     c #C1C1C1",
+"&     c #C3C3C3",
+"*     c #C6C6C6",
+"=     c #C8C8C8",
+"-     c #8D8D8D",
+";     c #CACACA",
+">     c #919191",
+",     c #EFEFEF",
+"'     c #878787",
+")     c #8A8A8A",
+"!     c #5C5C5C",
+"~     c #F8F8F8",
+"{     c #EAEAEA",
+"]     c #CCCCCC",
+"^     c #CECECE",
+"/     c #979797",
+"(     c #CDCDCD",
+"_     c #A1A1A1",
+":     c #090600",
+"<     c #A3A3A3",
+"[     c #C5C5C5",
+"}     c #C4C4C4",
+"|     c #D1D1D1",
+"1     c #D2D2D1",
+"2     c #D2D2D2",
+"3     c #9A9A9A",
+"4     c #E8E8E8",
+"5     c #949494",
+"6     c #939393",
+"7     c #574F4F",
+"8     c #FDFDFC",
+"9     c #777777",
+"0     c #7E7E7E",
+"a     c #9D9D9D",
+"b     c #6B6B6B",
+"c     c #F1F1F1",
+"d     c #ECECEC",
+"e     c #CFCFCF",
+"f     c #575050",
+"g     c #FDFAF8",
+"h     c #A5A5A5",
+"i     c #B9B9B9",
+"j     c #EEEEEE",
+"k     c #EDEDED",
+"l     c #D5D5D5",
+"m     c #BABABA",
+"n     c #6D6767",
+"o     c #F9F1EA",
+"p     c #9E9E9E",
+"q     c #B5B5B5",
+"r     c #D9D9D9",
+"s     c #D7D7D7",
+"t     c #BCBCBC",
+"u     c #625C5B",
+"v     c #F9EEE4",
+"w     c #4F4D4A",
+"x     c #646464",
+"y     c #747474",
+"z     c #D6D6D5",
+"A     c #DFDFDF",
+"B     c #A0A0A0",
+"C     c #615C5B",
+"D     c #F9F0E4",
+"E     c #746C67",
+"F     c #FEFDFC",
+"G     c #FFFEFD",
+"H     c #131210",
+"I     c #636363",
+"J     c #7C7C7C",
+"K     c #F3F2F2",
+"L     c #98948F",
+"M     c #F9EFE3",
+"N     c #A09489",
+"O     c #FEFDFD",
+"P     c #766D68",
+"Q     c #736961",
+"R     c #A3A3A2",
+"S     c #A6A6A6",
+"T     c #DBDBDB",
+"U     c #C7C7C7",
+"V     c #E8E5E2",
+"W     c #97938E",
+"X     c #F6E9D8",
+"Y     c #84817A",
+"Z     c #FBF3EA",
+"`     c #908C86",
+" .    c #F1EDE7",
+"..    c #7B7975",
+"+.    c #878786",
+"@.    c #070000",
+"#.    c #FAFAFA",
+"$.    c #DDDDDD",
+"%.    c #E2DFDC",
+"&.    c #A8A199",
+"*.    c #F0E0CE",
+"=.    c #C8BFB4",
+"-.    c #D5CCBF",
+";.    c #DFD7CD",
+">.    c #DAD3C9",
+",.    c #DDCFC4",
+"'.    c #928C84",
+").    c #A8A8A8",
+"!.    c #959595",
+"~.    c #040000",
+"{.    c #D9D5D2",
+"].    c #D9CABB",
+"^.    c #D7C8B8",
+"/.    c #DECFBF",
+"(.    c #D8C9B9",
+"_.    c #E3D3C2",
+":.    c #C9BBAC",
+"<.    c #D9CEC2",
+"[.    c #7F766D",
+"}.    c #909090",
+"|.    c #D3D3D3",
+"1.    c #060100",
+"2.    c #C0BDBA",
+"3.    c #8C8782",
+"4.    c #C2B5A7",
+"5.    c #BFB4A6",
+"6.    c #B8AB9D",
+"7.    c #BAAD9E",
+"8.    c #BEB0A2",
+"9.    c #948A7F",
+"0.    c #716860",
+"a.    c #E2E2E2",
+"b.    c #A9A9A8",
+"c.    c #332C2B",
+"d.    c #5D5954",
+"e.    c #79736C",
+"f.    c #958C80",
+"g.    c #8D8379",
+"h.    c #988D82",
+"i.    c #706760",
+"j.    c #787878",
+"k.    c #E4E4E4",
+"l.    c #C2C2C2",
+"m.    c #201A1A",
+"n.    c #57514F",
+"o.    c #625C59",
+"p.    c #625A53",
+"q.    c #6B625A",
+"r.    c #585251",
+"s.    c #696764",
+"t.    c #080000",
+"u.    c #989898",
+"v.    c #B0B0B0",
+"w.    c #AFAFAF",
+"x.    c #999999",
+"y.    c #9D9897",
+"z.    c #050000",
+"A.    c #0C0303",
+"B.    c #080100",
+"C.    c #030000",
+"D.    c #282523",
+"E.    c #5A5A5A",
+"F.    c #868686",
+"G.    c #ECE4E2",
+"H.    c #DED7D5",
+"I.    c #D8D1D0",
+"J.    c #E0DBD7",
+"K.    c #E9E6E3",
+"L.    c #FCFBFA",
+"M.    c #030500",
+"N.    c #0B0505",
+"O.    c #14100F",
+"P.    c #090806",
+"Q.    c #000100",
+"                                                ",
+"    . . . . . . . . . . . . . . . . . . . .     ",
+"    . + @ @ @ @ @ @ @ # # # # # # # # # $ .     ",
+"    . @ % % % & & & & * * * * * = = = = - .     ",
+"    . # & & & * * * * = = = = = ; ; ; ; > .     ",
+"    . , ' ' ' ) ) ) ) - - - - - > > > > ! .     ",
+"    . ~ { { { { { { { { { { { { { { { { ; .     ",
+"    . # ; ; ; ] ] ] ] ] ^ ^ ^ ^ $ $ $ $ / .     ",
+"    . # ] ] ] ( ^ ^ ^ _ : < [ } | 1 | 2 3 .     ",
+"    . 4 5 5 5 / / / 6 7 8 . 9 0 - a a a b .     ",
+"    . ~ c d d d d d e f g . h i $ j j k * .     ",
+"    . ~ 2 2 2 2 l l m n o . > p q r r r < .     ",
+"    . ~ l l l l s s t u v w . x . y p z < .     ",
+"    . A B B B B < 9 . C D E F . G H . I J .     ",
+"    . ~ @ , , , j . K L M N O P F Q R . S .     ",
+"    . ~ T T T T U . V W X Y Z `  ...+.@.< .     ",
+"    . #.$.$.$.$.& . %.&.*.=.-.;.>.,.'.@.p .     ",
+"    . { ).).).).!.~.{.].^./.(._.:.<.[.@.}..     ",
+"    . #.@ c c c |.1.2.3.4.5.6.7.8.9.0.@.] .     ",
+"    . #.a.a.a.a.l b.c.d.e.f.g.9.h.i.. j.q .     ",
+"    . #.a.a.a.a.k.l.j.m.n.o.p.q.r.s.t.u.q .     ",
+"    . a.v.v.v.v.v.w.x.y.z.A.t.B.C.D.E.F.m .     ",
+"    . . . . . . . . . ~.G.H.I.J.K.L.M.. . .     ",
+"                      ~.N.z.O.C.P.. Q.          "};
diff --git a/modules/gui/wxwindows/bitmaps/previous.xpm b/modules/gui/wxwindows/bitmaps/previous.xpm
new file mode 100644 (file)
index 0000000..c14f6b3
--- /dev/null
@@ -0,0 +1,84 @@
+/* XPM */
+static char * previous_xpm[] = {
+"24 24 57 1",
+"      c None",
+".     c #000000",
+"+     c #F7F7F7",
+"@     c #CBD6CA",
+"#     c #E7EFE7",
+"$     c #ACC8A9",
+"%     c #C9DBC9",
+"&     c #E6EEE5",
+"*     c #BFCEBF",
+"=     c #E7EFE6",
+"-     c #BBCFBA",
+";     c #B3C4B3",
+">     c #E6EEE6",
+",     c #B9CEB7",
+"'     c #B5CEB5",
+")     c #B7CCB5",
+"!     c #BFD4BF",
+"~     c #C7D7C5",
+"{     c #DBE5DB",
+"]     c #DAE5D9",
+"^     c #CBDAC9",
+"/     c #7EAB78",
+"(     c #BAD1B9",
+"_     c #B3CAB1",
+":     c #B0C9B0",
+"<     c #B0C9AE",
+"[     c #AEC7AC",
+"}     c #AAC5A8",
+"|     c #A9C4A7",
+"1     c #698267",
+"2     c #E4ECE3",
+"3     c #2D2D2D",
+"4     c #E0EADE",
+"5     c #B3CCB1",
+"6     c #B0C7AE",
+"7     c #ADC6AB",
+"8     c #ADC8AB",
+"9     c #AAC7A8",
+"0     c #678C63",
+"a     c #9FB79B",
+"b     c #6B9063",
+"c     c #C2CDC2",
+"d     c #8EB48A",
+"e     c #87AF84",
+"f     c #87B083",
+"g     c #88AF84",
+"h     c #88B085",
+"i     c #86AF82",
+"j     c #547150",
+"k     c #95A88F",
+"l     c #5B7950",
+"m     c #3C5235",
+"n     c #4A6342",
+"o     c #3B5035",
+"p     c #415639",
+"q     c #889D7F",
+"r     c #475E3E",
+"                        ",
+"                        ",
+"                        ",
+"  ....        .         ",
+"  .+@.       ..         ",
+"  .#$.      .%.         ",
+"  .#$.     .&*.         ",
+"  .#$.    .=-;........  ",
+"  .#$.   .>,'),!~{]^/.  ",
+"  .#$.  .>(_:<[}}}[|1.  ",
+"  .2$. 34567789[[6[80.  ",
+"  .ab..cdeeeeefgefhij.  ",
+"  .kl. .mllllllllllln.  ",
+"  .kl.  .mlllllllllln.  ",
+"  .kl.   .mllnoooooop.  ",
+"  .kl.    .mln........  ",
+"  .kl.     .mn.         ",
+"  .kl.      .n.         ",
+"  .qr.       ..         ",
+"  ....        .         ",
+"                        ",
+"                        ",
+"                        ",
+"                        "};
diff --git a/modules/gui/wxwindows/bitmaps/stop.xpm b/modules/gui/wxwindows/bitmaps/stop.xpm
new file mode 100644 (file)
index 0000000..7b1cc7d
--- /dev/null
@@ -0,0 +1,285 @@
+/* XPM */
+static char * stop_xpm[] = {
+"24 24 258 2",
+"      c None",
+".     c #010000",
+"+     c #180801",
+"@     c #2D1103",
+"#     c #2C1003",
+"$     c #280F02",
+"%     c #84320B",
+"&     c #C75621",
+"*     c #DC794A",
+"=     c #DA7546",
+"-     c #D77445",
+";     c #D37245",
+">     c #B74918",
+",     c #772B09",
+"'     c #250D02",
+")     c #0B0400",
+"!     c #88360E",
+"~     c #DF723D",
+"{     c #E47F4E",
+"]     c #E1733D",
+"^     c #DA5A1C",
+"/     c #D65112",
+"(     c #D14E11",
+"_     c #CC4C0F",
+":     c #C7490F",
+"<     c #C2460F",
+"[     c #BB430F",
+"}     c #742909",
+"|     c #0A0300",
+"1     c #150701",
+"2     c #B5450F",
+"3     c #E47B46",
+"4     c #E5733A",
+"5     c #E25813",
+"6     c #DF5613",
+"7     c #DB5412",
+"8     c #D04E10",
+"9     c #CA4B0F",
+"0     c #C5480F",
+"a     c #BF450F",
+"b     c #B9420E",
+"c     c #97350B",
+"d     c #130600",
+"e     c #B3440F",
+"f     c #E57944",
+"g     c #E67034",
+"h     c #E75A13",
+"i     c #E95B13",
+"j     c #E85B13",
+"k     c #E45913",
+"l     c #E05713",
+"m     c #DA5312",
+"n     c #D44F12",
+"o     c #CD4D0F",
+"p     c #C1460F",
+"q     c #BB430E",
+"r     c #B53F0D",
+"s     c #93330B",
+"t     c #090300",
+"u     c #82340F",
+"v     c #E17641",
+"w     c #E46C2F",
+"x     c #ED5D13",
+"y     c #C94F10",
+"z     c #C14B0F",
+"A     c #E35813",
+"B     c #DC5512",
+"C     c #C6490F",
+"D     c #AC3F0C",
+"E     c #C3460F",
+"F     c #BC430F",
+"G     c #B6400E",
+"H     c #B03D0D",
+"I     c #6A2408",
+"J     c #230C02",
+"K     c #D7632C",
+"L     c #E37A47",
+"M     c #E95C13",
+"N     c #A24919",
+"O     c #9C7663",
+"P     c #8C634D",
+"Q     c #AA4410",
+"R     c #DA5512",
+"S     c #DE5612",
+"T     c #C14B12",
+"U     c #A0735D",
+"V     c #B38C7A",
+"W     c #A64F27",
+"X     c #BC440F",
+"Y     c #A93A0D",
+"Z     c #1F0A01",
+"`     c #7F3715",
+" .    c #DE7A4A",
+"..    c #AB8069",
+"+.    c #FFFFFF",
+"@.    c #DEB39D",
+"#.    c #B14712",
+"$.    c #C34D13",
+"%.    c #A38272",
+"&.    c #DBDBDB",
+"*.    c #E6B49E",
+"=.    c #C66035",
+"-.    c #AA3A0D",
+";.    c #642107",
+">.    c #000000",
+",.    c #C3683D",
+"'.    c #D7602A",
+").    c #D95312",
+"!.    c #DF5713",
+"~.    c #E55913",
+"{.    c #AB7255",
+"].    c #D8AF9B",
+"^.    c #AC8978",
+"/.    c #DADADA",
+"(.    c #DC997B",
+"_.    c #CA6D44",
+":.    c #B5400E",
+"<.    c #AF3D0D",
+"[.    c #7F2B09",
+"}.    c #100500",
+"|.    c #D57548",
+"1.    c #BC4A11",
+"2.    c #B18771",
+"3.    c #E7B39C",
+"4.    c #CE724A",
+"5.    c #C7663C",
+"6.    c #B43F0D",
+"7.    c #AE3C0D",
+"8.    c #A8390C",
+"9.    c #8E2F0A",
+"0.    c #220C03",
+"a.    c #D24E11",
+"b.    c #D75112",
+"c.    c #DD5512",
+"d.    c #DE5714",
+"e.    c #AF8673",
+"f.    c #E8B49D",
+"g.    c #D3774E",
+"h.    c #C3592A",
+"i.    c #B7410E",
+"j.    c #B23E0D",
+"k.    c #AC3B0D",
+"l.    c #A6380C",
+"m.    c #852C08",
+"n.    c #1F0A02",
+"o.    c #210C03",
+"p.    c #D17045",
+"q.    c #C8490F",
+"r.    c #D45012",
+"s.    c #D85415",
+"t.    c #B28F7D",
+"u.    c #EBC1AF",
+"v.    c #C55625",
+"w.    c #BA420E",
+"x.    c #A4370C",
+"y.    c #742606",
+"z.    c #1A0801",
+"A.    c #0D0400",
+"B.    c #CC6E45",
+"C.    c #C4470F",
+"D.    c #CB4B0F",
+"E.    c #CE4D0F",
+"F.    c #A8410E",
+"G.    c #B18D7D",
+"H.    c #ECECEC",
+"I.    c #EBC8B9",
+"J.    c #BD5123",
+"K.    c #AD3B0D",
+"L.    c #A7380C",
+"M.    c #A2360B",
+"N.    c #672005",
+"O.    c #0E0400",
+"P.    c #AD5129",
+"Q.    c #BE450F",
+"R.    c #AA3E0C",
+"S.    c #A7745D",
+"T.    c #E6B39C",
+"U.    c #DCA892",
+"V.    c #B64F25",
+"W.    c #8E2F09",
+"X.    c #5F1E05",
+"Y.    c #804A32",
+"Z.    c #BD440F",
+"`.    c #97360B",
+" +    c #A87D6B",
+".+    c #E5B29C",
+"++    c #C96335",
+"@+    c #C45729",
+"#+    c #E2B19B",
+"$+    c #DBA995",
+"%+    c #B4512A",
+"&+    c #9A330A",
+"*+    c #7C2807",
+"=+    c #441504",
+"-+    c #190801",
+";+    c #BC5B32",
+">+    c #9A3E17",
+",+    c #C08E78",
+"'+    c #D89375",
+")+    c #C66034",
+"!+    c #BF5426",
+"~+    c #BC5427",
+"{+    c #D28E72",
+"]+    c #D9A38D",
+"^+    c #B4542D",
+"/+    c #AF4C24",
+"(+    c #872C08",
+"_+    c #712506",
+":+    c #160600",
+"<+    c #672B11",
+"[+    c #BB582E",
+"}+    c #B64717",
+"|+    c #C05A2F",
+"1+    c #B85025",
+"2+    c #B8552E",
+"3+    c #B3512A",
+"4+    c #B05029",
+"5+    c #973109",
+"6+    c #6F2307",
+"7+    c #471604",
+"8+    c #050100",
+"9+    c #872E0A",
+"0+    c #B7532A",
+"a+    c #B44B1F",
+"b+    c #A1360B",
+"c+    c #963109",
+"d+    c #6C2106",
+"e+    c #5D1D05",
+"f+    c #0C0300",
+"g+    c #832C0A",
+"h+    c #B4552E",
+"i+    c #B0481F",
+"j+    c #A5370C",
+"k+    c #A2360C",
+"l+    c #9F350B",
+"m+    c #7B2707",
+"n+    c #641F06",
+"o+    c #652006",
+"p+    c #0B0300",
+"q+    c #040100",
+"r+    c #5A1E06",
+"s+    c #A1360C",
+"t+    c #A2370C",
+"u+    c #822A08",
+"v+    c #661F05",
+"w+    c #702406",
+"x+    c #511905",
+"y+    c #140600",
+"z+    c #561D06",
+"A+    c #752707",
+"B+    c #892C08",
+"C+    c #7F2907",
+"D+    c #642005",
+"E+    c #5E1D05",
+"F+    c #4D1804",
+"G+    c #150600",
+"H+    c #080200",
+"I+    c #160701",
+"                                                ",
+"                  . + @ # + .                   ",
+"              $ % & * = - ; > , '               ",
+"          ) ! ~ { ] ^ / ( _ : < [ } |           ",
+"        1 2 3 4 5 5 6 7 / 8 9 0 a b c d         ",
+"      | e f g h i j k l m n o : p q r s t       ",
+"      u v w h x y z i A B / C D E F G H I       ",
+"    J K L A M N O P Q R S T U V W X G H Y Z     ",
+"    `  .7 5 j ..+.+.@.#.$.%.&.+.*.=.G H -.;.    ",
+"  >.,.'.).!.~.{.+.+.+.].^./.+.+.(._.:.<.Y [.>.  ",
+"  }.|.8 / 7 l 1.2.+.+.+.+.+.+.3.4.5.6.7.8.9.}.  ",
+"  0.; _ a.b.m c.d.e.+.+.+.+.f.g.h.i.j.k.l.m.n.  ",
+"  o.p.q._ ( r.b.s.t.+.+.+.+.u.v.w.r H -.x.y.z.  ",
+"  A.B.C.: D.E.F.G.H.+.+.+.+.+.I.J.j.K.L.M.N.O.  ",
+"  >.P.Q.< 0 R.S.+.+.+.3.T.+.+.+.U.V.Y x.W.X.>.  ",
+"    Y.b Z.a `. ++.+..+++@+#++.+.$+%+l.&+*+=+    ",
+"    -+;+i.b q >+,+'+)+w.!+~+{+]+^+/+M.(+_+:+    ",
+"      <+[+}+:.G |+|+:.6.j.1+2+3+4+M.5+6+7+      ",
+"      8+9+0+a+H H H H 7.k.-.L.x.b+c+d+e+8+      ",
+"        f+g+h+i+-.-.Y 8.l.j+k+l+m+n+o+p+        ",
+"          q+r+s+x.x.x.t+b+l+u+v+w+x+8+          ",
+"              y+z+A+B+C+D+o+E+F+G+              ",
+"                  >.H+I+I+H+>.                  ",
+"                                                "};
diff --git a/modules/gui/wxwindows/interface.cpp b/modules/gui/wxwindows/interface.cpp
new file mode 100644 (file)
index 0000000..d1e7d2a
--- /dev/null
@@ -0,0 +1,367 @@
+/*****************************************************************************
+ * interface.cpp : wxWindows plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2000-2001 VideoLAN
+ * $Id: interface.cpp,v 1.1 2002/11/18 13:02:16 gbazin Exp $
+ *
+ * Authors: Gildas Bazin <gbazin@netcourrier.com>
+ *
+ * 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 <stdlib.h>                                      /* malloc(), free() */
+#include <errno.h>                                                 /* ENOMEM */
+#include <string.h>                                            /* strerror() */
+#include <stdio.h>
+
+#include <vlc/vlc.h>
+#include <vlc/intf.h>
+
+/* Let wxWindows take care of the i18n stuff */
+#undef _
+
+#ifdef WIN32                                                 /* mingw32 hack */
+#undef Yield()
+#undef CreateDialog()
+#endif
+
+#include <wx/wxprec.h>
+#include <wx/wx.h>
+
+#include "wxwindows.h"
+#include "wx/artprov.h"
+
+/* include the toolbar graphics */
+#include "bitmaps/file.xpm"
+#include "bitmaps/disc.xpm"
+#include "bitmaps/net.xpm"
+#include "bitmaps/play.xpm"
+#include "bitmaps/pause.xpm"
+#include "bitmaps/stop.xpm"
+#include "bitmaps/previous.xpm"
+#include "bitmaps/next.xpm"
+#include "bitmaps/playlist.xpm"
+/*****************************************************************************
+ * Event Table.
+ *****************************************************************************/
+
+const int ID_TOOLBAR = 500;
+
+/* IDs for the controls and the menu commands */
+enum
+{
+    /* menu items */
+    Exit_Event = 1,
+    OpenFile_Event,
+    OpenDisc_Event,
+    OpenNet_Event,
+    OpenSat_Event,
+    EjectDisc_Event,
+
+    Logs_Event,
+
+    Audio_Event,
+    Subtitles_Event,
+    Prefs_Event,
+
+    SliderScroll_Event,
+    StopStream_Event,
+    PlayStream_Event,
+    PauseStream_Event,
+    PrevStream_Event,
+    NextStream_Event
+
+    /* it is important for the id corresponding to the "About" command to have
+     * this standard value as otherwise it won't be handled properly under Mac
+     * (where it is special and put into the "Apple" menu) */
+    About_Event = wxID_ABOUT,
+};
+
+BEGIN_EVENT_TABLE(Interface, wxFrame)
+    /* Menu events */
+    EVT_MENU(Exit_Event, Interface::OnExit)
+    EVT_MENU(About_Event, Interface::OnAbout)
+    EVT_MENU(OpenFile_Event, Interface::OnOpenFile)
+    /* Toolbar events */
+    EVT_MENU(OpenFile_Event, Interface::OnOpenFile)
+    EVT_MENU(StopStream_Event, Interface::OnStopStream)
+    EVT_MENU(PlayStream_Event, Interface::OnPlayStream)
+    EVT_MENU(PauseStream_Event, Interface::OnPauseStream)
+    EVT_MENU(PrevStream_Event, Interface::OnPrevStream)
+    EVT_MENU(NextStream_Event, Interface::OnNextStream)
+    /* Slider events */
+    EVT_COMMAND_SCROLL(SliderScroll_Event, Interface::OnSliderUpdate)
+END_EVENT_TABLE()
+
+/*****************************************************************************
+ * Constructor.
+ *****************************************************************************/
+Interface::Interface( intf_thread_t *_p_intf ):
+    wxFrame( NULL, -1, "title", wxDefaultPosition, wxDefaultSize,
+             wxDEFAULT_FRAME_STYLE )
+{
+
+    /* Initializations */
+    p_intf = _p_intf;
+
+    /* Give our interface a nice icon */
+    //SetIcon( wxICON(vlcicon) );
+
+    /* Create our "File" menu */
+#define HELP_FILE  N_("Open a file")
+#define HELP_DISC  N_("Open a DVD or (S)VCD")
+#define HELP_NET   N_("Open a network stream")
+#define HELP_SAT   N_("Open a satellite stream")
+#define HELP_EJECT N_("Eject the DVD/CD")
+#define HELP_EXIT  N_("Exit this program")
+    wxMenu *file_menu = new wxMenu;
+    file_menu->Append( OpenFile_Event, _("&Open File..."), HELP_FILE );
+    file_menu->Append( OpenDisc_Event, _("Open &Disc..."), HELP_DISC );
+    file_menu->Append( OpenNet_Event, _("&Network Stream..."), HELP_NET );
+#if 0
+    file_menu->Append( OpenSat_Event, _("&Satellite Stream..."), HELP_NET );
+#endif
+    file_menu->AppendSeparator();
+    file_menu->Append( EjectDisc_Event, _("&Eject Disc"), HELP_EJECT );
+    file_menu->AppendSeparator();
+    file_menu->Append( Exit_Event, _("E&xit"), HELP_EXIT );
+
+    /* Create our "View" menu */
+#define HELP_LOGS  N_("Show the program logs")
+    wxMenu *view_menu = new wxMenu;
+    view_menu->Append( Logs_Event, _("&Logs..."), HELP_LOGS );
+
+    /* Create our "Settings" menu */
+#define HELP_AUDIO N_("Change the current audio track")
+#define HELP_SUBS  N_("Change the current subtitles stream")
+#define HELP_PREFS N_("Go to the preferences menu")
+    wxMenu *settings_menu = new wxMenu;
+    settings_menu->Append( Audio_Event, _("&Audio"), HELP_AUDIO );
+    settings_menu->Append( Subtitles_Event, _("&Subtitles"), HELP_SUBS );
+    settings_menu->AppendSeparator();
+    settings_menu->Append( Prefs_Event, _("&Preferences..."), HELP_PREFS );
+
+    /* Create our "Help" menu */
+#define HELP_ABOUT N_("About this program")
+    wxMenu *help_menu = new wxMenu;
+    help_menu->Append( About_Event, _("&About..."), HELP_ABOUT );
+
+    /* Append the freshly created menus to the menu bar... */
+    wxMenuBar *menubar = new wxMenuBar( wxMB_DOCKABLE );
+    menubar->Append( file_menu, _("&File") );
+    menubar->Append( view_menu, _("&View") );
+    menubar->Append( settings_menu, _("&Settings") );
+    menubar->Append( help_menu, _("&Help") );
+
+    /* Attach the menu bar to the frame */
+    SetMenuBar( menubar );
+
+    /* Create toolbar */
+#define HELP_STOP N_("Stop current playlist item")
+#define HELP_PLAY N_("Play current playlist item")
+#define HELP_PAUSE N_("Pause current playlist item")
+#define HELP_PLO N_("Open playlist")
+#define HELP_PLP N_("Previous playlist item")
+#define HELP_PLN N_("Next playlist item")
+    wxBitmap *p_bmp_file     = new wxBitmap( file_xpm );
+    wxBitmap *p_bmp_disc     = new wxBitmap( disc_xpm );
+    wxBitmap *p_bmp_net      = new wxBitmap( net_xpm );
+    wxBitmap *p_bmp_play     = new wxBitmap( play_xpm );
+    wxBitmap *p_bmp_stop     = new wxBitmap( stop_xpm );
+    wxBitmap *p_bmp_pause    = new wxBitmap( pause_xpm );
+    wxBitmap *p_bmp_prev     = new wxBitmap( previous_xpm );
+    wxBitmap *p_bmp_next     = new wxBitmap( next_xpm );
+    wxBitmap *p_bmp_playlist = new wxBitmap( playlist_xpm );
+
+    wxToolBar *toolbar = CreateToolBar(
+        wxTB_HORIZONTAL | wxTB_TEXT | wxTB_FLAT | wxTB_DOCKABLE, ID_TOOLBAR );
+
+    toolbar->AddTool( OpenFile_Event, _("File"), *p_bmp_file, HELP_FILE );
+    toolbar->AddTool( OpenFile_Event, _("Disc"), *p_bmp_disc, HELP_DISC );
+    toolbar->AddTool( OpenFile_Event, _("Net"), *p_bmp_net, HELP_NET );
+#if 0
+    toolbar->AddTool( OpenFile_Event, _("Sat"), *p_bmp_net, HELP_SAT );
+#endif
+    toolbar->AddSeparator();
+    toolbar->AddTool( StopStream_Event, _("Stop"), *p_bmp_stop, HELP_STOP );
+    toolbar->AddTool( PlayStream_Event, _("Play"), *p_bmp_play, HELP_PLAY );
+    toolbar->AddTool( PauseStream_Event, _("Pause"), *p_bmp_pause, HELP_PAUSE);
+    toolbar->AddSeparator();
+    toolbar->AddTool( wxID_OPEN, _("Playlist"), *p_bmp_playlist, HELP_PLO );
+    toolbar->AddTool( PrevStream_Event, _("Prev"), *p_bmp_prev, HELP_PLP );
+    toolbar->AddTool( NextStream_Event, _("Next"), *p_bmp_next, HELP_PLN );
+
+    toolbar->Realize();
+
+    /* Create slider */
+    wxBoxSizer *slider_sizer = new wxBoxSizer( wxVERTICAL );
+    slider = new wxSlider( this, SliderScroll_Event, 0, 0, 100,
+                           wxDefaultPosition, wxSize( 450, 50 ),
+                           wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_TOP );
+    slider_sizer->Add( slider, 0, wxGROW | wxALL | wxALIGN_CENTER, 5 );
+
+    /* use the sizer for layout */
+    slider->Hide();
+    slider_sizer->Layout();
+    SetSizerAndFit( slider_sizer );
+
+    /* Give the frame an optional statusbar. The '1' just means one field.
+     * A gripsizer will automatically get put on into the corner, if that
+     * is the normal OS behaviour for frames on that platform. Helptext
+     * for menu items and toolbar tools will automatically get displayed
+     * here. */
+    statusbar = CreateStatusBar(2);
+    int i_status_width[2] = {-1,-2};
+    statusbar->SetStatusWidths( 2, i_status_width );
+
+    SetTitle( COPYRIGHT_MESSAGE );
+    SetAutoLayout( TRUE );
+    Layout();
+}
+
+Interface::~Interface()
+{
+}
+
+/*****************************************************************************
+ * Private methods.
+ *****************************************************************************/
+void Interface::OnExit( wxCommandEvent& WXUNUSED(event) )
+{
+    /* TRUE is to force the frame to close. */
+    Close(TRUE);
+}
+
+void Interface::OnAbout( wxCommandEvent& WXUNUSED(event) )
+{
+    wxString msg;
+    msg.Printf( _("This is the about dialog of the VideoLAN Client.\n") );
+
+    wxMessageBox( msg, "About VideoLAN Client",
+                  wxOK | wxICON_INFORMATION, this );
+}
+
+void Interface::OnOpenFile( wxCommandEvent& WXUNUSED(event) )
+{
+    wxFileDialog dialog
+                 (
+                    this,
+                    _T("Open file dialog"),
+                    _T(""),
+                    _T(""),
+                    _T("*.*")
+                 );
+
+    if (dialog.ShowModal() == wxID_OK)
+    {
+        wxString info;
+        info.Printf(_T("Full file name: %s\n")
+                    _T("Path: %s\n")
+                    _T("Name: %s"),
+                    dialog.GetPath().c_str(),
+                    dialog.GetDirectory().c_str(),
+                    dialog.GetFilename().c_str());
+        wxMessageDialog dialog2(this, info, _T("Selected file"));
+        dialog2.ShowModal();
+    }
+}
+
+void Interface::OnPlayStream( wxCommandEvent& WXUNUSED(event) )
+{
+    wxCommandEvent dummy;
+    playlist_t *p_playlist =
+        (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                       FIND_ANYWHERE );
+    if( p_playlist == NULL )
+    {
+        OnOpenFile( dummy );
+        return;
+    }
+
+    /* If the playlist is empty, open a file requester instead */
+    vlc_mutex_lock( &p_playlist->object_lock );
+    if( p_playlist->i_size )
+    {
+        vlc_mutex_unlock( &p_playlist->object_lock );
+        playlist_Play( p_playlist );
+        vlc_object_release( p_playlist );
+    }
+    else
+    {
+        vlc_mutex_unlock( &p_playlist->object_lock );
+        vlc_object_release( p_playlist );
+        OnOpenFile( dummy );
+    }
+}
+
+void Interface::OnStopStream( wxCommandEvent& WXUNUSED(event) )
+{
+    playlist_t * p_playlist =
+        (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                       FIND_ANYWHERE );
+    if( p_playlist == NULL )
+    {
+        return;
+    }
+
+    playlist_Stop( p_playlist );
+    vlc_object_release( p_playlist );
+}
+
+void Interface::OnPauseStream( wxCommandEvent& WXUNUSED(event) )
+{
+    if( p_intf->p_sys->p_input == NULL )
+    {
+        return;
+    }
+
+    input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
+}
+
+void Interface::OnSliderUpdate( wxScrollEvent& event )
+{
+    p_intf->p_sys->i_slider_pos = event.GetPosition();
+}
+
+void Interface::OnPrevStream( wxCommandEvent& WXUNUSED(event) )
+{
+    playlist_t * p_playlist =
+        (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                       FIND_ANYWHERE );
+    if( p_playlist == NULL )
+    {
+        return;
+    }
+
+    playlist_Prev( p_playlist );
+    vlc_object_release( p_playlist );
+}
+
+void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) )
+{
+    playlist_t * p_playlist =
+        (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                       FIND_ANYWHERE );
+    if( p_playlist == NULL )
+    {
+        return;
+    }
+
+    playlist_Next( p_playlist );
+    vlc_object_release( p_playlist );
+}
diff --git a/modules/gui/wxwindows/timer.cpp b/modules/gui/wxwindows/timer.cpp
new file mode 100644 (file)
index 0000000..451e4c6
--- /dev/null
@@ -0,0 +1,220 @@
+/*****************************************************************************
+ * timer.cpp : wxWindows plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2000-2001 VideoLAN
+ * $Id: timer.cpp,v 1.1 2002/11/18 13:02:16 gbazin Exp $
+ *
+ * Authors: Gildas Bazin <gbazin@netcourrier.com>
+ *
+ * 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 <stdlib.h>                                      /* malloc(), free() */
+#include <errno.h>                                                 /* ENOMEM */
+#include <string.h>                                            /* strerror() */
+#include <stdio.h>
+
+#include <vlc/vlc.h>
+#include <vlc/intf.h>
+
+/* Let wxWindows take care of the i18n stuff */
+#undef _
+
+#ifdef WIN32                                                 /* mingw32 hack */
+#undef Yield()
+#undef CreateDialog()
+#endif
+
+#include <wx/wxprec.h>
+#include <wx/wx.h>
+#include <wx/timer.h>
+
+#include "wxwindows.h"
+
+/*****************************************************************************
+ * Constructor.
+ *****************************************************************************/
+Timer::Timer( intf_thread_t *_p_intf, Interface *_p_main_interface )
+{
+    p_intf = _p_intf;
+    p_main_interface = _p_main_interface;
+
+    Start( 100 /*milliseconds*/, wxTIMER_CONTINUOUS );
+}
+
+Timer::~Timer()
+{
+}
+
+/*****************************************************************************
+ * Private methods.
+ *****************************************************************************/
+/*****************************************************************************
+ * wxModeManage: actualise the aspect of the interface whenever the input
+ * changes.
+ *****************************************************************************
+ * The lock has to be taken before you call the function.
+ *****************************************************************************/
+static int wxModeManage( intf_thread_t * p_intf )
+{
+    return 0;
+}
+
+/*****************************************************************************
+ * wxSetupMenus: function that generates title/chapter/audio/subpic
+ * menus with help from preceding functions
+ *****************************************************************************
+ * Function called with the lock on stream
+ *****************************************************************************/
+static int wxSetupMenus( intf_thread_t * p_intf )
+{
+    return 0;
+}
+
+/*****************************************************************************
+ * Manage: manage main thread messages
+ *****************************************************************************
+ * In this function, called approx. 10 times a second, we check what the
+ * main program wanted to tell us.
+ *****************************************************************************/
+void Timer::Notify()
+{
+    int i_start, i_stop;
+
+    vlc_mutex_lock( &p_intf->change_lock );
+
+    /* If the "display popup" flag has changed */
+    if( p_intf->b_menu_change )
+    {
+        p_intf->b_menu_change = 0;
+    }
+
+    /* Update the log window */
+    vlc_mutex_lock( p_intf->p_sys->p_sub->p_lock );
+    i_stop = *p_intf->p_sys->p_sub->pi_stop;
+    vlc_mutex_unlock( p_intf->p_sys->p_sub->p_lock );
+
+    if( p_intf->p_sys->p_sub->i_start != i_stop )
+    {
+    }
+
+    /* Update the input */
+    if( p_intf->p_sys->p_input == NULL )
+    {
+        p_intf->p_sys->p_input = (input_thread_t *)vlc_object_find( p_intf,
+                                                       VLC_OBJECT_INPUT,
+                                                       FIND_ANYWHERE );
+        /* Show slider */
+        if(p_intf->p_sys->p_input)
+        {
+            p_main_interface->slider->Show();
+            p_main_interface->statusbar->SetStatusText(
+                p_intf->p_sys->p_input->psz_source, 1 );
+        }
+    }
+    else if( p_intf->p_sys->p_input->b_dead )
+    {
+        /* Hide slider */
+        if(p_intf->p_sys->p_input)
+            p_main_interface->slider->Hide();
+
+        p_main_interface->statusbar->SetStatusText( "", 1 );
+
+        vlc_object_release( p_intf->p_sys->p_input );
+        p_intf->p_sys->p_input = NULL;
+    }
+
+    if( p_intf->p_sys->p_input )
+    {
+        input_thread_t *p_input = p_intf->p_sys->p_input;
+
+        vlc_mutex_lock( &p_input->stream.stream_lock );
+
+        if( !p_input->b_die )
+        {
+            /* New input or stream map change */
+            if( p_input->stream.b_changed )
+            {
+                wxModeManage( p_intf );
+                wxSetupMenus( p_intf );
+                p_intf->p_sys->b_playing = 1;
+            }
+
+            /* Manage the slider */
+            if( p_input->stream.b_seekable && p_intf->p_sys->b_playing )
+            {
+
+                stream_position_t position;
+
+                /* If the user hasn't touched the slider since the last time,
+                 * then the input can safely change it */
+                if( p_intf->p_sys->i_slider_pos ==
+                    p_intf->p_sys->i_slider_oldpos )
+                {
+                    /* Update the value */
+                    vlc_mutex_unlock( &p_input->stream.stream_lock );
+                    input_Tell( p_input, &position );
+                    vlc_mutex_lock( &p_input->stream.stream_lock );
+                    p_intf->p_sys->i_slider_oldpos =
+                        ( 100 * position.i_tell ) / position.i_size;
+
+                    if( p_intf->p_sys->i_slider_pos !=
+                        p_intf->p_sys->i_slider_oldpos )
+                    {
+                        p_intf->p_sys->i_slider_pos =
+                            p_intf->p_sys->i_slider_oldpos;
+
+                        p_main_interface->slider->SetValue(
+                            p_intf->p_sys->i_slider_pos );
+                    }
+                }
+
+                /* Otherwise, send message to the input if the user has
+                 * finished dragging the slider */
+                else if( p_intf->p_sys->b_slider_free )
+                {
+                    /* release the lock to be able to seek */
+                    vlc_mutex_unlock( &p_input->stream.stream_lock );
+                    input_Seek( p_input, p_intf->p_sys->i_slider_pos,
+                                INPUT_SEEK_PERCENT | INPUT_SEEK_SET );
+                    vlc_mutex_lock( &p_input->stream.stream_lock );
+
+                    /* Update the old value */
+                    p_intf->p_sys->i_slider_oldpos =
+                        p_intf->p_sys->i_slider_pos;
+                }
+            }
+
+            if( p_intf->p_sys->i_part !=
+                p_input->stream.p_selected_area->i_part )
+            {
+                p_intf->p_sys->b_chapter_update = 1;
+                wxSetupMenus( p_intf );
+            }
+        }
+
+        vlc_mutex_unlock( &p_input->stream.stream_lock );
+    }
+    else if( p_intf->p_sys->b_playing && !p_intf->b_die )
+    {
+        wxModeManage( p_intf );
+        p_intf->p_sys->b_playing = 0;
+    }
+
+    vlc_mutex_unlock( &p_intf->change_lock );
+}
diff --git a/modules/gui/wxwindows/wxwindows.cpp b/modules/gui/wxwindows/wxwindows.cpp
new file mode 100644 (file)
index 0000000..de939f5
--- /dev/null
@@ -0,0 +1,196 @@
+/*****************************************************************************
+ * wxwindows.cpp : wxWindows plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2000-2001 VideoLAN
+ * $Id: wxwindows.cpp,v 1.1 2002/11/18 13:02:16 gbazin Exp $
+ *
+ * Authors: Gildas Bazin <gbazin@netcourrier.com>
+ *
+ * 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 <stdlib.h>                                      /* malloc(), free() */
+#include <errno.h>                                                 /* ENOMEM */
+#include <string.h>                                            /* strerror() */
+#include <stdio.h>
+
+#include <vlc/vlc.h>
+#include <vlc/intf.h>
+
+/* Let wxWindows take care of the i18n stuff */
+#undef _
+
+#ifdef WIN32                                                 /* mingw32 hack */
+#undef Yield()
+#undef CreateDialog()
+#endif
+
+#include <wx/wxprec.h>
+#include <wx/wx.h>
+#include <wx/imagpng.h>
+
+#include "wxwindows.h"
+
+/*****************************************************************************
+ * Local prototypes.
+ *****************************************************************************/
+static int  Open         ( vlc_object_t * );
+static void Close        ( vlc_object_t * );
+
+static void Run          ( intf_thread_t * );
+
+/*****************************************************************************
+ * Local classes declarations.
+ *****************************************************************************/
+class Instance: public wxApp
+{
+public:
+    Instance();
+    Instance( intf_thread_t *_p_intf );
+
+    bool OnInit();
+
+private:
+    intf_thread_t *p_intf;
+};
+
+/*****************************************************************************
+ * Module descriptor
+ *****************************************************************************/
+vlc_module_begin();
+    add_category_hint( N_("wxWindows"), NULL );
+    set_description( (char *) _("wxWindows interface module") );
+    set_capability( "interface", 50 );
+    set_callbacks( Open, Close );
+    set_program( "wxvlc" );
+vlc_module_end();
+
+/*****************************************************************************
+ * Open: initialize and create window
+ *****************************************************************************/
+static int Open( vlc_object_t *p_this )
+{
+    intf_thread_t *p_intf = (intf_thread_t *)p_this;
+
+    /* Allocate instance and initialize some members */
+    p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
+    if( p_intf->p_sys == NULL )
+    {
+        msg_Err( p_intf, "out of memory" );
+        return VLC_ENOMEM;
+    }
+
+    p_intf->pf_run = Run;
+
+    p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
+
+    /* Initialize wxWindows thread */
+    p_intf->p_sys->b_playing = 0;
+    p_intf->p_sys->b_popup_changed = 0;
+    p_intf->p_sys->b_window_changed = 0;
+    p_intf->p_sys->b_playlist_changed = 0;
+
+    p_intf->p_sys->p_input = NULL;
+    p_intf->p_sys->i_playing = -1;
+    p_intf->p_sys->b_slider_free = 1;
+    p_intf->p_sys->i_slider_pos = p_intf->p_sys->i_slider_oldpos = 0;
+
+    p_intf->p_sys->i_part = -1;
+
+    return VLC_SUCCESS;
+}
+
+/*****************************************************************************
+ * Close: destroy interface window
+ *****************************************************************************/
+static void Close( vlc_object_t *p_this )
+{
+    intf_thread_t *p_intf = (intf_thread_t *)p_this;
+
+    if( p_intf->p_sys->p_input )
+    {
+        vlc_object_release( p_intf->p_sys->p_input );
+    }
+
+    msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
+
+    /* Destroy structure */
+    free( p_intf->p_sys );
+}
+
+/*****************************************************************************
+ * Run: wxWindows thread
+ *****************************************************************************/
+static void Run( intf_thread_t *p_intf )
+{
+    static char  *p_args[] = { "" };
+
+    /* Hack to pass the p_intf pointer to the new wxWindow Instance object */
+    wxTheApp = new Instance( p_intf );
+
+#if defined( WIN32 )
+    wxEntry( GetModuleHandle(NULL), NULL, NULL, SW_SHOW, TRUE );
+#else
+    wxEntry( 1, p_args );
+#endif
+}
+
+/* following functions are local */
+
+/*****************************************************************************
+ * Constructors.
+ *****************************************************************************/
+Instance::Instance( )
+{
+}
+
+Instance::Instance( intf_thread_t *_p_intf )
+{
+    /* Initialization */
+    p_intf = _p_intf;
+}
+
+IMPLEMENT_APP_NO_MAIN(Instance)
+
+/*****************************************************************************
+ * Instance::OnInit: the parent interface execution starts here
+ *****************************************************************************
+ * This is the "main program" equivalent, the program execution will
+ * start here.
+ *****************************************************************************/
+bool Instance::OnInit()
+{
+    wxImage::AddHandler(new wxPNGHandler);
+    //wxImage::AddHandler(new wxXPMHandler);
+
+    /* Make an instance of your derived frame. Passing NULL (the default value
+     * of Frame's constructor is NULL) as the frame doesn't have a frame
+     * since it is the first window */
+    Interface *MainInterface = new Interface( p_intf );
+
+    /* Show the interface */
+    MainInterface->Show(TRUE);
+
+    SetTopWindow(MainInterface);
+
+    /* Start timer */
+    new Timer( p_intf, MainInterface );
+
+    /* Return TRUE to tell program to continue (FALSE would terminate) */
+    return TRUE;
+}
diff --git a/modules/gui/wxwindows/wxwindows.h b/modules/gui/wxwindows/wxwindows.h
new file mode 100644 (file)
index 0000000..c6820d2
--- /dev/null
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * wxwindows.h: private wxWindows interface description
+ *****************************************************************************
+ * Copyright (C) 1999, 2000 VideoLAN
+ * $Id: wxwindows.h,v 1.1 2002/11/18 13:02:16 gbazin Exp $
+ *
+ * Authors: Gildas Bazin <gbazin@netcourrier.com>
+ *
+ * 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.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * intf_sys_t: description and status of Gtk+ interface
+ *****************************************************************************/
+struct intf_sys_t
+{
+    /* the wx parent window */
+    wxWindow            *p_wxwindow;
+
+    /* special actions */
+    vlc_bool_t          b_playing;
+    vlc_bool_t          b_popup_changed;                   /* display menu ? */
+    vlc_bool_t          b_window_changed;        /* window display toggled ? */
+    vlc_bool_t          b_playlist_changed;    /* playlist display toggled ? */
+    vlc_bool_t          b_slider_free;                      /* slider status */
+
+    /* menus handlers */
+    vlc_bool_t          b_program_update;   /* do we need to update programs 
+                                                                        menu */
+    vlc_bool_t          b_title_update;  /* do we need to update title menus */
+    vlc_bool_t          b_chapter_update;            /* do we need to update
+                                                               chapter menus */
+    vlc_bool_t          b_audio_update;  /* do we need to update audio menus */
+    vlc_bool_t          b_spu_update;      /* do we need to update spu menus */
+
+    /* windows and widgets */
+
+    /* The input thread */
+    input_thread_t *    p_input;
+
+    /* The slider */
+    int                 i_slider_pos;                     /* slider position */
+    int                 i_slider_oldpos;                /* previous position */
+
+    /* The messages window */
+    msg_subscription_t* p_sub;                  /* message bank subscription */
+
+    /* Playlist management */
+    int                 i_playing;                 /* playlist selected item */
+
+    /* The window labels for DVD mode */
+    int                 i_part;                           /* current chapter */
+};
+
+/*****************************************************************************
+ * Prototypes
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Classes declarations.
+ *****************************************************************************/
+class Interface;
+
+/* Timer */
+class Timer: public wxTimer
+{
+public:
+    /* Constructor */
+    Timer( intf_thread_t *p_intf, Interface *p_main_interface );
+    virtual ~Timer();
+
+    virtual void Notify();
+
+private:
+    intf_thread_t *p_intf;
+    Interface *p_main_interface;
+};
+
+/* Main Interface */
+class Interface: public wxFrame
+{
+public:
+    /* Constructor */
+    Interface( intf_thread_t *p_intf );
+    virtual ~Interface();
+    wxSlider *slider;
+    wxStatusBar *statusbar;
+
+private:
+    /* Event handlers (these functions should _not_ be virtual) */
+    void OnExit(wxCommandEvent& event);
+    void OnAbout(wxCommandEvent& event);
+    void OnOpenFile(wxCommandEvent& event);
+    void OnPlayStream(wxCommandEvent& event);
+    void OnStopStream(wxCommandEvent& event);
+    void OnPauseStream(wxCommandEvent& event);
+    void OnSliderUpdate(wxScrollEvent& event);
+    void OnPrevStream( wxCommandEvent& event );
+    void OnNextStream( wxCommandEvent& event );
+
+    DECLARE_EVENT_TABLE();
+
+    Timer *timer;
+    intf_thread_t *p_intf;
+};