PEXGetTableEntries - Get Lookup Table Entries (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

 
   Status PEXGetTableEntries(
          Display *display,
          PEXLookupTable table,
          unsigned int start,
          unsigned int count,
          int value_type,
          int *table_type_return,
          PEXPointer *entries_return
   )
 

Arguments

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

table
The resource identifier of the lookup table from which the table entries are to be obtained.

start
The index of the first lookup table entry to be returned.

count
The number of entries requested.

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

table_type_return
Returns the type of table.

entries_return
Returns an array of table entries.

Returns

Zero if unsuccessful; non-zero otherwise.

Description

Invoke PEXGetTableEntries to obtain the values associated with a range of contiguous table indices, starting at the specified entry index.

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

If a table entry in the range you request is not defined, then this function returns the default entry for a table of the requested type for the undefined entry. The type of entries in the returned list depend on the returned table 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 type of PEXRealizedValue, then this function returns the values actually used during rendering (i.e., the values used if the specified entry value cannot be exactly matched).

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

Errors

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

BadValue
The sum of start and count is too large, or index 0 is invalid for the specified table type.

See Also

For an overview, see Lookup Tables.