TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Thomas Seeling
date: 1997-03-04 13:11:38
subject: Video library blink/bright background

* Crossposted in OS2PROG
* Crossposted in OS2NET.PROGRAMMIERUNG.GER
* Crossposted in OS2.PROG.GER

======================================================================
* Area : emx
======================================================================
From: edgewood{at}pobox.com (Ed Blackman)


About a week ago, I asked:

>Is there some way to make the video library (v_*) toggle between using
>the blink bit to blink the foreground text (which is what it does now)
>and using it to allow bright background colors (which is what I would
>like to do)?

No one answered, so I assumed that the answer was no, and coded a solution
for OS/2, which I now release into the public domain.

/*
** Prototype:
**  int v_blink(int blink);
**
** Compatibility:
**  OS/2
**
** Description:
**  Change what the BLINK attribute constant does.  If blink is zero, **
characters on the screen with the BLINK bit set in the associated **
attribute will be drawn with bright background colors.  If blink is **
non-zero, characters with the BLINK bit set will be drawn with ** blinking
foreground text.
**
** Returns:
**  0 on failure
**  1 on success
*/

#define INCL_VIO
#define INCL_DOSERRORS
#include 

int v_blink(int blink)
{
    VIOINTENSITY vioi = {0};

    vioi.cb = sizeof(VIOINTENSITY);     /* length of the structure */
    vioi.type = 2;                      /* blink/bright background switch */
    vioi.fs = (blink == 0);             /* fs == 0: blink */
                                        /* fs == 1: bright background */

    return (NO_ERROR == VioSetState((void *)&vioi, 0));
}


--
edgewood{at}pobox.com (Ed Blackman)
"If pigs could vote, the man with the slop bucket would be elected
swineherd every time, no matter how much slaughtering he did on the side." 
 -Orson Scott Card


-------------
To unsubscribe send a message to majordomo{at}IAEhv.nl with in the body:
unsubscribe emx 
Report serious problems at: emx-owner{at}.IAEhv.nl.
======================================================================

--- E3-32/1.11-32/3.00+
* Origin: Die TeX-Box +49-6034-930021 V.34 -930022 ISDN 24h (2:244/1130.42)
SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407
SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1
@PATH: 244/1130 1500 396/1 270/101 712/624 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.