dockapps/000077500000000000000000000000001245000764300126635ustar00rootroot00000000000000dockapps/ARTWORK000066400000000000000000000211511245000764300137370ustar00rootroot00000000000000wmcdplay - A cd player designed for WindowMaker Copyright (C) 1998 Sam Hawker This software comes with ABSOLUTELY NO WARRANTY This software is free software, and you are welcome to redistribute it under certain conditions See the README file for a more complete notice. ARTWORK ======= The artwork mechanism allows you to customise the appearance (and more) of wmcdplay at run-time, by loading an artwork file with the "-f artwork_file" command line argument - yes, THIS IS A CHANGE!!!!! IT USED TO BE "-a" ---------------------------------------- This file trys to explain how to create artwork files. Please feel free to send me comments or improved versions. BASICS ====== wmcdplay can be in any one of 6 states: Data 0 Stopped 1 Playing 2 Paused 3 NoCD 4 TrayOpen 5 wmcdplay buttons can perform any of 10 actions, and the action can depend on the current state of wmcdplay: NOTHING 0 Stop 1 Play 2 Pause 3 Resume 4 Prev 5 Next 6 Rewd 7 FFwd 8 Eject 9 Close 10 PIXMAPS ======= The following symbolic color names may be used in any pixmaps: led_color_high led_color_med led_color_low color_back and should be used appropriately to ensure that the led and background colors can be set at runtime with the "-l led_color" and "-back_color" command line arguments led.xpm ------- This pixmap is used by wmcdplay to draw the digits of the time and track displays It represents the string of characters: "00112233445566778899 DDAATTNNOOCC--PPEE:;_" "00" means the character "0" but states that it is double width (eg 7+1 pixels wide) ":" means the character ":" which is only single width (eg 3+1 pixels wide) ";" means an unlit ":" single width character "_" means a single width "-" character The digit size used does not matter, but ensure that 1 pixel spaces are left between digits and that (double width + 1 space) = 2 * (single width + 1 space) eg. ( 7 + 1 ) = 2 * ( 3 + 1 ) Transparency is _NOT_ interpreted This file must begin with these 2 lines (character perfect): /* XPM */ static const char * led_xpm[] = { ledsym.xpm ---------- This pixmap is used by wmcdplay to draw the symbols illustrating the current status It should contain symbols for the following (in sequence): Data, Stopped, Playing, Paused, NoCD, TrayOpen The symbol size used does not matter, but ensure that 1 pixel spaces are left between symbols Transparency is _NOT_ interpreted This file must begin with these 2 lines (character perfect): /* XPM */ static const char * ledsym_xpm[] = { ledtsel.xpm ----------- This pixmap is used by wmcdplay to draw the symbols illustrating the current track selection mode It should contain symbols for the following (in sequence): None, Next, Repeat, RepeatCD, Random The symbol size used does not matter, but ensure that 1 pixel spaces are left between symbols Transparency is _NOT_ interpreted This file must begin with these 2 lines (character perfect): /* XPM */ static const char * ledtsel_xpm[] = { symbols.xpm ----------- This pixmap contains the symbols to be drawn onto the buttons It should contain symbols for the following (in sequence): NOTHING, Stop, Play, Pause, Resume, Prev, Next, Rewd, FFwd, Eject, Close The symbol size used does not matter, but ensure that 1 pixel spaces are left between symbols Transparency _IS_ interpreted This file must begin with these 2 lines (character perfect): /* XPM */ static const char * symbols_xpm[] = { cdplayer.xpm ------------ This pixmap provides the basic background for wmcdplay It _must_ be 64x64 pixels It should provide solid areas (the size and color of which will depend on the led.xpm, ledsym.xpm and ledtsel.xpm files used), for any required displays to be drawn onto These areas are usually bordered in some way It can also be used to provide solid areas which can form buttons (Although the button symbols can themselves form the buttons) Transparency _IS_ interpreted This file must begin with these 2 lines (character perfect): /* XPM */ static const char * cdplayer_xpm[] = { THE DATA FILE - artwork.dat =========================== So far, all we have in our artwork file is a set of pixmaps. But we also need a data file (artwork.dat), to answer the following questions: How many buttons are there? Where exactly is each button? What does each button do? Should do-NOTHING buttons be hidden? Which led displays are there? Where are they? The formats of entries in this file must follow the examples given quite closely. Basically, anything before an '=' must appear exactly as shown and at the beginning of the line (not indented as here). Also, all entries must be on a single line unless shown otherwise here. Comments and blank lines are, however, perfectly legal (between entries). How many buttons? ----------------- eg. int art_nbtns=5; Where exactly is each button? ----------------------------- Buttons must be shaped as convex polygons, so you give the position (and shape) of each as a list of coordinates of its verticies. The polygon defined by these points is used to interpret mouse clicks, and also (optionally) to hide do-NOTHING buttons. Also, tell wmcdplay where on the button to put the symbol. This is in the form of the co-ordinates of the top-left corner of the symbol, relative to the top-left corner of wmcdplay. A single entry, defines all buttons. eg. int art_btns[]={ 8 , 38 , 5 , 5 , 27 , 7 , 27 , 20 , 40 , 7 , 54 , 5 , 54 , 19 , 26 , 5 , 6 , 22 , 28 , 22 , 28 , 39 , 22 , 39 , 6 , 24 , 19 , 50 , 5 , 6 , 57 , 21 , 42 , 28 , 42 , 28 , 59 , 6 , 59 , 35 , 26 , 5 , 31 , 22 , 52 , 22 , 52 , 24 , 37 , 39 , 31 , 39 , 51 , 31 , 5 , 42 , 36 , 56 , 22 , 59 , 22 , 59 , 39 , 42 , 39 }; Each line defines 1 button: symbol_x , symbol_y , num_vertices , x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4 , x5 , y5 Different buttons may have different numbers of vertices, so different numbers of fields. The button must be a _convex_ polygon, and the vertices must be given in sequence, going _clockwise_ around the button. What does each button do? ------------------------- This is answered with a set of integer actions (see list given earlier) for each button, for each state (see list given earlier): wmcdplay state: 0 1 2 3 4 5 D S P P N T A T L A O R T O A U A A P Y S C Y P I E D T E N D O R D G P K E N eg. int art_actions[]={ 0 , 2 , 3 , 4 , 0 , 0 , 5 , 5 , 5 , 0 , 0 , 0 , 6 , 6 , 6 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 9 , 9 , 9 , 9 , 9 , 10 }; Should do-NOTHING buttons be hidden? ------------------------------------ This can be set so that whenever a button has NOTHING assigned to it, it is hidden (using the region defined by style_btns). Otherwise it is left and the symbol representing NOTHING is drawn onto it. eg. bool art_hidebtns=false; Which led displays are there? ----------------------------- eg. bool style_leds[4]={ true, true, false, false}; That's basically: show_time=true , show_track=true , show_status=false , show_trksel=false Where are they? --------------- eg. int art_ledpos[3][2]={ 8 , 7 , 37 , 45 , 0 , 0 , 0 , 0 }; That's basically: time_x=8 , time_y=7 , track_x=37 , track_y=45 , status_x=0 , status_y=0 , trksel_x=0 , trksel_y=0 These are the co-ordinates of the top-left corner of each display relative to the top-left corner of wmcdplay. You should enter valid integers even for displays which you have chosen not to use. ARTWORK FILES ============= All the above files should be placed in an appropriately named directory and the "makeart" script (installed by default in /usr/local/share/wmcdplay) should be executed in the parent directory. You should end up with a new .art file. You should be able to load wmcdplay with this artwork using the "-f artwork_file" command line argument. You should also be able to make your new artwork the compile-time default by using the "--with-art" option to the "configure" script. dockapps/COPYING000066400000000000000000000430761245000764300137300ustar00rootroot00000000000000 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. dockapps/ChangeLog000066400000000000000000000132521245000764300144400ustar00rootroot00000000000000RELEASE HISTORY: ================ Release 0.1 22/01/98 Poor window repaint technique. Incorrect display if paused on startup. Does not show Tray Open if opened by button on drive, (I think this can only be done if the drive is empty). Release 0.2 23/01/98 Improved window repaints. Correct display even if paused on startup. Improved interface on 'other' window managers. Release 0.3 07/02/98 Handles multisession CD properly. Now free's ALL pixmaps on exit (i hope). And GCs :-). Major re-write and interface alterations. Option for led display color. Smaller and better written. Release 0.4 12/02/98 Highly customizable user interface. You chose: Basic pixmap, How many buttons, Size, shape, position of buttons (polygons), Actions for each button in each state: (Stop, Stop Data, Play, Pause, Ejected), Led and symbol pixmaps, Position of displays. Release 0.5 24/02/98 Fixed bug relating to manual window positioning. Fixed error in grey.art. Release 0.6 04/03/98 Rewritten cdctl engine. Some more changes to artwork: Different states, Different actions. Random/Repeat track selection. Reduced CPU load (thanks to aseltine@cd.umass.edu), It wasn't high on my K6 233MHz box :-). Release 0.7 12/03/98 Better track selection. Command line option to set track selection mode. Yet more changes to artwork: Hiding of do-NOTHING buttons now optional, Symbols can be drawn onto non-solid background. New name (wmcdplay). Now works on 8bpp displays with full colormaps. (thanks to devernay@istar.fr on the mailing-list) Release 0.8 07/05/98 Now GPL. Added "-v volume" command line argument. Added "-b back_color" command line argument, ("-b darkslategrey -l cyan" gives a nice backlit look). Reduced cpu load. Relative or absolute time display, (click time display to switch). More changes to artwork: Led pixmaps now part of artwork, Symbolic color names can now be used in all pixmaps: led_color_high, led_color_med, led_color_low, color_back. All pixmaps now use standard names: cdplayer.xpm = cdplayer_xpm, symbols.xpm = symbols_xpm, led.xpm = led_xpm, ledsym.xpm = ledsym_xpm, ledtsel.xpm = ledtsel_xpm. Entries specifying symbol dimensions no longer needed, "symbols.xpm" now includes a symbol for NOTHING, New piece of artwork, "newstyle.art", New directory structure and scripts. Track selection should be more reliable now. Release 1.0 05/09/98 Added some error checking. Beta1 "-a artwork_file" is now "-f artwork_file", sorry ;-). Added "-a" command line argument for AfterStep users. Added "-position position" command line argument. Command line arguments, "-a", "-w" and "-s" are now toggle, so if you enable one at compile-time, you can override it at run-time. Track selection actually works now?? (anyone notice a recurring theme here??) Seperate update interval for when drive is empty. (thanks to .....) Fixed problem with (some?) SCSI devices refusing to give LBA values. Thanks to the linux ide-scsi-emulator. Now looks in some known directories for artwork files as a last resort. Improved artwork loading (it was very brain-dead). Formatting changes in artwork files (ARTWORK documentation is now up-to-date). Release 1.1 18/12/14 Add -i option so users can specify cd polling interval. Fix compiler warnings. Add FreeBSD and Hurd support. Switch build system to autotools. Install art script. Add manpage from Debian. Now maintained by Window Maker Developers Team . dockapps/Makefile.am000066400000000000000000000010761245000764300147230ustar00rootroot00000000000000bin_PROGRAMS = wmcdplay wmcdplay_SOURCES = cdctl.h cdctl_freebsd.h wmcdplay.cc XPM/standard.art BUILT_SOURCES = XPM/standard.art AM_CFLAGS = $(x11_CFLAGS) $(xpm_CFLAGS) $(xext_CFLAGS) AM_CPPFLAGS = -DSYSARTDIR=\"$(pkgdatadir)\" LIBS += $(x11_LIBS) $(xpm_LIBS) $(xext_LIBS) ART = XPM/bluered.art XPM/grey.art XPM/newstyle.art XPM/wmcd.art pkgdata_DATA = $(ART) pkgdata_SCRIPTS = XPM/makeart CLEANFILES = $(ART) XPM/standard.art XPM/%.art: cd XPM && ./makeart $* XPM/standard.art: XPM/@defaultart@.art cd XPM && ln -s @defaultart@.art standard.art man_MANS = wmcdplay.1 dockapps/README000066400000000000000000000077361245000764300135600ustar00rootroot00000000000000wmcdplay - A cd player designed for WindowMaker Copyright (C) 1998 Sam Hawker This software comes with ABSOLUTELY NO WARRANTY This software is free software, and you are welcome to redistribute it under certain conditions See the COPYING file for details. 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. THE AUTHOR: =========== Sam Hawker shawkie@geocities.com http://www.geocities.com/SiliconValley/Vista/2471/ INSTALLING: =========== autoreconf -i ./configure make make install TRACK SELECTION: ================ Release 0.6 introduced track selection. Actually, track selection is a slightly more logical version of the random/repeat functions found in Creative Labs' SB16 software suite for win95. The major change is that the previous releases just played from current position to the end of the cd. Now we play a single track, and when you set the track selection mode, you just tell the cd player what to do at the end of the track. Here are the options: 0 None - just stop 1 Next - play next (audio) track (stop if end of cd) 2 Repeat - play this track again 3 RepeatCD - play next (audio) track (start from first track if end of cd) 4 Random - select an audio track at random and play it The led display symbols for the modes are now part of the artwork file. The mode defaults to Next, but can be changed with the "-t track_selection" command line argument, or by clicking on the track selection mode led display. The main consequence of this approach is that when using Random, you will probably here a track twice before every track on the cd has been played once. (Most cd players have a playlist listing all tracks in a randomized order) Also, wmcdplay will always begin with track 1. Furthermore, the Next and Prev buttons will always move through track numbers on the cd (rather than, for instance, selecting random tracks). AFTERSTEP USERS: ================ (thanks to tygris@erols.com) This release includes in a new command line option (actually, its "-a" and artwork files are now loaded with "-f artwork_file"). The effect this has is to enable shape support (it implies "-s"), and to reduce the size of the window to 56x56 pixels. The "-position position" option has also been added, so you can push wmcdplay off the edge of the screen while it gets swallowed. To put wmmount in your Wharf, add the following line in the appropriate part of your .steprc *Wharf wmmount nil MaxSwallow "wmmount" wmmount -a -position -0-0 & It is also possible (by editing and recompiling the afterstep sources), to make Wharf handle the new 56x56 pixel window properly - yes, I add an option to use a 56x56 pixel window, even though the AfterStep Wharf really wants 55x57 pixel ones. I am told (by tygris@erols.com): "Locate Wharf.c (or is it Wharf.cc?) Should be in AfterStep-1.0/modules/Wharf. Locate this: if (Buttons[button].maxsize) { Buttons[button].icons[0].w = 55; Buttons[button].icons[0].h = 57; } and change the 55 and 57 to 56's. Save and compile." BUILD PROBLEMS: =============== You may have trouble linking wmmount with the compiler supplied on some recent distributions (eg. Debian 2.0 & RedHat 5.1). It can be made to build by adding the following line to the top of the Imakefile, before executing xmkmf: CC = c++ I am not sure of the effect this has on memory usage, etc. dockapps/XPM/000077500000000000000000000000001245000764300133275ustar00rootroot00000000000000dockapps/XPM/bluered/000077500000000000000000000000001245000764300147515ustar00rootroot00000000000000dockapps/XPM/bluered/artwork.dat000066400000000000000000000011551245000764300171360ustar00rootroot00000000000000int art_nbtns=4; int art_btns[]={ 9 , 26 , 4 , 8 , 25 , 21 , 25 , 21 , 38 , 8 , 38 , 9 , 43 , 4 , 8 , 42 , 21 , 42 , 21 , 56 , 8 , 56 , 44 , 26 , 4 , 43 , 25 , 56 , 25 , 56 , 38 , 43 , 38 , 44 , 43 , 4 , 43 , 42 , 56 , 42 , 56 , 56 , 43 , 56 }; int art_actions[]={ 0 , 2 , 3 , 4 , 0 , 0 , 5 , 5 , 5 , 0 , 0 , 0 , 9 , 9 , 1 , 1 , 9 , 10 , 6 , 6 , 6 , 0 , 0 , 0 }; bool art_hidebtns=true; bool art_showled[4]={ true , true , false , false }; int art_ledpos[4][2]={ 14 , 10 , 24 , 43 , 0 , 0 , 0 , 0 }; dockapps/XPM/bluered/cdplayer.xpm000066400000000000000000000131701245000764300173040ustar00rootroot00000000000000/* XPM */ static const char * cdplayer_xpm[] = { "64 64 64 1", " c None", ". c #FFFF00000000", "X c #F7DE00000820", "o c #EFBE00000820", "O c #EFBE00001040", "+ c #E79D00001861", "@ c #DF7D00001861", "# c #DF7D00002081", "$ c #D75C00002081", "% c #D75C000028A2", "& c #CF3C000030C2", "* c #C71B000030C2", "= c #C71B000038E3", "- c #BEFB000038E3", "; c #BEFB00004103", ": c #B6DA00004924", "> c #AEBA00004924", ", c #AEBA00005144", "< c #A69900005965", "1 c #9E7900005965", "2 c #9E7900006185", "3 c #965800006185", "4 c #9658000069A6", "5 c #8E38000071C6", "6 c #8617000071C6", "7 c #8617000079E7", "8 c #79E7000079E7", "9 c #79E700008617", "0 c #71C600008E38", "q c #69A600008E38", "w c #69A600009658", "e c #618500009E79", "r c #59650000A699", "t c #51440000A699", "y c #51440000AEBA", "u c #49240000B6DA", "i c #41030000B6DA", "p c #41030000BEFB", "a c #38E30000BEFB", "s c #38E30000C71B", "d c #30C20000CF3C", "f c #28A20000CF3C", "g c #28A20000D75C", "h c #20810000DF7D", "j c #18610000E79D", "k c #10400000E79D", "l c #F7DE00000000", "z c #CF3C000028A2", "x c #B6DA00004103", "c c #71C600008617", "v c #596500009E79", "b c #30C20000C71B", "n c #18610000DF7D", "m c #10400000EFBE", "M c #000000000000", "N c #08200000EFBE", "B c #08200000F7DE", "V c #00000000F7DE", "C c #E79D00001040", "Z c #49240000AEBA", "A c #A69900005144", "S c #8E38000069A6", "D c #618500009658", "F c #20810000D75C", " ", " ", " ", " ", " ", " ", " ", " ", " ..XoO+@#$%&*=-;:>,<1234567890qweertyuipasdfghhjk ", " .lXoO+@#%z&*=;x:>,<12445679c0qwevryyuipsbdfghnjm ", " .lMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMjm ", " .XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMjm ", " .XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMkm ", " lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmm ", " lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmN ", " lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmN ", " XoMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmB ", " XoMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmB ", " XoMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmB ", " XOMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNB ", " oOMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMBB ", " oO+@#$%&*=-;:>,<<234567890qweertyuipasdfghhjkmBV ", " oO+@#%%&*=;x:>,<12445679c0qwevryyuipsbdfghnjmmBV ", " ", " ", " .XC@%&=;><245 .XC@%&=;><245 ", " XC@%&=;><2458 XC@%&=;><2458 ", " C@%&=;><24580 C@%&=;><24580 ", " @%&=;><24580w @%&=;><24580w ", " %&=;><24580we %&=;><24580we ", " &=;><24580wer &=;><24580wer ", " =;><24580werZ =;><24580werZ ", " ;><24580werZi ;><24580werZi ", " ><24580werZis ><24580werZis ", " <24580werZisd <24580werZisd ", " 24580werZisdg 24580werZisdg ", " 4580werZisdgn 4580werZisdgn ", " 580werZisdgnk 580werZisdgnk ", " ", " ", " ", " ..XO@$&=;>A2457cwery ", " .XC@%&=;><245 .lo+#%*-:,<3S790Dvyu .XC@%&=;><245 ", " XC@%&=;><2458 .XMMMMMMMMMMMMMMMMZi XC@%&=;><2458 ", " C@%&=;><24580 lOMMMMMMMMMMMMMMMMup C@%&=;><24580 ", " @%&=;><24580w XCMMMMMMMMMMMMMMMMps @%&=;><24580w ", " %&=;><24580we O+MMMMMMMMMMMMMMMMab %&=;><24580we ", " &=;><24580wer C#MMMMMMMMMMMMMMMMsd &=;><24580wer ", " =;><24580werZ +$MMMMMMMMMMMMMMMMdg =;><24580werZ ", " ;><24580werZi #%MMMMMMMMMMMMMMMMdF ;><24580werZi ", " ><24580werZis $&MMMMMMMMMMMMMMMMgh ><24580werZis ", " <24580werZisd %*MMMMMMMMMMMMMMMMhj <24580werZisd ", " 24580werZisdg &=MMMMMMMMMMMMMMMMhk 24580werZisdg ", " 4580werZisdgn *;MMMMMMMMMMMMMMMMjm 4580werZisdgn ", " 580werZisdgnk =x><24580werZpsdgnkB 580werZisdgnk ", " ;:,135790DryupbghjmV ", " ", " ", " ", " ", " ", " ", " ", " "}; dockapps/XPM/bluered/led.xpm000066400000000000000000000040551245000764300162470ustar00rootroot00000000000000/* XPM */ static const char * led_xpm[] = { "171 11 4 1", " c #000000", "0 c #00ff00 s led_color_high", "1 c #009b00 s led_color_med", "2 c #006200 s led_color_low", " 00000 1 1 1 00000 00000 1 2 1 00000 00000 00000 00000 00000 1 1 1 1 1 1 00000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 00000 00000 ", "0 212 0 2 0 1 212 0 1 212 0 0 0 0 212 1 0 212 1 2 121 0 0 212 0 0 212 0 2 1 2 0 0 212 0 0 1 2 1 2 1 2 1 2 1 0 212 0 0 212 1 ", "01 10 10 10 10 01 10 01 01 20 01 10 01 10 10 01 10 01 01 10 01 10 2 2", "01 10 10 10 10 01 10 01 01 20 01 10 01 10 10 01 10 01 01 10 01 01 1 1 ", "0 0 1 0 1 121 0 2 121 0 0 212 0 0 212 1 0 212 1 2 0 0 212 0 0 212 0 1 2 1 212 0 0 212 0 0 212 2 1 212 2 1 212 2 1 212 2 1 212 2 0 212 0 0 212 1 ", " 1 2 1 2 1 2 00000 00000 00000 00000 00000 1 1 1 00000 00000 2 1 1 00000 00000 00000 00000 00000 00000 00000 00000 00000 212 212 010", "0 0 1 0 0 212 1 1 212 0 1 212 0 2 121 0 0 212 0 1 0 0 212 0 2 121 0 1 2 0 212 0 0 212 0 0 212 2 0 212 0 0 212 0 0 212 2 1 212 2 0 212 2 0 212 2 ", "01 10 10 01 10 10 20 01 10 20 01 10 20 01 10 01 10 01 01 10 01 10 01 01 01 10 2 2", "01 10 10 01 10 10 20 01 10 20 01 10 20 01 10 01 10 01 01 10 01 10 01 01 01 01 1 1 ", "0 212 0 1 0 0 212 1 2 121 0 1 0 2 121 0 0 212 0 1 0 0 212 0 2 121 0 1 1 0 212 0 0 0 0 212 1 0 0 0 212 0 0 212 1 1 1 0 1 0 212 1 ", " 00000 2 1 2 00000 00000 2 1 2 00000 00000 1 1 1 00000 00000 1 1 2 00000 2 1 2 00000 1 1 2 00000 00000 1 1 2 1 1 2 00000 "}; dockapps/XPM/bluered/ledsym.xpm000066400000000000000000000004701245000764300167750ustar00rootroot00000000000000/* XPM */ static const char * ledsym_xpm[] = { "35 5 2 1", " c #000000", "0 c #00ff00 s led_color_high", "00000 00000 0 00 00 0 0 ", "00000 00000 000 00 00 000 000 ", "00000 00000 00000 00 00 00000 00000", "00000 00000 000 00 00 ", "00000 00000 0 00 00 00000 00000"}; dockapps/XPM/bluered/ledtsel.xpm000066400000000000000000000007361245000764300171410ustar00rootroot00000000000000/* XPM */ static const char * ledtsel_xpm[]={ "29 11 2 1", " c #000000", "0 c #00ff00 s led_color_high", " 00 00 00 ", " 0 0 0 0 0 0 0 0 ", " 0 0 0 0 0 0 0 ", " 0 0 0 0 0 0 000 ", " 0 0 0 0 0 0 0 ", " 000 000 000 000 ", " 0 0 0 0 0 ", " 0 0 0 0 000 ", " 0 ", " 0 0", " 000 000 00 "}; dockapps/XPM/bluered/symbols.xpm000066400000000000000000000035761245000764300172020ustar00rootroot00000000000000/* XPM */ static const char * symbols_xpm[] = { "131 11 18 1", " c None", ". c #DF7DDF7DDF7D", "X c #D75CD34CD75C", "o c #CF3CCB2BCF3C", "O c #BEFBBEFBBEFB", "+ c #B6DAB2CAB6DA", "@ c #AEBAAAAAAEBA", "# c #9E799E799E79", "$ c #965896589658", "% c #8E388A288E38", "& c #79E77DF779E7", "* c #71C675D671C6", "= c #69A669A669A6", "- c #59655D755965", "; c #514455555144", ": c #492449244924", "> c #38E33CF338E3", ", c #30C234D330C2", " ...XoO+@#$% ...XoO ...XoO+@#$% ...XoO+@#$% .. O+@#$% ...XoO $% ...XoO+@#$% ...XoO+@#$% O ...XoO+@#$%", " ..XoO+@#$%& ..XoO+@ ..XoO+@#$%& ..XoO+@#$%& .. O+@#$%& ..XoO+@ %& ..XoO+@#$%& ..XoO+@#$%& O+@ ..XoO+@#$%&", " .X &* .X @#$ .X @ &* .X @ &* .X O+@ &* .X @#$ &* .XoO+@#$%&* .XoO+@#$%&* O+@#$ .X &*", " Xo *= Xo $%& Xo # *= Xo # *= XoO+@ *= Xo $%&*= XoO+@#$%&*= XoO+@#$%&*= O+@ $%& Xo *=", " oO =- oO &*= oO $ =- oO $ =- oO+@ =- oO &*=- oO+@#$%&*=- oO+@#$%&*=- O+@ &*= oO =-", " O+ -; O+ =-; O+ % -; O+ % -; O+@ -; O+ =-; O+@#$%&*=-; O+@#$%&*=-; O+@ =-; O+@ =-;", " +@ ;: +@ =-; +@ & ;: +@ & ;: +@#$ ;: +@ =-;: +@#$%&*=-;: +@#$%&*=-;: +@ ;: @#$ =-; ", " @# :> @# =-; @# * :> @# * :> @#$%& :> @# =-;:> @#$%&*=-;:> @#$%&*=-;:> @# :> $%& =-; ", " #$ >, #$ =-; #$ = >, #$ = >, #$ &*= >, #$ =-; >, #$%&*=-;:>, #$%&*=-;:>, #$ >, &*=-; ", " $%&*=-;:>,, $%&*=-; $%&*=-;:>,, $%&*=-;:>,, $% =-;:>,, $%&*=-; ,, $%&*=-;:>,, $%&*=-;:>,, $%&*=-;:>,, =-; ", " %&*=-;:>,,, %&*=-; %&*=-;:>,,, %&*=-;:>,,, %& ;:>,,, %&*=-; ,, %&*=-;:>,,, %&*=-;:>,,, %&*=-;:>,,, ; "}; dockapps/XPM/grey/000077500000000000000000000000001245000764300142755ustar00rootroot00000000000000dockapps/XPM/grey/artwork.dat000066400000000000000000000014271245000764300164640ustar00rootroot00000000000000int art_nbtns=5; int art_btns[]={ 8 , 38 , 5 , 5 , 27 , 7 , 27 , 20 , 40 , 7 , 54 , 5 , 54 , 19 , 26 , 5 , 6 , 22 , 28 , 22 , 28 , 39 , 22 , 39 , 6 , 24 , 19 , 50 , 5 , 6 , 57 , 21 , 42 , 28 , 42 , 28 , 59 , 6 , 59 , 35 , 26 , 5 , 31 , 22 , 52 , 22 , 52 , 24 , 37 , 39 , 31 , 39 , 51 , 31 , 5 , 42 , 36 , 56 , 22 , 59 , 22 , 59 , 39 , 42 , 39 }; int art_actions[]={ 0 , 2 , 3 , 4 , 0 , 0 , 5 , 5 , 5 , 0 , 0 , 0 , 6 , 6 , 6 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 9 , 9 , 9 , 9 , 9 , 10 }; bool art_hidebtns=true; bool art_showled[4]={ true , true , true , true }; int art_ledpos[4][2]={ 8 , 7 , 41 , 45 , 50 , 10 , 33 , 45 }; dockapps/XPM/grey/cdplayer.xpm000066400000000000000000000106071245000764300166320ustar00rootroot00000000000000/* XPM */ static const char * cdplayer_xpm[] = { "64 64 5 1", " c None", "0 c #414141", "1 c #000000", "2 c #C7C3C7", "3 c #9E9A9E", " ", " ", " ", " ", " ", " 000000000000000000000000000000000000000000000000000000 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 011111111111111111111111111111111111111111111111111112 ", " 222222222222222222222222222222222222222222222222222222 ", " ", " ", " 2222222222222222222222 222222222222222222222 222 ", " 0333333333333333333330 233333333333333333330 2330 ", " 033333333333333333330 23333333333333333330 23330 ", " 03333333333333333330 2333333333333333330 233330 ", " 0333333333333333330 233333333333333330 2333330 ", " 22 033333333333333330 23333333333333330 23333330 ", " 232 03333333333333330 2333333333333330 233333330 ", " 2332 0333333333333330 233333333333330 2333333330 ", " 23332 033333333333330 23333333333330 23333333330 ", " 233332 03333333333330 2333333333330 233333333330 ", " 2333332 0333333333330 233333333330 2333333333330 ", " 23333332 033333333330 23333333330 23333333333330 ", " 233333332 03333333330 2333333330 233333333333330 ", " 2333333332 0333333330 233333330 2333333333333330 ", " 23333333332 033333330 23333330 23333333333333330 ", " 233333333332 03333330 2333330 23333333333333330 ", " 2333333333332 0000000 000000 00000000000000000 ", " 23333333333332 ", " 233333333333330 ", " 23333333333330 ", " 2333333333330 2222220 0000000000000000000000000000 ", " 233333333330 23333330 0111111111111111111111111112 ", " 23333333330 233333330 0111111111111111111111111112 ", " 2333333330 2333333330 0111111111111111111111111112 ", " 233333330 23333333330 0111111111111111111111111112 ", " 23333330 233333333330 0111111111111111111111111112 ", " 2333330 2333333333330 0111111111111111111111111112 ", " 233330 23333333333330 0111111111111111111111111112 ", " 23330 233333333333330 0111111111111111111111111112 ", " 2330 2333333333333330 0111111111111111111111111112 ", " 230 23333333333333330 0111111111111111111111111112 ", " 20 233333333333333330 0111111111111111111111111112 ", " 2333333333333333330 0111111111111111111111111112 ", " 23333333333333333330 0111111111111111111111111112 ", " 233333333333333333330 0111111111111111111111111112 ", " 2333333333333333333330 0111111111111111111111111112 ", " 0000000000000000000000 2222222222222222222222222222 ", " ", " ", " ", " ", " "}; dockapps/XPM/grey/led.xpm000066400000000000000000000040551245000764300155730ustar00rootroot00000000000000/* XPM */ static const char * led_xpm[] = { "171 11 4 1", " c #000000", "0 c #00ff00 s led_color_high", "1 c #009b00 s led_color_med", "2 c #006200 s led_color_low", " 00000 1 1 1 00000 00000 1 2 1 00000 00000 00000 00000 00000 1 1 1 1 1 1 00000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 00000 00000 ", "0 212 0 2 0 1 212 0 1 212 0 0 0 0 212 1 0 212 1 2 121 0 0 212 0 0 212 0 2 1 2 0 0 212 0 0 1 2 1 2 1 2 1 2 1 0 212 0 0 212 1 ", "01 10 10 10 10 01 10 01 01 20 01 10 01 10 10 01 10 01 01 10 01 10 2 2", "01 10 10 10 10 01 10 01 01 20 01 10 01 10 10 01 10 01 01 10 01 01 1 1 ", "0 0 1 0 1 121 0 2 121 0 0 212 0 0 212 1 0 212 1 2 0 0 212 0 0 212 0 1 2 1 212 0 0 212 0 0 212 2 1 212 2 1 212 2 1 212 2 1 212 2 0 212 0 0 212 1 ", " 1 2 1 2 1 2 00000 00000 00000 00000 00000 1 1 1 00000 00000 2 1 1 00000 00000 00000 00000 00000 00000 00000 00000 00000 212 212 010", "0 0 1 0 0 212 1 1 212 0 1 212 0 2 121 0 0 212 0 1 0 0 212 0 2 121 0 1 2 0 212 0 0 212 0 0 212 2 0 212 0 0 212 0 0 212 2 1 212 2 0 212 2 0 212 2 ", "01 10 10 01 10 10 20 01 10 20 01 10 20 01 10 01 10 01 01 10 01 10 01 01 01 10 2 2", "01 10 10 01 10 10 20 01 10 20 01 10 20 01 10 01 10 01 01 10 01 10 01 01 01 01 1 1 ", "0 212 0 1 0 0 212 1 2 121 0 1 0 2 121 0 0 212 0 1 0 0 212 0 2 121 0 1 1 0 212 0 0 0 0 212 1 0 0 0 212 0 0 212 1 1 1 0 1 0 212 1 ", " 00000 2 1 2 00000 00000 2 1 2 00000 00000 1 1 1 00000 00000 1 1 2 00000 2 1 2 00000 1 1 2 00000 00000 1 1 2 1 1 2 00000 "}; dockapps/XPM/grey/ledsym.xpm000066400000000000000000000004701245000764300163210ustar00rootroot00000000000000/* XPM */ static const char * ledsym_xpm[] = { "35 5 2 1", " c #000000", "0 c #00ff00 s led_color_high", "00000 00000 0 00 00 0 0 ", "00000 00000 000 00 00 000 000 ", "00000 00000 00000 00 00 00000 00000", "00000 00000 000 00 00 ", "00000 00000 0 00 00 00000 00000"}; dockapps/XPM/grey/ledtsel.xpm000066400000000000000000000007361245000764300164650ustar00rootroot00000000000000/* XPM */ static const char * ledtsel_xpm[]={ "29 11 2 1", " c #000000", "0 c #00ff00 s led_color_high", " 00 00 00 ", " 0 0 0 0 0 0 0 0 ", " 0 0 0 0 0 0 0 ", " 0 0 0 0 0 0 000 ", " 0 0 0 0 0 0 0 ", " 000 000 000 000 ", " 0 0 0 0 0 ", " 0 0 0 0 000 ", " 0 ", " 0 0", " 000 000 00 "}; dockapps/XPM/grey/symbols.xpm000066400000000000000000000006611245000764300165160ustar00rootroot00000000000000/* XPM */ static const char * symbols_xpm[] = { "65 5 2 1", " c None", "0 c #000000", " 00000 0 00 00 00 00 0 0 0 0 0 00000", " 00000 000 00 00 00 00 0 000 000 0 0 0 0 0 000 000 ", " 00000 00000 00 00 00 00 00000 00000 00 00 00 00 00000 0 ", " 00000 000 00 00 00 00 0 000 000 0 0 0 0 0 ", " 00000 0 00 00 00 00 0 0 0 0 00000 00000"}; dockapps/XPM/makeart000077500000000000000000000003401245000764300146760ustar00rootroot00000000000000#!/bin/sh echo "Making artwork file $1.art from directory $1" cat $1/artwork.dat >$1.art cat $1/cdplayer.xpm >>$1.art cat $1/symbols.xpm >>$1.art cat $1/led.xpm >>$1.art cat $1/ledsym.xpm >>$1.art cat $1/ledtsel.xpm >>$1.artdockapps/XPM/newstyle/000077500000000000000000000000001245000764300152015ustar00rootroot00000000000000dockapps/XPM/newstyle/artwork.dat000066400000000000000000000017201245000764300173640ustar00rootroot00000000000000int art_nbtns=7; int art_btns[]={ 29 , 50 , 4 , 18 , 47 , 46 , 47 , 46 , 58 , 18 , 58 , 9 , 50 , 4 , 5 , 47 , 18 , 47 , 18 , 58 , 5 , 58 , 50 , 50 , 4 , 46 , 47 , 59 , 47 , 59 , 58 , 46 , 58 , 9 , 39 , 4 , 5 , 36 , 18 , 36 , 18 , 47 , 5 , 47 , 50 , 39 , 4 , 46 , 36 , 59 , 36 , 59 , 47 , 46 , 47 , 22 , 39 , 4 , 18 , 36 , 32 , 36 , 32 , 47 , 18 , 47 , 36 , 39 , 4 , 32 , 36 , 46 , 36 , 46 , 47 , 32 , 47 }; int art_actions[]={ 0 , 2 , 3 , 4 , 0 , 0 , 0 , 0 , 7 , 0 , 0 , 0 , 0 , 0 , 8 , 0 , 0 , 0 , 5 , 5 , 5 , 0 , 0 , 0 , 6 , 6 , 6 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 9 , 9 , 9 , 9 , 9 , 10 }; bool art_hidebtns=false; bool art_showled[4]={ true , true , true , true }; int art_ledpos[4][2]={ 11 , 7 , 26 , 19 , 44 , 7 , 42 , 20 }; dockapps/XPM/newstyle/cdplayer.xpm000066400000000000000000000107271245000764300175410ustar00rootroot00000000000000/* XPM */ static const char * cdplayer_xpm[] = { "64 64 8 1", " c None", ". c #000000", "X c #282828 s color_back", "o c #C7C3C7", "O c #F7F3FF", "+ c #86828E", "@ c #AEAAAE", "Q c #0000FF s led_color_high", " ", " ", " ", " ", " ........................................................ ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXQQQXXXXXQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXQXXXQQXQXQXXQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXQXXQXXXQQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXQXXQXXXQQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXQXXQXXXQXQXXQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", " oooooooooooooooooooooooooooooooooooooooooooooooooooooooo ", " ", " ", " ", " ........................................................ ", " .OOOOOOOOOOOO+OOOOOOOOOOOOO+OOOOOOOOOOOOO+OOOOOOOOOOOO+o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .+............+.............+.............+............o ", " .OOOOOOOOOOOO+OOOOOOOOOOOOOOOOOOOOOOOOOOO+OOOOOOOOOOOO+o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@@@@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@@@@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@@@@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@@@@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@@@@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@@@@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@@@@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@@@@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .O@@@@@@@@@@@.O@@@@@@@@@@@@@@@@@@@@@@@@@@.O@@@@@@@@@@@.o ", " .+............+...........................+............o ", " oooooooooooooooooooooooooooooooooooooooooooooooooooooooo ", " ", " ", " ", " ", " "}; dockapps/XPM/newstyle/led.xpm000066400000000000000000000024711245000764300164770ustar00rootroot00000000000000/* XPM */ static const char * led_xpm[] = { "128 9 3 1", " c #282828 s color_back", "1 c #006200 s led_color_low", "0 c #00ff00 s led_color_high", "10001 1111 10001 10001 11111 10001 10001 10001 10001 10001 111 10001 10001 10001 10001 10001 10001 111 10001 10001 ", "0 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 1 0 1 1 1 1 0 0 1 0 0 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 1 ", "0 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 1 0 1 1 1 1 0 0 1 0 0 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 1 0 1 1", "0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 1 ", "11111 1111 10001 10001 10001 10001 10001 1 11 10001 10001 111 1111 10001 111 11111 11111 11111 10001 10001 10001 11 11 00", "0 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 0 0 1 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 1 0 1 ", "0 1 0 1 1 0 0 1 1 1 1 0 1 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 1 1 0 1 1 0 1 1", "0 1 0 1 1 0 0 1 1 1 1 0 1 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 1 1 0 1 1 ", "10001 1111 10001 10001 1111 10001 10001 1111 10001 10001 111 10001 11111 111 11111 10001 10001 111 1111 10001 "}; dockapps/XPM/newstyle/ledsym.xpm000066400000000000000000000013251245000764300172250ustar00rootroot00000000000000/* XPM */ static const char * ledsym_xpm[] = { "59 9 3 1", " c #282828 s color_back", "0 c #00ff00 s led_color_high", "1 c #006200 s color_back", "0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 0 0 1 1 0 1 1 1 1 0 1 1", " ", "0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 0 1 1 0 0 0 1", " ", "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0", " ", "0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1", " ", "0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0"}; dockapps/XPM/newstyle/ledtsel.xpm000066400000000000000000000011701245000764300173620ustar00rootroot00000000000000/* XPM */ static const char * ledtsel_xpm[] = { "69 7 2 1", " c #282828 s color_back", "0 c #00ff00 s led_color_high", " ", " 0 0 0 0 ", " 0 0 0 0000000 0 0000000 0 0 0 ", " 0000000 0 0000000 0 0 0 0 0 00000 00000 ", " 0 0 0 0 0 0 0 0 ", " 0000 0000 0 ", " "}; dockapps/XPM/newstyle/symbols.xpm000066400000000000000000000006611245000764300174220ustar00rootroot00000000000000/* XPM */ static const char * symbols_xpm[] = { "65 5 2 1", " c None", "0 c #000000", " 00000 0 00 00 00 00 0 0 0 0 0 0 0 0 0 00000", " 00000 000 00 00 00 00 0 000 000 0 0000 0000 000 000 ", " 00000 00000 00 00 00 00 00000 00000 00000 00000 00000 0 ", " 00000 000 00 00 00 00 0 000 000 0 0000 0000 ", " 00000 0 00 00 00 00 0 0 0 0 0 0 0 0 00000 00000"}; dockapps/XPM/tile.xpm000066400000000000000000000126511245000764300150170ustar00rootroot00000000000000/* XPM */ static const char *tile_xpm[] = { "64 64 54 1", " c #F3CEF3CEF3CE", ". c #000000000000", "X c #514461856185", "o c #A289A289B2CA", "O c #A289A289A289", "+ c #A2899248B2CA", "@ c #9248A289A289", "# c #A2899248A289", "$ c #92489248A289", "% c #924892489248", "& c #92488207A289", "* c #820792489248", "= c #924882079248", "- c #820782079248", "; c #820782078207", ": c #820771C69248", "> c #618551446185", ", c #9248A289B2CA", "< c #92489248B2CA", "1 c #82079248A289", "2 c #82078207A289", "3 c #71C682079248", "4 c #71C682078207", "5 c #514451446185", "6 c #514451445144", "7 c #820771C68207", "8 c #410351445144", "9 c #514441035144", "0 c #71C671C69248", "q c #71C671C68207", "w c #71C671C671C6", "e c #410341035144", "r c #71C661858207", "t c #618571C68207", "y c #410351444103", "u c #410341034103", "i c #618571C671C6", "p c #410330C24103", "a c #30C241034103", "s c #71C6618571C6", "d c #6185618571C6", "f c #618561858207", "g c #30C230C230C2", "h c #618561856185", "j c #30C230C24103", "k c #5144618571C6", "l c #30C2410330C2", "z c #6185514471C6", "x c #208130C230C2", "c c #30C2208130C2", "v c #5144514471C6", "b c #2081208130C2", "n c #208120812081", "m c #410330C25144", " .", " X.", " oOoO+O+O+O+@#$+@#$#$#$$$#$$%&%&%&%&*&*&*=-=*=-=-=--;---;:;:;>.", " oo@o,o@o@o@+@+@<@$@$@$@$@$1$$$*$*$*&*&*2*&*2*-*-*-----3-3-4-X.", " oO+OoO#O+@#@#@#$#@#$#%#$$%$%$%&%&*=%&*=*=*=-=-=--;-;-;:;:;:;5.", " ,ooo@+@+@+@+@<@#@<@$$$$$$$$$*$1$*&*&*&*&*2*---*-----3---4:4:6.", " +O+O+O+@#$#@#$#$#$$%$$$%&%&%&%&*=*&*=-=*=---=--;---;:;:4:;:45.", " @o@o@o@+@+@<@$@$@$$$@$1$1$*$*$*&*&*2*=*2*-*-*-----4-3-4:4-4:6.", " +O#O+@#@#@#$#$#$#%#%$%&%$%&%&*=*&*=*=*=-=-=--;-;-;:;:;:;:4745.", " @+@+@+@+@<@#@$@$$$$$$$$$*$*$*&*&*&*&*2*---*-----3---4:4:4:4:8.", " #O+@#$#@#$#$#$$%$$$%&%&%&%&*=*&*=-=-=---=--;:;-;:;:4:4:474:49.", " @o@<@+@<@$@$@$$$$$1$1$*$*$*&*&*2*=*2*-*-*-----4-4-4:4:4:4:408.", " +@#@#@#$#$#$$%#%$%&%$%&%&*=*&*=*=*=-=-=--;-;-;:;:;:;:474747q9.", " @+@+@<@$$$@$$$$$1$$$*&*$*&*&*&*&*2*---------3-3-4:4:4:4:404q8.", " #$#@#$#$#$$%$$$%&%&%&%&*=-&*=-=-=---=--;:;:;:;:4:4:474:47q7q9.", " @#@<@$@$@$$$$$*$1$*$*$*&*&*2*-*2*-*-*-3---4-4-4:4:4:4:404q4q8.", " #@#$#$#$$%$%$%&%$%&%&*=*=*=-=*=-=;=--;-;-;:;:47;:474747q7q7q9.", " @<@$$$@$$$$$1$$$*&*&*&*&*&*=*2*---------4-3-4:4:4:4:404qq04q8.", " #$#$#$$%$%$%&%&%&%&*=-&*=-=-=------;:;:;:;:4:4:47q747qqq7qqq9.", " @$@$@$$$$$*$1$*$*$*&*&*2*-*-*---*-3-3-4-4-4:4:4:4:404q4q4qqq8.", " #$#$$%$%$%&%&%&%&*=*=*=-=-=-=;=--;:;-;:;:474:474747q7q7qqwqw9.", " $$@$$$$$*$$$*&*&*&*&*2*=*2*---------4-3-4:4:4:4:404qqq4qqqqqe.", " #$$%$%$%&%&*&%&*=-&*=-=-=------;:;:;:;:4:4:47q7q7qqq7qqwrqqw9.", " @$$$$$*$1$*&*$*2*&*2*-*-*-----3-3-4-4-4:4:404:404q4q4qqqqqtqy.", " $%$%$%&%&%=%&*=*=*=-=-=--;=--;:;-;:;:474:474747q7q7qqwqwqwrwe.", " $$$$*$1$*&*&*&*&*2*--2*-----3---4:3-4:4:4:4:404qqqqqqqqqtqtqu.", " &%$%&%&*&*&*=-=*=-=-=--;---;:;:;:;:4:4:47q7q7qqq7qqwrqrwrwrip.", " $$*$*$*&*&*2*&*2*-*-*-----3-3-4-4-4:4:404q404q4q4qtqqqiqtqiru.", " $%&%&*=%&*=*=*=-=-=--;-;-;:;-;:;:474:47q747q7q7qqwqwqwrwrirwu.", " *$1$*&*&*&*&*2*---*-----3---4:4:4:4:4:4:404qqqqqqqqqtqtqirira.", " &%&*=*&*=-=*=-=-=--;---;:;:;:;:4:4:47q7q7qqqqqqwrqrwrwriririp.", " *$*&*&*2*&*2*-*-*-----3-3-4-4-4:4:404q4q4qqq4qtqtqiqiqiriqira.", " &*=*&*=*=*=-=-=--;-;-;:;:;:;:474:47q7q7q7q7qqwrwqwrwrirwrisip.", " *&*&*&*&*2*---*-----3---4:4:4:4:404:404qqqqqqqqqtqtqiriririra.", " =*&*=-=*=---=--;---;:;:4:;:474:47q7q7qqqqqqwrwrwrwriririsdrdp.", " *&*2*=*2*-*-*-----4-3-4:4-4:4:404q4q4qqqqqtqtqiqiqiriqifirifa.", " &*=*=*=-=-=--;-;-;:;:;:;:474747q7q7qqq7qqwrwqwrwrirwrisisisdp.", " *&*&*2*---*-----3-3-4:4:4:4:404qq04qqqqqtqqqirtqiririririfida.", " =-=-=---=--;:;-;:;:4:4:474:47q7q7qqqqqqwrwrwrwriririsdrdsdddp.", " *=*2*-*-*-----4-4-4:4:4:4:404q4q4qqqqqtqtqiqiqiriqifififidida.", " =*=-=-=--;-;-;:;:4:;:474747q7q7qqwqwqwrwqwrwrirwrisdsisdsdsdp.", " *2*---------4-3-4:4:4:4:404qq04qqqqqtqqqiririririririfidddddg.", " =---=--;:;:;:;:4:4:474:47q7q7qqqqqqwrwrwrwriririsdsdsddddddhj.", " *---*-3---4-4-4:4:4:4:404q4q4qqqqqtqtqiqiqiririfififidddidkdl.", " =;=--;:;-;:;:474:474747q7q7qqwqwqwrwrwrwrirwrisdsdsdsdsddhzhj.", " --------4-3-4:4:4:4:404qq04qqqqqtqqqiririririfirifidddddddddx.", " ---;:;:;:;:4:4:47q747qqq7qqwqqqwrwrirwriririsdsdsddddddhzhzhc.", " --3-3-4-4-4:4:4:4:404q4q4qqqqqtqtqiriqiririfififidddddkdkdXdx.", " -;:;-;:;:474:474747q7q7qqwqwqwrwrwrwrisisisdsdsdddsddhzhdhzhg.", " ----4-3-4:4:4:4:404qqq4qqqqqtqtqiriririrififdfidddddkdddkzkdx.", " :;:;:;:4:4:47q7q7qqq7qqwrqqwrwriririririsdsdsddddddhzhzhzhzXc.", " 3-4-4-4:4:404:404q4q4qqqqqtqtqiriqiririfidididddddkdkdXdXdXzx.", " -;:;:474:47q747q7q7qqwqwqwrwrirwrisisisdsdsddddddhzhdhzhzXzhc.", " 4:4-4:4:4:4:404qqqqqqqqqtqtqiriririrififdfidddddkdddkzkdXzXzx.", " :;:4:4:47q7q7qqq7qqwrqrwrwriririsirisdsdsddddddhzhzhzhzXzXzXc.", " 4-4:4:404q404qqq4qtqqqiqtqiriqiririfidididddddkdkdXdXdXzXzXvx.", " :474:47q7q7q7q7qqwrwqwrwrirwrisisisdsdsddddddhzhzhzhzXzhzX>5c.", " 4:4:4:4:404qqqqqqqqqtqtqiririririfiddfidddddkdddXzkdXzXzXvXzx.", " :4:47q7q7qqqqqqwrwrwrwriririsdrisdddsddddddhzhzXzhzXzXzX>5>5c.", " 4:404q4q4qqqqqtqtqiqiqiriqiririfidididddddkdkdXzXdXzXzXvXvXvx.", " :47q7q7q7q7qqwrwqwrwrirwrisisisdsdsddhdddhzhzhzhzXzXzX>5>5>5b.", " 404:404qqqqqqqqqiqtqiririririfidddidddddkdkdXzkzXzXzXvXv5vX5n.", " >65656569698989y9e9u9ueumueupupapaplpgjgjgjgcgcgcgcxcbcncnbnb.", " ..............................................................."}; dockapps/XPM/wmcd/000077500000000000000000000000001245000764300142615ustar00rootroot00000000000000dockapps/XPM/wmcd/artwork.dat000066400000000000000000000017211245000764300164450ustar00rootroot00000000000000int art_nbtns=7; int art_btns[]={ 5 , 54 , 4 , 5 , 54 , 12 , 54 , 12 , 59 , 5 , 59 , 13 , 54 , 4 , 13 , 54 , 20 , 54 , 20 , 59 , 13 , 59 , 21 , 54 , 4 , 21 , 54 , 28 , 54 , 28 , 59 , 21 , 59 , 29 , 54 , 4 , 29 , 54 , 36 , 54 , 36 , 59 , 29 , 59 , 37 , 54 , 4 , 37 , 54 , 44 , 54 , 44 , 59 , 37 , 59 , 45 , 54 , 4 , 45 , 54 , 52 , 54 , 52 , 59 , 45 , 59 , 53 , 54 , 4 , 53 , 54 , 60 , 54 , 60 , 59 , 53 , 59 }; int art_actions[]={ 0 , 2 , 3 , 4 , 0 , 0 , 0 , 0 , 7 , 0 , 0 , 0 , 0 , 0 , 8 , 0 , 0 , 0 , 5 , 5 , 5 , 0 , 0 , 0 , 6 , 6 , 6 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 9 , 9 , 9 , 9 , 9 , 10 }; bool art_hidebtns=false; bool art_showled[4]={ true , true , true , true }; int art_ledpos[4][2]={ 8 , 37 , 28 , 14 , 50 , 40 , 20 , 14 }; dockapps/XPM/wmcd/cdplayer.xpm000066400000000000000000000106651245000764300166220ustar00rootroot00000000000000/* XPM */ static const char * cdplayer_xpm[] = { "64 64 6 1", " c None", ". c #410341034103", "X c #000000000000", "o c #C71BC30BC71B", "O c #618561856185", "+ c #B6DAB2CAB6DA", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ............................ ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXo ", " oooooooooooooooooooooooooooo ", " ", " ", " ", " ", " ", " OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO ", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+ ", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO ", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; dockapps/XPM/wmcd/led.xpm000066400000000000000000000040551245000764300155570ustar00rootroot00000000000000/* XPM */ static const char * led_xpm[] = { "171 11 4 1", " c #000000", "0 c #00ff00 s led_color_high", "1 c #009b00 s led_color_med", "2 c #006200 s led_color_low", " 00000 1 1 1 00000 00000 1 2 1 00000 00000 00000 00000 00000 1 1 1 1 1 1 00000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 00000 00000 ", "0 212 0 2 0 1 212 0 1 212 0 0 0 0 212 1 0 212 1 2 121 0 0 212 0 0 212 0 2 1 2 0 0 212 0 0 1 2 1 2 1 2 1 2 1 0 212 0 0 212 1 ", "01 10 10 10 10 01 10 01 01 20 01 10 01 10 10 01 10 01 01 10 01 10 2 2", "01 10 10 10 10 01 10 01 01 20 01 10 01 10 10 01 10 01 01 10 01 01 1 1 ", "0 0 1 0 1 121 0 2 121 0 0 212 0 0 212 1 0 212 1 2 0 0 212 0 0 212 0 1 2 1 212 0 0 212 0 0 212 2 1 212 2 1 212 2 1 212 2 1 212 2 0 212 0 0 212 1 ", " 1 2 1 2 1 2 00000 00000 00000 00000 00000 1 1 1 00000 00000 2 1 1 00000 00000 00000 00000 00000 00000 00000 00000 00000 212 212 010", "0 0 1 0 0 212 1 1 212 0 1 212 0 2 121 0 0 212 0 1 0 0 212 0 2 121 0 1 2 0 212 0 0 212 0 0 212 2 0 212 0 0 212 0 0 212 2 1 212 2 0 212 2 0 212 2 ", "01 10 10 01 10 10 20 01 10 20 01 10 20 01 10 01 10 01 01 10 01 10 01 01 01 10 2 2", "01 10 10 01 10 10 20 01 10 20 01 10 20 01 10 01 10 01 01 10 01 10 01 01 01 01 1 1 ", "0 212 0 1 0 0 212 1 2 121 0 1 0 2 121 0 0 212 0 1 0 0 212 0 2 121 0 1 1 0 212 0 0 0 0 212 1 0 0 0 212 0 0 212 1 1 1 0 1 0 212 1 ", " 00000 2 1 2 00000 00000 2 1 2 00000 00000 1 1 1 00000 00000 1 1 2 00000 2 1 2 00000 1 1 2 00000 00000 1 1 2 1 1 2 00000 "}; dockapps/XPM/wmcd/ledsym.xpm000066400000000000000000000004701245000764300163050ustar00rootroot00000000000000/* XPM */ static const char * ledsym_xpm[] = { "35 5 2 1", " c #000000", "0 c #00ff00 s led_color_high", "00000 00000 0 00 00 0 0 ", "00000 00000 000 00 00 000 000 ", "00000 00000 00000 00 00 00000 00000", "00000 00000 000 00 00 ", "00000 00000 0 00 00 00000 00000"}; dockapps/XPM/wmcd/ledtsel.xpm000066400000000000000000000007361245000764300164510ustar00rootroot00000000000000/* XPM */ static const char * ledtsel_xpm[]={ "29 11 2 1", " c #000000", "0 c #00ff00 s led_color_high", " 00 00 00 ", " 0 0 0 0 0 0 0 0 ", " 0 0 0 0 0 0 0 ", " 0 0 0 0 0 0 000 ", " 0 0 0 0 0 0 0 ", " 000 000 000 000 ", " 0 0 0 0 0 ", " 0 0 0 0 000 ", " 0 ", " 0 0", " 000 000 00 "}; dockapps/XPM/wmcd/symbols.xpm000066400000000000000000000023251245000764300165010ustar00rootroot00000000000000/* XPM */ static const char * symbols_xpm[] = { "87 7 26 1", " c None", ". c #CF3CCF3CCF3C", "X c #E79DE38DE79D", "o c #E79DE79DE79D", "O c #CF3CCB2BCF3C", "+ c #B6DAB6DAB6DA", "@ c #C71BC71BC71B", "# c #DF7DDB6CDF7D", "$ c #D75CD34CD75C", "% c #BEFBBAEABEFB", "& c #A699A289A699", "* c #EFBEEFBEEFBE", "= c #9E799E799E79", "- c #AEBAAAAAAEBA", "; c #71C675D671C6", ": c #965896589658", "> c #79E77DF779E7", ", c #69A669A669A6", "< c #49244D344924", "1 c #8E388A288E38", "2 c #492449244924", "3 c #59655D755965", "4 c #69A66DB669A6", "5 c #38E33CF338E3", "6 c #514455555144", "7 c #8E388E388E38", " .XoooO+ .@+ .XO#XO+ .XO#XO+ .@+ .@+ .@+ .@+ .@+ .XoooO+", " $oooo%& $X#O+ $o%#o%& $o%#o%& $@OX*O& $X#OX@& .@+.@+ .@+.@+ .oo%+ +$XoO&=", " %%---;; %$O##O+ %%;-%;; %%;-%;; %.O*X&; %$O#X+; .oOOoO& $X%XX%+ .oo#%%+ :>>,<<>", " %%---;; %%-11== %%;-%;; %%;-%;; %+-%-;; %%-1-=; +%=1%=; %+;%+;= +=;234= :>2<> ", " %%---;; %=3553> %%;-%;; %%;-%;; %:36;4; %=35;>; :>33>34 =;<;;<> %%---11 .XX#OO+", " =>222<4 =;53> =><,><4 =><,><4 =73;634 =;53;74 :7>:7> :7>:7> ++---== ++---==", " :;2223> :7> :;3,;3> :;3,;3> :7> :7> :7> :7> :;2223> :;2223>"}; dockapps/cdctl.h000066400000000000000000000306601245000764300141320ustar00rootroot00000000000000// cdctl.h - CDCtl class provides easy control of cd audio functions // Copyright (C) 1998 Sam Hawker // This software comes with ABSOLUTELY NO WARRANTY // This software is free software, and you are welcome to redistribute it // under certain conditions // See the README file for a more complete notice. // Although cdctl.h is an integral part of wmcdplay, it may also be distributed seperately. // Change this define to alter the size of forward and backward skips (in frames) // Yes, I know this should really be a method of CDCtl #define _CDCTL_SKIP_SIZE 1125 // Try defining some of these. They may improve performance or reliability // (or just plain make it work) // #define _CDCTL_STOP_BEFORE_PLAY // #define _CDCTL_START_BEFORE_PLAY // #define _CDCTL_SOFT_STOP // Define this if it stops after each track #define _CDCTL_SENSITIVE_EOT // If it still stops for a while between tracks, increase this (0-75 is a sensible range) #define _CDCTL_SENSITIVITY 0 #include #include #include #include #include #include #include #ifdef __linux__ #include #endif #ifdef __GNU__ #include #endif // CD status values #define ssData 0 #define ssStopped 1 #define ssPlaying 2 #define ssPaused 3 #define ssNoCD 4 #define ssTrayOpen 5 // Audio command values #define acStop 0 #define acPlay 1 #define acPause 2 #define acResume 3 #define acPrev 4 #define acNext 5 #define acRewd 6 #define acFFwd 7 #define acEject 8 #define acClose 9 // Track selection values (what to do when I've played the requested track) // Note: Track selection is not perfect - so use tsNone if you want to avoid trouble. // Basically, if we receive a CDROM_AUDIO_COMPLETED status, then we have to decide what to do. // If we think the last play command was ours (Next/Prev/FFwd/Rewd don't count), then we do something, // depending on the current track selection mode. // Failures: Sometimes we may think we sent the last play command when we did not (if we didn't see play stop in // in between). // If another application is polling the status, it may receive the CDROM_AUDIO_COMPLETED we are looking // for, and we will not, so will think play was stopped manually. // Similarly, we may read the CDROM_AUDIO_COMPLETED status when we don't want it, such that the other // application never sees it. // Verdict: Linux audio cdrom handling is broken. // Update: New define _CDCTL_SENSITIVE_EOT may help in cases where CDROM_AUDIO_COMPLETED is not being returned // correctly. It may, however, interfere with other running cd players. // Update: I think this works like a dream now. Even with many cd players sharing a cdrom. Let me know if not!! #define tsNone 0 // Just stop #define tsRepeat 1 // Play it again #define tsNext 2 // Play next track (stop at end of CD) #define tsRepeatCD 3 // Play next track (start from first track if end is reached) #define tsRandom 4 // Play a track at random class CDCtl { public: CDCtl(char *dname){ device=(char *)malloc(sizeof(char)*(strlen(dname)+1)); strcpy(device,dname); srand(getpid()); tracksel=tsRandom; tskOurPlay=false; if((cdfdopen = (cdfd = open(device,O_RDONLY | O_NONBLOCK))) != -1) { status_state=ssNoCD; status_track=0; status_pos=0; cd_trklist=NULL; doStatus(); readVolume(); } } ~CDCtl(){ if(cdfdopen){ close(cdfd); if(device!=NULL) free(device); if(cd_trklist!=NULL) free(cd_trklist); } } bool openOK(){ return cdfdopen; } void doAudioCommand(int cmd){ if(cdfdopen){ int newtrk=status_track; switch(cmd){ case acStop: #ifdef _CDCTL_SOFT_STOP ioctl(cdfd,CDROMSTART); #endif #ifndef _CDCTL_SOFT_STOP ioctl(cdfd,CDROMSTOP); #endif tskOurPlay=false; break; case acPlay: status_state=ssPlaying; select(status_track); tskOurPlay=true; break; case acPause: ioctl(cdfd,CDROMPAUSE); break; case acResume: ioctl(cdfd,CDROMRESUME); break; case acPrev: newtrk--; if(newtrk<0) newtrk=cd_tracks-1; select(newtrk); break; case acNext: newtrk++; if(newtrk>cd_tracks-1) newtrk=0; select(newtrk); break; case acRewd: if(status_pos>cd_trklist[status_track].track_start+_CDCTL_SKIP_SIZE){ status_pos-=_CDCTL_SKIP_SIZE; play(); } break; case acFFwd: if(status_pos0 && (now=stop)){ status_state=ssPlaying; selecttrack(); doStatus(); return; } else status_state=ssStopped; } else #endif status_state=ssStopped; } trackinfo(&sc); if(cd_trklist[status_track].track_data) status_state=ssData; } } } void setVolume(int l, int r){ if(cdfdopen){ struct cdrom_volctrl vol; vol.channel0=l; vol.channel1=r; ioctl(cdfd,CDROMVOLCTRL,&vol); readVolume(); } } void readVolume(){ if(cdfdopen){ struct cdrom_volctrl vol; ioctl(cdfd,CDROMVOLREAD,&vol); status_volumel=vol.channel0; status_volumer=vol.channel1; } } int getVolumeL(){ return status_volumel; } int getVolumeR(){ return status_volumer; } void setTrackSelection(int ts){ tracksel=ts; } int getTrackSelection(){ return tracksel; } char *getDevName(){ return device; } int getCDTracks(){ return cd_tracks; } int getCDLen(){ return cd_len; } int getTrackStart(int trk){ return cd_trklist[trk-1].track_start; } int getTrackLen(int trk){ return cd_trklist[trk-1].track_len; } bool getTrackData(int trk){ return cd_trklist[trk-1].track_data; } int getStatusState(){ return status_state; } int getStatusTrack(){ return status_track+1; } int getStatusPosAbs(){ return status_pos-cd_trklist[0].track_start; } int getStatusPosRel(){ return status_pos-cd_trklist[status_track].track_start; } private: void readTOC(){ if(cd_trklist!=NULL) free(cd_trklist); struct cdrom_tochdr hdr; ioctl(cdfd, CDROMREADTOCHDR, &hdr); cd_tracks=hdr.cdth_trk1; cd_trklist=(struct CDTrack *)malloc(cd_tracks*sizeof(struct CDTrack)); struct cdrom_tocentry te; int prev_addr=0; for(int i=0;i<=cd_tracks;i++){ if(i==cd_tracks) te.cdte_track=CDROM_LEADOUT; else te.cdte_track=i+1; te.cdte_format=CDROM_MSF; // I think it is ok to read this as LBA, but for a quiet life... ioctl(cdfd, CDROMREADTOCENTRY, &te); int this_addr=((te.cdte_addr.msf.minute * 60) + te.cdte_addr.msf.second) * 75 + te.cdte_addr.msf.frame - CD_MSF_OFFSET; if(i>0) cd_trklist[i-1].track_len = this_addr - prev_addr - 1; prev_addr=this_addr; if(icdsc_absaddr.msf.minute) * 60 + subchnl->cdsc_absaddr.msf.second) * 75 + subchnl->cdsc_absaddr.msf.frame - CD_MSF_OFFSET; for(status_track=0;status_track=cd_tracks){ tskOurPlay=false; return; } break; case tsRepeatCD: newtrk++; if(newtrk>=cd_tracks) newtrk=0; break; case tsRandom: newtrk+=(int)((cd_tracks-1)*(float)rand()/RAND_MAX+1); if(newtrk>=cd_tracks) newtrk-=cd_tracks; break; } } while(cd_trklist[newtrk].track_data); select(newtrk); play(); } int cdfd; int cdfdopen; char *device; int tracksel; bool tskOurPlay; struct CDTrack{ int track_start; int track_len; bool track_data; }; int cd_tracks; int cd_len; struct CDTrack *cd_trklist; int status_state; int status_track; int status_pos; int status_volumel; int status_volumer; }; dockapps/cdctl_freebsd.h000066400000000000000000000327201245000764300156230ustar00rootroot00000000000000// cdctl.h - CDCtl class provides easy control of cd audio functions // Copyright (C) 1998 Sam Hawker // This software comes with ABSOLUTELY NO WARRANTY // This software is free software, and you are welcome to redistribute it // under certain conditions // See the README file for a more complete notice. // Although cdctl.h is an integral part of wmcdplay, it may also be distributed seperately. // Change this define to alter the size of forward and backward skips (in frames) // Yes, I know this should really be a method of CDCtl #define _CDCTL_SKIP_SIZE 1125 // Try defining some of these. They may improve performance or reliability // (or just plain make it work) // #define _CDCTL_STOP_BEFORE_PLAY // #define _CDCTL_START_BEFORE_PLAY // #define _CDCTL_SOFT_STOP // Define this if it stops after each track #define _CDCTL_SENSITIVE_EOT // If it still stops for a while between tracks, increase this (0-75 is a sensible range) #define _CDCTL_SENSITIVITY 0 #include #include #include #include #include #include #include #include #include #define CD_MSF_OFFSET 150 // CD status values #define ssData 0 #define ssStopped 1 #define ssPlaying 2 #define ssPaused 3 #define ssNoCD 4 #define ssTrayOpen 5 // Audio command values #define acStop 0 #define acPlay 1 #define acPause 2 #define acResume 3 #define acPrev 4 #define acNext 5 #define acRewd 6 #define acFFwd 7 #define acEject 8 #define acClose 9 // Track selection values (what to do when I've played the requested track) // Note: Track selection is not perfect - so use tsNone if you want to avoid trouble. // Basically, if we receive a CDROM_AUDIO_COMPLETED status, then we have to decide what to do. // If we think the last play command was ours (Next/Prev/FFwd/Rewd don't count), then we do something, // depending on the current track selection mode. // Failures: Sometimes we may think we sent the last play command when we did not (if we didn't see play stop in // in between). // If another application is polling the status, it may receive the CDROM_AUDIO_COMPLETED we are looking // for, and we will not, so will think play was stopped manually. // Similarly, we may read the CDROM_AUDIO_COMPLETED status when we don't want it, such that the other // application never sees it. // Verdict: Linux audio cdrom handling is broken. // Update: New define _CDCTL_SENSITIVE_EOT may help in cases where CDROM_AUDIO_COMPLETED is not being returned // correctly. It may, however, interfere with other running cd players. // Update: I think this works like a dream now. Even with many cd players sharing a cdrom. Let me know if not!! #define tsNone 0 // Just stop #define tsRepeat 1 // Play it again #define tsNext 2 // Play next track (stop at end of CD) #define tsRepeatCD 3 // Play next track (start from first track if end is reached) #define tsRandom 4 // Play a track at random class CDCtl { public: CDCtl(char *dname){ device=(char *)malloc(sizeof(char)*(strlen(dname)+1)); strcpy(device,dname); srand(getpid()); tracksel=tsRandom; tskOurPlay=false; if(cdfdopen=(cdfd=open(device,O_RDONLY | O_NONBLOCK))!=-1){ status_state=ssNoCD; status_track=0; status_pos=0; cd_trklist=NULL; doStatus(); readVolume(); } } ~CDCtl(){ if(cdfdopen){ close(cdfd); if(device!=NULL) free(device); if(cd_trklist!=NULL) free(cd_trklist); } } bool openOK(){ return cdfdopen; } void doAudioCommand(int cmd){ if(cdfdopen){ int newtrk=status_track; switch(cmd){ case acStop: #ifdef _CDCTL_SOFT_STOP ioctl(cdfd,CDIOCSTART); #endif #ifndef _CDCTL_SOFT_STOP ioctl(cdfd,CDIOCSTOP); #endif tskOurPlay=false; break; case acPlay: status_state=ssPlaying; select(status_track); tskOurPlay=true; break; case acPause: ioctl(cdfd,CDIOCPAUSE); break; case acResume: ioctl(cdfd,CDIOCRESUME); break; case acPrev: newtrk--; if(newtrk<0) newtrk=cd_tracks-1; select(newtrk); break; case acNext: newtrk++; if(newtrk>cd_tracks-1) newtrk=0; select(newtrk); break; case acRewd: if(status_pos>cd_trklist[status_track].track_start+_CDCTL_SKIP_SIZE){ status_pos-=_CDCTL_SKIP_SIZE; play(); } break; case acFFwd: if(status_pos0 && (now=stop)){ status_state=ssPlaying; selecttrack(); doStatus(); return; } else status_state=ssStopped; } else #endif status_state=ssStopped; } trackinfo(&csci); if(cd_trklist[status_track].track_data) status_state=ssData; } } } void setVolume(int l, int r){ if(cdfdopen){ struct ioc_vol vol; vol.vol[0]=l; vol.vol[1]=r; vol.vol[2]=0; vol.vol[3]=0; ioctl(cdfd,CDIOCSETVOL,&vol); readVolume(); } } void readVolume(){ if(cdfdopen){ struct ioc_vol vol; ioctl(cdfd,CDIOCGETVOL,&vol); status_volumel=vol.vol[0]; status_volumer=vol.vol[1]; } } int getVolumeL(){ return status_volumel; } int getVolumeR(){ return status_volumer; } void setTrackSelection(int ts){ tracksel=ts; } int getTrackSelection(){ return tracksel; } char *getDevName(){ return device; } int getCDTracks(){ return cd_tracks; } int getCDLen(){ return cd_len; } int getTrackStart(int trk){ return cd_trklist[trk-1].track_start; } int getTrackLen(int trk){ return cd_trklist[trk-1].track_len; } bool getTrackData(int trk){ return cd_trklist[trk-1].track_data; } int getStatusState(){ return status_state; } int getStatusTrack(){ return status_track+1; } int getStatusPosAbs(){ return status_pos-cd_trklist[0].track_start; } int getStatusPosRel(){ return status_pos-cd_trklist[status_track].track_start; } private: void readTOC(){ if(cd_trklist!=NULL) free(cd_trklist); struct ioc_toc_header hdr; ioctl(cdfd, CDIOREADTOCHEADER, &hdr); cd_tracks=hdr.ending_track; cd_trklist=(struct CDTrack *)malloc(cd_tracks*sizeof(struct CDTrack)); #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) struct ioc_read_toc_entry te; te.data_len = (cd_tracks + 1) * sizeof(struct cd_toc_entry); te.data = (struct cd_toc_entry *)malloc(te.data_len); te.address_format = CD_LBA_FORMAT; te.starting_track = 0; ioctl(cdfd, CDIOREADTOCENTRYS, &te); for(int i = 0; i < cd_tracks; i++) { cd_trklist[i].track_data = te.data[i].control & 4 ? true : false; cd_trklist[i].track_start = ntohl(te.data[i].addr.lba); cd_trklist[i].track_len = ntohl(te.data[i + 1].addr.lba) - cd_trklist[i].track_start; } cd_len = ntohl(te.data[cd_tracks].addr.lba); free(te.data); #else struct cdrom_tocentry te; int prev_addr=0; for(int i=0;i<=cd_tracks;i++){ if(i==cd_tracks) te.cdte_track=CDROM_LEADOUT; else te.cdte_track=i+1; te.cdte_format=CDROM_MSF; // I think it is ok to read this as LBA, but for a quiet life... ioctl(cdfd, CDROMREADTOCENTRY, &te); int this_addr=((te.cdte_addr.msf.minute * 60) + te.cdte_addr.msf.second) * 75 + te.cdte_addr.msf.frame - CD_MSF_OFFSET; if(i>0) cd_trklist[i-1].track_len = this_addr - prev_addr - 1; prev_addr=this_addr; if(iwhat.position.absaddr.msf.minute) * 60 + subchnl->what.position.absaddr.msf.second) * 75 + subchnl->what.position.absaddr.msf.frame - CD_MSF_OFFSET; for(status_track=0;status_track=cd_tracks){ tskOurPlay=false; return; } break; case tsRepeatCD: newtrk++; if(newtrk>=cd_tracks) newtrk=0; break; case tsRandom: newtrk+=(int)((cd_tracks-1)*(float)rand()/RAND_MAX+1); if(newtrk>=cd_tracks) newtrk-=cd_tracks; break; } } while(cd_trklist[newtrk].track_data); select(newtrk); play(); } int cdfd; int cdfdopen; char *device; int tracksel; bool tskOurPlay; struct CDTrack{ int track_start; int track_len; bool track_data; }; int cd_tracks; int cd_len; struct CDTrack *cd_trklist; int status_state; int status_track; int status_pos; int status_volumel; int status_volumer; }; dockapps/configure.ac000066400000000000000000000012551245000764300151540ustar00rootroot00000000000000AC_INIT([wmcdplay], [1.1], [wmaker-dev@lists.windowmaker.org]) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_SRCDIR([configure.ac]) AC_PROG_CXX define([artlist], esyscmd([cd XPM && ls -d */ | sed 's/\///g'])) AC_ARG_WITH([art], AS_HELP_STRING([--with-art], [Choose art style. Defaults to 'newstyle'. Choices are: ] artlist), [], [with_art=newstyle]) if test ! -d "XPM/${with_art}"; then AC_MSG_ERROR([cannot find art directory '${with_art}'.]) fi AC_MSG_NOTICE([setting art style to '${with_art}'...]) AC_SUBST([defaultart], [$with_art]) PKG_CHECK_MODULES([x11], [x11]) PKG_CHECK_MODULES([xpm], [xpm]) PKG_CHECK_MODULES([xext], [xext]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT dockapps/wmcdplay.1000066400000000000000000000022171245000764300145670ustar00rootroot00000000000000.TH WMCDplay 1 "December 18, 2014" .SH NAME wmcdplay \- A cd player designed for WindowMaker .SH SYNOPSIS .B wmcdplay .RI [ options ] .br .SH DESCRIPTION A skinable CD player for the Window Maker dock. .SH OPTIONS .TP \fB\-h\fR | \fB\-help\fR | \fB\-\-help\fR display this help screen .TP \fB\-w\fR use WithdrawnState (for WindowMaker) .TP \fB\-s\fR shaped window .TP \fB\-a\fR use smaller window (for AfterStep Wharf) .TP \fB\-f\fR artwork_file load the specified artwork file .TP \fB\-t\fR track_selection set track selection (between 0 and 4) .TP \fB\-v\fR volume set the cdrom volume (between 0 and 255) .TP \fB\-i\fR interval interval in 1/20 seconds between cd polls when empty .TP \fB\-l\fR led_color use the specified color for led displays .TP \fB\-b\fR back_color use the specified color for backgrounds .TP \fB\-d\fR cd_device use specified device .TP \fB\-position\fR position set window position .TP \fB\-display\fR display select target display .SH AUTHOR wmcdplay was written by Sam Hawker This manual page was written by John H. Robinson, IV , for the Debian GNU/Linux system (but may be used by others). . dockapps/wmcdplay.cc000066400000000000000000000637421245000764300150260ustar00rootroot00000000000000// wmcdplay - A cd player designed for WindowMaker // Copyright (C) 1998 Sam Hawker // This software comes with ABSOLUTELY NO WARRANTY // This software is free software, and you are welcome to redistribute it // under certain conditions // See the README file for a more complete notice. // Defines, includes and global variables // -------------------------------------- // User defines - standard #define WINDOWMAKER false #define USESHAPE false #define AFTERSTEP false #define NORMSIZE 64 #define ASTEPSIZE 56 #define NAME "wmcdplay" #define CLASS "WMCDPlay" // User defines - custom #define CDDEV "/dev/cdrom" #define BACKCOLOR "#282828" #define LEDCOLOR "green" #define POSRELABS 0 // 0=relative position, 1=absolute position #define UINTERVAL_N 1 // 20ths of a second #define UINTERVAL_E 20 // 20ths of a second // Includes - standard #include #include #include #include // Includes - custom #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include "cdctl_freebsd.h" #else #include "cdctl.h" #endif // X-Windows includes - standard #include #include #include #include #include #include // Pixmaps - standard Pixmap pm_tile; Pixmap pm_disp; Pixmap pm_mask; // Pixmaps - artwork Pixmap pm_cd; Pixmap pm_cdmask; Pixmap pm_sym; Pixmap pm_symmask; Pixmap pm_led; Pixmap pm_sled; Pixmap pm_tled; // Xpm images - standard #include "XPM/tile.xpm" // Xpm images - artwork #include "XPM/standard.art" // Variables for command-line arguments - standard bool wmaker=WINDOWMAKER; bool ushape=USESHAPE; bool astep=AFTERSTEP; char display[256]=""; char position[256]=""; int winsize; // Variables for command-line arguments - custom char cddev[256]=CDDEV; char backcolor[256]=BACKCOLOR; char ledcolor[256]=LEDCOLOR; bool artwrk=false; char artwrkf[256]=""; int tsel=1; int vol=-1; // -1 means don't set volume int uinterval_e=UINTERVAL_E; // X-Windows basics - standard Atom _XA_GNUSTEP_WM_FUNC; Atom deleteWin; Display *d_display; Window w_icon; Window w_main; Window w_root; Window w_activewin; // X-Windows basics - custom GC gc_gc, gc_bitgc; unsigned long color[4]; // Misc custom global variables // ---------------------------- // For artwork loading int **art_btnlist; int *art_btnptr; int *art_actptr; int art_symsize[2]; int art_ledsize[6]; int mode=-1, track=-1, pos=-1; int tdisplay=POSRELABS; int ucount=0; char trackstr[8]=""; char timestr[8]=""; char chrset[]="00112233445566778899 DDAATTNNOOCC--PPEE:;_"; CDCtl *cdctl; // Procedures and functions // ------------------------ // Procedures and functions - standard void initXWin(int argc, char **argv); void freeXWin(); void createWin(Window *win, int x, int y); unsigned long getColor(char *colorname); unsigned long mixColor(char *colorname1, int prop1, char *colorname2, int prop2); // Procedures and functions - custom void scanArgs(int argc, char **argv); void checkStatus(bool forced); void pressEvent(XButtonEvent *xev); void repaint(); void update(); void drawText(int x, int y, char *text); // Procedures and functions - artwork basics bool readArtwork(char *artfilen); char *readBlock(FILE *dfile); int arrayItems(char *buf); void readArrayInt(char *buf, int *array, int n); void readArrayBool(char *buf, bool *array, int n); // Procedures and functions - artwork specials void createPixmap(const char **data, char *buf, Pixmap *image, Pixmap *mask, int *width, int *height); void setBtnList(int *bset); bool inPolygon(int *points, int px, int py); // Implementation // -------------- int main(int argc, char **argv) { scanArgs(argc, argv); initXWin(argc, argv); color[0]=mixColor(ledcolor, 0, backcolor, 100); color[1]=mixColor(ledcolor, 100, backcolor, 0); color[2]=mixColor(ledcolor, 60, backcolor, 40); color[3]=mixColor(ledcolor, 25, backcolor, 75); if(artwrk) artwrk=readArtwork(artwrkf); if(!artwrk){ int w, h; createPixmap(cdplayer_xpm, NULL, &pm_cd, &pm_cdmask, NULL, NULL); createPixmap(symbols_xpm, NULL, &pm_sym, &pm_symmask, &w, &h); art_symsize[0]=(w+1)/11-1; art_symsize[1]=h; createPixmap(led_xpm, NULL, &pm_led, NULL, &w, &h); art_ledsize[0]=(w+1)/strlen(chrset)-1; art_ledsize[1]=h; createPixmap(ledsym_xpm, NULL, &pm_sled, NULL, &w, &h); art_ledsize[2]=(w+1)/6-1; art_ledsize[3]=h; createPixmap(ledtsel_xpm, NULL, &pm_tled, NULL, &w, &h); art_ledsize[4]=(w+1)/5-1; art_ledsize[5]=h; art_btnptr=art_btns; art_actptr=art_actions; } setBtnList(art_btnptr); createPixmap(tile_xpm, NULL, &pm_tile, NULL, NULL, NULL); pm_disp = XCreatePixmap(d_display, w_root, 64, 64, DefaultDepth(d_display, DefaultScreen(d_display))); pm_mask = XCreatePixmap(d_display, w_root, 64, 64, 1); XGCValues gcv; unsigned long gcm; gcm=GCGraphicsExposures; gcv.graphics_exposures=false; gc_gc=XCreateGC(d_display, w_root, gcm, &gcv); gc_bitgc=XCreateGC(d_display, pm_mask, gcm, &gcv); cdctl=new CDCtl(cddev); if(!cdctl->openOK()) fprintf(stderr, "%s : Unable to open cdrom device '%s'.\n", NAME, cddev); else{ if(vol!=-1) cdctl->setVolume(vol, vol); int tsels[] = { tsNone, tsNext, tsRepeat, tsRepeatCD, tsRandom }; cdctl->setTrackSelection(tsels[tsel]); checkStatus(true); XEvent xev; XSelectInput(d_display, w_activewin, ButtonPress | ExposureMask); XMapWindow(d_display, w_main); bool done=false; while(!done){ while(XPending(d_display)){ XNextEvent(d_display, &xev); switch(xev.type){ case Expose: repaint(); break; case ButtonPress: pressEvent(&xev.xbutton); break; case ClientMessage: if((Atom) xev.xclient.data.l[0]==deleteWin) done=true; break; } } ucount++; if(ucount>=((mode==ssNoCD || mode==ssTrayOpen) ? uinterval_e : UINTERVAL_N)) checkStatus(false); XFlush(d_display); usleep(50000); } } XFreeGC(d_display, gc_gc); XFreeGC(d_display, gc_bitgc); XFreePixmap(d_display, pm_tile); XFreePixmap(d_display, pm_disp); XFreePixmap(d_display, pm_mask); XFreePixmap(d_display, pm_cd); XFreePixmap(d_display, pm_cdmask); XFreePixmap(d_display, pm_sym); XFreePixmap(d_display, pm_symmask); XFreePixmap(d_display, pm_led); XFreePixmap(d_display, pm_sled); XFreePixmap(d_display, pm_tled); freeXWin(); if(artwrk){ free(art_btnptr); free(art_actptr); } free(art_btnlist); delete cdctl; return 0; } void initXWin(int argc, char **argv){ winsize=astep ? ASTEPSIZE : NORMSIZE; if((d_display=XOpenDisplay(display))==NULL){ fprintf(stderr,"%s : Unable to open X display '%s'.\n", NAME, XDisplayName(display)); exit(1); } _XA_GNUSTEP_WM_FUNC=XInternAtom(d_display, "_GNUSTEP_WM_FUNCTION", false); deleteWin=XInternAtom(d_display, "WM_DELETE_WINDOW", false); w_root=DefaultRootWindow(d_display); XWMHints wmhints; XSizeHints shints; shints.x=0; shints.y=0; shints.flags=0; bool pos=(XWMGeometry(d_display, DefaultScreen(d_display), position, NULL, 0, &shints, &shints.x, &shints.y, &shints.width, &shints.height, &shints.win_gravity) & (XValue | YValue)); shints.min_width=winsize; shints.min_height=winsize; shints.max_width=winsize; shints.max_height=winsize; shints.base_width=winsize; shints.base_height=winsize; shints.flags=PMinSize | PMaxSize | PBaseSize; createWin(&w_main, shints.x, shints.y); if(wmaker || astep || pos) shints.flags |= USPosition; if(wmaker){ wmhints.initial_state=WithdrawnState; wmhints.flags=WindowGroupHint | StateHint | IconWindowHint; createWin(&w_icon, shints.x, shints.y); w_activewin=w_icon; wmhints.icon_window=w_icon; } else{ wmhints.initial_state=NormalState; wmhints.flags=WindowGroupHint | StateHint; w_activewin=w_main; } wmhints.window_group=w_main; XSetWMHints(d_display, w_main, &wmhints); XSetWMNormalHints(d_display, w_main, &shints); XSetCommand(d_display, w_main, argv, argc); XStoreName(d_display, w_main, NAME); XSetIconName(d_display, w_main, NAME); XSetWMProtocols(d_display, w_activewin, &deleteWin, 1); } void freeXWin(){ XDestroyWindow(d_display, w_main); if(wmaker) XDestroyWindow(d_display, w_icon); XCloseDisplay(d_display); } void createWin(Window *win, int x, int y){ XClassHint classHint; *win=XCreateSimpleWindow(d_display, w_root, x, y, winsize, winsize, 0, 0, 0); classHint.res_name=const_cast(NAME); classHint.res_class=const_cast(CLASS); XSetClassHint(d_display, *win, &classHint); } unsigned long getColor(char *colorname){ XColor color; XWindowAttributes winattr; XGetWindowAttributes(d_display, w_root, &winattr); color.pixel=0; XParseColor(d_display, winattr.colormap, colorname, &color); color.flags=DoRed | DoGreen | DoBlue; XAllocColor(d_display, winattr.colormap, &color); return color.pixel; } unsigned long mixColor(char *colorname1, int prop1, char *colorname2, int prop2){ XColor color, color1, color2; XWindowAttributes winattr; XGetWindowAttributes(d_display, w_root, &winattr); XParseColor(d_display, winattr.colormap, colorname1, &color1); XParseColor(d_display, winattr.colormap, colorname2, &color2); color.pixel=0; color.red=(color1.red*prop1+color2.red*prop2)/(prop1+prop2); color.green=(color1.green*prop1+color2.green*prop2)/(prop1+prop2); color.blue=(color1.blue*prop1+color2.blue*prop2)/(prop1+prop2); color.flags=DoRed | DoGreen | DoBlue; XAllocColor(d_display, winattr.colormap, &color); return color.pixel; } void scanArgs(int argc, char **argv){ for(int i=1;i\n"); fprintf(stderr, "This software comes with ABSOLUTELY NO WARRANTY\n"); fprintf(stderr, "This software is free software, and you are welcome to redistribute it\n"); fprintf(stderr, "under certain conditions\n"); fprintf(stderr, "See the README file for a more complete notice.\n\n"); fprintf(stderr, "usage:\n\n %s [options]\n\noptions:\n\n",argv[0]); fprintf(stderr, " -h | -help | --help display this help screen\n"); fprintf(stderr, " -w use WithdrawnState (for WindowMaker)\n"); fprintf(stderr, " -s shaped window\n"); fprintf(stderr, " -a use smaller window (for AfterStep Wharf)\n"); fprintf(stderr, " -f artwork_file load the specified artwork file\n"); fprintf(stderr, " -t track_selection set track selection (between 0 and 4)\n"); fprintf(stderr, " -v volume set the cdrom volume (between 0 and 255)\n"); fprintf(stderr, " -i interval interval in 1/20 seconds between cd polls when empty\n"); fprintf(stderr, " -l led_color use the specified color for led displays\n"); fprintf(stderr, " -b back_color use the specified color for backgrounds\n"); fprintf(stderr, " -d cd_device use specified device (rather than /dev/cdrom)\n"); fprintf(stderr, " -position position set window position (see X manual pages)\n"); fprintf(stderr, " -display display select target display (see X manual pages)\n\n"); exit(0); } if(strcmp(argv[i], "-w")==0) wmaker=!wmaker; if(strcmp(argv[i], "-s")==0) ushape=!ushape; if(strcmp(argv[i], "-a")==0) astep=!astep; if(strcmp(argv[i], "-t")==0){ if(idoStatus(); mode=cdctl->getStatusState(); track=cdctl->getStatusTrack(); if(mode==ssStopped){ if(tdisplay==0) pos=0; if(tdisplay==1) pos=cdctl->getTrackStart(track); } if(mode==ssPlaying || mode==ssPaused){ if(tdisplay==0) pos=cdctl->getStatusPosRel(); if(tdisplay==1) pos=cdctl->getStatusPosAbs(); } bool umode=mode!=oldmode || forced; bool utrack=umode || (!(mode==ssNoCD || mode==ssTrayOpen) && track!=oldtrack); bool utimer=utrack || ((mode==ssPlaying || mode==ssPaused || mode==ssStopped) && (int)(pos/75)!=(int)(oldpos/75)); if(utimer){ if(umode) update(); if(utrack){ if(mode==ssNoCD || mode==ssTrayOpen) sprintf(trackstr, " "); else sprintf(trackstr, "%2d", cdctl->getStatusTrack()); if(art_showled[1]) drawText(art_ledpos[1][0], art_ledpos[1][1], trackstr); } if(mode==ssPlaying || mode==ssPaused || mode==ssStopped){ int remain = 0; if(tdisplay==0) remain=cdctl->getTrackLen(cdctl->getStatusTrack())-pos; if(tdisplay==1) remain=cdctl->getCDLen()-pos; if(remain<2250) sprintf(timestr, " -;%02d", remain/75); else sprintf(timestr, "%2d:%02d", (pos/75)/60, (pos/75)%60); } if(art_showled[0]) drawText(art_ledpos[0][0], art_ledpos[0][1], timestr); repaint(); } } void pressEvent(XButtonEvent *xev){ int x=xev->x-(winsize/2-32); int y=xev->y-(winsize/2-32); int btn=-1; for(int i=0;i=art_ledpos[3][0] && y>=art_ledpos[3][1] && x<=art_ledpos[3][0]+art_ledsize[4] && y<=art_ledpos[3][1]+art_ledsize[5]){ int tsels[] = { tsNone, tsNext, tsRepeat, tsRepeatCD, tsRandom }; tsel++; if(tsel>=5) tsel=0; cdctl->setTrackSelection(tsels[tsel]); XCopyArea(d_display, pm_tled, pm_disp, gc_gc, (art_ledsize[4]+1)*tsel, 0, art_ledsize[4], art_ledsize[5], art_ledpos[3][0], art_ledpos[3][1]); repaint(); return; } } if(art_showled[0]){ if(x>=art_ledpos[0][0] && y>=art_ledpos[0][1] && x<=art_ledpos[0][0]+(art_ledsize[0]+1)*9-1 && y<=art_ledpos[0][1]+art_ledsize[1]){ tdisplay++; if(tdisplay>=2) tdisplay=0; checkStatus(false); return; } } } else{ int action=art_actptr[6*btn+mode]; int acmds[]={ acStop, acPlay, acPause, acResume, acPrev, acNext, acRewd, acFFwd, acEject, acClose }; if(action>0){ int acmd=acmds[action-1]; cdctl->doAudioCommand(acmd); checkStatus(false); } } } void repaint(){ XCopyArea(d_display, pm_disp, w_activewin, gc_gc, 0, 0, 64, 64, winsize/2-32, winsize/2-32); XEvent xev; while(XCheckTypedEvent(d_display, Expose, &xev)); } void update(){ if(mode==ssData) sprintf(timestr, "DA_TA"); if(mode==ssNoCD) sprintf(timestr, "NO;CD"); if(mode==ssTrayOpen) sprintf(timestr, "OP_EN"); XPoint mply[art_nbtns]; if(pm_cdmask!=None){ XSetForeground(d_display, gc_bitgc, 0); XCopyArea(d_display, pm_cdmask, pm_mask, gc_bitgc, 0, 0, 64, 64, 0, 0); for(int i=0; i=5){ fseek(artfile, -strlen(buf), SEEK_CUR); char *block=readBlock(artfile); if(keynum==5){ int items=arrayItems(block); art_btnptr=(int *)malloc(sizeof(int)*items); readArrayInt(block, art_btnptr, items); } if(keynum==6){ int items=arrayItems(block); art_actptr=(int *)malloc(sizeof(int)*items); readArrayInt(block, art_actptr, items); } if(keynum==7){ strncpy(buf, strchr(block+strlen(keystr[keynum-1]), '\n')+1, 250); *strchr(buf, '\n')='\0'; int w,h; if(strncmp(buf, "static const char * cdplayer_xpm", strlen("static const char * cdplayer_xpm"))==0) createPixmap(NULL, block, &pm_cd, &pm_cdmask, NULL, NULL); if(strncmp(buf, "static const char * symbols_xpm", strlen("static const char * symbols_xpm"))==0){ createPixmap(NULL, block, &pm_sym, &pm_symmask, &w, &h); art_symsize[0]=(w+1)/11-1; art_symsize[1]=h; } if(strncmp(buf, "static const char * led_xpm", strlen("static const char * led_xpm"))==0){ createPixmap(NULL, block, &pm_led, NULL, &w, &h); art_ledsize[0]=(w+1)/strlen(chrset)-1; art_ledsize[1]=h; } if(strncmp(buf, "static const char * ledsym_xpm", strlen("static const char * ledsym_xpm"))==0){ createPixmap(NULL, block, &pm_sled, NULL, &w, &h); art_ledsize[2]=(w+1)/6-1; art_ledsize[3]=h; } if(strncmp(buf, "static const char * ledtsel_xpm", strlen("static const char * ledtsel_xpm"))==0){ createPixmap(NULL, block, &pm_tled, NULL, &w, &h); art_ledsize[4]=(w+1)/5-1; art_ledsize[5]=h; } } free(block); } } } fclose(artfile); return true; } char *readBlock(FILE *dfile){ char buf[256]; long bytes=0; char *block=NULL; do{ if (fgets(buf, 250, dfile) == NULL) { fprintf(stderr,"%s : Error reading artwork file.\n", NAME); return NULL; } int buflen=strlen(buf); block=(char *)realloc(block, sizeof(char)*(bytes+buflen+1)); strcpy(block+bytes, buf); bytes+=buflen; } while(strstr(buf, "}")==NULL); return block; } int arrayItems(char *buf){ int items=1; char *bufptr=buf; while((bufptr=strstr(bufptr, ","))!=NULL){ bufptr++; items++; }; return items; } void readArrayInt(char *buf, int *array, int n){ char *bufptr; bufptr=strtok(buf, "{,}"); for(int i=0;i("back_color"), NULL, color[0]}, {const_cast("led_color_high"), NULL, color[1]}, {const_cast("led_color_med"), NULL, color[2]}, {const_cast("led_color_low"), NULL, color[3]}}; xpmattr.numsymbols=4; xpmattr.colorsymbols=xpmcsym; xpmattr.exactColors=false; xpmattr.closeness=40000; xpmattr.valuemask=XpmColorSymbols | XpmExactColors | XpmCloseness | XpmSize; if(data!=NULL) XpmCreatePixmapFromData(d_display, w_root, const_cast(data), image, mask, &xpmattr); else XpmCreatePixmapFromBuffer(d_display, w_root, buf, image, mask, &xpmattr); if(width!=NULL) *width=xpmattr.width; if(height!=NULL) *height=xpmattr.height; } void setBtnList(int *bset){ // Create a list of pointers to button data. // So, for example, data for button 2 can be accessed as art_btnlist[2]; // Also, the y co-ordinate of its symbol would be art_btnlist[2][1] art_btnlist=(int **)malloc(art_nbtns*sizeof(int *)); int curpos=0; for(int i=0;i