From 87366694d82c8d4c7f0bc210e6baa0ccd651d0c2 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 7 Jul 2009 19:35:54 +0200 Subject: Remove the internal GUI The GUI is badly designed and too closely coupled to the internal details of other code. The GUI code is in bad shape and unmaintained for years. There is no indication that anyone would maintain it in the future either. Even if someone did volunteer to implement a better integrated GUI having the current code in the tree probably wouldn't help much. So get rid of it. --- DOCS/man/en/mplayer.1 | 73 +- DOCS/tech/MAINTAINERS | 2 - DOCS/tech/binary-packaging.txt | 22 +- DOCS/xml/en/documentation.xml | 1 - DOCS/xml/en/faq.xml | 6 +- DOCS/xml/en/install.xml | 29 +- DOCS/xml/en/skin.xml | 1200 -------------------- Makefile | 60 +- README | 51 +- cfg-common.h | 2 - cfg-mplayer.h | 16 +- command.c | 24 - configure | 151 +-- etc/input.conf | 12 - gui/app.c | 239 ---- gui/app.h | 204 ---- gui/bitmap.c | 185 ---- gui/bitmap.h | 34 - gui/cfg.c | 371 ------- gui/cfg.h | 79 -- gui/interface.c | 1313 ---------------------- gui/interface.h | 240 ---- gui/mplayer/gmplayer.h | 51 - gui/mplayer/gtk/about.c | 346 ------ gui/mplayer/gtk/about.h | 29 - gui/mplayer/gtk/eq.c | 690 ------------ gui/mplayer/gtk/eq.h | 29 - gui/mplayer/gtk/fs.c | 656 ----------- gui/mplayer/gtk/fs.h | 39 - gui/mplayer/gtk/gtk_common.c | 197 ---- gui/mplayer/gtk/gtk_common.h | 41 - gui/mplayer/gtk/gtk_url.c | 170 --- gui/mplayer/gtk/gtk_url.h | 30 - gui/mplayer/gtk/mb.c | 114 -- gui/mplayer/gtk/mb.h | 29 - gui/mplayer/gtk/menu.c | 645 ----------- gui/mplayer/gtk/menu.h | 31 - gui/mplayer/gtk/opts.c | 1832 ------------------------------- gui/mplayer/gtk/opts.h | 33 - gui/mplayer/gtk/pl.c | 545 --------- gui/mplayer/gtk/pl.h | 29 - gui/mplayer/gtk/sb.c | 211 ---- gui/mplayer/gtk/sb.h | 30 - gui/mplayer/gui_common.c | 308 ------ gui/mplayer/gui_common.h | 37 - gui/mplayer/menu.c | 175 --- gui/mplayer/mw.c | 636 ----------- gui/mplayer/pb.c | 265 ----- gui/mplayer/pixmaps/MPlayer_mini.xpm | 638 ----------- gui/mplayer/pixmaps/a11.xpm | 22 - gui/mplayer/pixmaps/a169.xpm | 22 - gui/mplayer/pixmaps/a235.xpm | 22 - gui/mplayer/pixmaps/a43.xpm | 22 - gui/mplayer/pixmaps/ab.xpm | 34 - gui/mplayer/pixmaps/about.xpm | 427 ------- gui/mplayer/pixmaps/aspect.xpm | 22 - gui/mplayer/pixmaps/cancel.xpm | 139 --- gui/mplayer/pixmaps/chapter.xpm | 23 - gui/mplayer/pixmaps/delsub.xpm | 22 - gui/mplayer/pixmaps/dir.xpm | 148 --- gui/mplayer/pixmaps/dolby.xpm | 23 - gui/mplayer/pixmaps/double.xpm | 151 --- gui/mplayer/pixmaps/dvd.xpm | 129 --- gui/mplayer/pixmaps/empty.xpm | 20 - gui/mplayer/pixmaps/empty1px.xpm | 5 - gui/mplayer/pixmaps/eq.xpm | 35 - gui/mplayer/pixmaps/error.xpm | 544 --------- gui/mplayer/pixmaps/exit.xpm | 82 -- gui/mplayer/pixmaps/file.xpm | 26 - gui/mplayer/pixmaps/file2.xpm | 27 - gui/mplayer/pixmaps/fs.xpm | 109 -- gui/mplayer/pixmaps/half.xpm | 144 --- gui/mplayer/pixmaps/icon.xpm | 323 ------ gui/mplayer/pixmaps/loadeaf.xpm | 151 --- gui/mplayer/pixmaps/logo.xpm | 1227 --------------------- gui/mplayer/pixmaps/mplayer-desktop.xpm | 149 --- gui/mplayer/pixmaps/next.xpm | 79 -- gui/mplayer/pixmaps/normal.xpm | 130 --- gui/mplayer/pixmaps/ok.xpm | 24 - gui/mplayer/pixmaps/open.xpm | 83 -- gui/mplayer/pixmaps/pause.xpm | 48 - gui/mplayer/pixmaps/pl.xpm | 26 - gui/mplayer/pixmaps/play.xpm | 56 - gui/mplayer/pixmaps/playdvd.xpm | 137 --- gui/mplayer/pixmaps/playvcd.xpm | 201 ---- gui/mplayer/pixmaps/prefs.xpm | 69 -- gui/mplayer/pixmaps/prev.xpm | 77 -- gui/mplayer/pixmaps/question.xpm | 335 ------ gui/mplayer/pixmaps/skin.xpm | 181 --- gui/mplayer/pixmaps/sound.xpm | 140 --- gui/mplayer/pixmaps/stop.xpm | 254 ----- gui/mplayer/pixmaps/stop2.xpm | 48 - gui/mplayer/pixmaps/sub.xpm | 21 - gui/mplayer/pixmaps/title.xpm | 23 - gui/mplayer/pixmaps/tongue.xpm | 169 --- gui/mplayer/pixmaps/tonguebla.xpm | 156 --- gui/mplayer/pixmaps/up.xpm | 112 -- gui/mplayer/pixmaps/url.xpm | 21 - gui/mplayer/pixmaps/vcd.xpm | 179 --- gui/mplayer/pixmaps/warning.xpm | 314 ------ gui/mplayer/play.c | 387 ------- gui/mplayer/play.h | 51 - gui/mplayer/sw.c | 110 -- gui/mplayer/widgets.c | 255 ----- gui/mplayer/widgets.h | 80 -- gui/skin/cut.c | 52 - gui/skin/cut.h | 27 - gui/skin/font.c | 269 ----- gui/skin/font.h | 54 - gui/skin/skin.c | 745 ------------- gui/skin/skin.h | 35 - gui/win32/Changelog | 317 ------ gui/win32/README | 21 - gui/win32/dialogs.c | 1122 ------------------- gui/win32/dialogs.h | 134 --- gui/win32/gui.c | 1549 -------------------------- gui/win32/gui.h | 121 -- gui/win32/interface.c | 948 ---------------- gui/win32/playlist.c | 158 --- gui/win32/playlist.h | 61 - gui/win32/preferences.c | 714 ------------ gui/win32/skinload.c | 776 ------------- gui/win32/skinload.h | 215 ---- gui/win32/widgetrender.c | 354 ------ gui/win32/wincfg.c | 147 --- gui/wm/ws.c | 1311 ---------------------- gui/wm/ws.h | 275 ----- gui/wm/wskeys.h | 181 --- gui/wm/wsmkeys.h | 86 -- gui/wm/wsxdnd.c | 259 ----- gui/wm/wsxdnd.h | 71 -- input/input.c | 34 +- input/input.h | 14 +- libvo/mga_common.c | 5 - libvo/video_out.h | 4 - libvo/vo_dfbmga.c | 4 - libvo/vo_direct3d.c | 2 - libvo/vo_directx.c | 9 - libvo/vo_dxr3.c | 35 - libvo/vo_gl.c | 14 - libvo/vo_gl2.c | 21 - libvo/vo_vdpau.c | 10 +- libvo/vo_x11.c | 12 - libvo/vo_xmga.c | 11 +- libvo/vo_xover.c | 16 - libvo/vo_xv.c | 11 - libvo/vo_xvidix.c | 18 - libvo/vo_xvmc.c | 8 - libvo/x11_common.c | 37 - mp_core.h | 2 +- mp_msg.c | 13 - mp_msg.h | 1 - mpcommon.c | 9 - mplayer.c | 273 +---- mplayer.h | 2 - playtree.c | 14 - playtree.h | 7 +- stream/cache2.c | 4 - 158 files changed, 42 insertions(+), 30514 deletions(-) delete mode 100644 DOCS/xml/en/skin.xml delete mode 100644 gui/app.c delete mode 100644 gui/app.h delete mode 100644 gui/bitmap.c delete mode 100644 gui/bitmap.h delete mode 100644 gui/cfg.c delete mode 100644 gui/cfg.h delete mode 100644 gui/interface.c delete mode 100644 gui/interface.h delete mode 100644 gui/mplayer/gmplayer.h delete mode 100644 gui/mplayer/gtk/about.c delete mode 100644 gui/mplayer/gtk/about.h delete mode 100644 gui/mplayer/gtk/eq.c delete mode 100644 gui/mplayer/gtk/eq.h delete mode 100644 gui/mplayer/gtk/fs.c delete mode 100644 gui/mplayer/gtk/fs.h delete mode 100644 gui/mplayer/gtk/gtk_common.c delete mode 100644 gui/mplayer/gtk/gtk_common.h delete mode 100644 gui/mplayer/gtk/gtk_url.c delete mode 100644 gui/mplayer/gtk/gtk_url.h delete mode 100644 gui/mplayer/gtk/mb.c delete mode 100644 gui/mplayer/gtk/mb.h delete mode 100644 gui/mplayer/gtk/menu.c delete mode 100644 gui/mplayer/gtk/menu.h delete mode 100644 gui/mplayer/gtk/opts.c delete mode 100644 gui/mplayer/gtk/opts.h delete mode 100644 gui/mplayer/gtk/pl.c delete mode 100644 gui/mplayer/gtk/pl.h delete mode 100644 gui/mplayer/gtk/sb.c delete mode 100644 gui/mplayer/gtk/sb.h delete mode 100644 gui/mplayer/gui_common.c delete mode 100644 gui/mplayer/gui_common.h delete mode 100644 gui/mplayer/menu.c delete mode 100644 gui/mplayer/mw.c delete mode 100644 gui/mplayer/pb.c delete mode 100644 gui/mplayer/pixmaps/MPlayer_mini.xpm delete mode 100644 gui/mplayer/pixmaps/a11.xpm delete mode 100644 gui/mplayer/pixmaps/a169.xpm delete mode 100644 gui/mplayer/pixmaps/a235.xpm delete mode 100644 gui/mplayer/pixmaps/a43.xpm delete mode 100644 gui/mplayer/pixmaps/ab.xpm delete mode 100644 gui/mplayer/pixmaps/about.xpm delete mode 100644 gui/mplayer/pixmaps/aspect.xpm delete mode 100644 gui/mplayer/pixmaps/cancel.xpm delete mode 100644 gui/mplayer/pixmaps/chapter.xpm delete mode 100644 gui/mplayer/pixmaps/delsub.xpm delete mode 100644 gui/mplayer/pixmaps/dir.xpm delete mode 100644 gui/mplayer/pixmaps/dolby.xpm delete mode 100644 gui/mplayer/pixmaps/double.xpm delete mode 100644 gui/mplayer/pixmaps/dvd.xpm delete mode 100644 gui/mplayer/pixmaps/empty.xpm delete mode 100644 gui/mplayer/pixmaps/empty1px.xpm delete mode 100644 gui/mplayer/pixmaps/eq.xpm delete mode 100644 gui/mplayer/pixmaps/error.xpm delete mode 100644 gui/mplayer/pixmaps/exit.xpm delete mode 100644 gui/mplayer/pixmaps/file.xpm delete mode 100644 gui/mplayer/pixmaps/file2.xpm delete mode 100644 gui/mplayer/pixmaps/fs.xpm delete mode 100644 gui/mplayer/pixmaps/half.xpm delete mode 100644 gui/mplayer/pixmaps/icon.xpm delete mode 100644 gui/mplayer/pixmaps/loadeaf.xpm delete mode 100644 gui/mplayer/pixmaps/logo.xpm delete mode 100644 gui/mplayer/pixmaps/mplayer-desktop.xpm delete mode 100644 gui/mplayer/pixmaps/next.xpm delete mode 100644 gui/mplayer/pixmaps/normal.xpm delete mode 100644 gui/mplayer/pixmaps/ok.xpm delete mode 100644 gui/mplayer/pixmaps/open.xpm delete mode 100644 gui/mplayer/pixmaps/pause.xpm delete mode 100644 gui/mplayer/pixmaps/pl.xpm delete mode 100644 gui/mplayer/pixmaps/play.xpm delete mode 100644 gui/mplayer/pixmaps/playdvd.xpm delete mode 100644 gui/mplayer/pixmaps/playvcd.xpm delete mode 100644 gui/mplayer/pixmaps/prefs.xpm delete mode 100644 gui/mplayer/pixmaps/prev.xpm delete mode 100644 gui/mplayer/pixmaps/question.xpm delete mode 100644 gui/mplayer/pixmaps/skin.xpm delete mode 100644 gui/mplayer/pixmaps/sound.xpm delete mode 100644 gui/mplayer/pixmaps/stop.xpm delete mode 100644 gui/mplayer/pixmaps/stop2.xpm delete mode 100644 gui/mplayer/pixmaps/sub.xpm delete mode 100644 gui/mplayer/pixmaps/title.xpm delete mode 100644 gui/mplayer/pixmaps/tongue.xpm delete mode 100644 gui/mplayer/pixmaps/tonguebla.xpm delete mode 100644 gui/mplayer/pixmaps/up.xpm delete mode 100644 gui/mplayer/pixmaps/url.xpm delete mode 100644 gui/mplayer/pixmaps/vcd.xpm delete mode 100644 gui/mplayer/pixmaps/warning.xpm delete mode 100644 gui/mplayer/play.c delete mode 100644 gui/mplayer/play.h delete mode 100644 gui/mplayer/sw.c delete mode 100644 gui/mplayer/widgets.c delete mode 100644 gui/mplayer/widgets.h delete mode 100644 gui/skin/cut.c delete mode 100644 gui/skin/cut.h delete mode 100644 gui/skin/font.c delete mode 100644 gui/skin/font.h delete mode 100644 gui/skin/skin.c delete mode 100644 gui/skin/skin.h delete mode 100644 gui/win32/Changelog delete mode 100644 gui/win32/README delete mode 100644 gui/win32/dialogs.c delete mode 100644 gui/win32/dialogs.h delete mode 100644 gui/win32/gui.c delete mode 100644 gui/win32/gui.h delete mode 100644 gui/win32/interface.c delete mode 100644 gui/win32/playlist.c delete mode 100644 gui/win32/playlist.h delete mode 100644 gui/win32/preferences.c delete mode 100644 gui/win32/skinload.c delete mode 100644 gui/win32/skinload.h delete mode 100644 gui/win32/widgetrender.c delete mode 100644 gui/win32/wincfg.c delete mode 100644 gui/wm/ws.c delete mode 100644 gui/wm/ws.h delete mode 100644 gui/wm/wskeys.h delete mode 100644 gui/wm/wsmkeys.h delete mode 100644 gui/wm/wsxdnd.c delete mode 100644 gui/wm/wsxdnd.h diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 9582c62222..cc1672c546 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -124,11 +124,6 @@ tivo://host/[list|llist|fsid] [options] . .br -.B gmplayer -[options] -[\-skin\ skin] -. -.br .B mencoder [options] file [file|URL|\-] [\-o file | file://file | smb://[user:pass@]host/filepath] @@ -362,30 +357,6 @@ Seek backward/\:forward 1 minute. .PD 1 .PP .RS -(The following keys are only valid if GUI support is compiled in -and will take precedence over the keys defined above.) -.RE -.PP -.PD 0 -.RS -.IPs ENTER -Start playing. -.IPs "ESC\ \ " -Stop playing. -.IPs "l\ \ \ \ " -Load file. -.IPs "t\ \ \ \ " -Load subtitle. -.IPs "c\ \ \ \ " -Open skin browser. -.IPs "p\ \ \ \ " -Open playlist. -.IPs "r\ \ \ \ " -Open preferences. -.RE -.PD 1 -.PP -.RS (The following keys are only valid if you compiled with TV or DVB input support and will take precedence over the keys defined above.) .RE @@ -715,8 +686,6 @@ Available options are: .RSs .IPs "all\ \ " all configuration files -.IPs "gui (GUI only)" -GUI configuration file .IPs system system configuration file .IPs "user\ " @@ -752,7 +721,6 @@ Use the given profile(s), \-profile help displays a list of the defined profiles .TP .B \-really\-quiet (also see \-quiet) Display even less output and status messages than with \-quiet. -Also suppresses the GUI error message boxes. . .TP .B \-show\-profile @@ -860,11 +828,6 @@ later. See http://www.mplayerhq.hu/\:DOCS/\:HTML/\:en/\:edl.html for details. . .TP -.B \-enqueue (GUI only) -Enqueue files given on the command line in the playlist instead of playing them -immediately. -. -.TP .B \-nofixed\-vo \-fixed\-vo enforces a fixed video system for multiple files (one (un)initialization for all files). @@ -881,12 +844,6 @@ Video filters are not applied to such frames. For B-frames even decoding is skipped completely. . .TP -.B \-(no)gui -Enable or disable the GUI interface (default depends on binary name). -Only works as the first argument on the command line. -Does not work as a config-file option. -. -.TP .B \-h, \-help, \-\-help Show short summary of options. . @@ -1118,20 +1075,6 @@ Use the specified device for RTC timing. Play files in random order. . .TP -.B \-skin (GUI only) -Loads a skin from the directory given as parameter below the default skin -directories, /usr/\:local/\:share/\:mplayer/\:skins/\: and ~/.mplayer/\:skins/. -.sp 1 -.I EXAMPLE: -.PD 0 -.RSs -.IPs "\-skin fittyfene" -Tries /usr/\:local/\:share/\:mplayer/\:skins/\:fittyfene -and afterwards ~/.mplayer/\:skins/\:fittyfene. -.RE -.PD 1 -. -.TP .B \-slave (also see \-input) Switches on slave mode, in which MPlayer works as a backend for other programs. Instead of intercepting keyboard events, MPlayer will read commands separated @@ -3156,12 +3099,6 @@ Places the window at the bottom right corner of the screen. .PD 1 . .TP -.B \-guiwid (also see \-wid) (GUI only) -This tells the GUI to also use an X11 window and stick itself to the bottom -of the video, which is useful to embed a mini-GUI in a browser (with the -MPlayer plugin for instance). -. -.TP .B \-hue <\-100\-100> Adjust the hue of the video signal (default: 0). You can get a colored negative of the image with this option. @@ -3292,7 +3229,7 @@ the new display mode. Enables VBI for the vesa, dfbmga and svga video output drivers. . .TP -.B \-wid (also see \-guiwid) (X11, OpenGL and DirectX only) +.B \-wid (X11, OpenGL and DirectX only) This tells MPlayer to attach to an existing window. Useful to embed MPlayer in a browser (e.g.\& the plugger extension). . @@ -11068,14 +11005,6 @@ MEncoder user settings input bindings (see '\-input keylist' for the full list) . .TP -~/.mplayer/\:gui.conf -GUI configuration file -. -.TP -~/.mplayer/\:gui.pl -GUI playlist -. -.TP ~/.mplayer/\:font/ font directory (There must be a font.desc file and files with .RAW extension.) . diff --git a/DOCS/tech/MAINTAINERS b/DOCS/tech/MAINTAINERS index 680906e4e2..fcd4566c41 100644 --- a/DOCS/tech/MAINTAINERS +++ b/DOCS/tech/MAINTAINERS @@ -84,8 +84,6 @@ MPlayer code: * playtree, input layer: Alban Bedel * libswscale: Michael Niedermayer, Luca Abeni * DVB support: Nico Sabbi - * GUI: None - * GUI skins: Diego Biurrun * EDL code: Reynaldo H. Verdejo Pinochet, Oded Shimon Imported libs/projects: diff --git a/DOCS/tech/binary-packaging.txt b/DOCS/tech/binary-packaging.txt index 9d852372db..974a20d46f 100644 --- a/DOCS/tech/binary-packaging.txt +++ b/DOCS/tech/binary-packaging.txt @@ -66,9 +66,6 @@ the following features MUST be included in any official binary package: (*) if available for your OS/hardware -There is great demand for the GUI, so it SHOULD be included, but it MUST -come as a separate package (see Tips and Tricks for details). - Including other features, like LIVE.COM streaming or JACK support, is acceptable. They SHOULD, however, be build-time configurable, with the default build configuration containing the above set. @@ -111,7 +108,6 @@ for Red Hat and Fedora RPMs I am using FHS-compliant paths: /usr/share/doc/mplayer-version/ docs /usr/share/man/man1/ man page /usr/share/man/XX/man1/ translated man page -/usr/share/mplayer/skins/ GUI skins You MUST NOT include the codecs.conf file in your package. It is useful only for development purposes and often causes obscure problems for users. @@ -129,13 +125,9 @@ install only what you need. This is the layout I am using for Red Hat and Fedora RPMs: mencoder contains MEncoder binary (mencoder) -mplayer contains MPlayer binary without GUI (mplayer), - config files, man pages and documentation; - required by mplayer-gui +mplayer contains MPlayer binary config files, man pages and + documentation; mplayer-codecs-* contain binary codecs available from MPlayer's site -mplayer-gui contains MPlayer binary with GUI (gmplayer); - contains default skin (Blue) -mplayer-skin-* contain various MPlayer GUI skins There is no strict policy for now, just use your common sense. @@ -200,14 +192,8 @@ ao=alsa, Tips and tricks ~~~~~~~~~~~~~~~ -In my package layout, mplayer and mplayer-gui can be installed at the same -time, because they contain differently named binaries and there is no -conflict. The trick is to build MPlayer once with --enable-gui, rename the -resulting binary to "gmplayer" and then build it again, without GUI, but -keeping the rest of ./configure options the same. - -To provide man pages for all MPlayer suite binaries (mplayer, gmplayer, -mencoder), you can use man-links instead of regular symbolic links. +To provide man pages for all MPlayer suite binaries (mplayer, mencoder), you +can use man-links instead of regular symbolic links. Creating a mencoder man page linked to mplayer is as simple as: echo ".so mplayer.1" >> mencoder.1 diff --git a/DOCS/xml/en/documentation.xml b/DOCS/xml/en/documentation.xml index c1f0fb5527..2108533f96 100644 --- a/DOCS/xml/en/documentation.xml +++ b/DOCS/xml/en/documentation.xml @@ -175,4 +175,3 @@ can be distributed under the terms of the GNU General Public License Version 2. &encoding-guide.xml; &faq.xml; &bugreports.xml; -&skin.xml; diff --git a/DOCS/xml/en/faq.xml b/DOCS/xml/en/faq.xml index 83989dbf3a..9234ad7334 100644 --- a/DOCS/xml/en/faq.xml +++ b/DOCS/xml/en/faq.xml @@ -644,11 +644,7 @@ your configuration file. Add vo = selected_vo -to ~/.mplayer/config and/or - -vo_driver = selected_vo - -to ~/.mplayer/gui.conf. +to ~/.mplayer/config diff --git a/DOCS/xml/en/install.xml b/DOCS/xml/en/install.xml index f8019fe3f9..86afaaf65d 100644 --- a/DOCS/xml/en/install.xml +++ b/DOCS/xml/en/install.xml @@ -105,10 +105,6 @@ answers. Features - - Decide if you need GUI. If you do, see the GUI - section before compiling. - If you want to install MEncoder (our great all-purpose encoder), see the @@ -184,27 +180,10 @@ See the Subtitles and OSD section for details. What about the GUI? -The GUI needs GTK 1.2.x or GTK 2.0 (it isn't fully GTK, but the panels are), -so GTK (and the devel stuff, usually -called gtk-dev) has to be installed. -You can build it by specifying during -./configure. Then, to turn on GUI mode, you have to -execute the gmplayer binary. - - - -As MPlayer doesn't have a skin included, you -have to download one if you want to use the GUI. See the download page. -It should be extracted to the usual system-wide directory ($PREFIX/share/mplayer/skins), or to $HOME/.mplayer/skins. -MPlayer by default looks in these directories -for a directory named default, but -you can use the -option, or the skin=newskin config file directive to use -the skin in the */skins/newskin -directory. +MPlayer used to have an internal GUI, but it was removed because it was +buggy, unmaintained and there are much better alternatives. See the +frontends page for a list of existing GUIs. diff --git a/DOCS/xml/en/skin.xml b/DOCS/xml/en/skin.xml deleted file mode 100644 index 38feef6782..0000000000 --- a/DOCS/xml/en/skin.xml +++ /dev/null @@ -1,1200 +0,0 @@ - - - -<application>MPlayer</application> skin format - - -Overview - - - - -Skin components - - -Skins are quite free-format (unlike the fixed-format skins of -Winamp/XMMS, -for example), so it is up to you to create something great. - - - -Currently there are four windows to be decorated: the -main window, the -subwindow, the -playbar, and the -skin menu (which can be activated -by a right click). - - - - - The main window and/or the - playbar is where you can control - MPlayer. The background of the window is an image. - Various items can (and must) be placed in the window: - buttons, potmeters (sliders) and - labels. - For every item, you must specify its position and size. - - - - A button has three states (pressed, released, - disabled), thus its image must be divided into three parts vertically. See the - button item for details. - - - - A potmeter (mainly used for the seek bar and - volume/balance control) can have any number of phases by dividing its image - into different parts below each other. See - hpotmeter and - potmeter for details. - - - - Labels are a bit special: The characters - needed to draw them are taken from an image file, and the characters in the - image are described by a - font description file. - The latter is a plain text file which specifies the x,y position and size of - each character in the image (the image file and its font description file - form a font together). - See dlabel - and slabel for details. - - - - All images can have full transparency as described in the section about - image formats. If the X server - doesn't support the XShape extension, the parts marked transparent will be - black. If you'd like to use this feature, the width of the main window's - background image must be dividable by 8. - - - - - The subwindow is where the movie appears. It - can display a specified image if there is no movie loaded (it is quite boring - to have an empty window :-)) Note: - transparency is not allowed here. - - - - - The skin menu is just a way to control - MPlayer by means of menu entries. Two images - are required for the menu: one of them is the base image that shows the - menu in its normal state, the other one is used to display the selected - entries. When you pop up the menu, the first image is shown. If you move - the mouse over the menu entries, the currently selected entry is copied - from the second image over the menu entry below the mouse pointer - (the second image is never shown as a whole). - - - A menu entry is defined by its position and size in the image (see the - section about the skin menu for - details). - - - - - - -There is an important thing not mentioned yet: For buttons, potmeters and -menu entries to work, MPlayer must know what to -do if they are clicked. This is done by messages -(events). For these items you must define the messages to be generated when -they are clicked. - - - - -Image formats - -Images must be truecolor (24 or 32 bpp) PNGs. - -In the main window and in the playbar (see below) you can use images with -`transparency': Regions filled with the color #FF00FF (magenta) are fully -transparent when viewed by MPlayer. This means -that you can even have shaped windows if your X server has the XShape extension. - - - - - - -Files - - -You need the following files to build a skin: - - - The configuration file named skin tells - MPlayer how to put different parts of the skin - together and what to do if you click somewhere in the window. - - - The background image for the main window. - - - Images for the items in the main window (including one or more font - description files needed to draw labels). - - - The image to be displayed in the subwindow (optional). - - - Two images for the skin menu (they are needed only if you want to create - a menu). - - - With the exception of the skin configuration file, you can name the other - files whatever you want (but note that font description files must have - a .fnt extension). - - - - - - - - - -The skin file - - -As mentioned above, this is the skin configuration file. It is line oriented; -comment lines start with a ';' character at the beginning of -the line (only spaces and tabs are allowed before the ';'). - - - -The file is made up of sections. Each section describes the skin for an -application and has the following form: - -section = section name -. -. -. -end - - - - -Currently there is only one application, so you need only one section: its name -is movieplayer. - - - -Within this section each window is described by a block of the following form: - -window = window name -. -. -. -end - - - - -where window name can be one of these strings: - - - main - for the main window - - - sub - for the subwindow - - - menu - for the skin menu - - - playbar - playbar - - - - - -(The sub and menu blocks are optional - you do not need to create a menu or -decorate the subwindow.) - - - -Within a window block, you can define each item for the window by a line in -this form: -item = parameter -Where item is a string that identifies the type of the GUI -item, parameter is a numeric or textual value (or a list of -values separated by commas). - - - -Putting the above together, the whole file looks something like this: - -section = movieplayer - window = main - ; ... items for main window ... - end - - window = sub - ; ... items for subwindow ... - end - - window = menu - ; ... items for menu ... - end - - window = playbar - ; ... items for playbar ... - end -end - - - - -The name of an image file must be given without leading directories - images -are searched for in the skins directory. -You may (but you need not) specify the extension of the file. If the file does -not exist, MPlayer tries to load the file -<filename>.<ext>, where png -and PNG are tried for <ext> -(in this order). The first matching file will be used. - - - -Here is an example to make this clear. Suppose that you have an image called -main.png that you use for the main window: -base = main, -1, -1 -MPlayer tries to load main, -main.png, main.PNG files. - - - -Finally some words about positioning. The main window and the subwindow can be -placed in the different corners of the screen by giving X -and Y coordinates. 0 is top or left, --1 is center and -2 is right or bottom, as -shown in this illustration: - - -(0, 0)----(-1, 0)----(-2, 0) - | | | - | | | -(0,-1)----(-1,-1)----(-2,-1) - | | | - | | | -(0,-2)----(-1,-2)----(-2,-2) - - - - - - - -Main window and playbar - - -Below is the list of entries that can be used in the -'window = main' ... 'end', -and the 'window = playbar' ... 'end' -blocks. - - - - - - base = image, X, Y - - - - Lets you specify the background image to be used for the main window. - The window will appear at the given X,Y position on - the screen The window will have the size of the image. - - - These coordinates do not currently work for the display window. - - Transparent regions in the image (colored #FF00FF) appear black - on X servers without the XShape extension. The image's width must be dividable - by 8. - - - - - - button = image, X, Y, width, height, message - - - - Place a button of width * height size at - position X,Y. The specified message is - generated when the button is clicked. The image given by - image must have three parts below each other (according to - the possible states of the button), like this: - - - -+------------+ -| pressed | -+------------+ -| released | -+------------+ -| disabled | -+------------+ - - - - - - - decoration = enable|disable - - - - Enable or disable window manager decoration of the main window. Default is - disable. - - - This doesn't work for the display window, there is no need to. - - - - - - - hpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message - - - - - - - - vpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message - - - Place a horizontal (hpotmeter) or vertical (vpotmeter) potmeter of - width * height size at position - X,Y. The image can be divided into different parts for the - different phases of the potmeter (for example, you can have a pot for volume - control that turns from green to red while its value changes from the minimum - to the maximum.). hpotmeter can have a button that can be - dragged horizontally. The parameters are: - - - button - the image to be used for the - button (must have three parts below each other, like in case of - button) - - - bwidth, bheight - size - of the button - - - phases - the image to be used for the - different phases of the hpotmeter. A special value of NULL - can be used if you want no such image. The image must be divided into - numphases parts vertically like this: - -+------------+ -| phase #1 | -+------------+ -| phase #2 | -+------------+ - ... -+------------+ -| phase #n | -+------------+ - - - numphases - number of phases stored in the - phases image - - - default - default value for hpotmeter - (in the range 0 to 100) - - - X, Y - position for the hpotmeter - - - width, height - width and height - of the hpotmeter - - - message - the message to be generated when the - value of hpotmeter is changed - - - - - - - - potmeter = phases, numphases, default, X, Y, width, height, message - - - A hpotmeter without a button. (I guess it is meant to be - turned around, but it reacts to horizontal dragging only.) For the description - of the parameters see hpotmeter. - phases can be NULL, but it is quite - useless, since you cannot see where the potmeter is set. - - - - - - font = fontfile, fontid - - - Defines a font. fontfile is the name of a font description - file with a .fnt extension (do not specify the extension - here). fontid is used to refer to the font - (see dlabel - and slabel). Up to 25 fonts can be defined. - - - - - - slabel = X, Y, fontid, "text" - - - Place a static label at the position X,Y. - text is displayed using the font identified by - fontid. The text is just a raw string - ($x variables do not work) that must be enclosed between - double quotes (but the " character cannot be part of the text). The - label is displayed using the font identified by fontid. - - - - - - dlabel = X, Y, length, align, fontid, "text" - - - - Place a dynamic label at the position X,Y. The label is - called dynamic because its text is refreshed periodically. The maximum length - of the label is given by length (its height is the height - of a character). If the text to be displayed is wider than that, it will be - scrolled, - otherwise it is aligned within the specified space by the value of the - align parameter: 0 is for right, - 1 is for center, 2 is for left. - - - The text to be displayed is given by text: It must be - written between double quotes (but the " character cannot be part of the - text). The label is displayed using the font identified by - fontid. You can use the following variables in the text: - - - - - - VariableMeaning - - - - $1 - play time in hh:mm:ss format - - - $2 - play time in mmmm:ss format - - - $3 - play time in hh format (hours) - - - $4 - play time in mm format (minutes) - - - $5 - play time in ss format (seconds) - - - $6 - movie length in hh:mm:ss format - - - $7 - movie length in mmmm:ss format - - - $8 - play time in h:mm:ss format - - - $v - volume in xxx.xx% format - - - $V - volume in xxx.xx format - - - $b - balance in xxx.xx% format - - - $B - balance in xxx.xx format - - - $$ - the $ character - - - $a - a character according to the audio type (none: n, - mono: m, stereo: t) - - - $t - track number (in playlist) - - - $o - filename - - - $f - filename in lower case - - - $F - filename in upper case - - - $T - - a character according to the stream type (file: f, - Video CD: v, DVD: d, - URL: u) - - - - $p - the p character (if a movie is playing and the font - has the p character) - - - $s - the s character (if the movie is stopped and the - font has the s character) - - - $e - the e character (if playback is paused and the font - has the e character) - - - $x - movie width - - - $y - movie height - - - $C - name of the codec used - - - - - - - The $a, $T, $p, $s and $e - variables all return characters that should be displayed as special symbols - (for example, e is for the pause symbol that usually looks - something like ||). You should have a font for normal characters and - a different font for symbols. See the section about - symbols for more information. - - - - - - - - - -Subwindow - - -The following entries can be used in the -'window = sub' . . . 'end' block. - - - - - - base = image, X, Y, width, height - - - The image to be displayed in the window. The window will appear at the given - X,Y position on the screen (0,0 is the - top left corner). You can specify -1 for center and - -2 for right (X) and bottom - (Y). The window will be as large as the image. - width and height - denote the size of the window; they are optional (if they are missing, the - window is the same size as the image). - - - - - - background = R, G, B - - - Lets you set the background color. It is useful if the image is smaller than - the window. R, G and - B specifies the red, green and blue component of the color - (each of them is a decimal number from 0 to 255). - - - - - - - - -Skin menu - - -As mentioned earlier, the menu is displayed using two images. Normal menu -entries are taken from the image specified by the base item, -while the currently selected entry is taken from the image specified by the -selected item. You must define the position and size of each -menu entry through the menu item. - - - -The following entries can be used in the -'window = menu'. . .'end' block. - - - - - - base = image - - - The image for normal menu entries. - - - - - - selected = image - - - The image showing the menu with all entries selected. - - - - - - menu = X, Y, width, height, message - - - Defines the X,Y position and the size of a menu entry in - the image. message is the message to be generated when the - mouse button is released over the entry. - - - - - - - - - - - -Fonts - -As mentioned in the section about the parts of a skin, a font is defined by an -image and a description file. You can place the characters anywhere in the -image, but make sure that their position and size is given in the description -file exactly. - - - -The font description file (with .fnt extension) can have -comment lines starting with ';'. The file must have a line -in the form - -image = image -Where image is the name of the -image file to be used for the font (you do not have to specify the extension). - -"char" = X, Y, width, height -Here X and Y specify the position of the -char character in the image (0,0 is the -upper left corner). width and height are -the dimensions of the character in pixels. - - - -This example defines the A, B, C characters using font.png. - -; Can be "font" instead of "font.png". -image = font.png - -; Three characters are enough for demonstration purposes :-) -"A" = 0,0, 7,13 -"B" = 7,0, 7,13 -"C" = 14,0, 7,13 - - - - - - -Symbols - - -Some characters have special meanings when returned by some of the variables -used in dlabel. These characters are meant -to be shown as symbols so that things like a nice DVD logo can be displayed -instead of the character 'd' for a DVD stream. - - - -The following table lists all the characters that can be used to display -symbols (and thus require a different font). - - - - - - CharacterSymbol - - - pplay - sstop - epause - nno sound - mmono sound - tstereo sound - fstream is a file - vstream is a Video CD - dstream is a DVD - ustream is a URL - - - - - - - - - - - -GUI messages - - -These are the messages that can be generated by buttons, potmeters and -menu entries. - - - -Playback control: - - evNext - - Jump to next track in the playlist. - - - - - evPause - - Forms a switch together with evPlaySwitchToPause. They can - be used to have a common play/pause button. Both messages should be assigned - to buttons displayed at the very same position in the window. This message - pauses playing and the image for the evPlaySwitchToPause - button is displayed (to indicate that the button can be pressed to continue - playing). - - - - - evPlay - - Start playing. - - - - - evPlaySwitchToPause - - The opposite of evPauseSwitchToPlay. This message starts - playing and the image for the evPauseSwitchToPlay button - is displayed (to indicate that the button can be pressed to pause playing). - - - - - evPrev - - Jump to previous track in the playlist. - - - - - evStop - - Stop playing. - - - - - -Seeking: - - evBackward10sec - - Seek backward 10 seconds. - - - - - evBackward1min - - Seek backward 1 minute. - - - - - evBackward10min - - Seek backward 10 minutes. - - - - - evForward10sec - - Seek forward 10 seconds. - - - - - evForward1min - - Seek forward 1 minute. - - - - - evForward10min - - Seek forward 10 minutes. - - - - - evSetMoviePosition - - Seek to position (can be used by a potmeter; the - relative value (0-100%) of the potmeter is used). - - - - - -Video control: - - evHalfSize - - Set the movie window to half size. - - - - evDoubleSize - - Set the movie window to double size. - - - - evFullScreen - - Switch fullscreen mode on/off. - - - - evNormalSize - - Set the movie window to its normal size. - - - - - -Audio control: - - evDecAudioBufDelay - - Decrease audio buffer delay. - - - - - evDecBalance - - Decrease balance. - - - - - evDecVolume - - Decrease volume. - - - - - evIncAudioBufDelay - - Increase audio buffer delay. - - - - - evIncBalance - - Increase balance. - - - - - evIncVolume - - Increase volume. - - - - - evMute - - Mute/unmute the sound. - - - - - evSetBalance - - Set balance (can be used by a potmeter; the - relative value (0-100%) of the potmeter is used). - - - - - evSetVolume - - Set volume (can be used by a potmeter; the relative - value (0-100%) of the potmeter is used). - - - - - -Miscellaneous: - - evAbout - - Open the about window. - - - - - evDropSubtitle - - Disables the currently used subtitle. - - - - - evEqualizer - - Turn the equalizer on/off. - - - - - evExit - - Quit the program. - - - - - evIconify - - Iconify the window. - - - - - evLoad - - Load a file (by opening a file browser window, where you can choose a file). - - - - - evLoadPlay - - Does the same as evLoad, but it automatically starts - playing after the file is loaded. - - - - - evLoadSubtitle - - Loads a subtitle file (with the file selector). - - - - - evLoadAudioFile - - Loads an audio file (with the file selector). - - - - - evNone - - Empty message, it has no effect (except maybe in Subversion versions :-)). - - - - - evPlaylist - - Open/close the playlist window. - - - - - evPlayDVD - - Tries to open the disc in the given DVD-ROM drive. - - - - - evPlayVCD - - Tries to open the disc in the given CD-ROM drive. - - - - - evPreferences - - Open the preferences window. - - - - - evSetAspect - - Sets displayed image aspect. - - - - - evSetURL - - Displays the URL dialog window. - - - - - evSkinBrowser - - Open the skin browser window. - - - - - - - - - - -Creating quality skins - - -So you have read up on creating skins for the -MPlayer GUI, done your best with the -Gimp and wish to submit your skin to us? -Read on for some guidelines to avoid common mistakes and produce -a high quality skin. - - - -We want skins that we add to our repository to conform to certain -quality standards. There are also a number of things that you can do -to make our lives easier. - - - -As an example you can look at the Blue skin, -it satisfies all the criteria listed below since version 1.5. - - - - - Each skin should come with a - README file that contains information about - you, the author, copyright and license notices and anything else - you wish to add. If you wish to have a changelog, this file is a - good place. - - - - There should be a file VERSION - with nothing more than the version number of the skin on a single - line (e.g. 1.0). - - - - Horizontal and vertical controls (sliders like volume - or position) should have the center of the knob properly centered on - the middle of the slider. It should be possible to move the knob to - both ends of the slider, but not past it. - - - - Skin elements should have the right sizes declared - in the skin file. If this is not the case you can click outside of - e.g. a button and still trigger it or click inside its area and not - trigger it. - - - - The skin file should be - prettyprinted and not contain tabs. Prettyprinted means that the - numbers should line up neatly in columns. - - - - - diff --git a/Makefile b/Makefile index 7131000471..bf2ba7d66b 100644 --- a/Makefile +++ b/Makefile @@ -550,41 +550,6 @@ SRCS_MPLAYER-$(GGI) += libvo/vo_ggi.c SRCS_MPLAYER-$(GIF) += libvo/vo_gif89a.c SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c libvo/vo_gl2.c SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c -SRCS_MPLAYER-$(GUI) += gui/bitmap.c -SRCS_MPLAYER-$(GUI_GTK) += gui/app.c \ - gui/cfg.c \ - gui/interface.c \ - gui/mplayer/gui_common.c \ - gui/mplayer/menu.c \ - gui/mplayer/mw.c \ - gui/mplayer/pb.c \ - gui/mplayer/play.c \ - gui/mplayer/sw.c \ - gui/mplayer/widgets.c \ - gui/mplayer/gtk/about.c \ - gui/mplayer/gtk/eq.c \ - gui/mplayer/gtk/fs.c \ - gui/mplayer/gtk/gtk_common.c \ - gui/mplayer/gtk/gtk_url.c \ - gui/mplayer/gtk/mb.c \ - gui/mplayer/gtk/menu.c \ - gui/mplayer/gtk/opts.c \ - gui/mplayer/gtk/pl.c \ - gui/mplayer/gtk/sb.c \ - gui/skin/cut.c \ - gui/skin/font.c \ - gui/skin/skin.c \ - gui/wm/ws.c \ - gui/wm/wsxdnd.c \ - -SRCS_MPLAYER-$(GUI_WIN32) += gui/win32/dialogs.c \ - gui/win32/gui.c \ - gui/win32/interface.c \ - gui/win32/playlist.c \ - gui/win32/preferences.c \ - gui/win32/skinload.c \ - gui/win32/widgetrender.c \ - gui/win32/wincfg.c \ SRCS_MPLAYER-$(IVTV) += libao2/ao_ivtv.c libvo/vo_ivtv.c SRCS_MPLAYER-$(JACK) += libao2/ao_jack.c @@ -732,17 +697,10 @@ DEPS = $(filter-out %.S,$(patsubst %.cpp,%.d,$(patsubst %.c,%.d,$(SRCS_COMMON) $ ALL_PRG-$(MPLAYER) += mplayer$(EXESUF) ALL_PRG-$(MENCODER) += mencoder$(EXESUF) -INSTALL_TARGETS-$(GUI) += install-gui INSTALL_TARGETS-$(MENCODER) += install-mencoder install-mencoder-man INSTALL_TARGETS-$(MPLAYER) += install-mplayer install-mplayer-man DIRS = . \ - gui \ - gui/mplayer \ - gui/mplayer/gtk \ - gui/skin \ - gui/wm \ - gui/win32 \ input \ liba52 \ libaf \ @@ -882,7 +840,7 @@ version.h: version.sh # Make sure all generated header files are created. codec-cfg.d codec-cfg.o: codecs.conf