home *** CD-ROM | disk | FTP | other *** search
- #include <exec/types.h>
- #include <intuition/intuition.h>
-
- /********************************************
- * PrettyWindows v1.0 by Thom Robertson *
- ********************************************/
-
- /*
-
- This routine opens a window.
- The screen argument is a pointer to a Screen structure (this screen
- must be open). If the screen pointer is NULL (0), the window will open on
- the Workbench screen. The arguments are size variables.
- This routine returns the pointer to this window's Window structure if it
- was successful, otherwise it returns NULL (0).
- When called, it is assumed that the Intuition Library has already been
- called. If not, BOOM!
- If the window is larger than the screen, or is positioned off the edge of
- the screen, this routine may go BOOM.
- Note that since this window is BORDERLESS and has no gadgets or title, it
- will be completely blank until you put something in it. Don't let this
- throw you.
-
- */
-
- makewindow(screen,x,y,w,h)
- struct Screen *screen;
- int x,y,w,h;
- {
-
- struct NewWindow NewWindow;
- struct Window *Window;
-
- NewWindow.LeftEdge = x;
- NewWindow.TopEdge = y;
- NewWindow.Width = w;
- NewWindow.Height = h;
- NewWindow.DetailPen = 0;
- NewWindow.BlockPen = 1;
- NewWindow.Title = NULL;
- NewWindow.Flags = ACTIVATE;
- NewWindow.IDCMPFlags = MOUSEBUTTONS+MOUSEMOVE+GADGETDOWN+GADGETUP+
- MENUPICK+RAWKEY+ACTIVEWINDOW+INACTIVEWINDOW+BORDERLESS;
- if (screen != NULL)
- NewWindow.Type = CUSTOMSCREEN;
- else
- NewWindow.Type = WBENCHSCREEN;
- NewWindow.FirstGadget = NULL;
- NewWindow.CheckMark = NULL;
- NewWindow.Screen = screen;
- NewWindow.BitMap = NULL;
- NewWindow.MinWidth = 0;
- NewWindow.MinHeight = 0;
- NewWindow.MaxWidth = -1;
- NewWindow.MaxHeight = -1;
-
- if ((Window = (struct Window *)OpenWindow(&NewWindow))== NULL)
- return(0);
-
- return(Window);
-
- }
-
-