home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / guicreator / demos / managecdpics_main.c < prev    next >
C/C++ Source or Header  |  1977-12-31  |  3KB  |  78 lines

  1. /*************************************************************************/
  2. /*                                                                       */
  3. /*   GUI designed with GUICreator V1.0 - © 1995 by Markus Hillenbrand    */
  4. /*                                                                       */
  5. /*************************************************************************/
  6.  
  7. char *V="$VER: Name 1.0 (01.01.80)";
  8.  
  9. /*************************************************************************/
  10. /*                                                                       */
  11. /*   Includes                                                            */
  12. /*                                                                       */
  13. /*************************************************************************/
  14.  
  15. #include <wbstartup.h>
  16.  
  17. #include <exec/types.h>
  18. #include <graphics/gfxbase.h>
  19. #include <intuition/gadgetclass.h>
  20.  
  21. #include <clib/alib_protos.h>
  22. #include <clib/exec_protos.h>
  23. #include <clib/intuition_protos.h>
  24. #include <clib/gadtools_protos.h>
  25. #include <clib/graphics_protos.h>
  26. #include <clib/dos_protos.h>
  27.  
  28. #include "ManageCDPics.h"
  29.  
  30. /*************************************************************************/
  31. /*                                                                       */
  32. /*   Variables and Structures                                            */
  33. /*                                                                       */
  34. /*************************************************************************/
  35.  
  36. struct IntuitionBase *IntuitionBase   = NULL;
  37. struct GfxBase       *GfxBase         = NULL;
  38.  
  39. struct Library *GadToolsBase          = NULL;
  40. struct Library *AslBase               = NULL;
  41. struct Library *UtilityBase           = NULL;
  42. struct Library *DataTypesBase         = NULL;
  43.  
  44. /*************************************************************************/
  45. /*                                                                       */
  46. /*   main()                                                              */
  47. /*                                                                       */
  48. /*************************************************************************/
  49.  
  50. void main (int argc, char *argv[])
  51. {
  52.    IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library",39);
  53.    GfxBase      =(struct GfxBase *)      OpenLibrary("graphics.library" ,39);
  54.    GadToolsBase =OpenLibrary("gadtools.library" ,39);
  55.    AslBase      =OpenLibrary("asl.library"      ,39);
  56.    DataTypesBase=OpenLibrary("datatypes.library",39);
  57.    UtilityBase  =OpenLibrary("utility.library"  ,39);
  58.  
  59.    if (IntuitionBase && GadToolsBase && GfxBase && AslBase && DataTypesBase && UtilityBase)
  60.       {
  61.       struct Screen *screen=LockPubScreen(NULL);
  62.       if (screen)
  63.          {
  64.          HandleManageCDPicsWindow(screen,-1,-1,NULL);
  65.          UnlockPubScreen(NULL,screen);
  66.          }
  67.       else Printf("Cannot lock screen\n");
  68.       }
  69.    else Printf("Cannot open libraries v39!\n");
  70.  
  71.    if (AslBase)       CloseLibrary(AslBase);
  72.    if (UtilityBase)   CloseLibrary(UtilityBase);
  73.    if (GadToolsBase)  CloseLibrary(GadToolsBase);
  74.    if (DataTypesBase) CloseLibrary(DataTypesBase);
  75.    if (GfxBase)       CloseLibrary((struct Library *)GfxBase);
  76.    if (IntuitionBase) CloseLibrary((struct Library *)IntuitionBase);
  77. }
  78.