home *** CD-ROM | disk | FTP | other *** search
- /* include not needed for Aztec C using provided makefile */
- #include "sb:sb.h"
- extern int level;
- extern void PrScreen2();
-
- void PrScreen(string, screen) char *string; struct Screen *screen;
- {
- static struct StructData structdata[] = {
- { " NextScreen", "struct Screen *", 5, PTRSIZE },
- { " FirstWindow", "struct Window *", 5, PTRSIZE },
- { "-LeftEdge", "SHORT", 2, INTSIZE },
- { "-TopEdge", "SHORT", 2, INTSIZE },
- { "-Width", "SHORT", 2, INTSIZE },
- { "-Height", "SHORT", 2, INTSIZE },
- { "-MouseY", "SHORT", 2, INTSIZE },
- { "-MouseX", "SHORT", 2, INTSIZE },
- { " Flags", "USHORT", 12, INTSIZE },
- { " Title", "UBYTE *", 4, PTRSIZE },
- { " DefaultTitle", "UBYTE *", 4, PTRSIZE },
- { "-BarHeight", "BYTE", 3, BYTESIZE },
- { "-BarVBorder", "BYTE", 3, BYTESIZE },
- { "-BarHBorder", "BYTE", 3, BYTESIZE },
- { "-MenuVBorder", "BYTE", 3, BYTESIZE },
- { "-MenuHBorder", "BYTE", 3, BYTESIZE }
- };
- static char *flagnames[8] = {
- "WBENCHSCREEN", "CUSTOMSCREEN", NULL, NULL,
- "SHOWTITLE", "BEEPING", "CUSTOMBITMAP", NULL
- };
- int sum, choice = -1;
- ULONG bits;
- level++;
- while (choice) {
- sum = SetOptionText(string, structdata,
- (APTR)screen, DATASIZE, 0);
- switch (choice = GetChoice(MAXGADG + 1)) {
- case 1:
- if (screen->NextScreen)
- PrScreen("The next screen in Intuition's list", screen->NextScreen);
- break;
- case 2:
- if (screen->FirstWindow)
- PrWindow("The screen's first window", screen->FirstWindow);
- break;
- case 9:
- if ((bits = screen->Flags) & 2)
- bits ^= 1;
- FlagPrint("The screen's flags", flagnames, bits);
- break;
- case 10:
- PrString("The Screen's Title", screen->Title);
- break;
- case 11:
- PrString("The Screen's Default Title", screen->DefaultTitle);
- break;
- case MOREGADG:
- PrScreen2("Screen members (page 2)", screen, sum);
- break;
- }
- }
- level--;
- }
-
-
- void PrScreen2(string, screen, offset)
- char *string; struct Screen *screen; int offset;
- {
- static struct StructData structdata[] = {
- { "-WBorTop", "BYTE", 3, BYTESIZE },
- { "-WBorLeft", "BYTE", 3, BYTESIZE },
- { "-WBorLeft", "BYTE", 3, BYTESIZE },
- { "-WBorBottom", "BYTE", 3, INTSIZE },
- { " Font", "struct TextAttr *", 5, PTRSIZE },
- { "(ViewPort", "struct ViewPort)", 0, SZ(ViewPort) },
- { " RastPort", "struct RastPort ", 0, SZ(RastPort) },
- { " BitMap", "struct BitMap", 0, SZ(BitMap) },
- { "(LayerInfo", "struct Layer_Info)", 0, SZ(Layer_Info)},
- { " FirstGadget", "struct Gadget *", 5, PTRSIZE },
- { "-DetailPen", "UBYTE", 13, BYTESIZE },
- { "-BlockPen", "UBYTE", 13, BYTESIZE },
- { "-SaveColor0", "USHORT", 12, INTSIZE },
- { "(BarLayer", "struct Layer *)", 5, PTRSIZE },
- { "(ExtData", "UBYTE *)", 5, PTRSIZE },
- { "(UserData", "UBYTE *)", 5, PTRSIZE },
- };
- int sum, choice = -1;
- level++;
- while (choice) {
- sum = SetOptionText(string, structdata, (APTR)screen, DATASIZE, offset);
- switch (choice = GetChoice(DATASIZE)) {
- case 5:
- if (screen->Font)
- PrTextAttr("Structure TextAttr",screen->Font);
- break;
- case 7:
- PrRastPort("The screen's RastPort", &screen->RastPort);
- break;
- case 8:
- PrBitMap("The screen's BitMap", &screen->BitMap);
- break;
- case 10:
- if (screen->FirstGadget)
- PrGadget("The screen's first gadget", screen->FirstGadget);
- break;
- }
- }
- level--;
- }
-