wmail: fixed possible NULL-pointer dereference in config-parser.
[dockapps.git] / wmmp3 / buttons.c
blob98bfd10a52a880d1f3b9d9013b12dbf9d9f797d3
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 "buttons.h"
15 struct coord {
16 int x;
17 int y;
18 int w;
19 int h;
22 struct coord btn_pos[] = {
23 {35, 34, 12, 11}, /* stop */
24 {46, 34, 12, 11}, /* play */
25 {35, 45, 12, 11}, /* back */
26 {46, 45, 12, 11}, /* next */
27 {6, 34, 12, 11}, /* prev_dir */
28 {17, 34, 12, 11}, /* random */
29 {6, 45, 12, 11}, /* next_dir */
30 {17, 45, 12, 11}, /* repeat */
31 {5, 18, 54, 12} /* song title */
34 struct coord btn_up[] = {
35 {35, 70, 12, 11}, /* stop */
36 {46, 70, 12, 11}, /* play */
37 {35, 81, 12, 11}, /* back */
38 {46, 81, 12, 11}, /* next */
39 {6, 70, 12, 11}, /* prev_dir */
40 {17, 70, 12, 11}, /* random */
41 {6, 81, 12, 11}, /* next_dir */
42 {17, 81, 12, 11} /* repeat */
45 struct coord btn_down[] = {
46 {35, 97, 12, 11}, /* stop */
47 {46, 97, 12, 11}, /* play */
48 {35, 108, 12, 11}, /* back */
49 {46, 108, 12, 11}, /* next */
50 {6, 97, 12, 11}, /* prev_dir */
51 {17, 97, 12, 11}, /* random */
52 {6, 108, 12, 11}, /* next_dir */
53 {17, 108, 12, 11} /* repeat */
56 struct coord btn_gray[] = {
57 {95, 70, 12, 11}, /* stop */
58 {106, 70, 12, 11}, /* play */
59 {95, 81, 12, 11}, /* back */
60 {106, 81, 12, 11}, /* next */
61 {66, 70, 12, 11}, /* prev_dir */
62 {77, 70, 12, 11}, /* random */
63 {66, 81, 12, 11}, /* next_dir */
64 {77, 81, 12, 11} /* repeat */
67 void button_down(int i)
69 copyXPMArea(btn_down[i].x, btn_down[i].y, btn_down[i].w, btn_down[i].h,
70 btn_pos[i].x, btn_pos[i].y);
73 void button_up(int i)
75 copyXPMArea(btn_up[i].x, btn_up[i].y, btn_up[i].w, btn_up[i].h,
76 btn_pos[i].x, btn_pos[i].y);
79 void button_gray(int i)
81 copyXPMArea(btn_gray[i].x, btn_gray[i].y, btn_gray[i].w, btn_gray[i].h,
82 btn_pos[i].x, btn_pos[i].y);