PEXGetTableEntry - Get Lookup Table Entry (5.0)


Note: This function has been superseded by the PEXGetTableValues function, but it is maintained here for backwards compatibility with PEXlib 5.1.

Synopsis

 
  PEXPointer PEXGetTableEntry(
         Display *display,
         PEXLookupTable table,
         unsigned int index,
         int value_type,
         int *status_return,
         int *table_type_return
   )
 

Arguments

display
A pointer to a display structure returned by a successful XOpenDisplay call.

table
The resource identifier of the lookup table.

index
The index of the entry to be returned from the lookup table.

value_type
The type of values to return (PEXSetValue or PEXRealizedValue).

status_return
Returns the entry status, either PEXDefinedEntry if the specified lookup table entry is defined or PEXDefaultEntry if it is undefined.

table_type_return
Returns the type of table.

Returns

A pointer to the lookup table entry (see PEXLookupTable); a null pointer if unsuccessful.

Description

Invoke PEXGetTableEntry to obtain a single entry from the specified lookup table.

The type of the table specified by table must be one of the following:

If the lookup table entry you specify is defined, then this function returns the defined entry. If the lookup table entry is not defined, then this function returns the default entry for that type of table. The type of structure returned depends on the specified type. See PEXSetTableEntries for the structure types.

If you request a value type of PEXSetValue, then this function returns the values originally set in the table entry. If you request a value of PEXRealizedValue, then this function returns the values actually used during rendering (i.e., the values used if the specified entry value can not be exactly matched).

PEXlib allocates memory for the returned entry. Invoke PEXFreeTableEntries to deallocate the memory.

Errors

BadPEXLookupTable
The specified lookup table resource identifier is invalid, or the table type is unsupported.

BadValue
Index 0 is invalid for the specified table type.

See Also

For an overview, see Lookup Tables.