GEMLIB
0.44.0
|
control functions More...
Functions | |
void | v_clrwk (VdiHdl) |
void | v_clsvwk (VdiHdl) |
void | v_clswk (VdiHdl) |
short | v_flushcache (VdiHdl) |
short | v_loadcache (VdiHdl, const char *filename, short mode) |
void | v_opnvwk (short work_in[], VdiHdl *, short work_out[]) |
void | v_opnwk (short work_in[], VdiHdl *, short work_out[]) |
short | v_savecache (VdiHdl, const char *filename) |
void | v_set_app_buff (VdiHdl, void *buf_p, short size) |
void | v_updwk (VdiHdl) |
void | vs_clip (VdiHdl, short clip_flag, short pxy[]) |
void | vs_clip_pxy (VdiHdl, PXY pxy[]) |
void | vs_clip_off (VdiHdl) |
short | vst_load_fonts (VdiHdl, short) |
void | vst_unload_fonts (VdiHdl, short) |
control functions
todo: add description here
void v_clrwk | ( | short | handle | ) |
erases the screen or - if the device is a printer or plotter - advances the page and clears the printing buffer.
handle | Device handle |
References VDI_CNTRLMAX.
void v_clsvwk | ( | short | handle | ) |
closes a virtual workstation
handle | Device handle |
References VDI_CNTRLMAX.
void v_clswk | ( | short | handle | ) |
closes a physical workstation
handle | Device handle |
If you call v_clswk() for a printer driver and if you have not called v_updwk() or v_clear_disp_list() before, buffered commands will be executed and sent to the printer.
References VDI_CNTRLMAX.
short v_flushcache | ( | short | handle | ) |
short v_loadcache | ( | short | handle, |
const char * | filename, | ||
short | mode | ||
) |
handle | Device handle |
filename | |
mode |
References VDI_CNTRLMAX, VDI_INTINMAX, VDI_INTOUTMAX, VDI_PTSOUTMAX, and vdi_str2array_n().
void v_opnvwk | ( | short | work_in[], |
short * | handle, | ||
short | work_out[] | ||
) |
opens a virtual workstation on an already opened physical device (the screen). The attributes for each (virtual) workstation are maintained separately.
work_in | same as v_opnwk() |
handle | before the call, handle specifies the handle of the physical workstation (returned by graf_handle). After the call, handle will contain the handle of the virtual workstation |
work_out | same as v_opnwk() |
References PERIMETER_ON, VDI_CNTRLMAX, vsf_perimeter(), vsl_ends(), vsl_width(), vsm_height(), vst_effects(), and vst_height().
void v_opnwk | ( | short | work_in[], |
short * | handle, | ||
short | work_out[] | ||
) |
loads a device driver and opens a physical workstation. The driver is loaded according to ASSING.SYS and the device is initialized with parameters in the input array.
work_in | work_in Meaning of work_in[0..10]:
|
handle | before the call, handle should contain 0 or 1. after the call, handle will contain the handle of the physical workstation, or 0 if an error has occured. |
work_out | Meaning of work_out[0..56]:
|
Important: The screen driver is opened by the AES after all programs in the AUTO folder have been executed. Therefore applications have to call v_opnvwk()
If you open a NVDI printer or IMG driver, you can set the page size and the GEMDOS output device. The Metafile driver ignores the page size (it should be 0) but it uses the device name.
References VDI_CNTRLMAX.
short v_savecache | ( | short | handle, |
const char * | filename | ||
) |
handle | Device handle |
filename |
References VDI_CNTRLMAX, VDI_INTINMAX, and vdi_str2array_n().
void v_set_app_buff | ( | short | handle, |
void * | buf_p, | ||
short | size | ||
) |
void v_updwk | ( | short | handle | ) |
starts output on devices like printers or plotters, which buffer VDI commands in a display list and do not execute them immediately
handle | Device handle |
The screen driver executes VDI commands immediately and therefore you do not have to call "UPDATE WORKSTATION".
Note: The picture is drawn to the printer but no new page occurs. A Clear Workstation causes a new page.
References VDI_CNTRLMAX.
void vs_clip | ( | short | handle, |
short | clip_flag, | ||
short | pxy[] | ||
) |
You can limit the area for graphic operations by calling this function. If you enable clipping graphic operations will only take place in the clipping rectangle.
handle | Device handle |
clip_flag | turn on/off the clipping as follow:
|
pxy | clipping rectangle |
References VDI_CNTRLMAX.
void vs_clip_off | ( | short | handle | ) |
void vs_clip_pxy | ( | short | handle, |
PXY | pxy[] | ||
) |
same as vs_clip(handle,1,pxy)
handle | Device handle |
pxy | same as vs_clip() |
References VDI_CNTRLMAX.
short vst_load_fonts | ( | short | handle, |
short | select | ||
) |
loads the fonts for the device specified by handle
and returns the number of additional fonts.
handle | Device handle |
select | 0 (reserved) |
Before you call vst_load_fonts(), call vq_gdos() and make sure that the VDI can load additional fonts.
References VDI_CNTRLMAX.
void vst_unload_fonts | ( | short | handle, |
short | select | ||
) |
The memory for the additional fonts is freed.
handle | Device handle |
select | 0 (reserved) |
If the fonts are being shared by other virtual workstations with the same root device handle, the fonts are not unloaded from memory until one of the following conditions is met:
The default system fonts for the workstation remain loaded and available.
References VDI_CNTRLMAX.