Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!cbmvax!phillip From: phillip@cbmvax.UUCP Newsgroups: comp.sys.amiga Subject: Re: CON: and RAW: windows Message-ID: <1534@cbmvax.cbmvax.cbm.UUCP> Date: Wed, 11-Mar-87 08:54:21 EST Article-I.D.: cbmvax.1534 Posted: Wed Mar 11 08:54:21 1987 Date-Received: Thu, 12-Mar-87 23:29:56 EST References: <1421@cadovax.UUCP> Organization: Commodore Technology, West Chester, PA Lines: 48 in article <1421@cadovax.UUCP>, kaz@cadovax.UUCP (Kerry Zimmerman) says: > Keywords: CON: RAW: window > Summary: obtaining window pointers from CON: > References: > > [ OK line eater. Make my day! ] ..... > a CON: or RAW: file open request? Can I use the handle to find > my window pointer? > >...... Yes. If you convert your file handle from the open'ed window into a mc ptr and grab the process id for your window out of the file handle "type" field and use that for your packet port. Then send the diskinfo packet to that port. I guess you could hack the setfont code. BPTR myhand = Open("RAW:10/10/60/50/RawWindow",MODE_NEWFILE); struct FileHandle *fh = (struct FileHandle *) BADDR(myhand); struct MsgPort *processid = fh->fh_Type; BTW, the file handle structure is a little mixed up in that fh_Port should be where fh_Type is and vice-versa. > I obtained a copy of a program called "setfont2" which gets the window > pointer by passing a packet request. I found that the window pointer > returned is for the original CLI window only, not my console window. The program probably grabs the process id from the process structure: pr_ConsoleTask. Which would be the default window. > > What is the difference between opening CON: vs opening RAW:? Bascially the way data is handled. In RAW mode data is "untouched" and not buffered. In CON mode data is buffer until a EOF or are detected and ansi sequences are ignored. BTW, You can switch *any* window in and out of con/raw modes...By sending a packet to the window handler process [as in setfont]. (See 1.2 release notes) > Thanks in advance for any response. > > Kerry Zimmerman > # {ucbvax,ihnp4,decvax}!trwrb!cadovax!kaz > # cadovax!kaz@ucla-locus.arpa -phil ============================================================================== Phillip Lindsay - Commodore Business Machines - Amiga Technical Support UUCP: {ihnp4|seismo|caip}!cbmvax!phillip - Phone: (215) 431-9180 No warranty is implied or otherwise given in the form of suggestion or example. Any opinions found here are of my making. /* eof */