|
GLG Toolkit, C / C++ API Library
Version 4.6
|
Functions | |
| void | GlgIHChangeDParameter (GlgIH ih, char *name, double value) |
| Changes a double value stored in a named parameter. More... | |
| void | GlgIHChangeIParameter (GlgIH ih, char *name, GlgLong value) |
| Changes an integer value stored in a named parameter. More... | |
| void | GlgIHChangeOParameter (GlgIH ih, char *name, GlgObject value) |
| Changes a GLG object ID stored in a named parameter. More... | |
| void | GlgIHChangePParameter (GlgIH ih, char *name, void *value) |
| Changes a pointer stored in a named parameter. More... | |
| void | GlgIHChangeSParameter (GlgIH ih, char *name, char *value) |
| Changes a string value stored in a named parameter. More... | |
| double | GlgIHGetDParameter (GlgIH ih, char *name) |
| Returns a double value stored in a named parameter. More... | |
| GlgLong | GlgIHGetIParameter (GlgIH ih, char *name) |
| Returns an integer value stored in a named parameter. More... | |
| GlgObject | GlgIHGetOParameter (GlgIH ih, char *name) |
| Returns a GLG object ID stored in a named parameter. More... | |
| double | GlgIHGetOptDParameter (GlgIH ih, char *name, double default_value) |
| Returns a double value stored in an optional named parameter. More... | |
| GlgLong | GlgIHGetOptIParameter (GlgIH ih, char *name, GlgLong default_value) |
| Returns an integer value stored in an optional named parameter. More... | |
| GlgObject | GlgIHGetOptOParameter (GlgIH ih, char *name, GlgObject default_value) |
| Returns a GLG object ID stored in an optional named parameter. More... | |
| void * | GlgIHGetOptPParameter (GlgIH ih, char *name, void *default_value) |
| Returns a pointer stored in an optional named parameter. More... | |
| char * | GlgIHGetOptSParameter (GlgIH ih, char *name, char *default_value) |
| Returns a string value stored in an optional named parameter. More... | |
| void * | GlgIHGetPParameter (GlgIH ih, char *name) |
| Returns a pointer stored in a named parameter. More... | |
| char * | GlgIHGetSParameter (GlgIH ih, char *name) |
| Returns a pointer stored in a named parameter. More... | |
| void | GlgIHSetDParameter (GlgIH ih, char *name, double value) |
| Creates and stores a named double parameter. More... | |
| void | GlgIHSetIParameter (GlgIH ih, char *name, GlgLong value) |
| Creates and stores a named integer parameter. More... | |
| void | GlgIHSetOParameter (GlgIH ih, char *name, GlgObject value) |
| Creates and stores a named parameter that keeps a GLG object ID. More... | |
| void | GlgIHSetOParameterFromD (GlgIH ih, char *name, double value) |
| Creates and stores a named double parameter that is stored as a GLG Data object of the GLG_D type. More... | |
| void | GlgIHSetOParameterFromG (GlgIH ih, char *name, double value1, double value2, double value3) |
| Creates and stores a named parameter that keeps X, Y and Z or R, G and B values stored as a GLG Data object of the GLG_G type. More... | |
| void | GlgIHSetPParameter (GlgIH ih, char *name, void *value) |
| Creates and stores a named pointer parameter. More... | |
| void | GlgIHSetSParameter (GlgIH ih, char *name, char *value) |
| Creates and stores a named string parameter. More... | |
| void GlgIHChangeDParameter | ( | GlgIH | ih, |
| char * | name, | ||
| double | value | ||
| ) |
Changes a double value stored in a named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to change a global parameter. |
| name | Parameter name. |
| value | New parameter value. |
This function is similar to GlgIHSetDParameter, but instead of creating a new stored parameter, it changes the value of an existing stored parameter of the handler specified by the id.
If the stored parameter with the specified name does not exist, an error is generated.
Changes an integer value stored in a named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to change a global parameter. |
| name | Parameter name. |
| value | New parameter value. |
This function is similar to GlgIHSetIParameter, but instead of creating a new stored parameter, it changes the value of an existing stored parameter of the handler specified by the id.
If the stored parameter with the specified name does not exist, an error is generated.
Changes a GLG object ID stored in a named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to change a global parameter. |
| name | Parameter name. |
| value | New parameter value. |
This function is similar to GlgIHSetOParameter, but instead of creating a new stored parameter, it changes the value of an existing stored parameter of the handler specified by the id.
If the stored parameter with the specified name does not exist, an error is generated.
| void GlgIHChangePParameter | ( | GlgIH | ih, |
| char * | name, | ||
| void * | value | ||
| ) |
Changes a pointer stored in a named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to change a global parameter. |
| name | Parameter name. |
| value | New parameter value. |
This function is similar to GlgIHSetIParameter, but instead of creating a new stored parameter, it changes the value of an existing stored parameter of the handler specified by the id.
If the stored parameter with the specified name does not exist, an error is generated.
| void GlgIHChangeSParameter | ( | GlgIH | ih, |
| char * | name, | ||
| char * | value | ||
| ) |
Changes a string value stored in a named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to change a global parameter. |
| name | Parameter name. |
| value | New parameter value. |
This function is similar to GlgIHSetSParameter, but instead of creating a new stored parameter, it changes the value of an existing stored parameter of the handler specified by the id.
If the stored parameter with the specified name does not exist, an error is generated.
| double GlgIHGetDParameter | ( | GlgIH | ih, |
| char * | name | ||
| ) |
Returns a double value stored in a named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to query a global parameter. |
| name | Parameter name. |
An error is generated if a requested named parameter does not exist, or if its value cannot be converted to the requested return type.
Returns an integer value stored in a named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to query a global parameter. |
| name | Parameter name. |
An error is generated if a requested named parameter does not exist, or if its value cannot be converted to the requested return type.
Returns a GLG object ID stored in a named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to query a global parameter. |
| name | Parameter name. |
An error is generated if a requested named parameter does not exist.
| double GlgIHGetOptDParameter | ( | GlgIH | ih, |
| char * | name, | ||
| double | default_value | ||
| ) |
Returns a double value stored in an optional named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to query a global parameter. |
| name | Parameter name. |
| default_value | The default value that will be returned if the named parameter doesn't exist. |
This function is the same as GlgIHGetDParameter, except that the named parameter is optional. If a stored parameter with the requested name does not exist, a default value provided by default_value is returned.
Returns an integer value stored in an optional named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to query a global parameter. |
| name | Parameter name. |
| default_value | The default value that will be returned if the named parameter doesn't exist. |
This function is the same as GlgIHGetIParameter, except that the named parameter is optional. If a stored parameter with the requested name does not exist, a default value provided by default_value is returned.
Returns a GLG object ID stored in an optional named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to query a global parameter. |
| name | Parameter name. |
| default_value | The default value that will be returned if the named parameter doesn't exist. |
This function is the same as GlgIHGetOParameter, except that the named parameter is optional. If a stored parameter with the requested name does not exist, a default value provided by default_value is returned.
| void* GlgIHGetOptPParameter | ( | GlgIH | ih, |
| char * | name, | ||
| void * | default_value | ||
| ) |
Returns a pointer stored in an optional named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to query a global parameter. |
| name | Parameter name. |
| default_value | The default value that will be returned if the named parameter doesn't exist. |
This function is the same as GlgIHGetPParameter, except that the named parameter is optional. If a stored parameter with the requested name does not exist, a default value provided by default_value is returned.
| char* GlgIHGetOptSParameter | ( | GlgIH | ih, |
| char * | name, | ||
| char * | default_value | ||
| ) |
Returns a string value stored in an optional named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to query a global parameter. |
| name | Parameter name. |
| default_value | The default value that will be returned if the named parameter doesn't exist. |
This function is the same as GlgIHGetSParameter, except that the named parameter is optional. If a stored parameter with the requested name does not exist, a default value provided by default_value is returned.
| void* GlgIHGetPParameter | ( | GlgIH | ih, |
| char * | name | ||
| ) |
Returns a pointer stored in a named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to query a global parameter. |
| name | Parameter name. |
An error is generated if a requested named parameter does not exist.
| char* GlgIHGetSParameter | ( | GlgIH | ih, |
| char * | name | ||
| ) |
Returns a pointer stored in a named parameter.
| ih | Handler ID, or GLG_IH_GLOBAL to query a global parameter. |
| name | Parameter name. |
An error is generated if a requested named parameter does not exist, or if its value cannot be converted to the requested return type.
| void GlgIHSetDParameter | ( | GlgIH | ih, |
| char * | name, | ||
| double | value | ||
| ) |
Creates and stores a named double parameter.
| ih | Handler ID. |
| name | Parameter name. |
| value | Parameter value. |
The name argument specifies the name of the parameter; this name can be used to query the value of the parameter using GlgIHGetDParameter. If a parameter with the specified name already exists, it will be replaced, which can change the type of the parameter associated with the name.
See the Using IH Parameters section for information on how parameters are used.
Creates and stores a named integer parameter.
| ih | Handler ID. |
| name | Parameter name. |
| value | Parameter value. |
The name argument specifies the name of the parameter; this name can be used to query the value of the parameter using GlgIHGetIParameter. If a parameter with the specified name already exists, it will be replaced, which can change the type of the parameter associated with the name.
A parameter is added to the data storage of the handler specified by the ih argument. The GLG_IH_CURR macro can be used to specify the currently active handler, which can eliminate the need to pass the ih handler ID into all functions the handler may invoke.
The GLG_IH_GLOBAL macro can be used to add parameters to the global data storage instead of the data storage of the current handler. When parameters are added, string parameters are cloned and object parameters are referenced.
When a handler is uninstalled, all parameters stored in its data storage are automatically cleaned: string parameters are freed and object parameters are dereferenced. If pointer parameters are used to store addresses of allocated memory, the memory should be freed, as shown in the following example:
Creates and stores a named parameter that keeps a GLG object ID.
| ih | Handler ID. |
| name | Parameter name. |
| value | Parameter value. |
The name argument specifies the name of the parameter; this name can be used to query the value of the parameter using GlgIHGetOParameter. If a parameter with the specified name already exists, it will be replaced, which can change the type of the parameter associated with the name.
The stored object is referenced and is dereferenced when the handler's data storage is destroyed on the GLG_CLEANUP_EVENT event.
See the Using IH Parameters section for information on how parameters are used.
| void GlgIHSetOParameterFromD | ( | GlgIH | ih, |
| char * | name, | ||
| double | value | ||
| ) |
Creates and stores a named double parameter that is stored as a GLG Data object of the GLG_D type.
| ih | Handler ID. |
| name | Parameter name. |
| value | Parameter value. |
The name argument specifies the name of the parameter; this name can be used to query parameter value using GlgIHGetDParameter, or to query the parameter's object ID using GlgIHGetOParameter. If a parameter with the specified name already exists, it will be replaced, which can change the type of the parameter associated with the name.
See the Using IH Parameters section for information on how parameters are used.
| void GlgIHSetOParameterFromG | ( | GlgIH | ih, |
| char * | name, | ||
| double | value1, | ||
| double | value2, | ||
| double | value3 | ||
| ) |
Creates and stores a named parameter that keeps X, Y and Z or R, G and B values stored as a GLG Data object of the GLG_G type.
| ih | Handler ID. |
| name | Parameter name. |
| value1,value2,value3 | Parameter values. |
The name argument specifies the name of the parameter; this name can be used to query the parameter's object ID using GlgIHGetOParameter. If a parameter with the specified name already exists, it will be replaced, which can change the type of the parameter associated with the name.
See the Using IH Parameters section for information on how parameters are used.
| void GlgIHSetPParameter | ( | GlgIH | ih, |
| char * | name, | ||
| void * | value | ||
| ) |
Creates and stores a named pointer parameter.
| ih | Handler ID. |
| name | Parameter name. |
| value | Parameter value. |
The name argument specifies the name of the parameter; this name can be used to query the value of the parameter using GlgIHGetPParameter. If a parameter with the specified name already exists, it will be replaced, which can change the type of the parameter associated with the name.
It is an application's responsibility to allocate memory used by the stored pointer and free it when the handler's data storage is destroyed on the GLG_CLEANUP_EVENT event.
See the Using IH Parameters section for information on how parameters are used.
| void GlgIHSetSParameter | ( | GlgIH | ih, |
| char * | name, | ||
| char * | value | ||
| ) |
Creates and stores a named string parameter.
| ih | Handler ID. |
| name | Parameter name. |
| value | Parameter value. |
The name argument specifies the name of the parameter; this name can be used to query the value of the parameter using GlgIHGetSParameter. If a parameter with the specified name already exists, it will be replaced, which can change the type of the parameter associated with the name.
A copy of the string is stored and is freed when the handler's data storage is destroyed on the GLG_CLEANUP_EVENT event.
See the Using IH Parameters section for information on how parameters are used.