Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

VDI escape functions
[VDI Function Reference]

escapes functions More...

Defines

#define v_curaddress   vs_curaddress

Functions

void v_bit_image (short, const char *filename, short aspect, short x_scale, short y_scale, short h_align, short v_align, short *pxy)
void v_clear_disp_list (short)
short v_copies (short, short count)
void v_dspcur (short, short x, short y)
void v_form_adv (short)
void v_hardcopy (short)
short v_orient (short, short orientation)
void v_output_window (short, short *pxy)
short v_page_size (short, short page_id)
void v_rmcur (short)
short v_trays (short, short input, short output, short *set_input, short *set_output)
short vq_calibrate (short, short *flag)
short vq_page_name (short, short page_id, char *page_name, long *page_width, long *page_height)
void vq_scan (short, short *g_slice, short *g_page, short *a_slice, short *a_page, short *div_fac)
short vq_tabstatus (short)
short vq_tray_names (short, char *input_name, char *output_name, short *input, short *output)
short vs_calibrate (short, short flag, short *rgb)
short vs_palette (short, short palette)
void v_sound (short, short freq, short duration)
short vs_mute (short, short action)
void vq_tdimensions (short, short *xdimension, short *ydimension)
void vt_alignment (short, short dx, short dy)
void vt_axis (short, short xres, short yres, short *xset, short *yset)
void vt_origin (short, short xorigin, short yorigin)
void vt_resolution (short, short xres, short yres, short *xset, short *yset)
void v_meta_extents (short, short min_x, short min_y, short max_x, short max_y)
void v_write_meta (short, short numvdi_intin, short *avdi_intin, short num_ptsin, short *a_ptsin)
void vm_coords (short, short llx, short lly, short urx, short ury)
void vm_filename (short, const char *filename)
void vm_pagesize (short, short pgwidth, short pgheight)
void vsc_expose (short, short state)
void vsp_film (short, short color_idx, short lightness)
short vqp_filmname (short, short _index, char *name)
void v_offset (short, short offset)
void v_fontinit (short, const void *font_header)
void v_escape2000 (short, short times)
void v_alpha_text (short, const char *str)
void v_curdown (short)
void v_curhome (short)
void v_curleft (short)
void v_curright (short)
void v_curtext (short, const char *str)
void v_curup (short)
void v_eeol (short)
void v_eeos (short)
void v_enter_cur (short)
void v_exit_cur (short)
void v_rvoff (short)
void v_rvon (short)
void vq_chcells (short, short *n_rows, short *n_cols)
void vq_curaddress (short, short *cur_row, short *cur_col)
void vs_curaddress (short, short row, short col)

Detailed Description

escapes functions

todo: add description here


Define Documentation

#define v_curaddress   vs_curaddress
 

alternative name for vs_curaddress


Function Documentation

void v_alpha_text short  handle,
const char *  str
 

Parameters:
handle Device handle
str 
Since:
See also:

void v_bit_image short  handle,
const char *  filename,
short  aspect,
short  x_scale,
short  y_scale,
short  h_align,
short  v_align,
short pxy
 

This escape is required only for printers. It allows the application to request processing of a bit image file

Parameters:
handle Device handle
filename 
aspect Aspect ratio flag :
  • 0 = ignore aspect ratio
  • 1 = honor pixel aspect ratio
x_scale Scaling for x-axis :
  • 0 = fractional scaling
  • 1 = integer scaling
y_scale Scaling for y-axis :
  • 0 = fractional scaling
  • 1 = integer scaling
h_align horizontal alignment :
  • 0 = left
  • 1 = center
  • 2 = right
v_align vertical alignment :
  • 0 = top
  • 1 = middle
  • 2 = bottom
pxy output rectangle
Since:
all VDI versions

void v_clear_disp_list short  handle  ) 
 

This function for printer or plotter drivers clears the printing buffer (and deletes all previous commands). In contrast to v_clrwk() it does not advance the page.

Parameters:
handle Device handle
Since:
all VDI versions
This function should be called if the user interrupts printing while your application generates the page.

short v_copies short  handle,
short  count
 

Use v_copies() to set the number of copies of a page. If count is -1, the number of copies is returned.

Parameters:
handle Device handle
count number of copies (including the "original one"), or -1.
Returns:
number of copies (including the "original one")
Since:
depends on the driver
Note:
if the driver doesn't provide such feature, this function return 1.

void v_curdown short  handle  ) 
 

moves the cursor down one row. If the cursor is already in the last row, nothing happens.

Parameters:
handle Device handle
Since:
all VDI versions

void v_curhome short  handle  ) 
 

This function moves the cursor to the upper left character cell

Parameters:
handle Device handle
Since:
all VDI versions

void v_curleft short  handle  ) 
 

The cursor is moved left. If it is already in the first column, nothing happens.

Parameters:
handle Device handle
Since:
all VDI versions

void v_curright short  handle  ) 
 

moves the cursor right. If the cursor is already in the last column, nothing happens.

Parameters:
handle Device handle
Since:
all VDI versions

void v_curtext short  handle,
const char *  str
 

This function displays a string. The string starts at the current cursor position.

Parameters:
handle Device handle
str 
Since:
all VDI versions

void v_curup short  handle  ) 
 

The cursor is moved up one row. If the cursor is already in the first row, nothing happens.

Parameters:
handle Device handle
Since:
all VDI versions

void v_dspcur short  handle,
short  x,
short  y
 

places a graphic cursor at the specified location

Parameters:
handle Device handle
x x-coordinate of location to place cursor in current coordinate system
y y-coordinate of location to place cursor in current coordinate system.
Since:
all VDI versions
The cursor is usually a cross hair cursor and is of the same type as that used for Input Locator, Request Mode. If sample mode input is supported, the application can use this call to generate the cursor for Input Locator, Sample Mode. In memory-mapped devices, the cursor is drawn in XOR mode so GEM VDI can remove it.

void v_eeol short  handle  ) 
 

This function erases the screen from the cursor position to the end of line

Parameters:
handle Device handle
Since:
all VDI versions

void v_eeos short  handle  ) 
 

The screen is erased from the cursor position to the end of the screen

Parameters:
handle Device handle
Since:
all VDI versions

void v_enter_cur short  handle  ) 
 

This function enables text mode. The screen is cleared and the text cursor is displayed in the upper left cell of the screen.

Parameters:
handle Device handle
Since:
all VDI versions

void v_escape2000 short  handle,
short  times
 

In contrast to v_copies() this function sets the number of copies additional to the "original" page.

Parameters:
handle Device handle
times number of additional copies
Since:
depends on the driver
Note:
Not every printer driver supports this call and since it has no return values, you cannot inquire if it exists. Use v_copies()...

void v_exit_cur short  handle  ) 
 

"EXIT ALPHA MODE" switches back to graphics mode.

Parameters:
handle Device handle
Since:
all VDI versions

void v_fontinit short  handle,
const void *  font_header
 

this escape install the given font as font system.

Parameters:
handle Device handle
font_header 
Since:
???
Note:
this function is not descibed in any doc. Usage at your own risk! BTW, it seems that characters must be 8 pixels width (constant), and the format used must be the motorola format.

void v_form_adv short  handle  ) 
 

is required only for printers. It advances the printer page. This escape can be used instead of invoking a Clear Workstation function if it is desirable to retain the current printer display list while advancing to the next page.

Parameters:
handle Device handle
Since:
all VDI versions

void v_hardcopy short  handle  ) 
 

The device generates a hard copy with this escape. The escape is device-specific and copies the physical screen to a printer or other attached hard copy device.

Parameters:
handle Device handle
Since:
all VDI versions

void v_meta_extents short  handle,
short  min_x,
short  min_y,
short  max_x,
short  max_y
 

updates the extent of the metafile graphic and saves it in the metafile header.

Parameters:
handle Device handle
min_x 
min_y 
max_x 
max_y 
Since:
all VDI versions
The extents information may be used by some applications to provide a quick indication of the minimum rectangle which will bound all primitives output to the metafile.

If the Update Metafile Extents escape is not used when outputting to the metafile, zeroes will be written in the extents information portion of the metafile header.

void v_offset short  handle,
short  offset
 

this function set the screen offset in raster lines from the begining of the logical screen.

Parameters:
handle Device handle
offset 
Since:
???
Note:
this function is not descibe in any doc. Usage at your own risk!

short v_orient short  handle,
short  orientation
 

This function is used for switching between portrait and landscape output of a page. If orientation is -1, the current orientation is returned.

Parameters:
handle Device handle
orientation requested orientation :
  • (-1) just return orientation
  • (0) set to portrait
  • (1) set to landscape
Returns:
realized orientation as follow:
  • (-1) error (not enough memory) => close the driver
  • (0) portrait
  • (1) landscape
Since:
depends on the driver. If the driver doesn't support this fonction, 0 will be returned whatever orientation is.
If there is not enough memory to change the orientation, v_orient returns -1. If that is the case you have to close the driver via v_clswk().

void v_output_window short  handle,
short pxy
 

This escape is required only for printers. It allows the application to request that a particular rectangular window of the picture be output to the printer. This escape is similar to the Update Workstation function, except that the rectangular area must be specified.

Parameters:
handle Device handle
pxy window to be output
Since:
all VDI versions
Note that use of this function does not always guarantee that adjacent pictures will abut. Pictures will abut with a resolution of one printer head height.

short v_page_size short  handle,
short  page_id
 

sets the requested page size (if the page size is defined). If the requested size does not exist, the default setting will be used.

Parameters:
handle Device handle
page_id requested page size as follow:
  • 0: PAGE_DEFAULT
  • 1: PAGE_A3, DIN A3
  • 2: PAGE_A4, DIN A4
  • 3: PAGE_A5, DIN A5
  • 4: PAGE_B5, DIN B5
  • 16: PAGE_LETTER, Letter size
  • 17: PAGE_HALF, Half size
  • 18: PAGE_LEGAL, Legal size
  • 19: PAGE_DOUBLE, Double size
  • 20: PAGE_BROAD, Broad sheet size
Returns:
(-1) : error (not enough memory) => close the driver
else page_size
Since:
depends on the driver. If the driver doesn't support this function, 0 will be returned.
If the return value is -1, you have to close the driver because there is not enough memory.

void v_rmcur short  handle  ) 
 

This escape removes the last graphic cursor placed on the screen

Parameters:
handle Device handle
Since:
all VDI versions

void v_rvoff short  handle  ) 
 

This call switches reverse text output off

Parameters:
handle Device handle
Since:
all VDI versions

void v_rvon short  handle  ) 
 

After calling this function text will be displayed reverse

Parameters:
handle Device handle
Since:
all VDI versions

void v_sound short  handle,
short  freq,
short  duration
 

This escape plays a sound with the given frequency and duration

Parameters:
handle Device handle
freq 
duration 
Since:
PC-GEM >= 2.00

short v_trays short  handle,
short  input,
short  output,
short set_input,
short set_output
 

specify the paper trays. If the requested tray does not exist, the standard tray will be selected (input 0 and output 0).

Parameters:
handle Device handle
input requested input tray
  • (-1) : manual input
  • 0 : default input (tray 1)
  • 1 : tray 2
  • etc...
output requested output tray
  • 0: standard output (usually front)
  • 1: output 2
  • etc...
set_input selected input tray
[option CHECK_NULLPTR] set_input may be NULL
set_output selected output tray
[option CHECK_NULLPTR] set_output may be NULL
Returns:
0 if the driver doesn't supporte this function, any positive value (2) otherwise
Since:
depends on the driver. If the driver doesn't supporte this function, set_input and set_output will contain 0.
See also:
vq_tray_names()

void v_write_meta short  handle,
short  numvdi_intin,
short avdi_intin,
short  num_ptsin,
short a_ptsin
 

allows you to save application specific opcodes in a metafile. Opcodes 0 to 100 are reserved, the range above it can be used.

Parameters:
handle Device handle
numvdi_intin 
avdi_intin 
num_ptsin 
a_ptsin 
Since:
all VDI versions
The opcode is stored in a_intin[0].

void vm_coords short  handle,
short  llx,
short  lly,
short  urx,
short  ury
 

is a sub-opcode of WRITE METAFILE ITEM and sets the used coordinate system.

Parameters:
handle Device handle
llx x-Koordinate links unten
lly y-Koordinate links unten
urx x-Koordinate rechts oben
ury y-Koordinate rechts oben
Since:

void vm_filename short  handle,
const char *  filename
 

This function should be used to change the name of the metafile. The name filename must be an absolute path like "E:\\PICS\\FLIWATT.GEM".

Parameters:
handle Device handle
filename 
Since:
all VDI versions
The metafile in the current directory created by v_opnwk() ("GEMFILE.GEM") will be closed (and deleted by NVDI). Therefore vm_filename() should be called after v_opnwk().

Note: Old metafile driver may not delete the default file "GEMFILE.GEM" when you call vm_filename(). That means that you are on the safe side if you call Fdelete() after vm_filename() and try to delete GEMFILE.GEM.

void vm_pagesize short  handle,
short  pgwidth,
short  pgheight
 

is a sub-opcode of WRITE METAFILE ITEM and sets the page size in 1/10 mm.

Parameters:
handle Device handle
pgwidth width in 1/10 mm
pgheight height in 1/10 mm
Since:

short vq_calibrate short  handle,
short flag
 

This function report back, if vs_calibrate() exists and if calibration is switched on.

Parameters:
handle Device handle
flag calibration aus (0) or ein (1)
Returns:
O if vs_calibrate() is not supported by the driver, any other value if vs_calibrate() is supported by the driver.
Since:
depends on the driver

void vq_chcells short  handle,
short n_rows,
short n_cols
 

This call returns the number of columns and rows/lines of the text screen

Parameters:
handle Device handle
n_rows number of lines
[option CHECK_NULLPTR] n_rows may be NULL
n_cols number of columns
[option CHECK_NULLPTR] n_cols may be NULL
Note:
If n_rows and n_cols are 0, the device does not support text mode.
Since:
all VDI versions

void vq_curaddress short  handle,
short cur_row,
short cur_col
 

This call returns the current cursor position

Parameters:
handle Device handle
cur_row (1 to the maximum number of rows)
[option CHECK_NULLPTR] cur_row may be NULL
cur_col (1 to the maximum number of columns)
[option CHECK_NULLPTR] cur_col may be NULL
Since:
all VDI versions

short vq_page_name short  handle,
short  page_id,
char *  page_name,
long *  page_width,
long *  page_height
 

can be used to determine the name of a paper format and its physical size (height and width including the non-printable margins).

Parameters:
handle Device handle
page_id paper format
page_name pointer to the name
page_width width in micro meters
[option CHECK_NULLPTR] page_width may be NULL
page_height height in micro meters
[option CHECK_NULLPTR] page_height may be NULL
Returns:
paper format or -1 (error: the paper format is not defined and its size cannot be returned.)
Since:
depends on the driver. If the driver doesn't support this function, (-1) will be returned.

void vq_scan short  handle,
short g_slice,
short g_page,
short a_slice,
short a_page,
short div_fac
 

Parameters:
handle Device handle
g_slice 
[option CHECK_NULLPTR] g_slice may be NULL
g_page 
[option CHECK_NULLPTR] g_page may be NULL
a_slice 
[option CHECK_NULLPTR] a_slice may be NULL
a_page 
[option CHECK_NULLPTR] a_page may be NULL
div_fac 
[option CHECK_NULLPTR] div_fac may be NULL
Since:
See also:

short vq_tabstatus short  handle  ) 
 

This escape returns the availability status of a graphics tablet, mouse, joystick, or other similar device.

Parameters:
handle Device handle
Returns:
Tablet status :
  • 0 = tablet not available
  • 1 = tablet available
Since:
all VDI versions

void vq_tdimensions short  handle,
short xdimension,
short ydimension
 

Parameters:
handle Device handle
xdimension 
[option CHECK_NULLPTR] xdimension may be NULL
ydimension 
[option CHECK_NULLPTR] ydimension may be NULL
Since:
See also:

short vq_tray_names short  handle,
char *  input_name,
char *  output_name,
short input,
short output
 

returns the names of the current input and output tray

Parameters:
handle Device handle
input_name pointer to the name of the input tray or NULL
output_name pointer to the name of the output tray or NULL
input number of the input tray
output number of the output tray
Returns:
0 if the driver doesn't supporte this function, any positive value (2) otherwise
Since:
depends on the driver. If the driver doesn't support this function, input and output are set to 0, and the tray name is set to '\0' (if pointer isn't NULL).

short vqp_filmname short  handle,
short  index,
char *  name
 

this escape returns the name of a film.

Parameters:
handle Device handle
index 
name 
Returns:
0 (function not supported or wrong film index), or any positive value otherwise.
Since:
PC-GEM >= 2.0
Note:
a wrong film index returns an empty filmname.

short vs_calibrate short  handle,
short  flag,
short rgb
 

switcher color calibration on or off and can be used to set a calibration table. Before you call this function you should check if it exists (call vq_calibrate()).

Parameters:
handle Device handle
flag requested calibration off (0) or on (1)
rgb pointer to calibration table or 0L
Returns:
selected calibration off (0) or on (1)
Since:
depends on the driver
Note:
The calibration table is used for each workstation of the device driver. Therefore the calibration should only be changed by CPX modules or accessories.

void vs_curaddress short  handle,
short  row,
short  col
 

moves the alpha cursor directly to the specified row and column address anywhere on the display surface. Addresses beyond the displayable range of the screen are set to the nearest value that is within the displayable range of the screen.

Parameters:
handle Device handle
row Row number (1 to maximum number of rows)
col Column number (1 to maximum number of columns).
Since:
all VDI versions

short vs_mute short  handle,
short  action
 

This escape set/unset/return the tone mute flag

Parameters:
handle Device handle
action: 
  • (-1) inquire the mute flag
  • 0 clear the mute flag (sound on)
  • 1 set the mute flag (sound off)
Returns:
the mute flag set
Since:
PC-GEM >= 2.0

short vs_palette short  handle,
short  palette
 

This escape allows the selection of the palette on the IBM (Tm) medium-resolution color screen.

Parameters:
handle Device handle
palette Color selection :
  • 0 = use red, green, brown palette (default)
  • 1 = use cyan, magenta, white palette
Returns:
Palette selected
Since:
all VDI versions

void vsc_expose short  handle,
short  state
 

Parameters:
handle Device handle
state 
Since:
all VDI versions
See also:

void vsp_film short  handle,
short  index,
short  lightness
 

Parameters:
handle Device handle
index 
lightness 
Since:
all VDI versions
See also:

void vt_alignment short  handle,
short  dx,
short  dy
 

Parameters:
handle Device handle
dx 
dy 
Since:
See also:

void vt_axis short  handle,
short  xres,
short  yres,
short xset,
short yset
 

Parameters:
handle Device handle
xres 
yres 
xset 
[option CHECK_NULLPTR] xset may be NULL
yset 
[option CHECK_NULLPTR] yset may be NULL
Returns:
Since:
See also:

void vt_origin short  handle,
short  xorigin,
short  yorigin
 

Parameters:
handle Device handle
xorigin 
yorigin 
Since:
See also:

void vt_resolution short  handle,
short  xres,
short  yres,
short xset,
short yset
 

Parameters:
handle Device handle
xres 
yres 
xset 
[option CHECK_NULLPTR] xset may be NULL
yset 
[option CHECK_NULLPTR] yset may be NULL
Since:
See also:


Generated on Wed Nov 3 22:42:21 2004 for GEMLIB by  doxygen 1.3.9.1