home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / monitors / rsys / rsyssrc.lha / RSysGfxIntuiLists.c < prev    next >
C/C++ Source or Header  |  1993-09-19  |  15KB  |  659 lines

  1. /*
  2. ***************************************************************************
  3. *
  4. * Datei:
  5. *      RSysGfxIntuiLists.c
  6. *
  7. * Inhalt:
  8. *
  9. *      --- Globale Routinen ---
  10. *
  11. *    void MakeFontList ( void );
  12. *    void MakeScreenList ( void );
  13. *    void MakeWindowList ( void );
  14. *    void RSysGadgetList ( void );
  15. *    void RSysGetDisplayModes ( void );
  16. *    void SysBlitterWaitList ( void );
  17. *    void SysPubScreenList ( void );
  18. *    void SysTOFWaitList ( void );
  19. *
  20. *      --- Lokale  Routinen ---
  21. *
  22. *    static void gadgetinfo ( struct Gadget *gad , int i );
  23. *
  24. * Bemerkungen:
  25. *      Listen der Graphics- und Intuition-Library.
  26. *      (Teilweise ausgelagert aus RSysSpecialLists.c)
  27. *
  28. * Erstellungsdatum:
  29. *      07-Jul-93     Rolf Böhme
  30. *
  31. * Änderungen:
  32. *      07-Jul-93     Rolf Böhme      Erstellung
  33. *
  34. ***************************************************************************
  35. */
  36.  
  37. #include "RSys.h"
  38.  
  39.     /*
  40.      * MakeFontList() erzeugt eine Liste aller im System in der
  41.      * GfxBase definierten Fonts
  42.      */
  43. void
  44. MakeFontList(void)
  45. {
  46.     struct Node *node;
  47.     struct TextFont *font;
  48.     int    i = 0;
  49.  
  50.     DPOS;
  51.  
  52.     countentries = CountNodes(&GfxBase->TextFonts);
  53.  
  54.     if (NoEntries()) return;
  55.  
  56.     Entries = AllocScrollEntries(countentries);
  57.  
  58.     Forbid();
  59.  
  60.     for (node = GfxBase->TextFonts.lh_Head; node->ln_Succ && (i < countentries); node = node->ln_Succ)
  61.     {
  62.         font = (struct TextFont *) node;
  63.  
  64.         Entries[i].se_obj_id.address = font;
  65.         savestrcpy(Entries[i].se_obj_id.fullname, node, MAXFULLNAME - 1, NT_FONT);
  66.  
  67.         sprintf(Entries[i].se_Entry, EntryAttr[FONTS].ea_dataformat,
  68.               Entries[i].se_obj_id.address,
  69.                   Entries[i].se_obj_id.fullname,
  70.                   ((font->tf_Flags & FPF_DISKFONT) ? "Disk" : "ROM"),
  71.                   font->tf_YSize,
  72.                   font->tf_XSize,
  73.                   font->tf_LoChar,
  74.                   font->tf_HiChar);
  75.  
  76.         i++;
  77.     }
  78.  
  79.     countentries = i;
  80.  
  81.     Permit();
  82.  
  83.     CreateEntryList(SORT, 9);
  84.  
  85.     return;
  86. }
  87.  
  88.     /*
  89.      * MakeWindowList() erzeugt eine Liste der offenen Windows im
  90.      * System. Dazu werden alle geöffneten Screens durchsucht
  91.      */
  92. void
  93. MakeWindowList(void)
  94. {
  95.     ULONG lock;
  96.     struct Window *win;
  97.     struct Screen *scr;
  98.     char scrtitle[11];
  99.     int    i = 0;
  100.  
  101.     DPOS;
  102.  
  103.     countentries = CountIntuiObjects((int)GD_WindowsGad);
  104.  
  105.     if (NoEntries()) return;
  106.  
  107.     Entries = AllocScrollEntries(countentries);
  108.  
  109.     lock = LockIBase(NULL);
  110.  
  111.     for (scr = IntuitionBase->FirstScreen; scr && (i < countentries); scr = scr->NextScreen)
  112.         for (win = scr->FirstWindow; win && (i < countentries); win = win->NextWindow)
  113.         {
  114.             Entries[i].se_obj_id.address = win;
  115.  
  116.             if ((char *)win->Title) strncpy(Entries[i].se_obj_id.fullname, (char *)win->Title, MAXFULLNAME - 1);
  117.             else
  118.                 strcpy(Entries[i].se_obj_id.fullname, field[NO_TITLE]);
  119.  
  120.             if ((char *)scr->DefaultTitle) strncpy(scrtitle, (char *)scr->DefaultTitle, 10);
  121.             else
  122.                 strcpy(scrtitle, field[NO_TITLE]);
  123.  
  124.             sprintf(Entries[i].se_Entry, EntryAttr[WINDOWS].ea_dataformat,
  125.                  Entries[i].se_obj_id.address,
  126.                       Entries[i].se_obj_id.fullname,
  127.                       win->Height,
  128.                       win->Width,
  129.                       win->LeftEdge,
  130.                       win->TopEdge,
  131.                       scrtitle);
  132.  
  133.             i++;
  134.         }
  135.  
  136.     countentries = i;
  137.  
  138.     UnlockIBase(lock);
  139.  
  140.     CreateEntryList(SORT, 9);
  141.  
  142.     return;
  143. }
  144.  
  145.     /*
  146.      * MakeScreenList() erzeugt eine Liste aller geöffneten Screens
  147.      */
  148. void
  149. MakeScreenList(void)
  150. {
  151.     ULONG lock;
  152.     struct Screen *scr;
  153.     int    i = 0;
  154.     char pub[5];
  155.  
  156.     DPOS;
  157.  
  158.     countentries = CountIntuiObjects((int)GD_ScreensGad);
  159.  
  160.     if (NoEntries()) return;
  161.  
  162.     Entries = AllocScrollEntries(countentries);
  163.  
  164.     lock = LockIBase(NULL);
  165.  
  166.     for (scr = IntuitionBase->FirstScreen; scr && (i < countentries); scr = scr->NextScreen)
  167.     {
  168.         Entries[i].se_obj_id.address = scr;
  169.  
  170.         if (scr->Title) strncpy(Entries[i].se_obj_id.fullname, (char *)scr->Title, MAXFULLNAME - 1);
  171.         else
  172.             strcpy(Entries[i].se_obj_id.fullname, field[NO_TITLE]);
  173.  
  174.         strcpy(pub, "   ");
  175.  
  176.         if ((scr->Flags & WBENCHSCREEN) == WBENCHSCREEN) pub[0] = 'W';
  177.  
  178.         if ((scr->Flags & PUBLICSCREEN) == PUBLICSCREEN) pub[1] = 'P';
  179.  
  180.         if ((scr->Flags & CUSTOMSCREEN) == CUSTOMSCREEN) pub[2] = 'C';
  181.  
  182.         sprintf(Entries[i].se_Entry, EntryAttr[SCREENS].ea_dataformat,
  183.               Entries[i].se_obj_id.address,
  184.                   Entries[i].se_obj_id.fullname,
  185.                   scr->Height, scr->Width, scr->LeftEdge, scr->TopEdge,
  186.                   pub);
  187.  
  188.         i++;
  189.     }
  190.  
  191.     countentries = i;
  192.  
  193.     UnlockIBase(lock);
  194.  
  195.     CreateEntryList(SORT, 9);
  196.  
  197.     return;
  198. }
  199.  
  200.     /*
  201.      * SysPubScreenList() zeigt alle im System angemeldeten
  202.      * Public Screens an
  203.      */
  204. void
  205. SysPubScreenList(void)
  206. {
  207.     struct Node *node;
  208.     struct Screen *scr;
  209.     struct PubScreenNode *PSNodes;
  210.     struct List *PSList = NULL;
  211.     char name[20],taskname[16];
  212.     int    i = 0;
  213.    struct Node **adr;
  214.  
  215.     DPOS;
  216.  
  217.    HandleHelp(MN_SysPubScreenList);
  218.  
  219.     PrintHeader(SYSPUBSCR, NULL);
  220.  
  221.     EmptyListView();
  222.  
  223.     PSList = LockPubScreenList();
  224.     countentries = CountNodes(PSList);
  225.     UnlockPubScreenList();
  226.  
  227.     if (NoEntries()) return;
  228.  
  229.     PSNodes = (struct PubScreenNode *) MyAllocVec(countentries*sizeof(struct PubScreenNode),
  230.                                                               MEMF_ANY | MEMF_CLEAR, NO_KILL);
  231.     adr = (struct Node **) MyAllocVec(countentries*sizeof(struct Node *),
  232.                                                               MEMF_ANY | MEMF_CLEAR, NO_KILL);
  233.  
  234.     if(!PSNodes || ! adr)
  235.    {
  236.       MyFreeVec(PSNodes);
  237.       MyFreeVec(adr);
  238.  
  239.       return;
  240.    }
  241.  
  242.     PSList = LockPubScreenList();
  243.  
  244.     for (node = PSList->lh_Head; node->ln_Succ && (i < countentries); node = node->ln_Succ)
  245.    {
  246.       adr[i] = node;
  247.         CopyMem(node,&PSNodes[i++],sizeof(struct PubScreenNode));
  248.    }
  249.  
  250.     UnlockPubScreenList();
  251.  
  252.     Entries = AllocScrollEntries(countentries);
  253.  
  254.     for (i = 0; i < countentries; i++)
  255.     {
  256.         scr = PSNodes[i].psn_Screen;
  257.  
  258.         savestrcpy(name,&(PSNodes[i].psn_Node),19, NT_UNKNOWN);
  259.  
  260.         Forbid();
  261.  
  262.         if(PSNodes[i].psn_SigTask) savestrcpy(taskname,&PSNodes[i].psn_SigTask->tc_Node, 15, NT_TASK);
  263.         else
  264.             strcpy(taskname,field[NO_TASK]);
  265.  
  266.         Permit();
  267.  
  268.       Entries[i].se_obj_id.address = adr[i];
  269.         sprintf(Entries[i].se_Entry, EntryAttr[SYSPUBSCR].ea_dataformat,
  270.               adr[i],
  271.                   name,
  272.                   PSNodes[i].psn_VisitorCount,
  273.                   taskname);
  274.     }
  275.  
  276.     MyFreeVec(PSNodes);
  277.    MyFreeVec(adr);
  278.  
  279.     CreateEntryList(SORT, 9);
  280.  
  281.     PrintStatistics();
  282.  
  283.     return;
  284. }
  285.  
  286. void
  287. RSysGetDisplayModes(void)
  288. {
  289.     struct DisplayInfo dinfo;
  290.     struct NameInfo     ninfo;
  291.     struct DisplayNode {
  292.         struct Node             dn_Node;
  293.         struct DisplayInfo    dn_dinfo;
  294.         struct NameInfo        dn_ninfo;
  295.         struct DimensionInfo dn_diminfo;
  296.     }
  297.     *dnode,*copydnode;
  298.     struct Node *dispnode;
  299.     struct List *DispList;
  300.     ULONG modeID = INVALID_ID;
  301.     struct Remember *DispKey = NULL;
  302.     int i;
  303.  
  304.     DPOS;
  305.  
  306.    HandleHelp(MN_RSysGetDisplayModes);
  307.  
  308.     PrintHeader(DISPLAYMODES, NULL);
  309.  
  310.     EmptyListView();
  311.  
  312.     DispList = AllocRemember(&DispKey,sizeof(struct List),MEMF_CLEAR);
  313.     if(DispList)
  314.     {
  315.         NewList(DispList);
  316.  
  317.         while ((modeID = NextDisplayInfo (modeID)) != INVALID_ID)
  318.         {
  319.             if (GetDisplayInfoData (NULL, (UBYTE *) &dinfo, sizeof(dinfo),
  320.                                             DTAG_DISP,modeID))
  321.             {
  322.                 if ((dinfo.NotAvailable == 0) && (modeID & MONITOR_ID_MASK))
  323.                 {
  324.                         /*
  325.                          * Hier gelangt das Programm nur dann hin, wenn
  326.                          * der Modus verfügbar ist und nicht der
  327.                          * Default-Monitor benötigt wird, sondern ein
  328.                          * PAL-, NTSC- oder andere Monitore
  329.                          */
  330.                     if (GetDisplayInfoData (NULL,(UBYTE *) &ninfo, sizeof(ninfo),
  331.                                                     DTAG_NAME,modeID))
  332.                     {
  333.                         if(dnode = AllocRemember(&DispKey,sizeof(struct DisplayNode),
  334.                                                          MEMF_CLEAR|MEMF_PUBLIC))
  335.                         {
  336.                             if(dnode->dn_Node.ln_Name = AllocRemember(&DispKey,
  337.                                                                                     strlen((char *)ninfo.Name) +1,
  338.                                                                                     MEMF_CLEAR|MEMF_PUBLIC))
  339.                             {
  340.                                 strcpy (dnode->dn_Node.ln_Name, (char *)ninfo.Name);
  341.  
  342.                                 GetDisplayInfoData (NULL,(UBYTE *) &(dnode->dn_diminfo),
  343.                                                           sizeof(struct DimensionInfo),
  344.                                                           DTAG_DIMS, modeID);
  345.  
  346.                                 GetDisplayInfoData (NULL, (UBYTE *) &(dnode->dn_dinfo),
  347.                                                           sizeof(struct DisplayInfo),
  348.                                                           DTAG_DISP, modeID);
  349.  
  350.                                 AddTail(DispList, (struct Node *) dnode);
  351.                             }
  352.                         }
  353.                     }
  354.                 }
  355.             }
  356.         }
  357.  
  358.         countentries = CountNodes(DispList);
  359.  
  360.         if(!NoEntries())
  361.         {
  362.             Entries = AllocScrollEntries(countentries);
  363.  
  364.             for(dispnode = (struct Node *)DispList->lh_Head, i = 0;
  365.                  dispnode->ln_Succ && (i < countentries);
  366.                  dispnode = dispnode->ln_Succ)
  367.             {
  368.                 copydnode = (struct DisplayNode *)dispnode;
  369.             Entries[i].se_obj_id.address = dispnode;
  370.                 sprintf(Entries[i].se_Entry, EntryAttr[DISPLAYMODES].ea_dataformat,
  371.                     Entries[i].se_obj_id.address,
  372.                           copydnode->dn_Node.ln_Name,
  373.                           copydnode->dn_diminfo.MaxDepth,
  374.                           copydnode->dn_diminfo.MinRasterWidth,
  375.                           copydnode->dn_diminfo.MinRasterHeight,
  376.                           copydnode->dn_diminfo.MaxRasterWidth,
  377.                           copydnode->dn_diminfo.MaxRasterHeight);
  378.  
  379.                 i++;
  380.             }
  381.  
  382.             CreateEntryList(SORT, 9);
  383.         }
  384.  
  385.         FreeRemember(&DispKey,TRUE);
  386.  
  387.         PrintStatistics();
  388.     }
  389.     else ErrorHandle("No memory for Displaynodes", MEMORY_ERR, ALLOC_FAIL, KILL);
  390.  
  391.     return;
  392. }
  393.  
  394. void
  395. SysTOFWaitList(void)
  396. {
  397.     struct Node *node, **adr;
  398.     struct Node *TWQNodes;
  399.     char name[20];
  400.     int    i = 0;
  401.  
  402.     DPOS;
  403.  
  404.    HandleHelp(MN_SysTOFWaitList);
  405.  
  406.     PrintHeader(TOFWAIT, NULL);
  407.  
  408.     EmptyListView();
  409.  
  410.     countentries = CountNodes(&GfxBase->TOF_WaitQ);
  411.  
  412.     if (NoEntries()) return;
  413.  
  414.     TWQNodes = (struct Node *)MyAllocVec(countentries*sizeof(struct Node), MEMF_ANY | MEMF_CLEAR, NO_KILL);
  415.     adr = (struct Node **) MyAllocVec(countentries*sizeof(struct Node *), MEMF_ANY | MEMF_CLEAR, NO_KILL);
  416.  
  417.     if(!TWQNodes || !adr)
  418.    {
  419.       MyFreeVec(TWQNodes);
  420.       MyFreeVec(adr);
  421.  
  422.         return;
  423.    }
  424.  
  425.     Disable();
  426.  
  427.     for (node = GfxBase->TOF_WaitQ.lh_Head; node->ln_Succ && (i < countentries); node = node->ln_Succ)
  428.    {
  429.       adr[i] = node;
  430.         CopyMem(node,&TWQNodes[i++],sizeof(struct Node));
  431.    }
  432.  
  433.     Enable();
  434.  
  435.     Entries = AllocScrollEntries(countentries);
  436.  
  437.     for (i = 0; i < countentries; i++)
  438.     {
  439.         savestrcpy(name,&TWQNodes[i],19, NT_TASK);
  440.  
  441.       Entries[i].se_obj_id.address = &TWQNodes[i];
  442.         sprintf(Entries[i].se_Entry, EntryAttr[TOFWAIT].ea_dataformat,
  443.               adr[i],
  444.                   name,
  445.                   TWQNodes[i].ln_Pri );
  446.     }
  447.  
  448.     MyFreeVec(TWQNodes);
  449.     MyFreeVec(adr);
  450.  
  451.     CreateEntryList(SORT, 9);
  452.  
  453.     PrintStatistics();
  454.  
  455.     return;
  456. }
  457.  
  458.     /*
  459.      * SysBlitterWaitList() erzeugt eine Liste aller Tasks,
  460.      * die auf den Blitter warten. Diese Liste ist in der
  461.      * GfxBase (graphics.library) zu finden
  462.      */
  463. void
  464. SysBlitterWaitList(void)
  465. {
  466.     struct Node *node, **adr;
  467.     struct Node *BWQNodes;
  468.     char name[20];
  469.     int    i = 0;
  470.  
  471.     DPOS;
  472.  
  473.    HandleHelp(MN_SysBlitterWaitList);
  474.  
  475.     PrintHeader(BLITTERWAIT, NULL);
  476.  
  477.     EmptyListView();
  478.  
  479.     countentries = CountNodes(&GfxBase->BlitWaitQ);
  480.  
  481.     if (NoEntries()) return;
  482.  
  483.     BWQNodes = (struct Node *) MyAllocVec(countentries*sizeof(struct Node), MEMF_ANY | MEMF_CLEAR, NO_KILL);
  484.     adr = (struct Node **) MyAllocVec(countentries*sizeof(struct Node *), MEMF_ANY | MEMF_CLEAR, NO_KILL);
  485.  
  486.     if(!BWQNodes || ! adr)
  487.    {
  488.       MyFreeVec(BWQNodes);
  489.       MyFreeVec(adr);
  490.  
  491.         return;
  492.    }
  493.  
  494.     Disable();
  495.  
  496.     for (node = GfxBase->BlitWaitQ.lh_Head; node->ln_Succ && (i < countentries); node = node->ln_Succ)
  497.    {
  498.       adr[i] = node;
  499.         CopyMem(node,&BWQNodes[i++],sizeof(struct Node));
  500.    }
  501.  
  502.     Enable();
  503.  
  504.     Entries = AllocScrollEntries(countentries);
  505.  
  506.     for (i = 0; i < countentries; i++)
  507.     {
  508.         savestrcpy(name,&BWQNodes[i],19, NT_TASK);
  509.  
  510.       Entries[i].se_obj_id.address = adr[i];
  511.         sprintf(Entries[i].se_Entry, EntryAttr[BLITTERWAIT].ea_dataformat,
  512.               adr[i],
  513.                   name,
  514.                   BWQNodes[i].ln_Pri );
  515.     }
  516.  
  517.     MyFreeVec(BWQNodes);
  518.     MyFreeVec(adr);
  519.  
  520.     CreateEntryList(SORT, 9);
  521.  
  522.     PrintStatistics();
  523.  
  524.     return;
  525. }
  526.  
  527. static void
  528. gadgetinfo(struct Gadget *gad, int i)
  529. {
  530.     char title[15], typ[7];
  531.  
  532.     if(gad->GadgetText && gad->GadgetText->IText) strncpy(title, (char *)(gad->GadgetText->IText), 15);
  533.     else if(gad->GadgetRender || gad->SelectRender) strcpy(title, field[HAS_IMAGE]);
  534.     else
  535.         strcpy(title, field[NO_FIELD]);
  536.  
  537.     if(SETFLAG(gad,GTYP_SYSGADGET))      strcpy(typ,"SYS");
  538.     else if(SETFLAG(gad,GTYP_SCRGADGET)) strcpy(typ,"SCR");
  539.     else if(SETFLAG(gad,GTYP_GZZGADGET)) strcpy(typ,"GZZ");
  540.     else if(SETFLAG(gad,GTYP_REQGADGET)) strcpy(typ,"REQ");
  541.     else
  542.         strcpy(typ,"CUS");
  543.  
  544.     if(SETFLAG(gad, GTYP_WDRAGGING))         strcat(typ,"WDR");
  545.     else if(SETFLAG(gad, GTYP_SDRAGGING))    strcat(typ,"SDR");
  546.     else if(SETFLAG(gad, GTYP_WUPFRONT))     strcat(typ,"WUP");
  547.     else if(SETFLAG(gad, GTYP_SUPFRONT))     strcat(typ,"SUP");
  548.     else if(SETFLAG(gad, GTYP_WDOWNBACK))    strcat(typ,"WDO");
  549.     else if(SETFLAG(gad, GTYP_SDOWNBACK))    strcat(typ,"SDO");
  550.     else if(SETFLAG(gad, GTYP_CLOSE))        strcat(typ,"CLO");
  551.     else if(SETFLAG(gad, GTYP_BOOLGADGET))   strcat(typ,"BOO");
  552.     else if(SETFLAG(gad, GTYP_GADGET0002))   strcat(typ,"G02");
  553.     else if(SETFLAG(gad, GTYP_PROPGADGET))   strcat(typ,"PRO");
  554.     else if(SETFLAG(gad, GTYP_STRGADGET))    strcat(typ,"STR");
  555.     else if(SETFLAG(gad, GTYP_CUSTOMGADGET)) strcat(typ,"CUS");
  556.     else if(SETFLAG(gad, GTYP_SIZING))       strcat(typ,"SIZ");
  557.     else
  558.         strcat(typ,"UNK");
  559.  
  560.    Entries[i].se_obj_id.address = gad;
  561.     sprintf(Entries[i].se_Entry, EntryAttr[ALLGADGETS].ea_dataformat,
  562.            gad, title, typ, gad->LeftEdge, gad->TopEdge, gad->Width,
  563.               gad->Height);
  564.  
  565.     return;
  566. }
  567.     /*
  568.      * MakeWindowList() erzeugt eine Liste der offenen Windows im
  569.      * System. Dazu werden alle geöffneten Screens durchsucht
  570.      */
  571. void
  572. RSysGadgetList(void)
  573. {
  574.     ULONG lock;
  575.     struct Window *win;
  576.     struct Screen *scr;
  577.     struct Gadget *gad;
  578.     int    i = 0;
  579.  
  580.     DPOS;
  581.  
  582.    HandleHelp(MN_RSysGadgetList);
  583.  
  584.     PrintHeader(ALLGADGETS, NULL);
  585.  
  586.     EmptyListView();
  587.  
  588.     countentries = 0;
  589.  
  590.     PrintInfo("Please wait! Lock Intuition...", NO_SPEAK, 0);
  591.  
  592.     lock = LockIBase(NULL);
  593.  
  594.     for (scr = IntuitionBase->FirstScreen; scr; scr = scr->NextScreen)
  595.     {
  596.         countentries++;
  597.  
  598.         for(gad = scr->FirstGadget; gad; gad = gad->NextGadget) countentries++;
  599.  
  600.         for (win = scr->FirstWindow; win; win = win->NextWindow)
  601.         {
  602.             countentries++;
  603.  
  604.             if(win->FirstRequest) 
  605.             for(gad = win->FirstRequest->ReqGadget; gad; gad = gad->NextGadget) countentries++;
  606.  
  607.             for(gad = win->FirstGadget; gad; gad = gad->NextGadget) countentries++;
  608.         }
  609.     }
  610.  
  611.     UnlockIBase(lock);
  612.  
  613.     if (NoEntries()) return;
  614.  
  615.     Entries = AllocScrollEntries(countentries);
  616.  
  617.     PrintInfo("Please wait! Lock Intuition again...", NO_SPEAK, 0);
  618.  
  619.     lock = LockIBase(NULL);
  620.  
  621.     for (scr = IntuitionBase->FirstScreen; scr && (i < countentries); scr = scr->NextScreen)
  622.     {
  623.       Entries[i].se_obj_id.address = scr;
  624.  
  625.         if (scr->Title) sprintf(Entries[i++].se_Entry,"%08lx * SCR: %-20.20s *", scr, (char *)scr->Title);
  626.         else
  627.             sprintf(Entries[i++].se_Entry,"%08lx * SCR: %s *", scr, field[NO_TITLE]);
  628.  
  629.         for(gad = scr->FirstGadget; gad && (i < countentries); gad = gad->NextGadget)
  630.             gadgetinfo(gad, i++);
  631.  
  632.         for (win = scr->FirstWindow; win && (i < countentries); win = win->NextWindow)
  633.         {
  634.          Entries[i].se_obj_id.address = win;
  635.  
  636.             if ((char *)win->Title) sprintf(Entries[i++].se_Entry,"%08lx ** WIN: %-20.20s **", win, (char *)win->Title);
  637.             else
  638.                 sprintf(Entries[i++].se_Entry,"%08lx ** WIN: %s **", win, field[NO_TITLE]);
  639.  
  640.             if(win->FirstRequest)
  641.                 for(gad = win->FirstRequest->ReqGadget; gad && (i < countentries); gad = gad->NextGadget)
  642.                     gadgetinfo(gad, i++);
  643.  
  644.             for(gad = win->FirstGadget; gad && (i < countentries); gad = gad->NextGadget)
  645.                 gadgetinfo(gad, i++);
  646.         }
  647.     }
  648.  
  649.     countentries = i;
  650.  
  651.     UnlockIBase(lock);
  652.  
  653.     CreateEntryList(NO_SORT, 0);
  654.  
  655.     PrintStatistics();
  656.  
  657.     return;
  658. }
  659.