home *** CD-ROM | disk | FTP | other *** search
- #include <string.h>
- #include <stdlib.h>
- #include <proto/intuition.h>
- #include <proto/exec.h>
- #include <exec/ports.h>
- #include <dos/dos.h>
- #include <proto/dos.h>
- #include <dos/notify.h>
- #include <exec/memory.h>
-
- #include "FullWorkbench.h"
-
-
- VOID
- MakeOtherBackdropsVisible( struct Screen *WBScreen )
- {
- struct Window *Backdrop;
-
- /* if there are other backdrop windows, bring them to front */
- /* For instance, some title screen clocks */
-
- Forbid();
- Backdrop = WBScreen->FirstWindow;
- while (Backdrop)
- {
- if ((Backdrop->Flags & WFLG_BACKDROP) &&
- !(Backdrop->Flags & WFLG_WBENCHWINDOW))
- {
- WindowToFront(Backdrop);
- }
- Backdrop = Backdrop->NextWindow;
- }
- Permit();
- }
-
-
- VOID
- ToggleFullWorkbench ( BOOL Toggle)
- {
- struct Screen *WBScreen;
- struct Window *WBWin;
-
- if (WBScreen = (struct Screen *)LockPubScreen("Workbench"))
- {
- /* Find the backdrop window of the workbench if it exists */
-
- Forbid();
- WBWin = WBScreen->FirstWindow;
- while (WBWin && !((WBWin->Flags & WFLG_BACKDROP) && (WBWin->Flags & WFLG_WBENCHWINDOW)))
- {
- WBWin = WBWin->NextWindow;
- }
- Permit();
-
- if (WBWin)
- {
- /* WB Backdrop window exists */
-
- if(Toggle)
- {
- if (WBWin->Height < WBScreen->Height)
- {
- /* Enlarge the backdrop window so that picture covers all screen */
- ChangeWindowBox(WBWin,
- WBWin->LeftEdge,
- 0,
- WBWin->Width,
- WBScreen->Height);
- }
-
- /* Hide the workbench screen title bar */
- ShowTitle(WBScreen, FALSE);
-
- MakeOtherBackdropsVisible( WBScreen );
-
- }
- else
- {
- if (WBWin->Height == WBScreen->Height)
- {
- /* Reduce the backdrop window so that it is right under the title bar */
- ChangeWindowBox(WBWin,
- WBWin->LeftEdge,
- (WBScreen->BarHeight+1),
- WBWin->Width,
- WBScreen->Height-(WBScreen->BarHeight+1));
- WindowToBack(WBWin);
-
- /* Show the workbench screen title bar */
- ShowTitle(WBScreen, TRUE);
-
- MakeOtherBackdropsVisible( WBScreen );
- }
- }
- }
- UnlockPubScreen(NULL, WBScreen);
- }
- }
-