summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/src/eventhandler.hcc
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-11-10 12:45:18 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-11-10 12:45:18 (GMT)
commit9451e82004bb59a95d9589058759169c1c486c91 (patch)
tree991c9238e4290ed097f0d02494dc80c0f10c68f1 /Graphic_Equalizer/src/eventhandler.hcc
parentb7b9f1ff4da4dae9d4c14ee5e03a7555b254c31c (diff)
downloadTASS-9451e82004bb59a95d9589058759169c1c486c91.zip
TASS-9451e82004bb59a95d9589058759169c1c486c91.tar.gz
TASS-9451e82004bb59a95d9589058759169c1c486c91.tar.bz2
First Real Version
Diffstat (limited to 'Graphic_Equalizer/src/eventhandler.hcc')
-rw-r--r--Graphic_Equalizer/src/eventhandler.hcc71
1 files changed, 71 insertions, 0 deletions
diff --git a/Graphic_Equalizer/src/eventhandler.hcc b/Graphic_Equalizer/src/eventhandler.hcc
new file mode 100644
index 0000000..9c67aef
--- /dev/null
+++ b/Graphic_Equalizer/src/eventhandler.hcc
@@ -0,0 +1,71 @@
+/*! \file eventhandler.hcc
+ *
+ * \section generic This modules coordinates all events. Thus for example
+ * when the mousehandler registers a 'click' we coordinate
+ * the actions that follow that click.
+ *
+ * \section project Project information.
+ * Project Graphic Equalizer\n
+ * \author O.M. Schinagl
+ * \date 20041110
+ * \version 0.1
+ *
+ * \section copyright Copyright
+ * Copyright ©2004 Koninklijke Philips Electronics N.V. All rights reserved
+ *
+ * \section history Change history
+ * 20041110: O.M. Schinagl\n Initial version
+ *
+ ********************************************************************/
+
+/******** System Includes *************/
+#include <stdlib.hch>
+
+#include "pal_master.hch"
+
+/******** Application Includes ********/
+#include "eventhandler.hch"
+#include "eventhandler_shared.hch"
+#include "mouse_shared.hch"
+#include "display_shared.hch"
+
+
+
+/*! \fn void eventhandler_main(events_t *events, mousedata_t *mousedata);
+ * \brief
+ *
+ * \param events_t *events pointer to struct with all events.
+ * \param mousedata_t *mousedata pointer to struct with mouse data.
+ *
+ * \return Never Returns.
+ * \retval void
+ */
+void eventhandler_main(events_t *events, mousedata_t *mousedata) {
+ extern chan unsigned 1 mousedata_notification;
+
+ unsigned 5 volume_left;
+ unsigned 1 newmousedata;
+
+ for (;;) {
+ /*
+ * First we determine what mousestate we currently have. Then
+ * we check where we are to decide what to do.
+ */
+ switch (mousedata->state) {
+ case MOUSE_STATE_DOWN:
+ if (BUTTON_HELP == events->mask) {
+ events->help = !events->help;
+ }
+ break;
+ case MOUSE_STATE_ON_PRESS:
+ if (AREA_VOLUME_YAXIS) {
+ events->volume_position = mousedata->y;
+ volume_left = volume_table[(mousedata->y) -65];
+ RC200SetVolume(!volume_left, volume_left, volume_left);
+ }
+ if ((AREA_EQUALIZER_MIN <= events->mask) && (events->mask <= AREA_EQUALIZER_MAX)) {
+ }
+ break;
+ }
+ }
+} /* --- eventhandler_main() --- */