wmclockmon: include sample config-files in dist tar-ball
[dockapps.git] / wmmp3 / buttons.c
blobdd9d944d1ba815544063d74045ff4ed57e439eaa
1 /*
2 * wmmp3
3 * Copyright (c)1999 Patrick Crosby <xb@dotfiles.com>.
4 * This software covered by the GPL. See COPYING file for details.
6 * buttons.c
8 * This file contains button code.
10 * $Id: mpg123ctl.c,v 1.12 1999/10/08 06:21:41 pcrosby Exp $
13 #include "wmgeneral.h"
14 #include "buttons.h"
16 struct coord {
17 int x;
18 int y;
19 int w;
20 int h;
23 struct coord btn_pos[] = {
24 {35, 34, 12, 11}, /* stop */
25 {46, 34, 12, 11}, /* play */
26 {35, 45, 12, 11}, /* back */
27 {46, 45, 12, 11}, /* next */
28 {6, 34, 12, 11}, /* prev_dir */
29 {17, 34, 12, 11}, /* random */
30 {6, 45, 12, 11}, /* next_dir */
31 {17, 45, 12, 11}, /* repeat */
32 {5, 18, 54, 12} /* song title */
35 struct coord btn_up[] = {
36 {35, 70, 12, 11}, /* stop */
37 {46, 70, 12, 11}, /* play */
38 {35, 81, 12, 11}, /* back */
39 {46, 81, 12, 11}, /* next */
40 {6, 70, 12, 11}, /* prev_dir */
41 {17, 70, 12, 11}, /* random */
42 {6, 81, 12, 11}, /* next_dir */
43 {17, 81, 12, 11} /* repeat */
46 struct coord btn_down[] = {
47 {35, 97, 12, 11}, /* stop */
48 {46, 97, 12, 11}, /* play */
49 {35, 108, 12, 11}, /* back */
50 {46, 108, 12, 11}, /* next */
51 {6, 97, 12, 11}, /* prev_dir */
52 {17, 97, 12, 11}, /* random */
53 {6, 108, 12, 11}, /* next_dir */
54 {17, 108, 12, 11} /* repeat */
57 struct coord btn_gray[] = {
58 {95, 70, 12, 11}, /* stop */
59 {106, 70, 12, 11}, /* play */
60 {95, 81, 12, 11}, /* back */
61 {106, 81, 12, 11}, /* next */
62 {66, 70, 12, 11}, /* prev_dir */
63 {77, 70, 12, 11}, /* random */
64 {66, 81, 12, 11}, /* next_dir */
65 {77, 81, 12, 11} /* repeat */
68 void button_down(int i)
70 copyXPMArea(btn_down[i].x, btn_down[i].y, btn_down[i].w, btn_down[i].h,
71 btn_pos[i].x, btn_pos[i].y);
74 void button_up(int i)
76 copyXPMArea(btn_up[i].x, btn_up[i].y, btn_up[i].w, btn_up[i].h,
77 btn_pos[i].x, btn_pos[i].y);
80 void button_gray(int i)
82 copyXPMArea(btn_gray[i].x, btn_gray[i].y, btn_gray[i].w, btn_gray[i].h,
83 btn_pos[i].x, btn_pos[i].y);