Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!cbmvax!carolyn From: carolyn@cbmvax.UUCP Newsgroups: comp.sys.amiga Subject: Re: window and mouse cursor questions Message-ID: <1536@cbmvax.cbmvax.cbm.UUCP> Date: Wed, 11-Mar-87 18:29:47 EST Article-I.D.: cbmvax.1536 Posted: Wed Mar 11 18:29:47 1987 Date-Received: Fri, 13-Mar-87 02:11:15 EST References: <2724@jade.BERKELEY.EDU> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) Organization: Commodore Technology, West Chester, PA Lines: 48 In article <2724@jade.BERKELEY.EDU> mkent@violet.berkeley.edu() writes: > > How do you set the pen color of a console window higher than color >number 7? The "graphics rendition" string ( ;[30+color-number]m ) >works fine for the low color numbers, but it interprets numbers > 40 as >background pen colors (as per the documentation, amazingly). I notice >SetAPen has no effect on the color of text printed in console windows. >Note that I'm printing in the window using the console device i/o calls, >*not* the text library stuff. Rastport variables for console device Text output are stored in the ConUnit structure. The console device modifies the variables in the ConUnit structure when you write the CSI strings. At the start of each write, it temporarily copies those variables to the window's RastPort so that they are used when it calls Text(). To make the console device print text in a color higher than 7, you would have to store the color number in conunit->FgPen. I've been told you should surround your code to modify conunit->FgPen with a DISABLE/ENABLE pair. Seems like overkill to me, but... You should be able to find the pointer to the ConUnit structure in yourIORequest->io_Unit. (OpenDevice() puts it there). > How can I programmatically control which window is active? There is a new 1.2 Intuition function ActivateWindow(window). To call it, you need to link with 1.2 Amiga.lib. In addition, you'll have to specify version 33 when you open intuition.library so your program can make sure it's being run on a machine with at least 1.2 OS. Abort gracefully if the OpenLibrary fails. If you don't have 1.2 Amiga.lib, order the 1.2 Native Developer Update as described another recent posting of mine. (Note - if you are using Manx then get a 1.2 Manx update instead) > Last question (for now :-)): how does one programmatically control the >mouse state? You send a false InputEvent. See the input.device chapter in the ROM kernal manual. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=