home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
guicreator
/
demos
/
printer_main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1977-12-31
|
3KB
|
78 lines
/*************************************************************************/
/* */
/* GUI designed with GUICreator V1.0 - © 1995 by Markus Hillenbrand */
/* */
/*************************************************************************/
char *V="$VER: Name 1.0 (01.01.80)";
/*************************************************************************/
/* */
/* Includes */
/* */
/*************************************************************************/
#include <wbstartup.h>
#include <exec/types.h>
#include <graphics/gfxbase.h>
#include <intuition/gadgetclass.h>
#include <clib/alib_protos.h>
#include <clib/exec_protos.h>
#include <clib/intuition_protos.h>
#include <clib/gadtools_protos.h>
#include <clib/graphics_protos.h>
#include <clib/dos_protos.h>
#include "Printer.h"
/*************************************************************************/
/* */
/* Variables and Structures */
/* */
/*************************************************************************/
struct IntuitionBase *IntuitionBase = NULL;
struct GfxBase *GfxBase = NULL;
struct Library *GadToolsBase = NULL;
struct Library *AslBase = NULL;
struct Library *UtilityBase = NULL;
struct Library *DataTypesBase = NULL;
/*************************************************************************/
/* */
/* main() */
/* */
/*************************************************************************/
void main (int argc, char *argv[])
{
IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library",39);
GfxBase =(struct GfxBase *) OpenLibrary("graphics.library" ,39);
GadToolsBase =OpenLibrary("gadtools.library" ,39);
AslBase =OpenLibrary("asl.library" ,39);
DataTypesBase=OpenLibrary("datatypes.library",39);
UtilityBase =OpenLibrary("utility.library" ,39);
if (IntuitionBase && GadToolsBase && GfxBase && AslBase && DataTypesBase && UtilityBase)
{
struct Screen *screen=LockPubScreen(NULL);
if (screen)
{
HandlePrinterPrefsWindow(screen,-1,-1,NULL);
UnlockPubScreen(NULL,screen);
}
else Printf("Cannot lock screen\n");
}
else Printf("Cannot open libraries v39!\n");
if (AslBase) CloseLibrary(AslBase);
if (UtilityBase) CloseLibrary(UtilityBase);
if (GadToolsBase) CloseLibrary(GadToolsBase);
if (DataTypesBase) CloseLibrary(DataTypesBase);
if (GfxBase) CloseLibrary((struct Library *)GfxBase);
if (IntuitionBase) CloseLibrary((struct Library *)IntuitionBase);
}