table of contents
other versions
- wheezy 1:1.4.3-33
vga_ext_set(3) | Svgalib User Manual | vga_ext_set(3) |
NAME¶
vga_ext_set - set and query several extended featuresSYNOPSIS¶
#include <vga.h>DESCRIPTION¶
sets and several extended features. Before trying to call vga_ext_set() you should check if it is available in vga_getmodeinfo(3) for compatibility with old svgalib versions. In addition, the availability of certain features will depend on the current graphics mode.Query availability of features¶
- vga_ext_set(VGA_EXT_AVAILABLE, VGA_AVAIL_SET)
- returns an int with the i-th bit set if i is a valid what parameter for vga_ext_set().
- vga_ext_set(VGA_EXT_AVAILABLE, VGA_AVAIL_ACCEL)
- returns an integer with the i-th bit set if i
is a valid what parameter for vga_accel(3). For nicer code,
the following integers are predefined to have a bit set in the right
position:
- vga_ext_set(VGA_EXT_AVAILABLE, VGA_AVAIL_ROP)
- returns an integer as VGA_AVAIL_ACCEL does, but this time listing the vga_accel(3) operations which obey a vga_accel(ACCEL_SETRASTEROP, ...) setting.
- vga_ext_set(VGA_EXT_AVAILABLE, VGA_AVAIL_TRANSPARENCY)
- returns an integer as VGA_AVAIL_ACCEL does, but this time listing the vga_accel(3) operations which obey a vga_accel(ACCEL_SETTRANSPARENCY, ...) setting.
- vga_ext_set(VGA_EXT_AVAILABLE, VGA_AVAIL_ROPMODES)
- returns an integer with the i-th bit set if i
is a valid mode parameter for a vga_accel(ACCEL_SETRASTEROP,
mode) call. For example:
if (vga_ext_set(VGA_EXT_AVAILABLE,
VGA_AVAIL_ROPMODES) & (1 << ROP_XOR))
vga_accel(ACCEL_SETRASTEROP, ROP_XOR);
else
/* do something else */
- vga_ext_set(VGA_EXT_AVAILABLE, VGA_AVAIL_TRANSMODES)
- returns an integer with the i-th bit set if i is a valid mode parameter for a vga_accel(ACCEL_SETTRANSPARENCY, mode, ...) call. The function lists only the supported enable functions (currently ENABLE_TRANSPARENCY_COLOR and ENABLE_BITMAP_TRANSPARENCY). It is assumed the corresponding disable functions will then exist as well.
- vga_ext_set(VGA_EXT_AVAILABLE, VGA_AVAIL_FLAGS)
- returns an int with one bit on/off flags. Bits that are set
are supported refer to special features which can be enabled in the
current mode.
Operations with one bit flags¶
A certain mode might have a special feature which can be turned on or off by the applications. These functions allow to handle such features.- vga_ext_set(VGA_EXT_SET, int bitflags)
- set all flags that are set in bitflags, do not touch any other flags. Returns previous setting of all flags.
- vga_ext_set(VGA_EXT_CLEAR, int bitflags)
- clear all flags that are set in bitflags, do not touch any other flags. Returns previous setting of all flags.
- vga_ext_set(VGA_EXT_RESET, int bitflags)
- set all flags to the corresponding bits of bitflags.
Returns previous setting of all flags.
One bit flags for special features¶
As of now, we only support- VGA_CLUT8
- which is set by calling vga_ext_set(VGA_EXT_SET,
VGA_CLUT8). This makes the color lookup table for 16 and 256 color
lookup table modes work with 8 bit per red, green, blue part instead of
the ordinary 6 bits.
Miscanellous features¶
- vga_ext_set(VGA_EXT_PAGE_OFFSET, int offset)
- for all following vga_set*page(n)
calls (even those implicitly done by svgalib drawing functions) do
vga_set*page(n + offset) instead. This
is very nice for drawing in an offscreen area. However, it requires
the mode being able to use more than one page at all as well as not
having called vga_setlinearaddressing(3).
- vga_ext_set(VGA_EXT_FONT_SIZE, int size)
- sets the size of the buffer which the application passes to
vga_gettextfont(3) and vga_puttextfont(3). Old versions of
svgalib used a fixed size of 8192 which is still the default. Newer
versions of svgalib use a larger size internally to properly support the
extended font capabilities of newer kernels.
SEE ALSO¶
svgalib(7), vgagl(7), libvga.config(5), accel(6), testaccel(6), vga_setpalette(3), vga_setpalvec(3), vga_getpalette(3), vga_getpalvec(3), vga_setlinearaddressing(3), vga_setdisplaystart(3), vga_setpage(3), vga_setreadpage(3), vga_setwritepage(3), vga_gettextfont(3), vga_puttextfont(3).AUTHOR¶
This manual page was edited by Michael Weller <eowmob@exp-math.uni-essen.de>. The exact source of the referenced function as well as of the original documentation is unknown.27 July 1997 | Svgalib (>= 1.2.11) |