blob: 9c67aef3fbc701932610c2e24a797c91b1dfbd06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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() --- */
|