diff --git a/wmusic/COPYING b/wmusic/COPYING new file mode 100644 index 0000000..a43ea21 --- /dev/null +++ b/wmusic/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/wmusic/Makefile.in b/wmusic/Makefile.in new file mode 100644 index 0000000..c8324ca --- /dev/null +++ b/wmusic/Makefile.in @@ -0,0 +1,20 @@ +RCSS = Makefile.in configure.in README + +all: wmusic + +wmusic: + cd src && ${MAKE} wmusic + +clean: + rm -f *~ *.o core wmusic.spec + cd src && ${MAKE} clean + +distclean: clean + rm -f config.status config.log Makefile config.cache + cd src && ${MAKE} distclean + +install: + cd src && ${MAKE} install + +uninstall: + cd src && ${MAKE} uninstall diff --git a/wmusic/README b/wmusic/README new file mode 100644 index 0000000..56d16ab --- /dev/null +++ b/wmusic/README @@ -0,0 +1,184 @@ +wmusic +by Hadess +maintained by John + +wmusic is a dockapp that remote-controls xmms. Here is a list of the features: + +- VCR style controls including fast rewind and fast forward +- Time and Playlist position display +- Super stylee rotating arrow +- Hiding of the xmms windows (on startup and through middle-click) + +- AfterStep users, add this line to your ~/GNUstep/Library/AfterStep/wharf: + *Wharf wmusic - Swallow "wmusic" wmusic -w & +- Sawfish users, grab Tiger-T's DockMill theme, and apply it to the running + dockapp with the -w flag on. See the theme's README for more details. +- KDE users can use the "Dock Application Bar" to dock wmusic, don't forget + the -w flag to launch wmusic. Right-Click on Kicker, then pick: + Add->Extension->Dock Application Bar + +http://home.jtan.com/~john/index.shtml?software.shtml + +Building +-------- + +Requirements: + - xmms >= 1.0.0 and all the appropriate devel packages (glib, +gtk+, xmms, glibc...) + - xmms > 1.2.4 if you have problems with the prefs window popping up + +Simply type: + ./configure + make + make install + +URLs +---- +XMMS: http://xmms.org +DockMill: http://tigert.gimp.org/files/sawmill-themes/DockMill.tar.gz + +Changelog +--------- +- 1.5.0 +* Added -R option to start xmms when wmusic is started, and to exit wmusic + when xmms exits. + (Thanks to Mateusz Greszta) +* Incremented the minor version number, getting sick of 1.4.xx releases :) + +- 1.4.14 +* Fixed the configure/manpage issue from 1.4.13 :) + +- 1.4.13 +* Added Russian/Ukrainian glyph support. + (Thanks to Alexey Voinov , + Michael Shigorin ) + +- 1.4.12 +* Added patch to make sure xmms is running before calling some functions. + (Thanks to Michael Cohrs <) +* Added patch to fix volume slider overdrawing. + (Thanks to Zdik Kudrle ) +* Added patch to treat main window just like playlist, equalizer, with regard + to visibility after right-clicking the wmusic app. + (Thanks to Nicolas Hinz ) + +- 1.4.11 +* Added patch to show volume slider (-b flag), allowing volume control + without a scroll mouse. + (Thanks to Alessandro Budai ) + +- 1.4.10 +* Added patch to fix segfaults caused by wrong size of displayRect array + (Thanks to Alexey Voinov ) + +- 1.4.9 +* Added patch to stop rotating arrow when XMMS is paused (-a flag) +* Added patch to switch between time left and time elapsed display + (-l flag to start with time left) +* Changed docs to reflect new maintainership (John Chapin) + +- 1.4.8 +* Corrected e-mail addresses + +- 1.4.7 +* KDE support removed (maybe) because it breaks everything else (should fix + the "buttons not clickable" problem) + +- 1.4.6 +* Non-GNU make fixes (thanks to Eric Melville ) +* KDE support in libdockapp (thanks to Alain Schroeder ) +* KDE testing and README update (thanks to Eric Christopherson from #kde-users) + +- 1.4.5 +* Fixed another leak (will it ever stop ?) + (thanks to Ulrich Seidl for finding it out) + +- 1.4.4 +* Fixed a leak (thanks to Gerry OKeefe for reporting this one) + +- 1.4.3 +* Fixed volume flag to be -V (collided with -v/--version) +* Updated man page +* Fixed a leak +* Fixed title "freezing" when emptying the playlist +* Changed the separator for the scrolling title (and the code as well) +* Added ()*/ to the recognized characters +* Fixed a segfault related to the new separator code + +- 1.4.2 +* Updated manpage +* Added manpage by Alain Schroeder +* Added -t flag to start with title display (idea by Antoine Labour as well) +* Added apostroph in title (Antoine Labour ) +* Fixed 2 segfaults (title related again) + +- 1.4.1 +* Fixed wmusic.spec.in (thanks to g0sh on OPN) +* Really fixed the title display bugs +* Make sure to use -w to run it under window managers other than Window Maker +* Made the title scrolling speed slower + +- 1.4 +* Debian fixes and maintainership (Alain Schroeder) +* Wheel scroll support for volume change (thanks Marius Aamodt Eriksen) +* Added scroll title display, had to rework the GUI a bit + +- 1.2.6 +* Added hours:minutes display for songs longer than 99 minutes and 59 seconds + (idea by Scott Mc Dermott ) +* Now upstream Debian package + +- 1.2.5 +* Changed the size of the dockapp to 64x64, now Sawfish compatible + +- 1.2.4 +* Included libdockapp inside the archive, it is not needed to download and + install it separately. +* Added AfterStep compatibility + +- 1.2.3 +* Removed -n option (don't run XMMS on startup) +* Added -r option (run XMMS on startup) +* Double-click on the display will now run XMMS +* Added more differences between XMMS not playing / XMMS not running + +- 1.2.2 +* fixed a crazy cpu bug, threads are no more used + +- 1.2.1 +* changed the name from wmplay to wmusic +* fixed a bug (uninitialized var. was used on some circumstances) +* removed the close-on-xmms-close (click on the display to run xmms) +* added -n switch to avoid running xmms on startup + +- 1.2 +* a little bug fix for transparency +* added autoconf support, thanks to Logan + +- 1.1.9 +* Added -x switch for wmxmms like mouse-bindings + (lo_tek wanted it :P) + +- 1.1.8 +* Now multi-threaded, so that the display is independant of the rest + +- 1.1.0 +* Rewrote to use libdockapp rather than gdk + +- 0.9.9 +* Added Stereo/Mono display +* Added kbps display + +- 0.9 +* Added time and pos display, and the rotating arrow +* Switched the building to a Makefile + +- 0.1 +* First version, only the bottom buttons are working + +Copyright +--------- + +Plain and simple GPL version 2.0, see COPYING for more infos +- based on design work of Antoine Nulle and Martjin Pieterse +- double-click code from WMpop by Jérôme SAUTRET (jerome@linuxfan.com) diff --git a/wmusic/configure b/wmusic/configure new file mode 100755 index 0000000..806297a --- /dev/null +++ b/wmusic/configure @@ -0,0 +1,1708 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --with-x use the X Window System" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=src/wmusic.c + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +VERSION=1.5.0 +PACKAGE=wmusic +echo +echo "Configuring package: $PACKAGE-$VERSION" +echo + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:537: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:567: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:618: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:650: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 661 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:692: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:697: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:725: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:787: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:842: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +# If we find X, set shell vars x_includes and x_libraries to the +# paths, otherwise set no_x=yes. +# Uses ac_ vars as temps to allow command line to override cache and checks. +# --without-x overrides everything else, but does not touch the cache. +echo $ac_n "checking for X""... $ac_c" 1>&6 +echo "configure:926: checking for X" >&5 + +# Check whether --with-x or --without-x was given. +if test "${with_x+set}" = set; then + withval="$with_x" + : +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + # Both variables are already set. + have_x=yes + else +if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=NO ac_x_libraries=NO +rm -fr conftestdir +if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case "$ac_im_incroot" in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; + esac + case "$ac_im_usrlibdir" in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; + esac + fi + cd .. + rm -fr conftestdir +fi + +if test "$ac_x_includes" = NO; then + # Guess where to find include files, by looking for this one X11 .h file. + test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h + + # First, try using that file with no special directory specified. +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + # Look for the header file in a standard set of common directories. +# Check X11 before X11Rn because it is often a symlink to the current release. + for ac_dir in \ + /usr/X11/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + ; \ + do + if test -r "$ac_dir/$x_direct_test_include"; then + ac_x_includes=$ac_dir + break + fi + done +fi +rm -f conftest* +fi # $ac_x_includes = NO + +if test "$ac_x_libraries" = NO; then + # Check for the libraries. + + test -z "$x_direct_test_library" && x_direct_test_library=Xt + test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc + + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + LIBS="$ac_save_LIBS" +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + LIBS="$ac_save_LIBS" +# First see if replacing the include by lib works. +# Check X11 before X11Rn because it is often a symlink to the current release. +for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ + /usr/X11/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + /lib/usr/lib/X11 \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f conftest* +fi # $ac_x_libraries = NO + +if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then + # Didn't find X anywhere. Cache the known absence of X. + ac_cv_have_x="have_x=no" +else + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" +fi +fi + fi + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + echo "$ac_t""$have_x" 1>&6 + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 +fi + + + +echo $ac_n "checking for XF86VidModeQueryExtension in -lXxf86vm""... $ac_c" 1>&6 +echo "configure:1158: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5 +ac_lib_var=`echo Xxf86vm'_'XF86VidModeQueryExtension | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXxf86vm -L$x_libraries -lXext $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + +cat >> confdefs.h <<\EOF +#define XF86VIDMODE 1 +EOF + +VM_LIBS="-lXxf86vm" +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6 +echo "configure:1204: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 +ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXxf86dga -L$x_libraries -lXext $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + +cat >> confdefs.h <<\EOF +#define XF86DGA 1 +EOF + +DGA_LIBS="-lXxf86dga" +else + echo "$ac_t""no" 1>&6 +fi + + +# Extract the first word of "xmms-config", so it can be a program name with args. +set dummy xmms-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1252: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PATH_XMMSCONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PATH_XMMSCONFIG" in + /*) + ac_cv_path_PATH_XMMSCONFIG="$PATH_XMMSCONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PATH_XMMSCONFIG="$PATH_XMMSCONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH:/usr/X11R6/bin:/usr/local/bin" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PATH_XMMSCONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PATH_XMMSCONFIG" && ac_cv_path_PATH_XMMSCONFIG="no" + ;; +esac +fi +PATH_XMMSCONFIG="$ac_cv_path_PATH_XMMSCONFIG" +if test -n "$PATH_XMMSCONFIG"; then + echo "$ac_t""$PATH_XMMSCONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test $PATH_XMMSCONFIG = "no"; then + echo + echo "It appears as if Xmms (X Multimedia System - http://www.xmms.org)" + echo "is not installed on your computer." + echo + echo "If you have Xmms, make sure xmms-config is in your \$PATH" + echo + exit +fi + +# Extract the first word of "gtk-config", so it can be a program name with args. +set dummy gtk-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1299: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PATH_GTKCONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PATH_GTKCONFIG" in + /*) + ac_cv_path_PATH_GTKCONFIG="$PATH_GTKCONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PATH_GTKCONFIG="$PATH_GTKCONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH:/usr/X11R6/bin:/usr/local/bin" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PATH_GTKCONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PATH_GTKCONFIG" && ac_cv_path_PATH_GTKCONFIG="no" + ;; +esac +fi +PATH_GTKCONFIG="$ac_cv_path_PATH_GTKCONFIG" +if test -n "$PATH_GTKCONFIG"; then + echo "$ac_t""$PATH_GTKCONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test $PATH_GTKCONFIG = "no"; then + echo + echo "It appears as if GTK+ - http://www.gtk.org)" + echo "is not installed on your computer." + echo + echo "If you have gtk+, make sure gtk-config is in your \$PATH" + echo + exit +fi + + + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "Makefile wmusic.spec src/Makefile src/version.h src/config.h:src/config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@CC@%$CC%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@CPP@%$CPP%g +s%@PATH_XMMSCONFIG@%$PATH_XMMSCONFIG%g +s%@PATH_GTKCONFIG@%$PATH_GTKCONFIG%g +s%@DGA_LIBS@%$DGA_LIBS%g +s%@VM_LIBS@%$VM_LIBS%g +s%@VERSION@%$VERSION%g +s%@PACKAGE@%$PACKAGE%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/wmusic/configure.in b/wmusic/configure.in new file mode 100644 index 0000000..fa571ff --- /dev/null +++ b/wmusic/configure.in @@ -0,0 +1,63 @@ +dnl configure.in for wmusic + +AC_PREREQ(2.12) + +AC_INIT(src/wmusic.c) + +VERSION=1.5.0 +PACKAGE=wmusic +echo +echo "Configuring package: $PACKAGE-$VERSION" +echo + +AC_PROG_CC +AC_PROG_INSTALL +AC_CONFIG_HEADER(src/config.h:src/config.h.in) + +AC_PATH_X + +dnl AC_CHECK_LIB(dockapp, DAProcessActionRects, , +dnl echo +dnl echo "Error: libdockapp was not found" +dnl echo +dnl exit 1) + +AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,[ +AC_DEFINE(XF86VIDMODE,1,[XF86VidMode extension is present]) +VM_LIBS="-lXxf86vm"],,-L$x_libraries -lXext) + +AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,[ +AC_DEFINE(XF86DGA,1,[XF86DGA extension is present]) +DGA_LIBS="-lXxf86dga"],,-L$x_libraries -lXext) + +AC_PATH_PROG(PATH_XMMSCONFIG,xmms-config, no, + $PATH:/usr/X11R6/bin:/usr/local/bin) + +if test $PATH_XMMSCONFIG = "no"; then + echo + echo "It appears as if Xmms (X Multimedia System - http://www.xmms.org)" + echo "is not installed on your computer." + echo + echo "If you have Xmms, make sure xmms-config is in your \$PATH" + echo + exit +fi + +AC_PATH_PROG(PATH_GTKCONFIG,gtk-config, no, + $PATH:/usr/X11R6/bin:/usr/local/bin) + +if test $PATH_GTKCONFIG = "no"; then + echo + echo "It appears as if GTK+ - http://www.gtk.org)" + echo "is not installed on your computer." + echo + echo "If you have gtk+, make sure gtk-config is in your \$PATH" + echo + exit +fi + +AC_SUBST(DGA_LIBS) +AC_SUBST(VM_LIBS) +AC_SUBST(VERSION) +AC_SUBST(PACKAGE) +AC_OUTPUT(Makefile wmusic.spec src/Makefile src/version.h) diff --git a/wmusic/debian/changelog b/wmusic/debian/changelog new file mode 100644 index 0000000..46d1c67 --- /dev/null +++ b/wmusic/debian/changelog @@ -0,0 +1,115 @@ +wmusic (1.4.10-2) unstable; urgency=low + + * Use xlibs-dev as Build-Dep instead of xlibs6-dev (Closes: #170164). + + -- Alain Schroeder Fri, 7 Mar 2003 20:45:14 +0100 + +wmusic (1.4.10-1) unstable; urgency=low + + * New Upstream (Fixes Segfaults with gcc-3.0; New Upstream Address) + * Changed all addresses in debian/copyright and debian/wmusic.1 + * Fix hiding of xmms on startup (Closes: #166529). + + -- Alain Schroeder Wed, 30 Oct 2002 01:30:27 +0100 + +wmusic (1.4.9-1) unstable; urgency=low + + * New Upstream (It now includes the arrow-patch from 1.4.7-1 and adds the + possibility, to choose if the time left or time elapsed is displayed). + * Upped Standart Version. + + -- Alain Schroeder Fri, 22 Feb 2002 12:34:49 +0100 + +wmusic (1.4.7-1) unstable; urgency=low + + * New Upstream (Only changes to included libdockapp, which we don't use + since there is an debian package) + * Modified patch from (1.2.6-3 / #86939 / Spinning arrow when stopped) + to work only, if command line argument -a or --rotate-arrow is given. + Upstream is unresponsive at the moment, so I'm releasing this now. + * Changed Manpage to reflect the new patch. + * Changed debian menu entry to start with --rotate-arrow by default, too + + -- Alain Schroeder Thu, 2 Aug 2001 20:22:39 +0200 + +wmusic (1.4.6-1) unstable; urgency=low + + * New Upstream (No real change - only a few changes to README and + Makefile for *BSD) + * Linked against libdockapp again - the maintainer included my fixes + and fixed my fixes again ;) + + -- Alain Schroeder Tue, 24 Apr 2001 19:21:37 +0200 + +wmusic (1.4.5-2) unstable; urgency=low + + * Patched included libdockapp, to work correctly with KDE. (closes: #89516) + + -- Alain Schroeder Sun, 15 Apr 2001 01:59:11 +0200 + +wmusic (1.4.5-1) unstable; urgency=low + + * New Upstream. + + -- Alain Schroeder Mon, 11 Apr 2001 13:50:32 +0200 + +wmusic (1.4.4-2) unstable; urgency=low + + * Fixed menu entry and added a long description. + + -- Alain Schroeder Mon, 9 Apr 2001 15:52:48 +0200 + +wmusic (1.4.4-1) unstable; urgency=low + + * New Upstream, fixes Memory Leak and closes #91826 + + -- Alain Schroeder Mon, 2 Apr 2001 00:30:38 +0200 + +wmusic (1.4.3-1) unstable; urgency=low + + * New Upstream + * Changed back to libdockapp delivered with wmusic, since it + seem to handle some stuff right, this might close 89516, maybe + not... + + -- Alain Schroeder Wed, 16 Mar 2001 11:29:58 +0100 + +wmusic (1.4.2-1) unstable; urgency=low + + * New Upstream + + -- Alain Schroeder Mon, 12 Mar 2001 10:46:57 +0100 + +wmusic (1.4.1-1) unstable; urgency=low + + * New Upstream + * Upgraded Standarts Version + + -- Alain Schroeder Sun, 11 Mar 2001 16:47:29 +0100 + +wmusic (1.2.6-4) unstable; urgency=low + + * Wrote a manpage, closes #87140 + + -- Alain Schroeder Tue, 27 Feb 2001 11:29:12 +0100 + +wmusic (1.2.6-3) unstable; urgency=low + + * Now wmusic´s arrow doesn´t spin, if xmms is paused, closes #86939 + + -- Alain Schroeder Thu, 22 Feb 2001 05:17:45 +0100 + +wmusic (1.2.6-2) unstable; urgency=low + + * Changed section to sound + * Fixed dependencies and compiled wmusic against libdockapp + instead of just linking it (changed src/Makefile.in too to this), + closes Bug#86101 + + -- Alain Schroeder Fri, 16 Feb 2001 17:09:44 +0100 + +wmusic (1.2.6-1) unstable; urgency=low + + * Initial Release, closes Bug#85266. + + -- Alain Schroeder Sun, 14 Jan 2001 16:23:10 +0000 diff --git a/wmusic/debian/control b/wmusic/debian/control new file mode 100644 index 0000000..4b10327 --- /dev/null +++ b/wmusic/debian/control @@ -0,0 +1,14 @@ +Source: wmusic +Section: sound +Priority: optional +Maintainer: Alain Schroeder +Build-Depends: xmms-dev, xlibs-dev, libgtk1.2-dev, debhelper, libdockapp-dev +Standards-Version: 3.5.6.0 + +Package: wmusic +Architecture: any +Depends: ${shlibs:Depends} +Description: a remote-control DockApp for xmms + wmusic is a dockapp that remote-controls xmms. Features include VCR-style + controls, Time and Playlist display, supa stylee rotating arrow, hiding of + the xmms windows and reactive interface. diff --git a/wmusic/debian/copyright b/wmusic/debian/copyright new file mode 100644 index 0000000..f5b26bf --- /dev/null +++ b/wmusic/debian/copyright @@ -0,0 +1,14 @@ +This package was debianized by Bastien Nocera on +Sun, 14 Jan 2001 16:23:10 +0000 and is now maintained by Alain Schröder +. + +It was downloaded from http://home.jtan.com/~john/wmusic/ + +Upstream Author(s): John Chapin + +Copyright: +You are free to distribute this software under the terms of +the GNU General Public License. + +On Debian systems, the complete text of the GNU General Public +License can be found in /usr/share/common-licenses/GPL file. diff --git a/wmusic/debian/docs b/wmusic/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/wmusic/debian/docs @@ -0,0 +1 @@ +README diff --git a/wmusic/debian/menu b/wmusic/debian/menu new file mode 100644 index 0000000..0afcd9a --- /dev/null +++ b/wmusic/debian/menu @@ -0,0 +1,3 @@ +?package(wmusic):needs=X11 section=Apps/Sound\ + title="wmusic" command="/usr/bin/wmusic --rotate-arrow" \ + description="A remote-control DockApp for XMMS" diff --git a/wmusic/debian/rules b/wmusic/debian/rules new file mode 100755 index 0000000..1f75b3e --- /dev/null +++ b/wmusic/debian/rules @@ -0,0 +1,78 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=1 + +build: build-stamp +build-stamp: + dh_testdir + + ./configure --prefix=/usr/X11R6 --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) distclean + + -rm config.log config.status config.cache Makefile + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) install PREFIX=`pwd`/debian/tmp/usr + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit + dh_installcron + dh_installmanpages + dh_installinfo +# dh_undocumented wmusic.1 + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms + # You may want to make some executables suid here. +# dh_suidregister +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/wmusic/debian/wmusic.1 b/wmusic/debian/wmusic.1 new file mode 100644 index 0000000..b0bdc49 --- /dev/null +++ b/wmusic/debian/wmusic.1 @@ -0,0 +1,73 @@ +.TH WMUSIC 1 "February 22, 2002" +.SH NAME +wmusic \- a remote-control DockApp for xmms +.SH SYNOPSIS +.B wmusic +.RI [ options ] +.SH DESCRIPTION +This manual page documents briefly the +.B wmusic command. +\fBwmusic\fP is a dockapp that remote-controls xmms. Features include +VCR-style controls, Time and Playlist display, supa stylee rotating +arrow, hiding of the xmms windows and reactive interface. +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.TP +.B \-c, \-\-command +Use as the command to launch XMMS. You can start XMMS +by a double-click into the status part of \fBwmusic\fP. +.TP +.B \-d, \-\-display host:display[.screen] +specifies the X server to contact; see X(1). +.TP +.B \-r, \-\-run +Run XMMS on startup. +.TP +.B \-R, \-\-run\-exclusive +Run XMMS on startup, exit when xmms exits. +.TP +.B \-s, \-\-session +Wich XMMS Session to use. +.TP +.B \-t, \-\-title +Shows title instead of kbps by default. +.TP +.B \-u, \-\-hide +Hide XMMS windows on startup. +.TP +.B \-V, \-\-volume +Stepping of the wheel volume control (in percent). +.TP +.B \-x, \-\-wmxmms +Use wmxmms-like show and hide. Just hide the main XMMS window. +If you do not use this parameter, \fBwmusic\fP show and hide +the main, playlist and equaliser windows. You can toggle the hide +function by pressing with the middle button into the status part of +\fBwmusic\fP. +.TP +.B \-w, \-\-windowed +Run in windowed mode. Use this, if you want to run \fBwmusic\fP in +the AfterStep wharf. +.TP +.B \-a, \-\-rotate-arrow +Stop the rotating arrow when \fBwmusic\fP is paused. +.TP +.B \-l, \-\-time-left +Start \fBwmusic\fP with the display showing time left instead of time +elapsed. +.SH SEE ALSO +.BR xmms (1x), wmaker (1x) +.SH AUTHOR +wmusic was originally written by Bastien Nocera and +it is now maintained by John Chapin . +This manual page was written by Alain Schroeder , +for the Debian GNU/Linux system (but may be used by others). diff --git a/wmusic/install-sh b/wmusic/install-sh new file mode 100644 index 0000000..ebc6691 --- /dev/null +++ b/wmusic/install-sh @@ -0,0 +1,250 @@ +#! /bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/wmusic/libdockapp/AUTHORS b/wmusic/libdockapp/AUTHORS new file mode 100644 index 0000000..9b32703 --- /dev/null +++ b/wmusic/libdockapp/AUTHORS @@ -0,0 +1,3 @@ +Alfredo K. Kojima +Pascal G. Hofstee + diff --git a/wmusic/libdockapp/COPYING b/wmusic/libdockapp/COPYING new file mode 100644 index 0000000..2b65b40 --- /dev/null +++ b/wmusic/libdockapp/COPYING @@ -0,0 +1,19 @@ +Copyright (c) 1999 Alfredo K. Kojima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/wmusic/libdockapp/README b/wmusic/libdockapp/README new file mode 100644 index 0000000..d89e7ed --- /dev/null +++ b/wmusic/libdockapp/README @@ -0,0 +1,48 @@ +DockApp Making Standard Library + +Alfredo K. Kojima +Pascal G. Hofstee + +............................................................................... + +You must have the libXpm library installed and the shape extension supported +by your X server to be able to build and install libdockapp. + +To compile libDockApp enter the libdockapp directory and type: + +./configure +make install + + +The API is described in dockapp.h wmtest.c is a sample program +that shows the library usage. + + + +License: + +Copyright (c) 1999, 2000 Alfredo K. Kojima, Pascal Hofstee +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/wmusic/libdockapp/dacallback.c b/wmusic/libdockapp/dacallback.c new file mode 100644 index 0000000..98c2aca --- /dev/null +++ b/wmusic/libdockapp/dacallback.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1999 Alfredo K. Kojima + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + * $Id: dacallback.c,v 1.1.1.1 2004/02/27 02:53:10 john Exp $ + */ + +#include "dockapp.h" + +extern DACallbacks d_callbacks; +extern int d_timeout; + +void +DASetCallbacks(DACallbacks *callbacks) +{ + long mask = 0; + + d_callbacks = *callbacks; + + if (callbacks->buttonPress) + mask |= ButtonPressMask; + if (callbacks->buttonRelease) + mask |= ButtonReleaseMask; + if (callbacks->motion) + mask |= PointerMotionMask; + + XSelectInput(DADisplay, DAWindow, mask); + XFlush(DADisplay); +} + +void +DASetTimeout(int miliseconds) +{ + d_timeout = miliseconds; +} + diff --git a/wmusic/libdockapp/dacolor.c b/wmusic/libdockapp/dacolor.c new file mode 100644 index 0000000..5bed00d --- /dev/null +++ b/wmusic/libdockapp/dacolor.c @@ -0,0 +1,45 @@ +/* + * Copyright (c) 1999 Alfredo K. Kojima + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + * $Id: dacolor.c,v 1.1.1.1 2004/02/27 02:53:10 john Exp $ + */ + +#include "dockapp.h" + +extern char *progName; + +unsigned long +DAGetColor(char *colorName) +{ + XColor color; + + if (!XParseColor(DADisplay, + DefaultColormap(DADisplay, DefaultScreen(DADisplay)), + colorName, &color)) + printf("%s: could not parse color %s\n", progName, colorName), exit(1); + + if (!XAllocColor(DADisplay, DefaultColormap(DADisplay, DefaultScreen(DADisplay)), &color)) { + printf("%s: could not allocate color %s. Using black\n", progName, colorName); + return BlackPixel(DADisplay, DefaultScreen(DADisplay)); + } + + return color.pixel; +} + diff --git a/wmusic/libdockapp/daevent.c b/wmusic/libdockapp/daevent.c new file mode 100644 index 0000000..0cb9949 --- /dev/null +++ b/wmusic/libdockapp/daevent.c @@ -0,0 +1,122 @@ +/* + * Copyright (c) 1999 Alfredo K. Kojima + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + * $Id: daevent.c,v 1.1.1.1 2004/02/27 02:53:10 john Exp $ + */ + +#include +#include "dockapp.h" + +extern Window DALeader; +extern DACallbacks d_callbacks; +extern int d_timeout; + +Bool +DAProcessEvent(XEvent *event) +{ + if ((event->xany.window != DAWindow) && (event->xany.window != DALeader)) + return False; + + switch (event->type) { + case DestroyNotify: + if (d_callbacks.destroy) + (*d_callbacks.destroy)(); + exit(0); + break; + case ButtonPress: + if (d_callbacks.buttonPress) + (*d_callbacks.buttonPress)(event->xbutton.button, + event->xbutton.state, + event->xbutton.x, + event->xbutton.y); + break; + case ButtonRelease: + if (d_callbacks.buttonRelease) + (*d_callbacks.buttonRelease)(event->xbutton.button, + event->xbutton.state, + event->xbutton.x, + event->xbutton.y); + break; + case MotionNotify: + if (d_callbacks.motion) + (*d_callbacks.motion)(event->xmotion.x, + event->xmotion.y); + break; + case EnterNotify: + if (d_callbacks.enter) + (*d_callbacks.enter)(); + break; + case LeaveNotify: + if (d_callbacks.leave) + (*d_callbacks.leave)(); + break; + default: + return False; + } + + return True; +} + +void +DAEventLoop(void) +{ + XEvent event; + + for (;;) { + if (d_timeout >= 0) { + if (!DANextEventOrTimeout(&event, d_timeout)) { + if (d_callbacks.timeout) + (*d_callbacks.timeout)(); + continue; + } + } + else + XNextEvent(DADisplay, &event); + + DAProcessEvent(&event); + } +} + +Bool +DANextEventOrTimeout(XEvent *event, unsigned long miliseconds) +{ + struct timeval timeout; + fd_set rset; + + XSync(DADisplay, False); + if (XPending(DADisplay)) { + XNextEvent(DADisplay, event); + return True; + } + + timeout.tv_sec = miliseconds / 1000; + timeout.tv_usec = (miliseconds % 1000) * 1000; + + FD_ZERO(&rset); + FD_SET(ConnectionNumber(DADisplay), &rset); + + if (select(ConnectionNumber(DADisplay)+1, &rset, NULL, NULL, &timeout) > 0) { + XNextEvent(DADisplay, event); + return True; + } + + return False; +} + diff --git a/wmusic/libdockapp/damain.c b/wmusic/libdockapp/damain.c new file mode 100644 index 0000000..2fe2b5a --- /dev/null +++ b/wmusic/libdockapp/damain.c @@ -0,0 +1,335 @@ +/* + * Copyright (c) 1999 Alfredo K. Kojima + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + * $Id: damain.c,v 1.1.1.1 2004/02/27 02:53:10 john Exp $ + */ + +#include "dockapp.h" + + +#define MIN(a, b) (a < b ? a : b) + + +char *progName = NULL; +int d_width, d_height; +int d_windowed = 0; +int d_timeout = 0; +DACallbacks d_callbacks = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}; + +DARect DANoRect = {0, 0, 0, 0}; +Display *DADisplay = NULL; +Window DALeader = None; +Window DAWindow = None; +int DADepth = 0; +Visual *DAVisual = NULL; +GC DAGC = NULL; +DARect DAPreferredIconSizes = {-1, -1, 0, 0}; + + +void +DAGetDisplay(char *display, int argc, char **argv) +{ + progName = argv[0]; + + /* Open Connection to X Server */ + DADisplay = XOpenDisplay(display); + if (!DADisplay) { + printf("%s: could not open display %s!\n", progName, + XDisplayName(display)); + exit(EXIT_FAILURE); + } +} + + +void +DAProposeIconSize(unsigned width, unsigned height) +{ + XIconSize *iconSizes; + int nrSizes = 0; + + d_width = width; + d_height = height; + + /* Get the nearest allowed icon size if the WM specifies such */ + iconSizes = XAllocIconSize(); + if (XGetIconSizes(DADisplay, DefaultRootWindow(DADisplay), + &iconSizes, &nrSizes)) { + int i; + int da = -1; + int min_w = -1, min_h = -1; + int max_w = 0, max_h = 0; + + for (i = 0; i < nrSizes; i++) { + int w1, h1, w, h; + + if ((max_w < iconSizes[i].max_width) || + (max_h < iconSizes[i].max_height)) { + max_w = iconSizes[i].max_width; + max_h = iconSizes[i].max_height; + } + + if ((min_w > iconSizes[i].min_width) || + (min_h > iconSizes[i].min_height) || + (min_w == -1)) { + min_w = iconSizes[i].min_width; + min_h = iconSizes[i].min_height; + } + + if ((width > iconSizes[i].max_width) || + (width < iconSizes[i].min_width) || + (height > iconSizes[i].max_height) || + (height < iconSizes[i].min_height)) + continue; + + w1 = (iconSizes[i].max_width - width ) % iconSizes[i].width_inc; + h1 = (iconSizes[i].max_height - height) % iconSizes[i].height_inc; + w = MIN(w1, iconSizes[i].width_inc - w1); + h = MIN(h1, iconSizes[i].height_inc - h1); + + if ((w * h < da) || (da == -1)) { + d_width = width + w; + d_height = height + h; + da = w * h; + } + } + + DAPreferredIconSizes.x = min_w; + DAPreferredIconSizes.y = min_h; + DAPreferredIconSizes.width = max_w; + DAPreferredIconSizes.height = max_h; + + if (da == -1) { /* requested size is out of bounds */ + printf("Warning (%s): requested icon-size (%d x %d) is out of the range " + "allowed by the window manager\n", + progName, d_width, d_height); + } + } + XFree(iconSizes); +} + + +void +DACreateIcon(char *name, unsigned width, unsigned height, int argc, char **argv) +{ + XClassHint *classHint; + XWMHints *wmHints; + XGCValues gcv; + + + d_width = width; + d_height = height; + + /* Create Windows */ + DAWindow = XCreateSimpleWindow(DADisplay, DefaultRootWindow(DADisplay), + 0, 0, width, height, 0, 0, 0); + DALeader = XCreateSimpleWindow(DADisplay, DefaultRootWindow(DADisplay), + 0, 0, 1, 1, 0, 0, 0); + + /* Set ClassHint */ + if (!(classHint = XAllocClassHint())) + printf("%s: can't allocate memory for class hints!\n", progName), exit(1); + classHint->res_class = "DockApp"; + classHint->res_name = name; + + XSetClassHint(DADisplay, DALeader, classHint); + XFree(classHint); + + /* Set WMHints */ + if (!(wmHints = XAllocWMHints())) + printf("%s: can't allocate memory for wm hints!\n", progName), exit(1); + + wmHints->flags = IconWindowHint|WindowGroupHint; + + if (!d_windowed) { + wmHints->flags |= StateHint; + wmHints->initial_state = WithdrawnState; + } + + //Hadess + { + Status status; + XTextProperty title; + + status = XStringListToTextProperty(&progName, 1, &title); + XSetWMName(DADisplay, DALeader, &title); + XSetWMName(DADisplay, DAWindow, &title); + // XStoreName(DADisplay, DALeader, progName); + // XStoreName(DADisplay, DAWindow, progName); + } + wmHints->window_group = DALeader; + wmHints->icon_window = DAWindow; + + XSetWMHints(DADisplay, DALeader, wmHints); + + /* Set Command to start the app so it can be docked properly */ + XSetCommand(DADisplay, DALeader, argv, argc); + + DADepth = DefaultDepth(DADisplay, DefaultScreen(DADisplay)); + DAVisual = DefaultVisual(DADisplay, DefaultScreen(DADisplay)); + DAGC = DefaultGC(DADisplay, DefaultScreen(DADisplay)); + gcv.graphics_exposures = False; + XChangeGC(DADisplay, DAGC, GCGraphicsExposures, &gcv); + + XFlush(DADisplay); +} + + +void +DAShow(void) +{ + if (!d_windowed) + XMapRaised(DADisplay, DALeader); + else + XMapRaised(DADisplay, DAWindow); + + XFlush(DADisplay); +} + + +static DAProgramOption defaultOptions[] = { + {"-h", "--help", "shows this help text and exit", DONone, False, {NULL}}, + {"-v", "--version", "shows program version and exit", DONone, False, {NULL}}, + {"-w", "--windowed", "runs the application in windowed mode", DONone, False, {NULL}} +}; + + +static void +printHelp(char *prog, char *description, DAProgramOption *options, int count) +{ + int j; + + printf("Usage: %s [OPTIONS]\n", prog); + if (description) + puts(description); + + for (j = 0; j < count + 3; j++) { + char blank[30]; + int c; + int i; + + if (j >= count) { + options = defaultOptions; + i = j - count; + } + else + i = j; + + if (options[i].shortForm && options[i].longForm) + c = printf(" %s, %s", options[i].shortForm, options[i].longForm); + else if (options[i].shortForm) + c = printf(" %s", options[i].shortForm); + else if (options[i].longForm) + c = printf(" %s", options[i].longForm); + else + continue; + + if (options[i].type != DONone) { + switch (options[i].type) { + case DOInteger: + c += printf(" "); + break; + case DOString: + c += printf(" "); + break; + case DONatural: + c += printf(" "); + break; + } + } + + memset(blank, ' ', 30); + if (c > 29) + c = 1; + blank[30-c] = 0; + printf("%s %s\n", blank, options[i].description); + } +} + + +void +DAParseArguments(int argc, char **argv, DAProgramOption *options, + int count, char *programDescription, char *versionDescription) +{ + int i, j; + int found = 0; + + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) + printHelp(argv[0], programDescription, options, count), exit(0); + if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--version") == 0) + puts(versionDescription), exit(0); + if (strcmp(argv[i], "-w") == 0 || strcmp(argv[i], "--windowed") == 0) { + d_windowed = 1; + continue; + } + + found = 0; + for (j = 0; j < count; j++) { + if ((options[j].shortForm && strcmp(options[j].shortForm, argv[i]) == 0) || + (options[j].longForm && strcmp(options[j].longForm, argv[i]) == 0)) { + found = 1; + + options[j].used = True; + + if (options[j].type == DONone) + break; + + i++; + if (i >= argc) + printf("%s: missing argument for option '%s'\n", argv[0], argv[i-1]), exit(1); + + switch (options[j].type) { + case DOInteger: + { + int integer; + + if (sscanf(argv[i], "%i", &integer) != 1) + printf("%s: error parsing argument for option %s\n", + argv[0], argv[i-1]), exit(1); + *options[j].value.integer = integer; + } + break; + case DONatural: + { + int integer; + + if (sscanf(argv[i], "%i", &integer) != 1) + printf("%s: error oarsing argument for option %s\n", + argv[0], argv[i-1]), exit(1); + if (integer < 0) + printf("%s: argument %s must be >= 0\n", + argv[0], argv[i-1]), exit(1); + *options[j].value.integer = integer; + } + break; + case DOString: + *options[j].value.string = argv[i]; + break; + } + break; + } + } + if (!found) { + printf("%s: unrecognized option '%s'\n", argv[0], argv[i]); + printHelp(argv[0], programDescription, options, count), exit(1); + } + } +} + diff --git a/wmusic/libdockapp/dapixmap.c b/wmusic/libdockapp/dapixmap.c new file mode 100644 index 0000000..1a3eb82 --- /dev/null +++ b/wmusic/libdockapp/dapixmap.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 1999 Alfredo K. Kojima + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + * $Id: dapixmap.c,v 1.1.1.1 2004/02/27 02:53:10 john Exp $ + */ + +#include +#include +#include +#include +#include "dockapp.h" + +extern int d_width, d_height; + +void +DASetShapeWithOffset(Pixmap shapeMask, int x_ofs, int y_ofs) +{ + XShapeCombineMask(DADisplay, DAWindow, ShapeBounding, -x_ofs, -y_ofs, shapeMask, + ShapeSet); + XFlush(DADisplay); +} + +void +DASetPixmap(Pixmap pixmap) +{ + XSetWindowBackgroundPixmap(DADisplay, DAWindow, pixmap); + XClearWindow(DADisplay, DAWindow); + XFlush(DADisplay); +} + +Pixmap +DAMakePixmap(void) +{ + return (XCreatePixmap(DADisplay, DAWindow, d_width, d_height, DADepth)); +} + +Bool +DAMakePixmapFromData(char **data, Pixmap *pixmap, Pixmap *mask, + unsigned *width, unsigned *height) +{ + XpmAttributes xpmAttr; + + xpmAttr.valuemask = XpmCloseness; + xpmAttr.closeness = 40000; + + if (XpmCreatePixmapFromData(DADisplay, DAWindow, data, + pixmap, mask, &xpmAttr) != 0) + return False; + + *width = xpmAttr.width; + *height = xpmAttr.height; + + return True; +} + diff --git a/wmusic/libdockapp/darect.c b/wmusic/libdockapp/darect.c new file mode 100644 index 0000000..d818d22 --- /dev/null +++ b/wmusic/libdockapp/darect.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1999 Alfredo K. Kojima + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + * $Id: darect.c,v 1.1.1.1 2004/02/27 02:53:10 john Exp $ + */ + +#include "dockapp.h" + +void +DAProcessActionRects(int x, int y, DAActionRect *actionrects, int count, + void *data) +{ + int index = 0; + + if (!actionrects) + return; + + while ( (index < count) && + ((x < actionrects[index].rect.x) || + (x > actionrects[index].rect.x + actionrects[index].rect.width) || + (y < actionrects[index].rect.y) || + (y > actionrects[index].rect.y + actionrects[index].rect.height))) + index++; + + if (index == count) + return; + + if (actionrects[index].action) + (*actionrects[index].action)(x - actionrects[index].rect.x, + y - actionrects[index].rect.y, + actionrects[index].rect, + data); +} + diff --git a/wmusic/libdockapp/dockapp.h b/wmusic/libdockapp/dockapp.h new file mode 100644 index 0000000..a2b4f07 --- /dev/null +++ b/wmusic/libdockapp/dockapp.h @@ -0,0 +1,253 @@ +/* + * Copyright (c) 1999 Alfredo K. Kojima + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * $Id: dockapp.h,v 1.1.1.1 2004/02/27 02:53:10 john Exp $ + */ + +#ifndef _DOCKAPP_H_ +#define _DOCKAPP_H_ + +/* + * This is a simple (trivial) library for writing Window Maker dock + * applications, or dockapps (those that only show up in the dock), easily. + * + * It is very limited and can be only used for dockapps that open a single + * appicon for process in only ibe single display, but this seems to be + * enough for most, if not all, dockapps. + */ + +#include +#include +#include +#include + + + +/* + * the callbacks for events related to the dockapp window your program wants + * to handle + */ +typedef struct { + /* the dockapp window was destroyed */ + void (*destroy)(void); + /* button pressed */ + void (*buttonPress)(int button, int state, int x, int y); + /* button released */ + void (*buttonRelease)(int button, int state, int x, int y); + /* pointer motion */ + void (*motion)(int x, int y); + /* pointer entered dockapp window */ + void (*enter)(void); + /* pointer left dockapp window */ + void (*leave)(void); + /* timer expired */ + void (*timeout)(void); +} DACallbacks; + + +typedef struct { + char *shortForm; /* short form for option, like -w */ + char *longForm; /* long form for option, like --withdrawn */ + char *description; /* description for the option */ + + short type; /* type of argument */ + Bool used; /* if the argument was passed on the cmd-line */ + + /* the following are only set if the "used" field is True */ + union { + void *ptr; /* a ptr for the value that was passed */ + int *integer; /* on the command line */ + char **string; + } value; +} DAProgramOption; + +typedef struct { + int x, y; + int width, height; +} DARect; + +typedef void DARectCallback(int x, int y, DARect rect, void *data); + +typedef struct { + DARect rect; + DARectCallback *action; +} DAActionRect; + + +/* option argument types */ +enum { + DONone, /* simple on/off flag */ + DOInteger, /* an integer number */ + DOString, /* a string */ + DONatural /* positive integer number */ +}; + + +extern Display *DADisplay; +extern Window DAWindow; +extern int DADepth; +extern Visual *DAVisual; +extern GC DAGC; +extern DARect DANoRect; + + +/* + * DAParseArguments- + * Command line arguments parser. The program is exited if there are + * syntax errors. + * + * -h, --help and --version are automatically handled (causing the program + * to exit) + * -w is handled automatically as well and causes the dockapp to be run + * in windowed mode. + */ +void DAParseArguments(int argc, char **argv, DAProgramOption *options, + int count, char *programDescription, char *versionDescription); + +/* + * DAInitialize- + * Initialize the dockapp, open a connection to the X Server, + * create the needed windows and set them up to become an appicon window. + * It will automatically detect if Window Maker is present and use + * an appropriate window form. + * + * You must call this always before calling anything else (except for + * DAParseArguments()) + * + * Arguments: + * display - the name of the display to connect to. + * Use "" to use the default value. + * name - the name of your dockapp, used as the instance name + * for the WM_CLASS hint. Like wmyaclock. + * The ClassName is set to "DockApp" on default. + * width, height - the size of the dockapp window. 48x48 is the + * preferred size. + * argc, argc - the program arguments. argv[0] will be used + * as the instance name for the WM_CLASS hint. + */ + +#define DAInitialize(display, name, width, height, argc, argv) \ + DAGetDisplay(display, argc, argv); \ + DACreateIcon(name, width, height, argc, argv); + + +void DAGetDisplay(char *display, int argc, char **argv); + +void DACreateIcon(char *name, unsigned width, unsigned height, + int argc, char **argv); + +void DAProposeIconSize(unsigned width, unsigned height); + + + +/* + * DASetShapeWithOffset- + * Sets the shape mask of the dockapp to the specified one. This is + * optional. If you pass None as shapeMask, the dockapp will become + * non-shaped. + * + * This is only needed if you want the dockapp to be shaped. + */ +#define DASetShape(shapeMask) (DASetShapeWithOffset((shapeMask), 0, 0)) +void DASetShapeWithOffset(Pixmap shapeMask, int x_ofs, int y_ofs); + +/* + * DASetPixmap- + * Sets the image pixmap for the dockapp. Once you set the image with it, + * you don't need to handle expose events. + */ +void DASetPixmap(Pixmap pixmap); + +/* + * DAMakePixmap- + * Creates a pixmap suitable for use with DASetPixmap() + */ +Pixmap DAMakePixmap(void); + +/* + * DAMakePixmapFromData- + * Creates a pixmap and mask from XPM data + */ +Bool DAMakePixmapFromData(char **data, Pixmap *pixmap, Pixmap *mask, + unsigned *width, unsigned *height); + +/* + * DAGetColor- + * Returns a color. + */ +unsigned long DAGetColor(char *colorName); + +/* + * DAShow- + * Opens the dockapp. + * + * Always call this function or the dockapp won't show up. + */ +void DAShow(void); + +/* + * DASetCallbacks- + * Register a set of callbacks for events like mouse clicks. + * + * Only needed if you want to receive some event. + */ +void DASetCallbacks(DACallbacks *callbacks); + +/* + * DASetTimeout- + * Sets a timeout for the DAEventLoop(). The timeout callback + * will be called whenever the app doesn't get any events from the + * X server in the specified time. + */ +void DASetTimeout(int miliseconds); + +/* + * DANextEventOrTimeout- + * Waits until a event is received or the timeout limit has + * expired. Returns True if an event was received. + */ +Bool DANextEventOrTimeout(XEvent *event, unsigned long miliseconds); + +/* + * DAProcessEvent- + * Processes an event. Returns True if the event was handled and + * False otherwise. + * + * Must be called from your event loop, unless you use DAEventLoop() + */ +Bool DAProcessEvent(XEvent *event); + +/* + * DAEventLoop- + * Enters an event loop where events are processed until the dockapp + * is closed. This function never returns. + */ +void DAEventLoop(void); + +/* + * DAProcessActionRects- + * Processes the current coordinates for the functions in the array of + * action rectangles, converting coordinates to relative coordinates in + * the rectangles. The last item must be NULL. + */ +void DAProcessActionRects(int x, int y, DAActionRect *actionrects, + int count, void *data); + +#endif diff --git a/wmusic/src/Makefile.in b/wmusic/src/Makefile.in new file mode 100644 index 0000000..31f21d4 --- /dev/null +++ b/wmusic/src/Makefile.in @@ -0,0 +1,37 @@ +RCSS = wmusic.c Makefile.in config.h.in version.h.in + +CC = @CC@ + +PREFIX = @prefix@ + +SRCS = wmusic.c ../libdockapp/dacallback.c ../libdockapp/dacolor.c \ + ../libdockapp/daevent.c ../libdockapp/damain.c \ + ../libdockapp/dapixmap.c ../libdockapp/darect.c +OBJS = $(SRCS:.c=.o) + +CFLAGS = -Wall -g -O2 -I. -I../libdockapp `@PATH_GTKCONFIG@ --cflags` \ + `@PATH_XMMSCONFIG@ --cflags` \ + -DDATA_DIR=\"`@PATH_XMMSCONFIG@ --data-dir`\" +LDFLAGS = @LIBS@ -lXpm `@PATH_GTKCONFIG@ --libs` `@PATH_XMMSCONFIG@ --libs` \ + @DGA_LIBS@ @VM_LIBS@ + +all: wmusic + +install: all + if test ! -d $(PREFIX); then mkdir -p $(PREFIX); fi + + if test ! -d $(PREFIX)/bin; then mkdir -p $(PREFIX)/bin; fi + + @INSTALL@ -c -m 755 -s wmusic $(PREFIX)/bin + +wmusic: $(OBJS) $(IFLAGS) + gcc -g -o wmusic $(OBJS) $(LDFLAGS) + +uninstall: clean + rm -f $(PREFIX)/bin/wmusic + +clean: + rm -f *~ *.o ../libdockapp/*~ ../libdockapp/*.o core wmusic + +distclean: clean + rm -f Makefile config.h version.h diff --git a/wmusic/src/config.h.in b/wmusic/src/config.h.in new file mode 100644 index 0000000..e69de29 diff --git a/wmusic/src/version.h.in b/wmusic/src/version.h.in new file mode 100644 index 0000000..3a95798 --- /dev/null +++ b/wmusic/src/version.h.in @@ -0,0 +1 @@ +#define VERSION "@PACKAGE@ @VERSION@" diff --git a/wmusic/src/wmusic-digits.xpm b/wmusic/src/wmusic-digits.xpm new file mode 100644 index 0000000..6330955 --- /dev/null +++ b/wmusic/src/wmusic-digits.xpm @@ -0,0 +1,161 @@ +/* XPM */ +static char * wmusic_digits_xpm[] = { +"193 101 57 1", +" c None", +". c #202020", +"+ c #1FB1AC", +"@ c #23ADA7", +"# c #27A8A3", +"$ c #2AA39F", +"% c #2E9F9B", +"& c #319A97", +"* c #359593", +"= c #38908F", +"- c #3C8C8B", +"; c #3F8787", +"> c #438282", +", c #477E7E", +"' c #4A797A", +") c #4E7476", +"! c #516F72", +"~ c #556B6E", +"{ c #58666A", +"] c #5C6166", +"^ c #5F5C62", +"/ c #63585D", +"( c #675359", +"_ c #6A4E55", +": c #6E4A51", +"< c #71454D", +"[ c #754049", +"} c #783B45", +"| c #7C3741", +"1 c #7F323D", +"2 c #832D38", +"3 c #872934", +"4 c #8A2430", +"5 c #8E1F2C", +"6 c #911A28", +"7 c #951624", +"8 c #981120", +"9 c #9C0C1C", +"0 c #9F0717", +"a c #1F1F1F", +"b c #20B2AC", +"c c #004841", +"d c #188983", +"e c #107C78", +"f c #004840", +"g c #A00818", +"h c #FF7F7F", +"i c #FF0000", +"j c #000000", +"k c #808088", +"l c #A8A8A8", +"m c #F8FCF8", +"n c #F0F0F8", +"o c #004941", +"p c #20B2AE", +"q c #007D71", +"r c #1A2625", +".............................................................+@#$%&*=-;>,')!~{]^/(_:<[}|1234567890aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ", +"..bbb...cccd.dbbbd.dbbbd.dcccd.dbbbd.dbbbd.dbbbd.dbbbd.dbbbd.+@#$%&*=-;>,')!~{]^/(_:<[}|1234567890aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ", +".b...b.c...b.c...b.c...b.b...b.b...c.b...c.c...b.b...b.b...b.+@#$%&*=-;>,')!~{]^/(_:<[}|1234567890aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ", +".b...b.c...b.c...b.c...b.b...b.b...c.b...c.c...b.b...b.b...b.+@#$%&*=-;>,')!~{]^/(_:<[}|1234567890aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ", +".dcccd..cccd.dbbbd..bbbd.dbbbd.dbbbd.dbbbd..cccd.dbbbd.dbbbd.+@#$%&*=-;>,')!~{]^/(_:<[}|1234567890aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ", +".b...b.c...b.b...c.c...b.c...b.c...b.b...b.c...b.b...b.c...b.+@#$%&*=-;>,')!~{]^/(_:<[}|1234567890aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ", +".b...b.c...b.b...c.c...b.c...b.c...b.b...b.c...b.b...b.c...b. ", +"..bbb...cccd.dbbbd.dbbbd..cccd.dbbbd.dbbbd..cccd.dbbbd.dbbbd. ", +"............................................................. ", +"............................................................................. ", +"............................................................................. ", +"...bbbb...cccce.ebbbbd.ebbbbe.ecccce.ebbbbe.ebbbbd.ebbbbe.ebbbbd.ebbbbd...... ", +"..b....b.c....b.c....b.c....b.b....b.b....c.b....c.c....b.b....b.b....b..b... ", +"..b....b.c....b.c....b.c....b.b....b.b....c.b....c.c....b.b....b.b....b..b... ", +"..b....b.c....b.c....b.c....b.b....b.b....c.b....c.c....b.b....b.b....b...... ", +"..ecccce..cccce.ebbbbe.ebbbbe.ebbbbe.ebbbbe.ebbbbe..cccce.ebbbbe.ebbbbe...... ", +"..b....b.c....b.b....c.c....b.c....b.c....b.b....b.c....b.b....b.c....b...... ", +"..b....b.c....b.b....c.c....b.c....b.c....b.b....b.c....b.b....b.c....b..b... ", +"..b....b.c....b.b....c.c....b.c....b.c....b.b....b.c....b.b....b.c....b..b... ", +"...bbbb...cccce.ebbbbe.ebbbbe..cccce.ebbbbe.ebbbbe..cccce.ebbbbe.ebbbbe...... ", +"............................................................................. ", +"............................................................................. ", +"...b...f.....b...f.....b...b.....gggg....higg....ihhi....ggih....gggg....gggg. ", +"..bb.f..f...bb.b..f...bb.b..b...g....g..h....g..g....g..g....h..g....i..g....g ", +"bbbb..f..fbbbb..b..fbbbb..b..b..f....g..f....g..f....g..f....i..f....h..f....g ", +"bbbb..f..fbbbb..b..fbbbb..b..b..i....i..g....g..g....g..g....g..g....h..g....g ", +"..bb.f..f...bb.b..f...bb.b..b..iii...h.ggg...g.ggg...g.ggg...g.ggg...i.ggg...g ", +"...b...f.....b...f.....b...b..iiiii..hggggg..iggggg..gggggg..gggigg..gggggg..g ", +" ..g....i..g....h..g....g..g....g..h....g..g....g ", +" ..g....g..g....h..g....i..i....g..h....g..g....g ", +" ...gggg....gggi....gihh....hhig....iggg....gggg. ", +"jjjjjjjjjjjjjkjjjjjjjjjjjjjkjjjjjjjjjjjjkjjjjjjjjjjjjk ", +"jllllllllllllmjllllllllllllmjlllllllllllmjlllllllllllm ...f...f.. ", +"jlljlljlljlllmjlljlljlljlllmjlllljlljlllmjllljlljllllm ..ff.f..f. ", +"jlljljjljjlllmjlljjljjljlllmjllljjljjlllmjllljjljjlllm ffff..f..f ", +"jlljjjjjjjlllmjlljjjjjjjlllmjlljjjjjjlllmjllljjjjjjllm ffff..f..f ", +"jlljljjljjlllmjlljjljjljlllmjllljjljjlllmjllljjljjlllm ..ff.f..f. ", +"jlljlljlljlllmjlljlljlljlllmjlllljlljlllmjllljlljllllm ...f...f.. ", +"jllllllllllllmjllllllllllllmjlllllllllllmjlllllllllllm ", +"kmmmmmmmmmmmmmkmmmmmmmmmmmmmkmmmmmmmmmmmmkmmmmmmmmmmmm .................. ", +"jjjjjjjjjjkjjjjjjjjjjjjjjjjjjjjkjjjjjjjjjjkjjjjjjjjjjk .................. ", +"jlllllllllmjlllllllllllllllllllmjlllllllllmjlllllllllm b...b............. ", +"jlllllllllmjlllllllllllllllllllmjlllllllllmjlllllllllm b...b............. ", +"jlllljllllmjllllllljjllllllllllmjlljjljjllmjlljjjjjllm b.b.bb..bb..bbb... ", +"jllljjjlllmjllllllljjjjllllllllmjlljjljjllmjlljjjjjllm bb..b.b.b.b.fb.... ", +"jlljjjjjllmjllllllljjjjjjllllllmjlljjljjllmjlljjjjjllm b.b.bb..bb..bbb... ", +"jlllllllllmjllllllljjjjllllllllmjlljjljjllmjlljjjjjllm ........b......... ", +"jlljjjjjllmjllllllljjllllllllllmjlljjljjllmjlljjjjjllm ", +"jlllllllllmjlllllllllllllllllllmjlllllllllmjlllllllllm ", +"jlllllllllmjlllllllllllllllllllmjlllllllllmjlllllllllm ", +"kmmmmmmmmmmkmmmmmmmmmmmmmmmmmmmmkmmmmmmmmmmkmmmmmmmmmm ", +"nmmmmmmmmnnnnknnnmmmmmnnnnnknmmmmmmmmnnnknnnmmmmmnnnnk ", +"nlllllllllllljnlllllllllllljnllllllllllljnlllllllllllj ", +"nlljlljlljllljnlljlljlljllljnlllljlljllljnllljlljllllj ", +"nlljljjljjllljnlljjljjljllljnllljjljjllljnllljjljjlllj ", +"nlljjjjjjjllljnlljjjjjjjllljnlljjjjjjllljnllljjjjjjllj ", +"nlljljjljjllljnlljjljjljllljnllljjljjllljnllljjljjlllj ", +"nlljlljlljllljnlljlljlljllljnlllljlljllljnllljlljllllj ", +"nlllllllllllljnlllllllllllljnllllllllllljnlllllllllllj ", +"kjjjjjjjjjjjjjkjjjjjjjjjjjjjkjjjjjjjjjjjjkjjjjjjjjjjjj ", +"nnmmmmmnnnknnnnnmmmmmmmmmmmmmmmknnnmmmmnnnknnnmmmmnnnk ", +"nllllllllljnllllllllllllllllllljnllllllllljnlllllllllj ", +"nllllllllljnllllllllllllllllllljnllllllllljnlllllllllj ", +"nlllljlllljnllllllljjlllllllllljnlljjljjlljnlljjjjjllj ", +"nllljjjllljnllllllljjjjlllllllljnlljjljjlljnlljjjjjllj ", +"nlljjjjjlljnllllllljjjjjjlllllljnlljjljjlljnlljjjjjllj ", +"nllllllllljnllllllljjjjlllllllljnlljjljjlljnlljjjjjllj ", +"nlljjjjjlljnllllllljjlllllllllljnlljjljjlljnlljjjjjllj ", +"nllllllllljnllllllllllllllllllljnllllllllljnlllllllllj ", +"nllllllllljnllllllllllllllllllljnllllllllljnlllllllllj ", +"kjjjjjjjjjjkjjjjjjjjjjjjjjjjjjjjkjjjjjjjjjjkjjjjjjjjjj ", +" ", +"............................................................................................................................................................. ", +".opppo.qppp..qpppq.qppp..qpppq.qpppq.qpppq.qoooq..oooq..oooq.qoooq.qooo..pooop.qppp..qpppq.qpppq.qpppq.qpppq.qpppq.qpppq.qoooq.qoooq.qoooq.qoooq.qoooq.qpppq. ", +".p...p.p...p.p...o.p...p.p...o.p...o.p...o.p...p.o...p.o...p.p...p.p...o.pp.pp.p...p.p...p.p...p.p...p.p...p.p...o.o.p.o.p...p.p...p.p...p.p...p.p...p.o...p. ", +".p...p.p...p.p...o.p...p.p...o.p...o.p...o.p...p.o...p.o...p.p..po.p...o.p.p.p.p...p.p...p.p...p.p...p.p...p.p...o.o.p.o.p...p.p...p.p...p.op.po.p...p.o..po. ", +".qpppq.qppp..qooo..qoooq.qppp..qppp..qoppq.qpppq..oooq..oooq.qppo..qooo..qoooq.qoooq.qoooq.qpppq.qpooq.qppp..qpppq..oqo..qoooq.qoooq.qoooq..opo..qpppq..opo.. ", +".p...p.p...p.p...o.p...p.p...o.p...o.p...p.p...p.o...p.o...p.p..po.p...o.p...p.p...p.p...p.p...o.p.p.p.p...p.o...p.o.p.o.p...p.p...p.p.p.p.op.po.o...p.op..o. ", +".p...p.p...p.p...o.p...p.p...o.p...o.p...p.p...p.o...p.o...p.p...p.p...o.p...p.p...p.p...p.p...o.p..pp.p...p.o...p.o.p.o.p...p.p...p.pp.pp.p...p.o...p.p...o. ", +".qoooq.qppp..qpppq.pppp..qpppq.pooo..qpppq.qoooq..ooop.qpppq.qoooq.qpppo.qoooq.pooop.qpppq.qooo..qpppq.qoooq.qpppq..oqo..opppp..ppp..pooop.qooopqqpppq.qpppq. ", +"............................................................................................................................................................. ", +" ", +"........................................................................................................................q...... ", +"..ppp...oooq.qpppq.qpppq.qoooq.qpppq.qpppq.qpppq.qpppq.qpppq..ooo...ooo...ooo...poo...poo...oop...ooo...oop...p.p..opppq.opopo. ", +".p...p.o...p.o...p.o...p.p...p.p...o.p...o.o...p.p...p.p...p.o...o.o...o.o...o.p...o.p...o.o...p.p.q.p.o..po.o.pro.pq..o.qpppq. ", +".p...p.o...p.o...p.o...p.p...p.p...o.p...o.o...p.p...p.p...p.o...o.o...o.o...o.p...o.p...o.o...p.oqqqo.o.p.o.o.p.o.p...o.p...o. ", +".qoooq..oooq.qpppq..pppq.qpppq.qpppq.qpppq..oooq.opppo.qpppq..ooo..qpppq..ooo...ooo..qooo...oooq.ppppp..opo...oqo..pppq..qppq.. ", +".p...p.o...p.p...o.o...p.o...p.o...p.p...p.o...p.p...p.o...p.o...o.o...o.o...o.o...o.p...o.o...p.oqqqo.o.p.o.o.p.o.p...o.p...o. ", +".p...p.o...p.p...o.o...p.o...p.o...p.p...p.o...p.p...p.o...p.o...o.o...o.o...o.o...o.p...o.o...p.p.q.p.op..o.o.p.o.pq..o.p...o. ", +"..ppp...ooop.qpppq.qpppq..oooq.qpppq.qpppq..oooq.qpppq.qpppq..ooo...ooo...qpq...ooo...poo...oop...ooo...poo...opo..opppq.qpppq. ", +"............................................................................................................................... ", +" ", +"................................................................................................................................................................................................ ", +".qoqpq.opppo.qpppq.qooq...qpq..qpppq..opo..qpppq.qoooq.qoooq.qopoq.qoooq..qppq.pooop.qoooq.qpppq.qpppq.qpppq.qpppq.qpppq.qpppq.qoooq.qoqoq.qppp..qooo..qoooq..pppq.qoqoq.qpppq.qoqoq.qoooq.pqoo. ", +".p.p.p.p...p.p...o.p..po.op.po.p...o.qpppq.p...o.p...p.p...p.p...p.p...p.opq.p.pp.pp.p...p.p...p.p...p.p...p.p...p.p...o.o.p.o.p...p.p.p.p.p...p.p...o.p...p.q...p.p.p.p.o...p.p.p.p.p...p.op..o ", +".p.p.p.p...p.p...o.p..po.op.po.p...o.p.p.p.p...o.op.po.p..pp.p..pp.p..po.op..p.p.p.p.p...p.p...p.p...p.p...p.p...p.p...o.o.p.o.p...p.p.p.p.p...p.p...o.p...p.o...p.p.p.p.o...p.p.p.p.p...p.op..o ", +".qpqoq.qpppq.qppp..poop...pop..qppq..qopoq.qooo...opo..qopoq.qopoq.qppo...pooq.qoooq.qpppq.qoooq.qoooq..pppq.qpppq.qooo...oqo..qpppq..ppp..qppp..qpppq.qpqoq..qpp..qoqoq.qpppq.qoqoq.qpppq..qppq ", +".p.p.p.p...p.p...p.p..po.op.po.p...o.p.p.p.p...o.op.po.pp..p.pp..p.p..po.op..p.p...p.p...p.p...p.p...p.p...p.p...o.p...o.o.p.o.o...p.p.p.p.p...p.p...p.p.p.p.o...p.p.p.p.o...p.p.p.p.o...p.op..p ", +".p.p.p.p...p.p...p.qpppq.qpppq.p...o.qpppq.p...o.p...p.p...p.p...p.p...p.qp..p.p...p.p...p.p...p.p...p.p...p.p...o.p...o.o.p.o.o...p.p.p.p.p...p.p...p.p.p.p.q...p.p.p.p.o...p.qpqpq.o...p.op..p ", +".qoqpq.qoooq.qppp...ooqp.pqoqp.qpppq..opo..qooo..qoooq.qoooq.qoooq.qoooq.pqoop.qoooq.qoooq.qpppq.qoooq.qoooq.qooo..qpppq..oqo..qpppq.qoqoq.qppp..qpppq.qpqoq..pppq.qpppq.qpppq..ooop..oooq..qppq ", +"................................................................................................................................................................................................ "}; diff --git a/wmusic/src/wmusic-master.xpm b/wmusic/src/wmusic-master.xpm new file mode 100644 index 0000000..e54b073 --- /dev/null +++ b/wmusic/src/wmusic-master.xpm @@ -0,0 +1,83 @@ +/* XPM */ +static char * wmusic_master_xpm[] = { +"64 64 16 1", +" c None", +". c #202020", +"+ c #C0C0C0", +"@ c #20B0A8", +"# c #188880", +"$ c #107C78", +"% c #004840", +"& c #A00818", +"* c #20B2AC", +"= c #188983", +"- c #004841", +"; c #000000", +"> c #F0F0F8", +", c #F8FCF8", +"' c #808088", +") c #A8A8A8", +" ", +" ", +" ", +" ", +" ........................................................ ", +" .......................................................+ ", +" .......................................................+ ", +" ....@@@@...@@@@........@@@@...@@@@........@@@...@@@....+ ", +" ...@....@.@....@..#@..@....@.@....@......@...@.@...@...+ ", +" ...@....@.@....@..$@..@....@.@....@......@...@.@...@...+ ", +" ...@....@.@....@......@....@.@....@......$%%%$.$%%%$...+ ", +" ...$%%%%$.$%%%%$......$%%%%$.$%%%%$......@...@.@...@...+ ", +" ...@....@.@....@......@....@.@....@......@...@.@...@...+ ", +" ...@....@.@....@..#@..@....@.@....@.......@@@...@@@....+ ", +" ...@....@.@....@..$@..@....@.@....@....................+ ", +" ....@@@@...@@@@........@@@@...@@@@.....................+ ", +" .......................................................+ ", +" .......................................................+ ", +" .........%...%.........................................+ ", +" ........%%.%..%...............................&&&&.....+ ", +" ......%%%%..%..%.............................&....&....+ ", +" ......%%%%..%..%.............................%....&....+ ", +" ........%%.%..%..............................&....&....+ ", +" .........%...%..............................&&&...&....+ ", +" ...........................................&&&&&..&....+ ", +" .............................................&....&....+ ", +" ....***...***...***..........................&....&....+ ", +" ...*...*.*...*.*...*..........................&&&&.....+ ", +" ...*...*.*...*.*...*.*...*.............................+ ", +" ...=---=.=---=.=---=.*...*.............................+ ", +" ...*...*.*...*.*...*.*.*.**..**..***...................+ ", +" ...*...*.*...*.*...*.**..*.*.*.*.%*....................+ ", +" ....***...***...***..*.*.**..**..***...................+ ", +" .............................*.........................+ ", +" .......................................................+ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ", +" ", +" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ", +" ;>,,,,,,,,>>>>'>>>,,,,,>>>>>'>,,,,,,,,>>>'>>>,,,,,>>>>'+ ", +" ;>))))))))))));>))))))))))));>)))))))))));>)))))))))));+ ", +" ;>));));));)));>));));));)));>))));));)));>)));));))));+ ", +" ;>)););;);;)));>));;);;);)));>)));;);;)));>)));;);;)));+ ", +" ;>));;;;;;;)));>));;;;;;;)));>));;;;;;)));>)));;;;;;));+ ", +" ;>)););;);;)));>));;);;);)));>)));;);;)));>)));;);;)));+ ", +" ;>));));));)));>));));));)));>))));));)));>)));));))));+ ", +" ;>))))))))))));>))))))))))));>)))))))))));>)))))))))));+ ", +" ;';;;;;;;;;;;;;';;;;;;;;;;;;;';;;;;;;;;;;;';;;;;;;;;;;;+ ", +" ;>>,,,,,>>>'>>>>>,,,,,,,,,,,,,,,'>>>,,,,>>>'>>>,,,,>>>'+ ", +" ;>)))))))));>)))))))))))))))))));>)))))))));>)))))))));+ ", +" ;>)))))))));>)))))))))))))))))));>)))))))));>)))))))));+ ", +" ;>))));))));>)))))));;))))))))));>));;);;));>));;;;;));+ ", +" ;>)));;;)));>)))))));;;;))))))));>));;);;));>));;;;;));+ ", +" ;>));;;;;));>)))))));;;;;;))))));>));;);;));>));;;;;));+ ", +" ;>)))))))));>)))))));;;;))))))));>));;);;));>));;;;;));+ ", +" ;>));;;;;));>)))))));;))))))))));>));;);;));>));;;;;));+ ", +" ;>)))))))));>)))))))))))))))))));>)))))))));>)))))))));+ ", +" ;>)))))))));>)))))))))))))))))));>)))))))));>)))))))));+ ", +" ;';;;;;;;;;;';;;;;;;;;;;;;;;;;;;;';;;;;;;;;;';;;;;;;;;;+ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ", +" ", +" ", +" "}; diff --git a/wmusic/src/wmusic.c b/wmusic/src/wmusic.c new file mode 100644 index 0000000..7e536f7 --- /dev/null +++ b/wmusic/src/wmusic.c @@ -0,0 +1,763 @@ +/* wmusic - a xmms remote-controlling DockApp + * Copyright (C) 2000-2001 Bastien Nocera + * Maintained by John Chapin + * + * 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-1307, USA. + */ + +#define DBL_CLICK_INTERVAL 250 /* double click interval in milliseconds */ +#define ARROW_INTERVAL 100 /* arrow update interval in milliseconds */ +#define SCROLL_INTERVAL 300 /* scroll update interval in milliseconds */ +#define SEPARATOR " ** " /* The separator for the scrolling title */ +#define DISPLAYSIZE 6 /* width of text to display (running title) */ + +#include +#include +#include +#include +#include +#include + +#include "version.h" +#include "config.h" +#include "wmusic-master.xpm" +#include "wmusic-digits.xpm" + +/*---------------------------------------------------------------------------*/ +/* Prototypes */ +/*---------------------------------------------------------------------------*/ + +void copyNumArea(int x, int y, int sx, int sy, int dx, int dy); +void ActionPlay(int x, int y, DARect rect, void *data); +void ActionPause(int x, int y, DARect rect, void *data); +void ActionEject(int x, int y, DARect rect, void *data); +void ActionPrev(int x, int y, DARect rect, void *data); +void ActionNext(int x, int y, DARect rect, void *data); +void ActionStop(int x, int y, DARect rect, void *data); +void ActionFastr(int x, int y, DARect rect, void *data); +void ActionFastf(int x, int y, DARect rect, void *data); +void ToggleWins(int x, int y, DARect rect, void *data); +void ToggleVol(int x, int y, DARect rect, void *data); +void ChangeVol(int x, int y, DARect rect, void *data); +void ToggleTitle(int x, int y, DARect rect, void *data); +void ToggleTime(int x, int y, DARect rect, void *data); +void buttonPress(int button, int state, int x, int y); +void buttonRelease(int button, int state, int x, int y); +void DisplayRoutine(); +void DrawPos (int pos); +void DrawTime(int time); +void DrawArrow(void); +void DrawChannels(int channels); +void DrawKbps(int bps); +void DrawTitle(char *title); +void ExecuteXmms(void); + +/*----------------------------------------------------------------------------*/ +/* Variables */ +/*----------------------------------------------------------------------------*/ + +/* X11 variables */ +char *displayName = ""; +GC gc; +XEvent ev; + +/* Dockapp variables */ +unsigned int xmms_session = 0; +char *xmms_cmd = "xmms"; +Bool main_vis=0, pl_vis=0, eq_vis=0; +Bool xmms_running; +unsigned int volume_step = 5; +Bool run_excusive=0; + +Bool t_scroll=0; +Bool t_time=0; +Bool t_volume=0; +float title_pos = 0; +unsigned int arrow_pos = 0; +Bool pause_norotate = 0; +Time click_time=0; + +Pixmap pixmap, mask; /* Pixmap that is displayed */ +Pixmap pixnum, masknum; /* Pixmap source */ + +int left_pressed = 0; /* for pseudo drag callback */ +int motion_event = 0; /* on motion events we do not want(too fast) display update */ + +static DAActionRect buttonRects[] = { + {{5, 39, 14, 9}, ActionPrev}, + {{19, 39, 14, 9}, ActionNext}, + {{33, 39, 13, 9}, ActionFastr}, + {{46, 39, 13, 9}, ActionFastf}, + {{5, 48, 11, 11}, ActionEject}, + {{16, 48, 21, 11}, ActionPlay}, + {{37, 48, 11, 11}, ActionPause}, + {{48, 48, 11, 11}, ActionStop} +}; + +static DAActionRect toggleRect[] = { + {{5, 5, 54, 30}, ToggleWins} +}; + +static DAActionRect globRect[] = { + {{0, 0, 64, 64}, ToggleVol} +}; + +static DAActionRect displayRects[] = { + {{5, 5, 54, 12}, ToggleTime}, + {{5, 25, 54, 9}, ToggleTitle} +}; + +static DAActionRect volumeRects[] = { + {{5, 17, 38, 8 }, ChangeVol} +}; + +static DAProgramOption options[] = { + {"-c", "--command", "Command to launch xmms", DOString, False, + {&xmms_cmd} }, + {"-d", "--display", "Display to use", DOString, False, {&displayName} }, + {"-r", "--run", "Run xmms on startup", DONone, False, {NULL} }, + {"-s", "--session", "Xmms session to use", DONatural, False, + {&xmms_session} }, + {"-t", "--title", "Show title instead of kbps by default", DONone, + False, {NULL} }, + {"-u", "--hide", "Hide xmms windows on startup", DONone, False, + {NULL} }, + {"-V", "--volume", "Stepping of the wheel volume control (in percent)", + DONatural, False, {&volume_step} }, + {"-x", "--wmxmms", "Use wmxmms-like show and hide", DONone, False, + {NULL} }, + {"-a", "--rotate-arrow", "Do not rotate the arrow, when paused", + DONone, False, {NULL} }, + {"-l", "--time-left", "Show time left instead of time remaining by default", + DONone, False, {NULL} }, + {"-b", "--volume-slider", "Show volume slider instead of channels", + DONone, False, {NULL}}, + {"-R", "--run-excusive", "Run xmms on startup, exit when xmms exits", DONone, False, {NULL} } +}; + +typedef struct +{ + wchar_t c; + int x; + int y; +} glyphdescr; + +static glyphdescr glyphs[] = { + {L'-', 67, 83}, {L'.', 73, 83}, {L'\x27', 79, 83}, + {L'(', 85, 83}, {L')', 91, 83}, {L'*', 97, 83}, {L'/', 103, 83}, + + {L'0', 1, 83}, {L'1', 7, 83}, {L'2', 13, 83}, {L'3', 19, 83}, {L'4', 25, 83}, + {L'5', 31, 83}, {L'6', 37, 83}, {L'7', 43, 83}, {L'8', 49, 83}, {L'9', 55, 83}, + + + + {L'A', 1, 73}, {L'a', 1, 73}, + {L'B', 7, 73}, {L'b', 7, 73}, + {L'C', 13, 73}, {L'c', 13, 73}, + {L'D', 19, 73}, {L'd', 19, 73}, + {L'E', 25, 73}, {L'e', 25, 73}, + + {L'F', 31, 73}, {L'f', 31, 73}, + {L'G', 37, 73}, {L'g', 37, 73}, + {L'H', 43, 73}, {L'h', 43, 73}, + {L'I', 49, 73}, {L'i', 49, 73}, + {L'J', 55, 73}, {L'j', 55, 73}, + + {L'K', 61, 73}, {L'k', 61, 73}, + {L'L', 67, 73}, {L'l', 67, 73}, + {L'M', 73, 73}, {L'm', 73, 73}, + {L'N', 79, 73}, {L'n', 79, 73}, + {L'O', 85, 73}, {L'o', 85, 73}, + + {L'P', 91, 73}, {L'p', 91, 73}, + {L'Q', 97, 73}, {L'q', 97, 73}, + {L'R',103, 73}, {L'r',103, 73}, + {L'S',109, 73}, {L's',109, 73}, + {L'T',115, 73}, {L't',115, 73}, + + {L'U',121, 73}, {L'u',121, 73}, + {L'V',127, 73}, {L'v',127, 73}, + {L'W',133, 73}, {L'w',133, 73}, + {L'X',139, 73}, {L'x',139, 73}, + {L'Y',145, 73}, {L'y',145, 73}, + + {L'Z',151, 73}, {L'z',151, 73}, + + + {L'\x42e', 1, 93}, {L'\x44e', 1, 93}, /* cyrillic Yu */ + + {L'\x410', 7, 93}, {L'\x430', 7, 93}, /* cyrillic A */ + {L'\x411', 13, 93}, {L'\x431', 13, 93}, /* cyrillic Be */ + {L'\x426', 19, 93}, {L'\x446', 19, 93}, /* cyrillic Ce */ + {L'\x414', 25, 93}, {L'\x434', 25, 93}, /* cyrillic De */ + {L'\x415', 31, 93}, {L'\x435', 31, 93}, /* cyrillic Ye */ + + {L'\x424', 37, 93}, {L'\x444', 37, 93}, /* cyrillic eF */ + {L'\x413', 43, 93}, {L'\x433', 43, 93}, /* cyrillic Ge */ + {L'\x425', 49, 93}, {L'\x445', 49, 93}, /* cyrillic Ha */ + {L'\x418', 55, 93}, {L'\x438', 55, 93}, /* cyrillic I */ + {L'\x419', 61, 93}, {L'\x439', 61, 93}, /* cyrillic I-kratkoe */ + + {L'\x41a', 67, 93}, {L'\x43a', 67, 93}, /* cyrillic Ka */ + {L'\x41b', 73, 93}, {L'\x43b', 73, 93}, /* cyrillic eL */ + {L'\x41c', 79, 93}, {L'\x43c', 79, 93}, /* cyrillic eM */ + {L'\x41d', 85, 93}, {L'\x43d', 85, 93}, /* cyrillic eN */ + {L'\x41e', 91, 93}, {L'\x43e', 91, 93}, /* cyrillic O */ + + {L'\x41f', 97, 93}, {L'\x43f', 97, 93}, /* cyrillic Pe */ + {L'\x42f',103, 93}, {L'\x44f',103, 93}, /* cyrillic Ya */ + {L'\x420',109, 93}, {L'\x440',109, 93}, /* cyrillic eR */ + {L'\x421',115, 93}, {L'\x441',115, 93}, /* cyrillic eS */ + {L'\x422',121, 93}, {L'\x442',121, 93}, /* cyrillic Te */ + + {L'\x423',127, 93}, {L'\x443',127, 93}, /* cyrillic U */ + {L'\x416',133, 93}, {L'\x436',133, 93}, /* cyrillic Je */ + {L'\x412',139, 93}, {L'\x432',139, 93}, /* cyrillic Ve */ + {L'\x42c',145, 93}, {L'\x44c',145, 93}, /* cyrillic MyagkijZnak */ + {L'\x42b',151, 93}, {L'\x44b',151, 93}, /* cyrillic Y */ + + {L'\x417',157, 93}, {L'\x437',157, 93}, /* cyrillic Ze */ + {L'\x428',163, 93}, {L'\x448',163, 93}, /* cyrillic Sha */ + {L'\x42d',169, 93}, {L'\x44d',169, 93}, /* cyrillic E */ + {L'\x429',175, 93}, {L'\x449',175, 93}, /* cyrillic Scha */ + {L'\x427',181, 93}, {L'\x447',181, 93}, /* cyrillic Che */ + + {L'\x42a',187, 93}, {L'\x44a',187, 93}, /* cyrillic TvyordyiZnak */ + {L'\x404',115, 83}, {L'\x454',115, 83}, /* ukrainian IE */ + {L'\x406', 49, 73}, {L'\x456', 49, 73}, /* ukrainian I */ + {L'\x407',109, 83}, {L'\x457',109, 83}, /* ukrainian YI */ + {L'\x491', 43, 93}, {L'\x490', 43, 93}, /* ukrainian GHE with upturn */ + + {L'\x401',121, 83}, {L'\x451',121, 83}, /* cyrillic Yo */ + + {L' ', 61, 83} +}; + +/*----------------------------------------------------------------------------*/ +/* Functions */ +/*----------------------------------------------------------------------------*/ + +void copyNumArea(int x, int y, int sx, int sy, int dx, int dy) +{ + XCopyArea(DADisplay, pixnum, pixmap, gc, x, y, sx, sy, dx, dy); +} + +void buttonDraw(DARect rect) +{ + copyNumArea((rect.x)-5, (rect.y)-8, rect.width, rect.height, + rect.x, rect.y); + DASetPixmap(pixmap); +} + +void ActionPlay(int x, int y, DARect rect, void *data) +{ + if (data) { + buttonDraw(rect); + } else { + xmms_remote_play(xmms_session); + } +} + +void ActionPause(int x, int y, DARect rect, void *data) +{ + if (data) { + buttonDraw(rect); + } else { + xmms_remote_pause(xmms_session); + } +} + +void ActionEject(int x, int y, DARect rect, void *data) +{ + if (data) { + buttonDraw(rect); + } else { + xmms_remote_eject(xmms_session); + } +} + +void ActionPrev(int x, int y, DARect rect, void *data) +{ + if (data) { + buttonDraw(rect); + } else { + xmms_remote_playlist_prev(xmms_session); + } +} + +void ActionNext(int x, int y, DARect rect, void *data) +{ + if (data) { + buttonDraw(rect); + } else { + xmms_remote_playlist_next(xmms_session); + } +} + +void ActionStop(int x, int y, DARect rect, void *data) +{ + if (data) { + buttonDraw(rect); + } else { + xmms_remote_stop(xmms_session); + } +} + +void ActionFastr(int x, int y, DARect rect, void *data) +{ + if (data) { + buttonDraw(rect); + } else { + xmms_remote_jump_to_time(xmms_session, + xmms_remote_get_output_time(xmms_session)-10000); + } +} + +void ActionFastf(int x, int y, DARect rect, void *data) +{ + if (data) { + buttonDraw(rect); + } else { + xmms_remote_jump_to_time(xmms_session, + xmms_remote_get_output_time(xmms_session)+10000); + } +} + +void ToggleWins(int x, int y, DARect rect, void *data) +{ + if (xmms_running) + { + if (options[7].used) + { + if (data) + xmms_remote_main_win_toggle(xmms_session, + !xmms_remote_is_main_win(xmms_session)); + if (!data) + xmms_remote_pl_win_toggle(xmms_session, + !xmms_remote_is_pl_win(xmms_session)); + } else { + if (xmms_remote_is_main_win(xmms_session) || + xmms_remote_is_pl_win(xmms_session) || + xmms_remote_is_eq_win(xmms_session)) + { + main_vis = xmms_remote_is_main_win(xmms_session); + pl_vis = xmms_remote_is_pl_win(xmms_session); + eq_vis = xmms_remote_is_eq_win(xmms_session); + + xmms_remote_main_win_toggle(xmms_session, 0); + xmms_remote_pl_win_toggle(xmms_session, 0); + xmms_remote_eq_win_toggle(xmms_session, 0); + } else { + xmms_remote_main_win_toggle(xmms_session, main_vis); + xmms_remote_pl_win_toggle(xmms_session, pl_vis); + xmms_remote_eq_win_toggle(xmms_session, eq_vis); + } + } + } else { + if ( (ev.xbutton.time-click_time) <= DBL_CLICK_INTERVAL ) + { + click_time=0; + ExecuteXmms(); + } else { + click_time=ev.xbutton.time; + } + } +} + +void ToggleVol(int x, int y, DARect rect, void *data) +{ + int volume; + int factor; + + if (*(int*)data == 1) + factor = volume_step; + else + factor = -volume_step; + + /* xmms seems to do the bounds checking for us */ + + volume = xmms_remote_get_main_volume(xmms_session); + xmms_remote_set_main_volume(xmms_session, volume+factor); +} + +void ChangeVol(int x, int y, DARect rect, void *data) +{ + int volume = (int)100*(((float)x)/38); + xmms_remote_set_main_volume(xmms_session, volume); +} + +void ToggleTitle(int x, int y, DARect rect, void *data) +{ + if (t_scroll) + t_scroll = 0; + else t_scroll =1; +} + +void ToggleTime(int x, int y, DARect rect, void *data) +{ + if (t_time) + t_time = 0; + else t_time =1; +} + +void buttonPress(int button, int state, int x, int y) +{ + if (button==1) + left_pressed=1; + if (xmms_running) + { + if (button == 1) + { + char *tmp="1"; + DAProcessActionRects(x, y, buttonRects, sizeof(buttonRects)/sizeof(DAActionRect), tmp); + DAProcessActionRects(x, y, displayRects, sizeof(displayRects)/sizeof(DAActionRect), tmp); + } + if (button == 2) + { + DAProcessActionRects(x, y, toggleRect, sizeof(toggleRect)/sizeof(DAActionRect), NULL); + } + if (button == 3) + { + char *tmp="1"; + DAProcessActionRects(x, y, toggleRect, sizeof(toggleRect)/sizeof(DAActionRect), tmp); + } + if ((button == 4) || (button == 5)) + { + if (button == 5) + { + /* Wheel scrolls down */ + int tmp=2; + DAProcessActionRects(x, y, globRect, sizeof(globRect)/sizeof(DAActionRect), &tmp); + } else { + /* Wheel scrolls up */ + int tmp=1; + DAProcessActionRects(x, y, globRect, sizeof(globRect)/sizeof(DAActionRect), &tmp); + } + } + } + else + DAProcessActionRects(x, y, toggleRect, sizeof(toggleRect)/sizeof(DAActionRect), NULL); +} + +void buttonRelease(int button, int state, int x, int y) +{ + if (button==1) + left_pressed=0; + if (xmms_running) + { + if (button == 1) + { + copyNumArea(0,51, 54, 20, 5,39); + DASetPixmap(pixmap); + DAProcessActionRects(x, y, buttonRects, sizeof(buttonRects)/sizeof(DAActionRect), NULL); + } + } +} + +void buttonDrag(int x, int y) +{ + motion_event=1; + if (t_volume) + if (left_pressed==1) { + DAProcessActionRects(x,y, volumeRects, 1, NULL); + DrawChannels(0); /* volume only update */ + DASetPixmap(pixmap); + } +} + +void DisplayRoutine() +{ + int time = 0, length = 0, position = 100; + int rate, freq, nch; + char *title = NULL; + Bool do_scroll=t_scroll; + + xmms_running=xmms_remote_is_running(xmms_session); + + /* Compute diplay */ + if (!xmms_running) + { + if (run_excusive) + exit(0); + position = 100; /* Will display "00" as the current position */ + do_scroll = 0; /* Will display channel/kbps info */ + arrow_pos = 5; + rate = 0; + time = 0; + nch = 4; + freq = 0; + length = 0; + } else { + /* check again, avoiding xmms_remote_* functions to hang, + if xmms was closed in the meantime */ + if ((xmms_running = xmms_remote_is_running(xmms_session))) + { + position = xmms_remote_get_playlist_pos(xmms_session); + xmms_remote_get_info(xmms_session, &rate, &freq, &nch); + time = xmms_remote_get_output_time(xmms_session); + length = xmms_remote_get_playlist_time(xmms_session, position); + title = xmms_remote_get_playlist_title(xmms_session, position); + if (!xmms_remote_is_playing(xmms_session) || (pause_norotate && + xmms_remote_is_paused(xmms_session) )) + arrow_pos = 5; + } + } + + /*Draw everything */ + if (t_time) DrawTime(length-time); + else DrawTime(time); + DrawPos(position); + DrawArrow(); + DrawChannels(nch); + if (do_scroll && (title != NULL)) + DrawTitle(title); + else + DrawKbps(rate); + + DASetPixmap(pixmap); + + if (title != NULL) + free(title); +} + +void DrawPos (int pos) +{ + char posstr[16]; + char *p = posstr; + int i=1; + + pos++; + if (pos > 99) pos=0; + sprintf(posstr, "%02d", pos); + + for (;i<3; i++) + { + copyNumArea((*p-'0')*6 + 1, 1, 6, 7, (i*6)+39, 7); + p++; + } +} + +void DrawTime(int time) +{ + char timestr[16]; + char *p = timestr; + int i=0; + + time = time / 1000; + + /* 3 cases: + * up to 99 minutes and 59 seconds + * up to 99 hours and 59 minutes + * more + */ + if (time < 6000) + { + sprintf(timestr, "%02d%02d", time / 60, time % 60); + } else { + if (time < 360000) + { + sprintf(timestr, "%02d%02d", time / 3600, + time % 3600 / 60); + } else { + sprintf(timestr, "%02d%02d", 0, 0); + } + } + + for (;i<4; i++) + { + copyNumArea((*p-'0')*7 + 2, 11, 7, 9, i<2 ?(i*7)+7:(i*7)+12, 7); + p++; + } +} + +void DrawArrow(void) +{ + copyNumArea((arrow_pos*8)+30, 22, 8, 9, 47, 19); + arrow_pos++; + if (arrow_pos > 4) arrow_pos = 0; +} + +void DrawChannels(int channels) +{ + + if (t_volume) { + int volume = (int)(0.36*(float)xmms_remote_get_main_volume(xmms_session)); + if (volume > 36) + volume = 36; + copyNumArea(61, 0, volume, 6, 7, 18); + copyNumArea(97, 0, 36-volume, 6, 7+volume, 18); + } else { + if (channels == 4) + { + copyNumArea(55, 32, 10, 6, 10, 18); + } else { + copyNumArea((channels*10), 22, 10, 6, 10, 18); + } + } +} + +void DrawKbps(int bps) +{ + char kbpstr[16]; + char *p = kbpstr; + int i=1; + + if (bps > 999000) bps=0; + sprintf(kbpstr, "%03d", bps / 1000); + + for (;i<4; i++) + { + copyNumArea((*p-'0')*6 + 1, 1, 6, 7, (i*6)+1, 26); + p++; + } + copyNumArea(55, 39, 18, 8, 25, 26); +} + +void DrawChar(wchar_t wc, int x, int y) +{ + int i; + for(i = 0; i < sizeof(glyphs)/sizeof(glyphdescr) - 1; ++i) + { + if(wc == glyphs[i].c) + break; + } + copyNumArea(glyphs[i].x, glyphs[i].y, 6, 8, x, y); +} + +int DrawChars(char *title, int tpos, int pos) +{ + wchar_t wc; + + mbtowc(NULL, NULL, 0); + while(*title && (pos <= (tpos + DISPLAYSIZE))) + { + int len = mbtowc(&wc, title, MB_CUR_MAX); + title += len; + if(pos > tpos) + DrawChar(wc, (pos - tpos)*6 + 1, 26); + ++pos; + } + return pos; +} + +void DrawTitle(char *name) +{ + int len, pos, tpos = title_pos; + + if (name == NULL) + return; +#ifdef DEBUG + printf("name: %s\n", name); +#endif + len = pos = DrawChars(name, tpos, 0); + if(pos < 6) + { + DrawChars(" ", tpos, pos); + return; + } + + if(pos <= tpos + DISPLAYSIZE) + pos = DrawChars(SEPARATOR, tpos, pos); + + if(pos <= tpos + DISPLAYSIZE) + DrawChars(name, tpos, pos); + + if(tpos >= len + strlen(SEPARATOR)) + title_pos = 0; + + title_pos = title_pos + 0.5; +} + +void ExecuteXmms(void) +{ + char *command; + int status; + + command=malloc(strlen(xmms_cmd)+5); + sprintf(command, "%s &", xmms_cmd); + status = system(command); + if (status) + { + fprintf(stderr, "XMMS can't be launched, exiting..."); + exit(1); + } + while (!xmms_remote_is_running(xmms_session)) + usleep(10000L); + free(command); +} +/*----------------------------------------------------------------------------*/ +/* Main */ +/*----------------------------------------------------------------------------*/ + +int main(int argc, char **argv) +{ + unsigned height, width; + DACallbacks callbacks={NULL, buttonPress, buttonRelease, buttonDrag, + NULL, NULL, NULL}; + + /* Initialization */ + DAParseArguments(argc, argv, options, + sizeof(options)/sizeof(DAProgramOption), + "XMMS remote control by Bastien Nocera ", + VERSION); + + setlocale(LC_ALL, ""); + DAInitialize(displayName, "wmusic", 64, 64, argc, argv); + DASetCallbacks(&callbacks); + DASetTimeout(100); + + DAMakePixmapFromData(wmusic_master_xpm, &pixmap, + &mask, &height, &width); + DAMakePixmapFromData(wmusic_digits_xpm, &pixnum, + &masknum, &height, &width); + gc = DefaultGC(DADisplay, DefaultScreen(DADisplay)); + DASetShapeWithOffset(mask, 0, 0); + + DASetPixmap(pixmap); + DAShow(); + + /* End of initialization */ + + if (options[4].used) t_scroll=1; + if (options[8].used) pause_norotate=1; + if (options[9].used) t_time=1; + if (options[10].used) t_volume=1; + if (options[11].used) run_excusive=1; + + /* Launch xmms if it's not running and -r or -R was used */ + xmms_running=xmms_remote_is_running(xmms_session); + if ((!xmms_running) && (options[2].used || run_excusive)) + { + ExecuteXmms(); + xmms_running=1; + } + + if(xmms_remote_is_main_win(xmms_session) && (options[6].used)) + ToggleWins(0, 0, DANoRect, NULL); + + /* Update the display */ + DisplayRoutine(); + + while (1) { + if (DANextEventOrTimeout(&ev, 100)) + DAProcessEvent(&ev); + if (!motion_event) + DisplayRoutine(); + else + motion_event=0; + } + return 0; +} + diff --git a/wmusic/wmusic.spec.in b/wmusic/wmusic.spec.in new file mode 100644 index 0000000..4bae720 --- /dev/null +++ b/wmusic/wmusic.spec.in @@ -0,0 +1,43 @@ +%define name @PACKAGE@ +%define version @VERSION@ +%define release 1 +%define prefix /usr + +Summary: a remote-control DockApp for xmms +Name: %{name} +Version: %{version} +Release: %{release} +Copyright: GPL +Source: http://hadess.net/files/wmusic-%{version}.tar.gz +Group: Applications/Multimedia +BuildRoot: /var/tmp/%{name}-%{version}-root +Packager: Hadess +Requires: xmms >= 1.0.0 + +%description +wmusic is a dockapp that remote-controls xmms. Here is a list of the features: + +- VCR style controls including fast rewind and fast forward +- Time and Playlist position display +- Super stylee rotating arrow +- Hiding of the xmms windows (on startup and through middle-click) +- Multi-threaded + +%prep +%setup -q -n %{name}-%{version} +%build +./configure --prefix=%{prefix} + +%install +make PREFIX=$RPM_BUILD_ROOT/%{prefix} install + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%attr(0755,root,root) /%{prefix}/bin/wmusic +%doc COPYING README + +%changelog +* Mon Jan 31 2000 Hadess +- First .spec file