home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!news.funet.fi!funic!sauna.cs.hut.fi!news.cs.hut.fi!s37732v
- From: s37732v@snakemail.hut.fi (Markus Juhani Aalto)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: IntuitionBase
- Date: 12 Jan 93 10:33:40 GMT
- Organization: Helsinki University of Technology, Finland
- Lines: 53
- Distribution: inet
- Message-ID: <S37732V.93Jan12123340@lk-hp-22.hut.fi>
- References: <1993Jan11.054350.13351@daimi.aau.dk> <Dok9wB1w165w@ersys.edmonton.ab.ca>
- NNTP-Posting-Host: lk-hp-22.hut.fi
- In-reply-to: ruil@ersys.edmonton.ab.ca's message of Mon, 11 Jan 93 16:34:36 MST
-
- In article <Dok9wB1w165w@ersys.edmonton.ab.ca> ruil@ersys.edmonton.ab.ca (Rui Lopes) writes:
-
- Well, that's what I thought to, but IntuitionBase is a Library structure
- (ie. you declare it as: struct Library *IntuitionBase) but what I want is
- the IntuitionBase structure that holds current system information. I was
- hoping that there would be some sort of function that would do this, but
- I can't find any.....
- Later,
-
- Rui Lopes ruil@ersys.edmonton.ab.ca
-
- Because IntuitionBase structure is documented, you should declare it like
- this.
-
- struct IntuitionBase *IntuitionBase = NULL;
-
- Setting it to NULL isn`t necessary but it makes it easier to check if
- it was open in a clean up code.
-
- Here is a little clip how to use it
- ----------------------------------
- #include "intuition/intuition.h"
-
- struct IntuitionBase *IntuitionBase = NULL;
-
- main()
- {
- ULONG lock;
-
- IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",33);
- if(IntuitionBase == NULL) return;
-
- /* Now we can use IntuitionBase */
- lock = LockIBase(0);
-
- /* Access IntuitionBase in here. */
- info = IntuitionBase->wantedinfo;
-
- UnlockIBase(lock); /* or was it UnLockIBase(lock)? */
-
- etc...
- }
- --
-
-
- **************************************************************************
- * Markus Aalto | Helsinki University of Technology *
- * | *
- * EMail: s37732v@vipunen.hut.fi | Faculty of Electric Engineering *
- * Fax: 358-0-8746991 (Sometimes) | *
- * | Undergraduate in Computer Science *
- **************************************************************************
-
-