From 424ae58fc8e1060f4d986645d113f37ac5efb80d Mon Sep 17 00:00:00 2001 From: stegerg Date: Sun, 15 Apr 2007 12:50:41 +0000 Subject: [PATCH] Added DefaultWindowShapeFunc. Calls WDM_WINDOWSHAPE. git-svn-id: https://svn.aros.org:8080/svn/aros/trunk/AROS@25774 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/intuition/intuition_misc.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/rom/intuition/intuition_misc.c b/rom/intuition/intuition_misc.c index 2054b91b6..13b03948e 100644 --- a/rom/intuition/intuition_misc.c +++ b/rom/intuition/intuition_misc.c @@ -1099,4 +1099,36 @@ void FireScreenNotifyMessage(IPTR data, ULONG flag, struct IntuitionBase *Intuit { FireScreenNotifyMessageCode(data, flag, 0, IntuitionBase); } + +/**********************************************************************************/ + +AROS_UFH3(struct Region *, DefaultWindowShapeFunc, + AROS_UFHA(struct Hook *, hook, A0), + AROS_UFHA(struct Layer *, lay, A2), + AROS_UFHA(struct ShapeHookMsg *, msg, A1)) +{ + AROS_USERFUNC_INIT + + struct IntuitionBase *IntuitionBase = (struct IntuitionBase *)hook->h_Data; + struct Window *win = (struct Window *)hook->h_SubEntry; + struct Region *shape; + struct wdpWindowShape shapemsg; + + shapemsg.MethodID = WDM_WINDOWSHAPE; + shapemsg.wdp_TrueColor = (GetPrivScreen(win->WScreen)->DInfo.dri.dri_Flags & DRIF_DIRECTCOLOR) ? TRUE : FALSE; + shapemsg.wdp_Width = msg->NewBounds.MaxX - msg->NewBounds.MinX + 1; + shapemsg.wdp_Height = msg->NewBounds.MaxY - msg->NewBounds.MinY + 1; + shapemsg.wdp_UserBuffer = IW(win)->DecorUserBuffer; + + shape = (struct Region *)DoMethodA(GetPrivScreen(win->WScreen)->WinDecorObj, (Msg)&shapemsg); + + if (IW(win)->OutlineShape) DisposeRegion(IW(win)->OutlineShape); + IW(win)->OutlineShape = shape; + IW(win)->CustomShape = FALSE; + + return shape; + + AROS_USERFUNC_EXIT +} + /**********************************************************************************/ -- 2.11.4.GIT