2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <proto/layers.h>
9 #include "intuition_intern.h"
10 #include "inputhandler_actions.h"
12 #ifdef CGXSHOWHIDESUPPORT
13 #undef ChangeLayerVisibility
14 struct ShowWindowActionMsg
16 struct IntuiActionMsg msg
;
17 struct Window
*window
;
20 static VOID
int_showwindow(struct ShowWindowActionMsg
*msg
,
21 struct IntuitionBase
*IntuitionBase
);
24 #ifdef ChangeLayerVisibility
25 struct ShowWindowActionMsg
27 struct IntuiActionMsg msg
;
28 struct Window
*window
;
31 static VOID
int_showwindow(struct ShowWindowActionMsg
*msg
,
32 struct IntuitionBase
*IntuitionBase
);
35 /*****************************************************************************
38 #include <proto/intuition.h>
40 AROS_LH1(VOID
, ShowWindow
,
43 AROS_LHA(struct Window
*, window
, A0
),
46 struct IntuitionBase
*, IntuitionBase
, 140, Intuition
)
49 Make a window visible. This function does not bring the
50 window back into the visible area of the screen but rather
51 switches it into visible state.
55 window - The window to affect.
71 *****************************************************************************/
75 #ifdef CGXSHOWHIDESUPPORT
76 struct ShowWindowActionMsg msg
;
78 DEBUG_SHOWWINDOW(dprintf("ShowWindow: Window 0x%lx\n", window
));
83 DoASyncAction((APTR
)int_showwindow
, &msg
.msg
, sizeof(msg
), IntuitionBase
);
86 #ifdef ChangeLayerVisibility
87 struct ShowWindowActionMsg msg
;
89 DEBUG_SHOWWINDOW(dprintf("ShowWindow: Window 0x%lx\n", window
));
92 DoASyncAction((APTR
)int_showwindow
, &msg
.msg
, sizeof(msg
), IntuitionBase
);
98 #ifdef CGXSHOWHIDESUPPORT
99 static VOID
int_showwindow(struct ShowWindowActionMsg
*msg
,
100 struct IntuitionBase
*IntuitionBase
)
102 struct Window
*window
= msg
->window
;
103 struct Library
*CGXSystemBase
;
105 if (!ResourceExisting(window
, RESOURCE_WINDOW
, IntuitionBase
)) return;
108 if ((CGXSystemBase
= OpenLibrary("cgxsystem.library", 0)))
110 CGXShowWindow(window
);
111 ((struct IntWindow
*)(window
))->specialflags
&= ~SPFLAG_ICONIFIED
;
112 CloseLibrary(CGXSystemBase
);
113 ActivateWindow(window
);
118 #ifdef ChangeLayerVisibility
119 static VOID
int_showwindow(struct ShowWindowActionMsg
*msg
,
120 struct IntuitionBase
*IntuitionBase
)
122 struct Window
*window
= msg
->window
;
123 struct Screen
*screen
;
125 if (!ResourceExisting(window
, RESOURCE_WINDOW
, IntuitionBase
)) return;
126 screen
= window
->WScreen
;
128 if (!IsWindowVisible(window
))
130 struct Requester
*req
;
132 LOCK_REFRESH(screen
);
136 ChangeLayerVisibility(BLAYER(window
), TRUE
);
138 ChangeLayerVisibility(WLAYER(window
), TRUE
);
140 for (req
= window
->FirstRequest
; req
; req
= req
->OlderRequest
)
142 ChangeLayerVisibility(req
->ReqLayer
, TRUE
);
145 CheckLayers(screen
, IntuitionBase
);
147 UNLOCK_REFRESH(screen
);