home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1997 #3
/
amigamamagazinepolishissue03-1
/
ma_1995
/
09
/
ami931a.txt
< prev
next >
Wrap
Text File
|
1997-04-07
|
1KB
|
121 lines
^-
<l>
/* Listing #7 */
#include <intuition/intuition.h>
#include <proto/exec.h>
#include <proto/graphics.h>
#include <proto/intuition.h>
#include <stdio.h>
struct IntuitionBase *IntuitionBase;
struct GfxBase *GfxBase;
struct Screen *ekran;
ULONG modeid=DEFAULT_MONITOR_ID | HIRES_KEY;
UWORD tabpens[]={(UWORD)~0};
int main(int argc, char *argv[])
{
check_os(OS_20);
if (!(IntuitionBase=(struct IntuitionBase*)OpenLibrary("intuition.library", 37)))
return 20;
if (!(GfxBase=(struct GfxBase*)OpenLibrary("graphics.library", 37)))
{
CloseLibrary((struct Library*)IntuitionBase);
return 20;
}
if (argc>1)
modeid=strtoul(argv[1], 0, 0); /* Konwersja na wartoôê liczbowâ */
if (!ModeNotAvailable(modeid))
if (ekran=OpenScreenTags(0,
SA_Depth, 2,
SA_Title, "LISTING7",
SA_Type, PUBLICSCREEN,
SA_PubName, "LISTING7",
SA_DisplayID, modeid,
SA_Pens, tabpens,
TAG_DONE))
{
PubScreenStatus(ekran, 0);
for (;;)
{
printf("Naciônij RETURN, aby zamknâê ekran...\n");
getchar();
if (CloseScreen(ekran))
break;
printf("Zamknij wszystkie okna znajdujâce sië na ekranie!\n");
}
}
else
printf("Nie mogë otworzyê ekranu!\n");
else
printf("Podano nieznany identyfikator trybu wyôwietlania!\n");
CloseLibrary((struct Library*)GfxBase);
CloseLibrary((struct Library*)IntuitionBase);
return 0;
}