summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/src/mouse.hcc
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-12-09 14:00:26 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-12-09 14:00:26 (GMT)
commitb0ae032ae5712e38471c9347af289f3e50b0a08a (patch)
tree5f98113107975ddcc484cffb27625e09d015f504 /Graphic_Equalizer/src/mouse.hcc
parent593d5fded11b8723ce27883e06865ab205c6f008 (diff)
downloadTASS-b0ae032ae5712e38471c9347af289f3e50b0a08a.zip
TASS-b0ae032ae5712e38471c9347af289f3e50b0a08a.tar.gz
TASS-b0ae032ae5712e38471c9347af289f3e50b0a08a.tar.bz2
Added defines makeing it possible to split the application in various parts namely:
Loader (loads data from the smart media into ram) Equalizer (The 'normal' known application) Visualization (The graphical visualization)
Diffstat (limited to 'Graphic_Equalizer/src/mouse.hcc')
-rw-r--r--Graphic_Equalizer/src/mouse.hcc131
1 files changed, 0 insertions, 131 deletions
diff --git a/Graphic_Equalizer/src/mouse.hcc b/Graphic_Equalizer/src/mouse.hcc
deleted file mode 100644
index 61ce619..0000000
--- a/Graphic_Equalizer/src/mouse.hcc
+++ /dev/null
@@ -1,131 +0,0 @@
-/*! \file mouse.hcc
- *
- * \section generic This module takes care of mouse input. The mouse
- * input function itself is however performed by the
- * touchscreen of the RC200.
- *
- * \section project Project information.
- * Project Graphic Equalizer\n
- * \author O.M. Schinagl
- * \date 20041011
- * \version 0.1
- *
- * \section copyright Copyright
- * Copyright ©2004 Koninklijke Philips Electronics N.V. All rights reserved
- *
- * \section history Change history
- * 20041011: O.M. Schinagl\n Initial version
- *
- ********************************************************************/
-
-/******** System Includes *************/
-#include <stdlib.hch>
-
-#include "pal_master.hch"
-#include "pal_mouse.hch"
-
-/******** Application Includes ********/
-#include "configuration.hch"
-#include "mouse_shared.hch"
-#include "mouse.hch"
-
-#if HAVE_DEBUG
- #include "debug.hch"
-#endif
-
-
-
-/*! \fn void mouse_main(mousedata_t *mousedata);
- * \brief Main mousedriver. This function never returns! It calls the
- * main mousehandler and returns the States and coordinates
- * into a shared store.
- *
- * \param *mousedata Storage for all mousedata and states.
- *
- * \return Never Returns.
- * \retval void
- */
-void mouse_main(mousedata_t *mousedata) {
- unsigned 18 touch_sampler;
- unsigned 10 x, oldx;
- unsigned 9 y, oldy;
- unsigned 3 mousestate, oldmousestate;
- unsigned 1 touch, touched, oldtouched;
-
- /*
- * We only check for mouse states once every 2^18 time. This to
- * overcome the sampling of the 'Touch' state of the RC200 libs. When
- * using newer libs this might be overkill, e.g. smaller values may
- * work or sampling all together will be redundant.
- */
- touch_sampler = 1;
- while (TRUE) {
- if (!touch_sampler) {
- /*
- * We are here ready to set mouse states. We compare
- * current and previous states and thereby determine
- * the state to send to others
- */
- if (touched) {
- if(oldtouched) {
- mousestate = MOUSE_STATE_DOWN;
- } else {
- mousestate = MOUSE_STATE_ON_PRESS;
- }
- oldtouched = TRUE;
- } else {
- if(oldtouched) {
- mousestate = MOUSE_STATE_ON_RELEASE;
- } else {
- mousestate = MOUSE_STATE_UP;
- }
- oldtouched = FALSE;
- }
- /*
- * We have now processed our Touch. Reset it for the
- * next run.
- */
- touched = FALSE;
-
- /*
- * In the rare occurance that we receive values
- * beyond our range, we set them to some sane
- * values here.
- */
- x = (x > 639) ? 0 : x;
- y = (y > 479) ? 0 : y;
-
- /*
- * Compare Previous States and Coordinates to determine
- * wether they have changed. If so, Copy them into
- * shared memory, notify the listening processes and
- * Set the new as previous values for the next run. We
- * can only do this when the display has handled all
- * changes.
- */
- if (((oldmousestate != mousestate) || (oldx != x) || (oldy != y)) && (MOUSE_NOT_UPDATED == mousedata->status)) {
- //par {
- oldx = x;
- oldy = y;
- oldmousestate = mousestate;
- mousedata->x = x;
- mousedata->y = 0 @ y;
- mousedata->state = mousestate;
- mousedata->status = MOUSE_UPDATED;
- //}
- }
- }
-
- /*
- * Read the current X and Y of the 'cursor' and register wether
- * the display was touched. If touched store this in a local
- * store. This we do to catch the sampling of the RC200 lib.
- */
- RC200TouchScreenReadScaled(&x, &y, &touch);
- if (touch) {
- touched = TRUE;
- }
-
- touch_sampler++;
- }
-} /* --- mouse_main() --- */