New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / intuition / changewindowshape.c
blob42b38cdb64e42d5175655efff0281530be481ebb
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <proto/layers.h>
8 #include "intuition_intern.h"
9 #include "inputhandler_actions.h"
11 #ifdef ChangeLayerShape
13 struct ChangeWindowShapeActionMsg
15 struct IntuiActionMsg msg;
16 struct Window *window;
17 struct Region *shape;
18 struct Hook *callback;
21 static VOID int_changewindowshape(struct ChangeWindowShapeActionMsg *msg,
22 struct IntuitionBase *IntuitionBase);
24 #endif
26 /*****************************************************************************
28 NAME */
29 #include <proto/intuition.h>
31 AROS_LH3(struct Region *, ChangeWindowShape,
33 /* SYNOPSIS */
34 AROS_LHA(struct Window *, window, A0),
35 AROS_LHA(struct Region *, newshape, A1),
36 AROS_LHA(struct Hook *, callback, A2),
38 /* LOCATION */
39 struct IntuitionBase *, IntuitionBase, 143, Intuition)
41 /* FUNCTION
42 Make a window invisible.
44 INPUTS
45 window - The window to affect.
47 RESULT
49 NOTES
51 EXAMPLE
53 BUGS
55 SEE ALSO
57 INTERNALS
59 HISTORY
61 *****************************************************************************/
63 AROS_LIBFUNC_INIT
64 AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
66 #ifdef ChangeLayerShape
67 struct ChangeWindowShapeActionMsg msg;
69 ASSERT_VALID_PTR(window);
71 if (IS_GZZWINDOW(window)) return NULL;
73 msg.window = window;
74 msg.shape = newshape;
75 msg.callback = callback;
76 DoSyncAction((APTR)int_changewindowshape, &msg.msg, IntuitionBase);
78 return msg.shape;
79 #else
81 /* shut up the compiler */
82 IntuitionBase = IntuitionBase;
83 callback = callback;
84 newshape = newshape;
85 window = window;
87 return NULL;
88 #endif
90 AROS_LIBFUNC_EXIT
92 } /* ChangeWindowShape */
95 #ifdef ChangeLayerShape
96 static VOID int_changewindowshape(struct ChangeWindowShapeActionMsg *msg,
97 struct IntuitionBase *IntuitionBase)
99 struct Window *window = msg->window;
100 struct Region *shape = msg->shape;
101 struct Hook *callback = msg->callback;
102 struct Screen *screen = window->WScreen;
104 if (!ResourceExisting(window, RESOURCE_WINDOW, IntuitionBase)) return;
106 LOCK_REFRESH(screen);
107 msg->shape = ChangeLayerShape(window->WLayer, shape, callback);
108 UNLOCK_REFRESH(screen);
110 CheckLayers(screen, IntuitionBase);
112 #endif