Make AddMouseRegion's index unsigned
[dockapps.git] / wmradio / wmradio.h
blob5b2a4d3f19221fdb40e449eaf28ba1ae9e5c8681
1 /*
2 * Copyright (C) 12 Jun 2003 Tomas Cermak
4 * This file is part of wmradio program.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #ifndef _WMRADIO_H_
22 #define _WMRADIO_H_
23 #include "config.h"
25 #define VERSION "0.9"
26 #define PACKAGE "wmradio"
28 #define SCAN_NO_CHANGE 0
29 #define SCAN_START 1
30 #define SCAN_STOP 2
32 #define REVENT_MOUSE_MOVE 1
33 #define REVENT_BUTTON_PRESS 2
34 #define REVENT_BUTTON_RELEASE 3
35 #define REVENT_TIMER 4
36 #define REVENT_QUIT 5
37 #define REVENT_EXPOSE 6
38 #define REVENT_SCROLL_UP 7
39 #define REVENT_SCROLL_DOWN 8
41 #define CONTROL_STATE_PRESSED 1
42 #define CONTROL_STATE_NOT_PRESSED 0
44 typedef
45 struct {
46 char type;
47 unsigned int x;
48 unsigned int y;
49 char button;
50 char control;
51 char shift;
52 } RadioEvent;
54 typedef
55 struct {
56 int radiofd;
57 char is_on;
58 char current_station;
59 int current_freq;
60 char scan_in_progress;
61 char dont_quit_mode;
62 } RadioInfo;
64 typedef enum {
65 POWER_SWITCH,
66 TUNE_MINUS,
67 TUNE_PLUS,
68 SET_PRESET,
69 SAVE_PRESET,
70 SCAN,
71 TUNE_NAME_PREV,
72 TUNE_NAME_NEXT,
73 READ_CONFIG
74 } RadioCommand;
76 void wmradio_handle_event(RadioEvent *e);
77 void wmradio_command(RadioCommand command, int value);
78 void wmradio_next_station(void);
79 void wmradio_prev_station(void);
80 RadioInfo *wmradio_radio_info(void);
81 void wmradio_init_radio_info(void);
82 int wmradio_init(void);
83 void wmradio_done(void);
85 #endif