summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/src/eventhandler.hcc
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-11-11 10:27:31 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-11-11 10:27:31 (GMT)
commit9877678730e53e9ee99241a8ab5babe35eacf28d (patch)
tree275313725d8a1816a665b892c6116549e26f24a7 /Graphic_Equalizer/src/eventhandler.hcc
parent51085a870cc074c3eeef5a6ba1b45503ce0e0f4d (diff)
downloadTASS-9877678730e53e9ee99241a8ab5babe35eacf28d.zip
TASS-9877678730e53e9ee99241a8ab5babe35eacf28d.tar.gz
TASS-9877678730e53e9ee99241a8ab5babe35eacf28d.tar.bz2
Diffstat (limited to 'Graphic_Equalizer/src/eventhandler.hcc')
-rw-r--r--Graphic_Equalizer/src/eventhandler.hcc27
1 files changed, 15 insertions, 12 deletions
diff --git a/Graphic_Equalizer/src/eventhandler.hcc b/Graphic_Equalizer/src/eventhandler.hcc
index b9b6b1f..b614d28 100644
--- a/Graphic_Equalizer/src/eventhandler.hcc
+++ b/Graphic_Equalizer/src/eventhandler.hcc
@@ -24,12 +24,17 @@
#include "pal_master.hch"
/******** Application Includes ********/
+#include "configuration.hch"
#include "mouse_shared.hch"
#include "display_shared.hch"
#include "eventhandler_shared.hch"
#include "eventhandler.hch"
+#if HAVE_DEBUG
+ #include "debug.hch"
+#endif
+extern chan unsigned 1 maskupdate_notification;
/*! \fn void eventhandler_main(events_t *events, mousedata_t *mousedata);
* \brief
@@ -40,26 +45,24 @@
* \return Never Returns.
* \retval void
*/
-void eventhandler_main(events_t *events, mousedata_t *mousedata) {
- extern chan unsigned 1 mousedata_notification;
-
+macro proc eventhandler_main(events, mousedata) {
unsigned 5 volume_left;
- unsigned 1 newmousedata;
+ unsigned 1 newmaskupdate;
for (;;) {
- mousedata_notification ? newmousedata;
+ maskupdate_notification ? newmaskupdate;
/*
* First we determine what mousestate we currently have. Then
* we check where we are to decide what to do.
*/
- switch (mousedata->state) {
+ switch (mousedata.state) {
case MOUSE_STATE_ON_PRESS:
/*
* If the current mask equals the help button
* we flip the help bit.
*/
- if (BUTTON_HELP == events->mask) {
- events->help = !events->help;
+ if (BUTTON_HELP == events.mask) {
+ events.help = !events.help;
} else {
delay;
}
@@ -69,18 +72,18 @@ void eventhandler_main(events_t *events, mousedata_t *mousedata) {
* If we are in the volume area we update the
* volume level for both channels.
*/
- if (AREA_VOLUME_YAXIS) {
+ if (AREA_VOLUME_YAXIS == events.mask) {
/*
* Copy the current Y cursor position
* to the events struct. This we then
* later use for drawing purposes.
*/
- events->volume_position = 0 @ mousedata->y;
+ events.volume_position = 0 @ mousedata.y;
/*
* Look the relative y-coordinate up in
* the volumecontrol lookup table.
*/
- volume_left = volumecontrol_table[((mousedata->y) -65) <- 6];
+ volume_left = volumecontrol_table[((mousedata.y) -65) <- 6];
/*
* We feel that volume gets softer the
* closer it gets to the 0, and louder
@@ -92,7 +95,7 @@ void eventhandler_main(events_t *events, mousedata_t *mousedata) {
} else {
delay;
}
- if ((AREA_EQUALIZER_MIN <= events->mask) && (events->mask <= AREA_EQUALIZER_MAX)) {
+ if ((AREA_EQUALIZER_MIN <= events.mask) && (events.mask <= AREA_EQUALIZER_MAX)) {
delay;
} else {
delay;