http://www.w3.org/TR/html4/loose.dtd"> StdGUI Property Functions

StdGUI Property Functions

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
AUTHOR

NAME

StdGUI Property Functions

SYNOPSIS

int set_property(TARGET *p_tgt, char *p_name, int p_mode, ...);

int get_property(TARGET *p_tgt, char *p_name, char ***p_value, int *p_values);

int del_property(TARGET *p_tgt, char *p_name);

int set_ind_property(TARGET *p_tgt, char *p_name, int p_index, char *p_value);

int get_ind_property(TARGET *p_tgt, char *p_name, int p_index, char **p_value);

int del_ind_property(TARGET *p_tgt, char *p_name, int p_index);

int index_property(TARGET *p_tgt, int p_index, char **p_name);

DESCRIPTION

Properties are named lists of strings attached to the application context, windows and widgets. These named string lists control the appearance and behavior of the targets to which they are attached: a property can map a callback function to an event, hold the title of a window, keep track of a widget’s position or size, hold the values displayed in a scrolling list widget, or do almost anything else that can be represented by a string value or set of string values.

Properties are the primary means by which program code controls GUI elements in a StdGUI program.

The set_property() function sets the named properties (p_name) on the specified target window or widget (or the application context if the target is NULL) (p_tgt) to the specified string (p_mode=1), strings (p_mode>1) or array of strings (p_mode=0). Multiple properties on the same target may be set with a single call to this function. The list of properties and property values is terminated with a NULL value.

The get_property() function returns the string values (in p_value) for the named property (p_name) on the target window or widget (or application context if target is NULL) (p_tgt).Thenumberofstringvaluesin the property is returned in the p_values parameter.

The del_property() function deletes the named property (p_name) from the target window or widget (or application context if target is NULL) (p_tgt).

The set_ind_property() function sets the value (p_value) of a specific string element (indexed by p_index) of the named property’s (p_name) string list.

The get_ind_property() function returns (in p_value) the specified string element (indexed by p_index) of the named property’s (p_name) string list.

The del_ind_property() function removes the indexed string element (p_index) of the named property (p_name).

The index_property() function returns the name (p_name) of the indexed property (p_index) of the target window or widget (or application context if target is NULL) (p_tgt).

RETURN VALUES

All of the property functions return zero (0) on success, non-zero on failure.

AUTHOR

Jeffrey Dutky

dutky@bellatlantic.net or jeff.dutky@gmail.com

http://members.bellatlantic.net/~dutky