-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathackstring.c
More file actions
56 lines (48 loc) · 1.4 KB
/
ackstring.c
File metadata and controls
56 lines (48 loc) · 1.4 KB
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
/******************************************************************************
* AckString *
* Automatically acknowledges string contents when the gadget goes inactive! *
******************************************************************************/
///Includes
#include <proto/exec.h>
#include <proto/utility.h> // <-- Required for tag redirection
#include <libraries/mui.h>
#include <proto/muimaster.h>
#include <clib/alib_protos.h> // <-- Required for DoSuperMethod()
#include <SDI_compiler.h> // Required for
#include <SDI_hook.h> // <-- multi platform
#include <SDI_stdarg.h> // compatibility
#include "dosupernew.h"
#include "ackstring.h"
///
///Structs
struct cl_Data
{
//<SUBCLASS VARIABLES HERE>
};
struct cl_Msg
{
ULONG MethodID;
//<SUBCLASS METHOD MESSAGE PAYLOAD HERE>
};
///
//<DEFINE SUBCLASS METHODS HERE>
///Dispatcher
SDISPATCHER(cl_Dispatcher)
{
struct cl_Data *data;
if (! (msg->MethodID == OM_NEW)) data = INST_DATA(cl, obj);
switch(msg->MethodID)
{
case MUIM_GoInactive:
DoMethod(obj, MUIM_Set, MUIA_String_Acknowledge, TRUE);
default:
return DoSuperMethodA(cl, obj, msg);
}
}
///
///Class Creator
struct MUI_CustomClass* MUI_Create_AckString(void)
{
return (MUI_CreateCustomClass(NULL, MUIC_String, NULL, sizeof(struct cl_Data), ENTRY(cl_Dispatcher)));
}
///