GEMLIB  0.44.0
Macros | Functions
VDI escape functions

escapes functions More...

Macros

#define v_curaddress   vs_curaddress
 

Functions

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

Detailed Description

escapes functions

todo: add description here

Macro Definition Documentation

#define v_curaddress   vs_curaddress

alternative name for vs_curaddress

Function Documentation

void v_alpha_text ( short  handle,
const char *  str 
)
Parameters
handleDevice handle
str
Since
See also

References VDI_CNTRLMAX, VDI_INTINMAX, and vdi_str2array_n().

void v_alpha_text16n ( short  handle,
const short *  wstr,
short  num 
)
Parameters
handleDevice handle
wstr
numstring len
Since
See also

References VDI_CNTRLMAX.

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
handleDevice handle
filename
aspectAspect ratio flag :
  • 0 = ignore aspect ratio
  • 1 = honor pixel aspect ratio
x_scaleScaling for x-axis :
  • 0 = fractional scaling
  • 1 = integer scaling
y_scaleScaling for y-axis :
  • 0 = fractional scaling
  • 1 = integer scaling
h_alignhorizontal alignment :
  • 0 = left
  • 1 = center
  • 2 = right
v_alignvertical alignment :
  • 0 = top
  • 1 = middle
  • 2 = bottom
pxyoutput rectangle
Since
all VDI versions

References VDI_CNTRLMAX, VDI_INTINMAX, and vdi_str2array_n().

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
handleDevice handle
Since
all VDI versions

This function should be called if the user interrupts printing while your application generates the page.

References VDI_CNTRLMAX.

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
handleDevice handle
countnumber 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.

References VDI_CNTRLMAX.

void v_curdown ( short  handle)

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

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

void v_curhome ( short  handle)

This function moves the cursor to the upper left character cell

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

void v_curleft ( short  handle)

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

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

void v_curright ( short  handle)

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

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

void v_curtext ( short  handle,
const char *  str 
)

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

Parameters
handleDevice handle
str
Since
all VDI versions

References VDI_CNTRLMAX, VDI_INTINMAX, and vdi_str2array_n().

void v_curtext16n ( short  handle,
const short *  wstr,
short  num 
)

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

Parameters
handleDevice handle
wstr
numstring len
Since
all VDI versions

References VDI_CNTRLMAX.

void v_curup ( short  handle)

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

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

void v_dspcur ( short  handle,
short  x,
short  y 
)

places a graphic cursor at the specified location

Parameters
handleDevice handle
xx-coordinate of location to place cursor in current coordinate system
yy-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.

References VDI_CNTRLMAX.

void v_eeol ( short  handle)

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

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

void v_eeos ( short  handle)

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

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

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
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

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
handleDevice handle
timesnumber 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()...

References VDI_CNTRLMAX.

void v_exit_cur ( short  handle)

"EXIT ALPHA MODE" switches back to graphics mode.

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

void v_fontinit ( short  handle,
const void *  font_header 
)

this escape install the given font as font system.

Parameters
handleDevice 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.

References VDI_CNTRLMAX.

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
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

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
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

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
handleDevice 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.

References VDI_CNTRLMAX.

void v_offset ( short  handle,
short  offset 
)

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

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

References VDI_CNTRLMAX.

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
handleDevice handle
orientationrequested 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().

References VDI_CNTRLMAX.

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
handleDevice handle
pxywindow 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.

References VDI_CNTRLMAX.

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
handleDevice handle
page_idrequested 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.

References VDI_CNTRLMAX.

void v_rmcur ( short  handle)

This escape removes the last graphic cursor placed on the screen

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

void v_rvoff ( short  handle)

This call switches reverse text output off

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

void v_rvon ( short  handle)

After calling this function text will be displayed reverse

Parameters
handleDevice handle
Since
all VDI versions

References VDI_CNTRLMAX.

void v_sound ( short  handle,
short  freq,
short  duration 
)

This escape plays a sound with the given frequency and duration

Parameters
handleDevice handle
freq
duration
Since
PC-GEM >= 2.00

References VDI_CNTRLMAX.

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
handleDevice handle
inputrequested input tray
  • (-1) : manual input
  • 0 : default input (tray 1)
  • 1 : tray 2
  • etc...
outputrequested output tray
  • 0: standard output (usually front)
  • 1: output 2
  • etc...
set_inputselected input tray
[option CHECK_NULLPTR] set_input may be NULL
set_outputselected 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()

References VDI_CNTRLMAX.

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
handleDevice handle
numvdi_intin
avdi_intin
num_ptsin
a_ptsin
Since
all VDI versions

The opcode is stored in a_intin[0].

References VDI_CNTRLMAX.

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
handleDevice handle
llxx-Koordinate links unten
llyy-Koordinate links unten
urxx-Koordinate rechts oben
uryy-Koordinate rechts oben
Since

References VDI_CNTRLMAX.

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
handleDevice 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.

References VDI_CNTRLMAX, VDI_INTINMAX, and vdi_str2array_n().

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
handleDevice handle
pgwidthwidth in 1/10 mm
pgheightheight in 1/10 mm
Since

References VDI_CNTRLMAX.

short vq_calibrate ( short  handle,
short *  flag 
)

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

Parameters
handleDevice handle
flagcalibration 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

References VDI_CNTRLMAX.

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
handleDevice handle
n_rowsnumber of lines
[option CHECK_NULLPTR] n_rows may be NULL
n_colsnumber 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

References VDI_CNTRLMAX.

void vq_curaddress ( short  handle,
short *  cur_row,
short *  cur_col 
)

This call returns the current cursor position

Parameters
handleDevice 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

References VDI_CNTRLMAX.

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
handleDevice handle
page_idpaper format
page_namepointer to the name
page_widthwidth in micro meters
[option CHECK_NULLPTR] page_width may be NULL
page_heightheight 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.

References VDI_CNTRLMAX.

void vq_scan ( short  handle,
short *  g_slice,
short *  g_page,
short *  a_slice,
short *  a_page,
short *  div_fac 
)
Parameters
handleDevice 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

References VDI_CNTRLMAX.

short vq_tabstatus ( short  handle)

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

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

References VDI_CNTRLMAX.

void vq_tdimensions ( short  handle,
short *  xdimension,
short *  ydimension 
)
Parameters
handleDevice handle
xdimension
[option CHECK_NULLPTR] xdimension may be NULL
ydimension
[option CHECK_NULLPTR] ydimension may be NULL
Since
See also

References VDI_CNTRLMAX.

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
handleDevice handle
input_namepointer to the name of the input tray or NULL
output_namepointer to the name of the output tray or NULL
inputnumber of the input tray
outputnumber 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).

References VDI_CNTRLMAX.

short vqp_filmname ( short  handle,
short  index,
char *  name 
)

this escape returns the name of a film.

Parameters
handleDevice 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.

References vdi_array2str(), VDI_CNTRLMAX, and VDI_INTOUTMAX.

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
handleDevice handle
flagrequested calibration off (0) or on (1)
rgbpointer 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.

References VDI_CNTRLMAX.

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
handleDevice handle
rowRow number (1 to maximum number of rows)
colColumn number (1 to maximum number of columns).
Since
all VDI versions

References VDI_CNTRLMAX.

short vs_mute ( short  handle,
short  action 
)

This escape set/unset/return the tone mute flag

Parameters
handleDevice 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

References VDI_CNTRLMAX.

short vs_palette ( short  handle,
short  palette 
)

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

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

References VDI_CNTRLMAX.

void vsc_expose ( short  handle,
short  state 
)
Parameters
handleDevice handle
state
Since
all VDI versions
See also

References VDI_CNTRLMAX.

void vsp_film ( short  handle,
short  index,
short  lightness 
)
Parameters
handleDevice handle
index
lightness
Since
all VDI versions
See also

References VDI_CNTRLMAX.

void vt_alignment ( short  handle,
short  dx,
short  dy 
)
Parameters
handleDevice handle
dx
dy
Since
See also

References VDI_CNTRLMAX.

void vt_axis ( short  handle,
short  xres,
short  yres,
short *  xset,
short *  yset 
)
Parameters
handleDevice handle
xres
yres
xset
[option CHECK_NULLPTR] xset may be NULL
yset
[option CHECK_NULLPTR] yset may be NULL
Returns
Since
See also

References VDI_CNTRLMAX.

void vt_origin ( short  handle,
short  xorigin,
short  yorigin 
)
Parameters
handleDevice handle
xorigin
yorigin
Since
See also

References VDI_CNTRLMAX.

void vt_resolution ( short  handle,
short  xres,
short  yres,
short *  xset,
short *  yset 
)
Parameters
handleDevice handle
xres
yres
xset
[option CHECK_NULLPTR] xset may be NULL
yset
[option CHECK_NULLPTR] yset may be NULL
Since
See also

References VDI_CNTRLMAX.