-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.c
126 lines (108 loc) · 2.37 KB
/
app.c
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*
app.c (22.02.2015)
Custom commodity functions not
directly related to TempMon-functionality
based on app.c from DevCon '90 example
by Commodore-Amiga, Inc.
*/
#include "app.h"
#include "TempMon_rev.h"
#include "TempMon.h"
#include <proto/dos.h>
#include <ctype.h>
#include <proto/gadtools.h>
#include <libraries/gadtools.h>
#include <intuition/intuition.h>
//#include <stdlib.h>
#define V(x) ((VOID *)x)
#define DEBUG 1
BOOL IDCMPRefresh = FALSE;
BOOL setupCustomCX()
{
return(setupIHelp());
}
VOID shutdownCustomCX()
{
}
VOID handleCustomCXMsg(id)
ULONG id;
{
switch(id)
{
case 0:
default:
MyHandleCXMsg(id);
break;
}
}
VOID handleCustomCXCommand(id)
ULONG id;
{
switch(id)
{
case 0:
default:
break;
}
}
#if CSIGNAL
VOID handleCustomSignal(VOID)
{
}
#endif
/****handleIMsg() ******************************************
*
* NAME
* handleIMsg -- Handle window IDCMP messages.
*
* SYNOPSIS
* handleIMsg(msg);
*
* VOID handleIMsg(struct IntuiMessage *msg);
*
* FUNCTION
* This function handles all the IntuiMessages for standard
* commodities functions. If the message is for an application
* Gadget or Menu the appropriate application function,
* handleCustomMenu() or HandleGadget(), is called.
*
* INPUTS
* msg = The current IntuiMessage.
*
* RESULT
* The appropriate action for the message is performed.
*
*****************************************************************************
*
*/
VOID handleIMsg(struct IntuiMessage *msg, UBYTE port)
{
ULONG msg_Class;
UWORD code;
msg_Class = msg->Class;
code = msg->Code;
#if DEBUG
Printf("Received a message, class %ld, code %ld\n", msg_Class, code);
#endif
/* handleIMsg() */
GT_ReplyIMsg( (struct IntuiMessage *) msg );
switch ( msg_Class )
{
case IDCMP_REFRESHWINDOW:
Printf("Refreshing Window...\n");
IDCMPRefresh=TRUE;
refreshWindow();
IDCMPRefresh=FALSE;
break;
case IDCMP_MENUPICK:
break;
case IDCMP_VANILLAKEY:
break;
case IDCMP_RAWKEY:
//handleRawKey(code);
break;
case IDCMP_MOUSEBUTTONS:
//terminate();
break;
}
}