Documentation from vtiinet.h

ROV

Introduction

[top]

ROV - Easy applications from C

Copyright - © Jason Tribbeck / 7th ARM 1994-2001

Contributing authors - Jason Tribbeck

File - vtiinet.h

Type - helper

Description

The vtiinet helper provides an interface to the VTi Internet system ("!Voyager").

Some of the calls are designed as an interface to the VTiInternet module, whilst the rest are used to create Voyager standard configuration windows.

Note - It is of little interest to anyone not developing Voyager applications.

VTiInternet SWI interfaces

[top]

See the VTiInternet documentation for details.

int VTiInternet_GetErrorCode(void);
canvas VTiInternet_GetPassword(void);
int VTiInternet_CauseError(char * , char * , char * , char * , char *);
int VTiInternet_ReadConfigure(int, int, void * , int);
int VTiInternet_WriteConfigure(int, int, void * , int);
int VTiInternet_EraseConfigure(int, int);
int VTiInternet_EraseProgram(int);
int VTiInternet_CheckFilter(char * , int);
void VTiInternet_SetDriver(char *);
int Driver(int, int, int, int);
void VTi_VSync(void);
#define VTiInternet_ConfigureLength(aa,bb) VTiInternet_ReadConfigure(aa,bb,0,0)
#define VTiInternet_Error1(aa,bb) VTiInternet_CauseError(aa,bb,0,0,0)
#define VTiInternet_Error2(aa,bb,cc) VTiInternet_CauseError(aa,bb,cc,0,0)
#define VTiInternet_Error3(aa,bb,cc,dd) VTiInternet_CauseError(aa,bb,cc,dd,0)
#define VTiInternet_Error4(aa,bb,cc,dd,ee) VTiInternet_CauseError(aa,bb,cc,dd,ee)

See also: http://www.argogroup.com/vix/

ID (definition)

[top]

Convert a four character ID into a word.

Parameters:

 - a - the bottom 8 bits.
 - b - the next 8 bits.
 - c - the next 8 bits.
 - d - the top 8 bits.

Note - This is used to make IDs for the configuration file. For example, to make the id 'NEWS', use ID('N', 'E', 'W', 'S').

#define ID(a, b, c, d) ((int) ((int) d << 24) | ((int) c << 16) | ((int) b <<  8) | (int)(a))

menu_make (function pointer)

[top]

Definition of a menu maker

Parameters:

 - icon ic - icon to which the menu is attached.

Returns:

 -  the generated menu.

Note - This is called when an icon generated by VTi_CreateMenu() is clicked on.

typedef menu (*menu_make)(icon ic);

See also: VTi_CreateMenu()

_opts (function pointer)

[top]

Definition of an option handler.

Note - These are called to read, write or cancel options

typedef void (* _opts)(void);

list_addop (function pointer)

[top]

Definition of an extendable list handler.

Parameters:

 - int event - the event code.

Returns:

 -  non-zero for event handled, zero for event not handled.

typedef int (* list_addop)(int event);

VTi_OpenConfigure

[top]

Create a configuration window.

Parameters:

 - char *title - the title of the window.
 - int h - the height of the nested window.
 - _opts wr - the function called to write current options.
 - _opts rd - the function called to read options.
 - _opts cn - the function called to cancel options.
 - int vixen - the Vixen ID for this configuration program.

Note - The VTiInet system maintains the current y coordinate for all the icons on the configuration screen.

void VTi_OpenConfigure(char *title,
		       int h,
		       _opts wr,
		       _opts rd,
		       _opts cn,
		       int vixen);

See also: http://www.argonet.co.uk/vixen/

VTi_CreateMenu

[top]

Create a menu item in the configuration window.

Parameters:

 - char *text - the short descriptive text for the menu item.
 - char *value - the pointer to the buffer holding the selected value.
 - menu_make maker - the menu maker.
 - char *help - the help text returned to interactive help.

Returns:

 -  the generated icon.

Note - This creates a half-width menu icon, with the descriptive text to the left of the value box.

icon VTi_CreateMenu(char *text,
		    char *value,
		    menu_make maker,
		    char *help);

VTi_CreateLongMenu

[top]

Create a menu item in the configuration window.

Parameters:

 - char *text - the short descriptive text for the menu item.
 - char *value - the pointer to the buffer holding the selected value.
 - menu_make maker - the menu maker.
 - char *help - the help text returned to interactive help.

Returns:

 -  the generated icon.

Note - This creates a full-width menu icon, with the descriptive text above the value box.

icon VTi_CreateLongMenu(char *text,
			char *value,
			menu_make maker,
			char *help);

VTi_FadeMenu

[top]

Fade a menu item

Parameters:

 - icon ic - the icon to fade.
 - int faded - non-zero for faded, zero for unfaded.

Note - This also fades the value box as well.

void VTi_FadeMenu(icon ic,
		  int faded);

VTi_CreateLongWriteable

[top]

Create a writeable icon.

Parameters:

 - char *text - the short descriptive text for the icon.
 - char *value - the pointer to the value buffer.
 - int len - the maximum length of the string.
 - int type - the type of the writeable field.
 - char *help - the help text returned to interactive help.

Returns:

 -  the generated icon.

Note - This creates a half-width writeable icon, with the descriptive text to the left of the value box.*/ icon VTi_CreateWriteable(char *text, char *value, int len, int type, char *help);

/** Create a writeable icon.
 - char *text - the short descriptive text for the icon.
 - char *value - the pointer to the value buffer.
 - int len - the maximum length of the string.
 - int type - the type of the writeable field.
 - char *help - the help text returned to interactive help.

Returns:

 -  the generated icon.

Note - This creates a full-width writeable icon, with the descriptive text above the value box.

icon VTi_CreateLongWriteable(char *text,
			     char *value,
			     int len,
			     int type,
			     char *help);
/**
 * Create a horizontal bar.
 */
void VTi_CreateHBar(void);

See also: VTi_CreateLongWriteable(), VTi_CreateUnits(), VTi_CreateUnits(), VTi_CreateWriteable(), Writeable icon types, Writeable icon types

VTi_CreateComment

[top]

Create a comment.

Parameters:

 - char *text - the text for the comment.

void VTi_CreateComment(char *text);

VTi_CreateUnits

[top]

Create a writeable icon with units at the end.

Parameters:

 - char *text - the short descriptive text for the icon.
 - char *value - the pointer to the value buffer.
 - char *units - the text for the units.
 - int len - the maximum length of the string.
 - int type - the type of the writeable field.
 - char *help - the help text returned to interactive help.

Returns:

 -  the generated icon.

Note - This creates a full-width writeable icon, with the descriptive text above the value box.

icon VTi_CreateUnits(char *text,
		     char *value,
		     char *units,
		     int len,
		     int type,
		     char *help);
/**
 * Create an option box
 * @param text the text to the right of the option box
 * @param esg the ESG for the option box.
 * @param help the help text returned to interactive help.
 * @return the generated icon.
 * @note If the ESG is zero, then an option icon is created. Otherwise, a radio
 * icon is created.
 * See also: VTi_CreateShortOption()

 */
icon VTi_CreateOption(char *text,
		      int esg,
		      char *help);

See also: VTi_CreateLongWriteable(), VTi_CreateWriteable(), Writeable icon types

VTi_CreateShortOption

[top]

Create a short option box

Parameters:

 - char *text - the text to the right of the option box
 - int esg - the ESG for the option box.
 - char *help - the help text returned to interactive help.

Returns:

 -  the generated icon.

Note - This is designed to allow two option boxes across the configuration window.

Note - If the ESG is zero, then an option icon is created. Otherwise, a radio icon is created.

icon VTi_CreateShortOption(char *text,
			   int esg,
			   char *help);

See also: VTi_CreateOption(), VTi_ReleaseShort()

VTi_ReleaseShort

[top]

Release the short flag.

Note - This clears an internal variable, and is used if an odd number of short options have been created.

void VTi_ReleaseShort(void);

See also: VTi_CreateShortOption()

VTi_CreateInformation

[top]

Create an information field.

Parameters:

 - char *text - the short descriptive text for the field.
 - char *value - the pointer to the information value buffer.
 - char *help - the pointer to the help text.

Returns:

 -  the generated icon.

Note - This creates a half-width information icon, with the descriptive text to the left of the value box.

icon VTi_CreateInformation(char *text,
			   char *value,
			   char *help);

VTi_CreateLargeInformation

[top]

Create a long information field.

Parameters:

 - char *text - the short descriptive text for the field.
 - char *value - the pointer to the information value buffer.
 - char *help - the pointer to the help text.

Returns:

 -  the generated icon.

Note - This creates a full-width information icon, with the descriptive text above the value box.

icon VTi_CreateLargeInformation(char *text,
				char *value,
				char *help);

VTi_Help

[top]

Return interactive help

Note - This is called by the canvas' help event handler.

void VTi_Help(void);

VTi_CreateExtendibleList

[top]

Create an extendible list.

Parameters:

 - char *text - the short descriptive text for the field.
 - char *value - the pointer to the value buffer.
 - menu_make maker - the menu maker.
 - list_addop adder - the list adder handler.
 - int len - the length of the text in the value buffer.
 - int type - the type of the writeable icon.
 - char *help - the pointer to the help text.

Returns:

 -  the generated icon.

Note - This creates a half-width information icon, with the descriptive text to the left of the value box.

icon VTi_CreateExtendibleList(char *text,
			      char *value,
			      menu_make maker,
			      list_addop adder,
			      int len,
			      int type,
			      char * help);

See also: VTi_CreateLargeExtendibleList(), VTi_CreateOpenExtendibleList(), Writeable icon types, list_addop(), menu_make()

VTi_CreateLargeExtendibleList

[top]

Create a large extendible list.

Parameters:

 - char *text - the short descriptive text for the field.
 - char *value - the pointer to the value buffer.
 - menu_make maker - the menu maker.
 - list_addop adder - the list adder handler.
 - int len - the length of the text in the value buffer.
 - int type - the type of the writeable icon.
 - char *help - the pointer to the help text.

Returns:

 -  the generated icon.

Note - This creates a full-width information icon, with the descriptive text above the value box.

icon VTi_CreateLargeExtendibleList(char *text,
				   char *value,
				   menu_make maker,
				   list_addop adder,
				   int len,
				   int type,
				   char * help);

See also: VTi_CreateExtendibleList(), VTi_CreateOpenLargeExtendibleList(), Writeable icon types, list_addop(), menu_make()

VTi_FadeExtendibleList

[top]

Fade an extendible list

Parameters:

 - icon ic - the icon.
 - int faded - non-zero for faded, zero for unfaded.

void VTi_FadeExtendibleList(icon ic,
			    int faded);

VTi_CreateAction

[top]

Create an action button.

Parameters:

 - char *text - the text in the button.
 - char *help - the pointer to the help text.

Returns:

 -  the generated icon.

icon VTi_CreateAction(char *text,
		      char *help);

VTi_CreateOpenExtendibleList

[top]

Create an open extendible list.

Parameters:

 - char *text - the short descriptive text for the field.
 - char *value - the pointer to the value buffer.
 - menu_make maker - the menu maker.
 - list_addop adder - the list adder handler.
 - int len - the length of the text in the value buffer.
 - int type - the type of the writeable icon.
 - char *help - the pointer to the help text.

Returns:

 -  the generated icon.

Note - This creates a half-width information icon, with the descriptive text to the left of the value box.

Note - This differs from a normal extendible list in that there can be other icons between the extendible list and the "add" and "remove" buttons.

icon VTi_CreateOpenExtendibleList(char *text,
				  char *value,
				  menu_make maker,
				  list_addop adder,
				  int len,
				  int type,
				  char * help);

See also: VTi_AddExtendibleList(), VTi_CloseExtendibleList(), VTi_CreateLargeExtendibleList(), VTi_CreateOpenLargeExtendibleList(), Writeable icon types, list_addop(), menu_make()

VTi_CreateOpenLargeExtendibleList

[top]

Create a large extendible list.

Parameters:

 - char *text - the short descriptive text for the field.
 - char *value - the pointer to the value buffer.
 - menu_make maker - the menu maker.
 - list_addop adder - the list adder handler.
 - int len - the length of the text in the value buffer.
 - int type - the type of the writeable icon.
 - char *help - the pointer to the help text.

Returns:

 -  the generated icon.

Note - This creates a full-width information icon, with the descriptive text above the value box.

Note - This differs from a normal extendible list in that there can be other icons between the extendible list and the "add" and "remove" buttons.

icon VTi_CreateOpenLargeExtendibleList(char *text,
				       char *value,
				       menu_make maker,
				       list_addop adder,
				       int len,
				       int type,
				       char *help);

See also: VTi_AddExtendibleList(), VTi_CloseExtendibleList(), VTi_CreateLargeExtendibleList(), VTi_CreateOpenExtendibleList(), Writeable icon types, list_addop(), menu_make()

VTi_AddToExtendibleList

[top]

Add to an extendible list.

Parameters:

 - char *text - the short descriptive text.
 - char *value - the pointer to the value buffer.
 - int len - the length of the buffer.
 - int type - the type if the writeable icon.

Returns:

 -  the generated icon.

icon VTi_AddToExtendibleList(char *text,
			     char *value,
			     int len,
			     int type);

See also: VTi_CreateOpenExtendibleList(), VTi_CreateOpenLargeExtendibleList()

VTi_CloseExtendibleList

[top]

Terminate an extendible list by adding "Add" and "Remove" icons.

void VTi_CloseExtendibleList(void);

VTi_CreateOpenLargeInformation

[top]

Create a large information field in an open extendible list.

Parameters:

 - char *text - the short descriptive text.
 - char *value - the pointer to the value buffer.

icon VTi_CreateOpenLargeInformation(char *text,
				    char * value);

VTi_CreateExample

[top]

Create an example text.

Parameters:

 - char *text - the short descriptive text.
 - char *help - the pointer to the help text.

icon VTi_CreateExample(char *text,
		       char *help);

VTi_Position

[top]

Get/change the y position.

Parameters:

 - int offset - the offset to change the size by.

Returns:

 -  the next coordinate for an icon.

int VTi_Position(int offset);

Writeable icon types

[top]
#define VTI_ALL    (0)
#define VTI_DIGITS (1)
#define VTI_ALPHA  (2)
#define VTI_ALNUM  (3)
#define VTI_HEX    (4)
#define VTI_GROUP  (5)
#define VTI_IP	   (6)

Generated Thu Feb 7 23:22:52 2002