revert commit 56204.
[AROS.git] / workbench / libs / muimaster / classes / notify.c
blob864e0c1e36cf15c7864d414476b50d7010112b42
1 /*
2 Copyright © 2002-2018, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <stdlib.h>
7 #include <string.h>
9 #include <exec/types.h>
10 #include <clib/alib_protos.h>
11 #include <libraries/commodities.h>
12 #include <proto/commodities.h>
13 #include <proto/exec.h>
14 #include <proto/intuition.h>
15 #include <proto/utility.h>
16 #include <proto/muimaster.h>
18 #include "muimaster_intern.h"
19 #include "mui.h"
20 #include "support.h"
22 #include "notify.h"
24 #define MYDEBUG
25 #include "debug.h"
27 extern struct Library *MUIMasterBase;
29 AROS_UFH2S(void, cpy_func,
30 AROS_UFHA(UBYTE, chr, D0),
31 AROS_UFHA(STRPTR *, strPtrPtr, A3))
33 AROS_USERFUNC_INIT
35 *(*strPtrPtr)++ = chr;
37 AROS_USERFUNC_EXIT
40 AROS_UFH2S(void, len_func,
41 AROS_UFHA(UBYTE, chr, D0),
42 AROS_UFHA(LONG *, lenPtr, A3))
44 AROS_USERFUNC_INIT
46 (*lenPtr)++;
48 AROS_USERFUNC_EXIT
53 * Notify class is superclass of all other MUI classes.
57 MUIA_ApplicationObject [..G] done
58 MUIA_AppMessage [..G] done
59 MUIA_HelpLine [ISG] done
60 MUIA_HelpNode [ISG] done
61 MUIA_NoNotify [.S.] done
62 MUIA_ObjectID [ISG] done
63 MUIA_Parent [..G] done
64 MUIA_Revision [..G] done
65 MUIA_UserData [ISG] done
66 MUIA_Version [..G] done
68 MUIM_CallHook done
69 MUIM_Export dummy & redefine in subclasses w/ children
70 MUIM_FindUData redefine in subclasses w/ children
71 MUIM_GetConfigItem
72 MUIM_GetUData redefine in subclasses w/ children
73 MUIM_Import dummy & redefine in subclasses w/ children
74 MUIM_KillNotify done
75 MUIM_KillNotifyObj done (semantic ?)
76 MUIM_MultiSet done
77 MUIM_NoNotifySet done
78 MUIM_Notify done
79 MUIM_Set done
80 MUIM_SetAsString done
81 MUIM_SetUData redefine in subclasses w/ children
82 MUIM_SetUDataOnce redefine in subclasses w/ children
83 MUIM_WriteLong done
84 MUIM_WriteString done
87 static const int __version = 1;
88 static const int __revision = 1;
90 struct MUI_NotifyAttributes
92 STRPTR na_HelpNode;
93 LONG na_HelpLine;
94 struct AppMessage *na_AppMessage;
98 * Notification handler
100 typedef struct NotifyNode
102 struct MinNode nn_Node;
103 BOOL nn_Active; /* TRUE if notification is currently being handled */
104 /* It's used to prevent loops */
105 ULONG nn_TrigAttr;
106 IPTR nn_TrigVal;
107 APTR nn_DestObj;
108 ULONG nn_NumParams;
109 IPTR *nn_Params; /* FIXME: use nn_Params[1] and tweak stuff below */
110 IPTR *nn_NewParams; /* For MUIV_EveryTime */
111 } *NNode;
113 typedef struct NotifyNodeIX
115 struct NotifyNode nn;
116 IX ix;
117 } *NNodeIX;
119 static struct NotifyNode *CreateNNode(struct MUI_NotifyData *data,
120 struct MUIP_Notify *msg)
122 ULONG i, paramsize;
124 struct NotifyNode *nnode;
126 if ((msg->TrigAttr == MUIA_Window_InputEvent)
127 && (msg->TrigVal != MUIV_EveryTime))
129 IX ix = { IX_VERSION };
131 if (ParseIX((CONST_STRPTR) msg->TrigVal, &ix) != 0)
132 return NULL;
134 if ((nnode =
135 (struct NotifyNode *)mui_alloc_struct(struct NotifyNodeIX)))
137 ((struct NotifyNodeIX *)nnode)->ix = ix;
140 else
142 nnode = mui_alloc_struct(struct NotifyNode);
145 if (!nnode)
146 return NULL;
148 nnode->nn_Active = FALSE;
149 nnode->nn_TrigAttr = msg->TrigAttr;
150 nnode->nn_TrigVal = msg->TrigVal;
151 nnode->nn_DestObj = msg->DestObj;
152 nnode->nn_NumParams = msg->FollowParams;
154 /* Allocate one more IPTR (FollowParams + 1) as some ext apps/classes
155 forget trailing NULLs in methods like MUIM_MultiSet and MUI seems
156 like it can live with that (without crashing) */
158 paramsize = (msg->FollowParams + 1);
159 if (msg->TrigVal == MUIV_EveryTime)
161 paramsize *= 2;
164 if ((nnode->nn_Params = (IPTR *) mui_alloc(paramsize * sizeof(IPTR))))
166 IPTR *par = (IPTR *) & msg->FollowParams;
168 for (i = 0; i < msg->FollowParams; i++)
170 nnode->nn_Params[i] = *(par + i + 1);
173 if (msg->TrigVal == MUIV_EveryTime)
175 nnode->nn_NewParams = nnode->nn_Params + msg->FollowParams + 1;
176 for (i = 0; i < msg->FollowParams; i++)
178 nnode->nn_NewParams[i] = *(par + i + 1);
182 return nnode;
185 mui_free(nnode);
187 return NULL;
190 static void DeleteNNode(struct MUI_NotifyData *data,
191 struct NotifyNode *nnode)
193 mui_free(nnode->nn_Params);
194 mui_free(nnode);
198 IPTR Notify__OM_SET(struct IClass *cl, Object *obj, struct opSet *msg);
201 * OM_NEW
203 IPTR Notify__OM_NEW(struct IClass *cl, Object *obj, struct opSet *msg)
205 struct MUI_NotifyData *data;
206 struct TagItem *tags = msg->ops_AttrList;
207 struct TagItem *tag;
209 obj = (Object *) DoSuperMethodA(cl, obj, (Msg) msg);
210 if (!obj)
211 return FALSE;
213 data = INST_DATA(cl, obj);
215 data->mnd_Attributes = mui_alloc_struct(struct MUI_NotifyAttributes);
216 if (data->mnd_Attributes == NULL)
218 CoerceMethod(cl, obj, OM_DISPOSE);
219 return FALSE;
222 while ((tag = NextTagItem(&tags)) != NULL)
224 switch (tag->ti_Tag)
226 case MUIA_HelpLine:
227 data->mnd_Attributes->na_HelpLine = (LONG) tag->ti_Data;
228 break;
230 case MUIA_HelpNode:
231 data->mnd_Attributes->na_HelpNode = (STRPTR) tag->ti_Data;
232 break;
234 case MUIA_ObjectID:
235 data->mnd_ObjectID = (ULONG) tag->ti_Data;
236 break;
238 case MUIA_UserData:
239 data->mnd_UserData = (IPTR) tag->ti_Data;
240 break;
244 return (IPTR) obj;
249 * OM_DISPOSE
251 IPTR Notify__OM_DISPOSE(struct IClass *cl, Object *obj, Msg msg)
253 struct MinNode *node, *tmp;
254 struct MUI_NotifyData *data = INST_DATA(cl, obj);
256 mui_free(data->mnd_Attributes);
258 if (data->mnd_NotifyList)
260 for (node = data->mnd_NotifyList->mlh_Head; node->mln_Succ;
261 node = tmp)
263 tmp = node->mln_Succ;
264 DeleteNNode(data, (struct NotifyNode *)node);
266 mui_free(data->mnd_NotifyList);
269 return DoSuperMethodA(cl, obj, msg);
272 static void check_notify(NNode nnode, Object *obj, struct TagItem *tag)
274 IPTR *params;
275 APTR destobj;
276 int i;
277 BOOL donotify = FALSE;
279 /* is it the good attribute? */
280 if (tag->ti_Tag != nnode->nn_TrigAttr)
281 return;
283 /* Is the notification already being performed? */
284 if (nnode->nn_Active)
286 static int counter;
288 bug("%s: MUI Notification loop detected! (#%d)\n", FindTask(NULL)->tc_Node.ln_Name, counter++);
289 #if DEBUG
290 D(bug(" Source object: 0x%x", obj));
292 switch ((IPTR) nnode->nn_DestObj)
294 case MUIV_Notify_Application:
295 D(bug(" Dest object: 0x%x (MUIV_Notify_Application)\n",
296 _app(obj)));
297 break;
298 case MUIV_Notify_Self:
299 D(bug(" Dest object: 0x%x (MUIV_Notify_Self)\n", obj));
300 destobj = obj;
301 break;
302 case MUIV_Notify_Window:
303 if (muiRenderInfo(obj)) /* otherwise _win(obj) does NULL access! */
305 D(bug(" Dest object: 0x%x (MUIV_Notify_Window)\n",
306 _win(obj)));
308 else
310 D(bug(" Dest object: INVALID "
311 "(MUIV_Notify_Window, but no muiRenderInfo)\n"));
313 break;
314 default:
315 D(bug(" Dest object: 0x%x\n", nnode->nn_DestObj));
316 break;
318 D(bug(" Attribute: 0x%x Value: 0x%x\n", tag->ti_Tag,
319 tag->ti_Data));
321 #endif
322 return;
325 if (nnode->nn_TrigVal == MUIV_EveryTime)
327 donotify = TRUE;
329 else if (nnode->nn_TrigAttr == MUIA_Window_InputEvent)
331 if (MatchIX((struct InputEvent *)tag->ti_Data,
332 &((struct NotifyNodeIX *)nnode)->ix))
334 donotify = TRUE;
337 else if (nnode->nn_TrigVal == tag->ti_Data)
339 donotify = TRUE;
342 if (donotify)
344 switch ((IPTR) nnode->nn_DestObj)
346 case MUIV_Notify_Application:
347 destobj = _app(obj);
348 break;
349 case MUIV_Notify_Self:
350 destobj = obj;
351 break;
352 case MUIV_Notify_Window:
353 if (muiRenderInfo(obj)) /* otherwise _win(obj) does NULL access! */
355 destobj = _win(obj);
357 else
359 return;
361 break;
362 default:
363 destobj = nnode->nn_DestObj;
366 params = nnode->nn_Params;
367 if (nnode->nn_TrigVal == MUIV_EveryTime)
369 params = nnode->nn_NewParams;
371 for (i = 1; i < nnode->nn_NumParams; i++)
373 switch (nnode->nn_Params[i])
375 case MUIV_TriggerValue:
376 params[i] = tag->ti_Data;
377 break;
379 case MUIV_NotTriggerValue:
380 params[i] = !tag->ti_Data;
381 break;
386 nnode->nn_Active = TRUE;
388 /* call method */
389 DoMethodA(destobj, (Msg) params);
391 nnode->nn_Active = FALSE;
396 * OM_SET
398 IPTR Notify__OM_SET(struct IClass *cl, Object *obj, struct opSet *msg)
400 struct MUI_NotifyData *data = INST_DATA(cl, obj);
401 struct TagItem *tags = msg->ops_AttrList;
402 BOOL no_notify = FALSE;
403 struct TagItem *tag;
404 struct MinNode *node;
406 /* There are many ways to find out what tag items provided by set()
407 ** we do know. The best way should be using NextTagItem() and simply
408 ** browsing through the list.
410 while ((tag = NextTagItem(&tags)) != NULL)
412 switch (tag->ti_Tag)
414 case MUIA_AppMessage:
415 data->mnd_Attributes->na_AppMessage = (struct AppMessage *)tag->ti_Data;
416 break;
418 case MUIA_HelpLine:
419 data->mnd_Attributes->na_HelpLine = (LONG) tag->ti_Data;
420 break;
422 case MUIA_HelpNode:
423 data->mnd_Attributes->na_HelpNode = (STRPTR) tag->ti_Data;
424 break;
426 case MUIA_NoNotify:
427 if (tag->ti_Data == TRUE)
428 no_notify = TRUE;
429 break;
431 case MUIA_ObjectID:
432 data->mnd_ObjectID = (ULONG) tag->ti_Data;
433 break;
435 case MUIA_UserData:
436 data->mnd_UserData = tag->ti_Data;
437 break;
442 * check for notifications
444 if (!data->mnd_NotifyList || no_notify)
445 return 0;
447 tags = msg->ops_AttrList;
448 while ((tag = NextTagItem(&tags)))
450 ForeachNode (data->mnd_NotifyList, node)
452 check_notify((NNode) node, obj, tag);
456 return 0;
461 * OM_GET
463 IPTR Notify__OM_GET(struct IClass *cl, Object *obj, struct opGet *msg)
465 /* small macro to simplify return value storage */
466 #define STORE *(msg->opg_Storage)
468 struct MUI_NotifyData *data = INST_DATA(cl, obj);
470 //kprintf("*** Notify->GET\n");
471 switch (msg->opg_AttrID)
473 case MUIA_ApplicationObject:
474 if (data->mnd_GlobalInfo)
475 STORE = (IPTR) data->mnd_GlobalInfo->mgi_ApplicationObject;
476 else
477 STORE = 0;
478 return TRUE;
480 case MUIA_AppMessage:
481 STORE = (IPTR) data->mnd_Attributes->na_AppMessage;
482 return TRUE;
484 case MUIA_HelpLine:
485 STORE = (IPTR) data->mnd_Attributes->na_HelpLine;
486 return TRUE;
488 case MUIA_HelpNode:
489 STORE = (IPTR) data->mnd_Attributes->na_HelpNode;
490 return TRUE;
492 case MUIA_ObjectID:
493 STORE = (IPTR) data->mnd_ObjectID;
494 return TRUE;
496 case MUIA_Parent:
497 STORE = (IPTR) data->mnd_ParentObject;
498 return TRUE;
500 case MUIA_Revision:
501 STORE = __revision;
502 return TRUE;
504 case MUIA_UserData:
505 STORE = data->mnd_UserData;
506 return TRUE;
508 case MUIA_Version:
509 STORE = __version;
510 return TRUE;
513 return DoSuperMethodA(cl, obj, (Msg) msg);
518 * MUIM_CallHook : Call a standard amiga callback hook, defined by a Hook
519 * structure.
521 IPTR Notify__MUIM_CallHook(struct IClass *cl, Object *obj,
522 struct MUIP_CallHook *msg)
524 if (msg->Hook->h_Entry)
525 return CallHookPkt(msg->Hook, obj, &msg->param1);
526 else
527 return FALSE;
532 * MUIM_Export : to export an object's "contents" to a dataspace object.
534 /* nothing to export */
537 * MUIM_FindUData : tests if the MUIA_UserData of the object
538 * contains the given <udata> and returns the object pointer in this case.
540 IPTR Notify__MUIM_FindUData(struct IClass *cl, Object *obj,
541 struct MUIP_FindUData *msg)
543 struct MUI_NotifyData *data = INST_DATA(cl, obj);
545 if (data->mnd_UserData == msg->udata)
547 return (IPTR) obj;
549 return 0L;
554 * MUIM_GetUData : This method tests if the MUIA_UserData of the object
555 * contains the given <udata> and gets <attr> to <storage> for itself
556 * in this case.
558 IPTR Notify__MUIM_GetUData(struct IClass *cl, Object *obj,
559 struct MUIP_GetUData *msg)
561 struct MUI_NotifyData *data = INST_DATA(cl, obj);
563 if (data->mnd_UserData == msg->udata)
565 get(obj, msg->attr, msg->storage);
566 return TRUE;
568 return FALSE;
573 * MUIM_Import : to import an object's "contents" from a dataspace object.
575 /* nothing to import */
578 * MUIM_KillNotify : kills previously given notifications on specific attributes.
580 IPTR Notify__MUIM_KillNotify(struct IClass *cl, Object *obj,
581 struct MUIP_KillNotify *msg)
583 struct MUI_NotifyData *data = INST_DATA(cl, obj);
584 struct MinNode *node;
585 struct NotifyNode *nnode;
587 if (!data->mnd_NotifyList)
588 return 0;
590 for (node = data->mnd_NotifyList->mlh_Head; node->mln_Succ;
591 node = node->mln_Succ)
593 nnode = (NNode) node;
594 if (msg->TrigAttr == nnode->nn_TrigAttr)
596 Remove((struct Node *)node);
597 DeleteNNode(data, nnode);
598 return 1;
601 return 0;
606 * MUIM_KillNotifyObj : originally undocumented !
607 * Supposed to kill a notification with a given attr and a given dest.
609 IPTR Notify__MUIM_KillNotifyObj(struct IClass *cl, Object *obj,
610 struct MUIP_KillNotifyObj *msg)
612 struct MUI_NotifyData *data = INST_DATA(cl, obj);
613 struct MinNode *node;
614 struct NotifyNode *nnode;
616 if (!data->mnd_NotifyList)
617 return 0;
619 for (node = data->mnd_NotifyList->mlh_Head; node->mln_Succ;
620 node = node->mln_Succ)
622 nnode = (NNode) node;
623 if ((msg->TrigAttr == nnode->nn_TrigAttr)
624 && (msg->dest == nnode->nn_DestObj))
626 Remove((struct Node *)node);
627 DeleteNNode(data, nnode);
628 return 1;
631 return 0;
636 * MUIM_MultiSet : Set an attribute for multiple objects.
638 IPTR Notify__MUIM_MultiSet(struct IClass *cl, Object *obj,
639 struct MUIP_MultiSet *msg)
641 IPTR *destobj_p;
642 for (destobj_p = (IPTR *) & msg->obj; (*destobj_p) != 0; destobj_p++)
644 set((APTR) *destobj_p, msg->attr, msg->val);
646 return TRUE;
651 * MUIM_NoNotifySet : Acts like MUIM_Set but doesn't trigger any notification.
653 IPTR Notify__MUIM_NoNotifySet(struct IClass *cl, Object *obj,
654 struct MUIP_NoNotifySet *msg)
656 return SetAttrs(obj, MUIA_NoNotify, TRUE, msg->attr, msg->val,
657 TAG_DONE);
662 * MUIM_Notify : Add a notification event handler to an object.
664 IPTR Notify__MUIM_Notify(struct IClass *cl, Object *obj,
665 struct MUIP_Notify *msg)
667 struct MUI_NotifyData *data = INST_DATA(cl, obj);
668 struct NotifyNode *nnode;
670 if (msg->FollowParams < 1)
671 return FALSE;
673 if (data->mnd_NotifyList == NULL)
675 if (!(data->mnd_NotifyList = mui_alloc_struct(struct MinList)))
676 return FALSE;
677 NewList((struct List *)data->mnd_NotifyList);
680 nnode = CreateNNode(data, msg);
681 if (NULL == nnode)
682 return FALSE;
684 AddTail((struct List *)data->mnd_NotifyList, (struct Node *)nnode);
685 return TRUE;
690 * MUIM_Set : Set an attribute to a value, useful within a MUIM_Notify method.
692 IPTR Notify__MUIM_Set(struct IClass *cl, Object *obj,
693 struct MUIP_Set *msg)
695 return set(obj, msg->attr, msg->val);
699 * MUIM_SetAsString : Set a (text kind) attribute to a string.
701 IPTR Notify__MUIM_SetAsString(struct IClass *cl, Object *obj,
702 struct MUIP_SetAsString *msg)
704 STRPTR txt;
705 LONG txt_len;
707 txt_len = 0;
708 RawDoFmt(msg->format, (RAWARG)&msg->val,
709 (VOID_FUNC) AROS_ASMSYMNAME(len_func), &txt_len);
711 /* D(bug("Notify_SetAsString: fmt=%s, txtlen=%d\n", msg->format, txt_len)); */
712 txt = AllocVec(txt_len + 1, 0);
713 if (NULL == txt)
714 return FALSE;
717 STRPTR txtptr = txt;
718 RawDoFmt(msg->format, (RAWARG)&msg->val,
719 (VOID_FUNC) AROS_ASMSYMNAME(cpy_func), &txtptr);
722 set(obj, msg->attr, (IPTR) txt);
723 FreeVec(txt);
725 return TRUE;
730 * MUIM_SetUData : This method tests if the MUIA_UserData of the object
731 * contains the given <udata> and sets <attr> to <val> for itself in this case.
733 IPTR Notify__MUIM_SetUData(struct IClass *cl, Object *obj,
734 struct MUIP_SetUData *msg)
736 struct MUI_NotifyData *data = INST_DATA(cl, obj);
738 if (data->mnd_UserData == msg->udata)
740 set(obj, msg->attr, msg->val);
741 return TRUE;
743 return FALSE;
748 * MUIM_WriteLong : This method simply writes a longword somewhere to memory.
750 IPTR Notify__MUIM_WriteLong(struct IClass *cl, Object *obj,
751 struct MUIP_WriteLong *msg)
753 *(msg->memory) = msg->val;
754 return TRUE;
759 * MUIM_WriteString : This method simply copies a string somewhere to memory.
761 IPTR Notify__MUIM_WriteString(struct IClass *cl, Object *obj,
762 struct MUIP_WriteString *msg)
764 strcpy(msg->memory, msg->str);
765 return TRUE;
768 /**************************************************************************
769 MUIM_ConnectParent
770 **************************************************************************/
771 IPTR Notify__MUIM_ConnectParent(struct IClass *cl, Object *obj,
772 struct MUIP_ConnectParent *msg)
774 //struct MUI_NotifyData *data = INST_DATA(cl, obj);
776 /* Objects only have parents if they are inside a group or family object;
777 ** no idea why MUIA_Parent belongs to the notify class then
779 /* data->mnd_ParentObject = msg->parent;*/
780 muiGlobalInfo(obj) = muiGlobalInfo(msg->parent);
781 return TRUE;
784 /**************************************************************************
785 MUIM_DisconnectParent
786 **************************************************************************/
787 IPTR Notify__MUIM_DisconnectParent(struct IClass *cl, Object *obj,
788 struct MUIP_DisconnectParent *msg)
790 //struct MUI_NotifyData *data = INST_DATA(cl, obj);
791 /* data->mnd_ParentObject = NULL;*/
792 #if 0
793 /* Some apps (YAM) seem to access this even after disconnection */
794 muiGlobalInfo(obj) = NULL;
795 #endif
796 return 0;
799 /**************************************************************************
800 MUIM_GetConfigItem
801 **************************************************************************/
802 IPTR Notify__MUIM_GetConfigItem(struct IClass *cl, Object *obj,
803 struct MUIP_GetConfigItem *msg)
805 IPTR found =
806 DoMethod(muiGlobalInfo(obj)->mgi_Configdata, MUIM_Dataspace_Find,
807 msg->id);
809 if (found)
811 *msg->storage = found;
812 return TRUE;
814 else
816 return FALSE;
821 BOOPSI_DISPATCHER(IPTR, Notify_Dispatcher, cl, obj, msg)
823 switch (msg->MethodID)
825 case OM_NEW:
826 return Notify__OM_NEW(cl, obj, (struct opSet *)msg);
827 case OM_DISPOSE:
828 return Notify__OM_DISPOSE(cl, obj, msg);
829 case OM_SET:
830 return Notify__OM_SET(cl, obj, (struct opSet *)msg);
831 case OM_GET:
832 return Notify__OM_GET(cl, obj, (struct opGet *)msg);
833 case MUIM_CallHook:
834 return Notify__MUIM_CallHook(cl, obj, (APTR) msg);
835 case MUIM_Export:
836 return TRUE;
837 case MUIM_FindUData:
838 return Notify__MUIM_FindUData(cl, obj, (APTR) msg);
839 case MUIM_GetUData:
840 return Notify__MUIM_GetUData(cl, obj, (APTR) msg);
841 case MUIM_Import:
842 return TRUE;
843 case MUIM_KillNotify:
844 return Notify__MUIM_KillNotify(cl, obj, (APTR) msg);
845 case MUIM_KillNotifyObj:
846 return Notify__MUIM_KillNotifyObj(cl, obj, (APTR) msg);
847 case MUIM_MultiSet:
848 return Notify__MUIM_MultiSet(cl, obj, (APTR) msg);
849 case MUIM_NoNotifySet:
850 return Notify__MUIM_NoNotifySet(cl, obj, (APTR) msg);
851 case MUIM_Notify:
852 return Notify__MUIM_Notify(cl, obj, (APTR) msg);
853 case MUIM_Set:
854 return Notify__MUIM_Set(cl, obj, (APTR) msg);
855 case MUIM_SetAsString:
856 return Notify__MUIM_SetAsString(cl, obj, (APTR) msg);
857 case MUIM_SetUData:
858 return Notify__MUIM_SetUData(cl, obj, (APTR) msg);
859 case MUIM_SetUDataOnce:
860 return Notify__MUIM_SetUData(cl, obj, (APTR) msg);
861 /* use Notify_SetUData */
862 case MUIM_WriteLong:
863 return Notify__MUIM_WriteLong(cl, obj, (APTR) msg);
864 case MUIM_WriteString:
865 return Notify__MUIM_WriteString(cl, obj, (APTR) msg);
866 case MUIM_ConnectParent:
867 return Notify__MUIM_ConnectParent(cl, obj, (APTR) msg);
868 case MUIM_DisconnectParent:
869 return Notify__MUIM_DisconnectParent(cl, obj, (APTR) msg);
870 case MUIM_GetConfigItem:
871 return Notify__MUIM_GetConfigItem(cl, obj, (APTR) msg);
874 return DoSuperMethodA(cl, obj, msg);
876 BOOPSI_DISPATCHER_END
879 * Class descriptor.
881 const struct __MUIBuiltinClass _MUI_Notify_desc =
883 MUIC_Notify, /* Class name */
884 ROOTCLASS, /* super class name */
885 sizeof(struct MUI_NotifyData), /* size of class's own data */
886 (void *) Notify_Dispatcher /* class dispatcher */