🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #13304

Re: Need help dealing with the clipboard

#13304
From: Valentin Pepelea
Date: Thu, 04 Jan 1990 00:37
44 lines
2645 bytes
In article <3126@cbnewsj.ATT.COM> paulm@cbnewsj.ATT.COM (paul.j.maioriello) writes:
>
>I have been trying to write a program that monitors the Amiga clipboard.device.
>This program will try to tell wehn a program has posted to the
>default clipboard unit.  While I currently have the program working,
>I know it is not working in the proper Amiga fashion.  Basically, it opens
>the clipboard device sets up the iorequest structure and message ports and
>calls SendIO. The problem is that SendIO return immediately, even if there
>is nothing in the clip.  This means that the only way that I can monitor
>things is by doing the SendIO in a loop.  I would like to be able to Wait()
>until there is something in the clip.  I'm I on the right track here, or
>what?

The SendIO() function tells the device to start performing the IO and returns
immediately in order to allow you to take full advantage of multitasking. The
task which called SendIO() can now perform other operations while IO is being
performed.

If you wish to be blocked until the IO transfer is complete, use DoIO(), or the
sequence
		SendIO(foo);
		WaitIO(foo);

>Also, it seems that the clipboard.device doesn't know about all the
>commands that good exec devices are supposed to.
>When I try to send it a CMD_CLEAR, DoIO returns a -3 which I believe indicates
>an unimplemented instruction.  Several of the other "standard"
>commands detailed on page 44 of the exec ROM Kernel manual also seem
>to be unimplemented by the clipboard device.  Is this truly the case
>or am I (once again) messing something up?

The command CMD_CLEAR clears all internal buffers used by the device. Well, if
the device does not use any internal buffers, then this command should not do
anything, should it?

>Paul M
>cbnewsj!paulm		Currently still "busy waiting" for the clipboard!!!

Valentin
-- 
The Goddess of democracy? "The tyrants     Name:    Valentin Pepelea
may distroy a statue,  but they cannot     Phone:   (215) 431-9327
kill a god."                               UseNet:  cbmvax!valentin@uunet.uu.net
             - Ancient Chinese Proverb     Claimer: I not Commodore spokesman be
Technical Details
Message-ID: <9202@cbmvax.commodore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!oliveb!amiga!cbmvax!valentin
References: <3126@cbnewsj.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!oliveb!amiga!cbmvax!valentin
From: valentin@cbmvax.commodore.com (Valentin Pepelea)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Need help dealing with the clipboard
Message-ID: <9202@cbmvax.commodore.com>
Date: 4 Jan 90 00:37:49 GMT
References: <3126@cbnewsj.ATT.COM>
Reply-To: valentin@cbmvax.commodore.com (Valentin Pepelea)
Organization: Commodore, West Chester, PA
Lines: 44