PEXGetPredefinedEntries - Get Lookup Table Predefined Indices (5.0)


Note: It is recommended that the following compatibility functions not be used for PEXlib applications because of the wide variation in the predefined values found in various implementations.

Synopsis

 
   Status PEXGetPredefinedEntries(
          Display *display,
          Drawable drawable,
          int table_type,
          unsigned int start,
          unsigned int count,
          PEXPointer *entries_return
   )
 

Arguments

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

drawable
The resource identifier of a drawable.

table_type
The type of lookup table (see the Description).

start
The index of the first predefined entry to be returned.

count
The number of predefined entries requested.

entries_return
Returns an array of predefined table entries.

Returns

Zero if unsuccessful; non-zero otherwise.

Description

Invoke PEXGetPredefinedEntries to obtain the predefined entries for the specified lookup table. The type must be one of the following:

Predefined entries are those automatically filled with valid data when you create a lookup table. This function assumes that you will use the lookup table on drawables with the same root and depth as the specified drawable. At most, this function returns the specified number of entries, starting with the specified entry index. You cannot request more entries than predefined entries. Invoke PEXGetTableInfo to determine the number of predefined entries.

Entries in the returned list depend on the type specified. See PEXSetTableEntries for the structure types.

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

Errors

BadDrawable
The specified drawable resource identifier is invalid.

BadMatch
The specified drawable is unsupported.

BadValue
The specified table type is invalid or unsupported, start is less than the minimum predefined entry, the sum of start and count is greater than the maximum predefined entry, or index 0 is not valid for the specified table type.

BadPEXLookupTable
The specified table type is unsupported.

See Also

For an overview, see Lookup Tables.