home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Micro R&D 1
/
MicroRD-CD-ROM-Vol1-1994.iso
/
os20
/
cli
/
getpubname.lha
/
GetPubName
/
MoreIntuition.mod
< prev
next >
Wrap
Text File
|
1992-09-13
|
3KB
|
99 lines
(*___________________________________________________________________________
|·| MoreIntuition.mod |-'|##|
|----------------------------------------------------------------------------|
|| 1> | |
|| 1> :Contents. Einige Routinen zu Intuition, die ich in mehreren | |
|| 1> :Contents. Programme verwende | |
|| 1> :Author. Michael `Mick' Hohmann | |
|| 1> :Address. Carl-Schilling-Str. 10; 8701 Kirchheim | |
|| 1> :Phone. 09 31 / 54 1 55 | |
|| 1> :Copyright. Copyrighted Software by ImageArts | |
|| 1> :Language. Oberon | |
|| 1> :Translator. AmigaOberon 2.39d | |
|| 1> :History. v1.0 Added LockFrontPubScr() | |
|| 1> :History. v1.21 totally rewritten | |
|| 1> :History. v1.3 translated to Oberon | |
|| 1> :Thanx. an Bernd Möllemann, Jürgen Weinelt und Steffen Reith | |
|| 1> :Thanx. für ihre Hilfe bei der Erstellung der Algorythmen | |
|| 1> |_|
||_________________________________________________________________________|/|
----------------------------------------------------------------------------*)
MODULE MoreIntuition;
IMPORT
E:=Exec,
I:=Intuition,
SYSTEM,
Strings;
CONST
versionString = "$VER: MoreIntuition 1.21 (Thursday 23 Jul 1992)";
TYPE
String = ARRAY I.maxPubScreenName+1 OF CHAR;
StringPtr = POINTER TO String;
(* ************************************************************************** *)
PROCEDURE LockFrontPubScr*(VAR pubName:ARRAY OF CHAR):I.ScreenPtr;
VAR pubScr,frontScr : I.ScreenPtr;
pubScrList : E.ListPtr;
pubNamePtr : StringPtr;
rootScr : I.ScreenPtr;
intuiLock : LONGINT;
dummy : BOOLEAN;
BEGIN
(** Initialisierungen **)
pubScr:=NIL;
rootScr:=NIL;
dummy:=TRUE;
IF pubName="" THEN
(** Pointer des vordersten Screens holen **)
intuiLock:=I.LockIBase(0);
frontScr:=I.int^.firstScreen;
I.UnlockIBase(intuiLock);
(** PubScreenListe locken **)
pubScrList:=I.LockPubScreenList();
(** Sucht nach dem vordersten Screen in der PubScreenListe **)
LOOP
pubNamePtr:=SYSTEM.VAL(StringPtr,I.NextPubScreen(pubScr,pubName));
pubScr:=I.LockPubScreen(pubNamePtr^);
IF (pubScr=NIL) OR (pubScr=rootScr) THEN pubScr:=I.LockPubScreen(NIL); EXIT END;
IF (pubScr=frontScr) THEN EXIT END;
I.UnlockPubScreen(NIL,pubScr);
IF dummy THEN
rootScr:=pubScr;
dummy:=FALSE
END
END;
(** PubScreenList unlocken **)
I.UnlockPubScreenList()
ELSE
pubScr:=I.LockPubScreen(pubName)
END;
(** Und nun den Pointer auf den gelockten Screen zurückgeben **)
RETURN pubScr
END LockFrontPubScr;
(* ************************************************************************** *)
BEGIN
END MoreIntuition.