2 Copyright 1995-2006, The AROS Development Team. All rights reserved.
3 Copyright 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id: startscreennotifytaglist.c 20651 2006-12-30 20:57:12Z d.brewka $
6 Add a Intuition Notification.
9 #include <intuition/intuition.h>
11 #include "intuition_intern.h"
13 /*****************************************************************************
17 #include <proto/exec.h>
18 #include <proto/intuition.h>
19 #include <proto/utility.h>
21 AROS_LH1(IPTR
, StartScreenNotifyTagList
,
24 AROS_LHA(struct TagItem
*, tags
, A0
),
27 struct IntuitionBase
*, IntuitionBase
, 161, Intuition
)
30 Add Notifications to Intuitionn.
33 taglist - A OS4 Styled Taglist for
36 the value is private only a test against ZERO is allowed and means Failure
50 *****************************************************************************/
53 AROS_LIBBASE_EXT_DECL(struct IntuitionBase
*,IntuitionBase
)
54 struct IntScreenNotify
*notify
;
56 notify
= (struct IntScreenNotify
*) AllocMem(sizeof(struct IntScreenNotify
), MEMF_CLEAR
);
60 notify
->port
= (struct MsgPort
*) GetTagData(SNA_MsgPort
, 0, tags
);
61 notify
->sigbit
= (BYTE
) GetTagData(SNA_SigBit
, 0, tags
);
62 notify
->sigtask
= (struct Task
*) GetTagData(SNA_SigTask
, 0, tags
);
63 notify
->flags
= (ULONG
) GetTagData(SNA_Notify
, 0, tags
);
64 notify
->userdata
= (IPTR
) GetTagData(SNA_UserData
, 0, tags
);
65 notify
->hook
= (struct Hook
*) GetTagData(SNA_Hook
, 0, tags
);
66 notify
->node
.ln_Pri
= (BYTE
) GetTagData(SNA_Priority
, 0, tags
);
67 notify
->pubname
= (struct MsgPort
*) GetTagData(SNA_PubName
, 0, tags
);
68 ObtainSemaphore(&GetPrivIBase(IntuitionBase
)->ScreenNotificationListLock
);
69 Enqueue(&GetPrivIBase(IntuitionBase
)->ScreenNotificationList
, (struct Node
*) notify
);
70 ReleaseSemaphore(&GetPrivIBase(IntuitionBase
)->ScreenNotificationListLock
);
73 ReturnPtr ("StartScreenNotifyTagList", APTR
, notify
);
76 } /* StartScreenNotifyTagList */