DISPCONTAINERFRAMEREQUESTEDCALLBACK

#include "l_bitmap.h"

L_INT pEXT_CALLBACK YourFuction(nCellIndex, puFramesRequested, uLength, pUserData)

L_INT nCellIndex;

/* index of a cell */

L_UINT * puFramesRequested;

/* table of uLength integers containing frames requested */

L_UINT uLength;

/* length of the frames requested array */

L_VOID * pUserData;

/* user data */

This feature is available in version 16 or higher.

Parameter

Description

nCellIndex

Index of the cell, which has requested the frames in puFramesRequested.

puFramesRequested

Table of uLength integers containing frames requested

uLength

Length of the frames requested array.

pUserData

A void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of L_DispContainerSetLowMemoryUsageCallBack.) Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The low memory usage feature works by stopping the control from loading all the frames at runtime. Instead, the control will load only the frames that are currently visible on the cell. The control will send a request each time the user scrolls down or up, changes the number of visible framesetc. For example, suppose the cell layout is a 2X2 (See L_DispContainerSetCellProperties), and the user needs to load more than 100000 frames. The control will not load them all. This function will send a callback (DISPCONTAINERFRAMEREQUESTEDCALLBACK) when the cell is loaded requesting 4 frames (1, 2, 3 and 4) (because the cell is 2X2). Once the user scrolls down the cell to show frame number 5, frame number 1 will be disposed of because it is no longer visible, and the callback will be fired to request frame number 5. When frames are requested, the user is supposed to send them to the control using the function L_DispContainerSetRequestedImage.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP, Windows CE.

See Also

Functions:

L_DispContainerCreate, L_DispContainerDestroy, L_DispContainerEnableCellLowMemoryUsage, L_DispContainerInsertCell, L_DispContainerSetRequestedImage, L_DispContainerGetLowMemoryUsageCallBack, L_DispContainerSetLowMemoryUsageCallBack, L_DispContainerSetCellBitmapList

Topics:

Using the Image Viewer

 

Image Viewer Functions: Using the Image Viewer

Example

For an example, refer to L_DispContainerSetLowMemoryUsageCallBack.