Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
Classes | Typedefs | Functions | Variables
config.h File Reference
#include <ilviews/base/config.h>
#include <ilviews/base/port.h>
#include <windows.h>

Classes

class  IlvBitmapAllocationResult
 Return type of IlvBitmapAllocationFailedCallback functions. More...
 
class  IlvWindowsDisplayConfig
 Display configuration class for Windows applications. More...
 
class  IlvWindowsPoint
 This class is a helper to deal with the Windows API structure POINT in Rogue Wave Views code. More...
 
class  IlvWindowsRect
 This class is a helper to deal with the Windows API structure RECT in Rogue Wave Views code. More...
 

Typedefs

typedef IlvBitmapAllocationResult(* IlvBitmapAllocationFailedCallback) (IlvDisplay *display, IlvDim width, IlvDim height, IlUShort depth, IlvBitmap::MemoryType memoryType, IlUInt attemptCounter)
 This type defines the prototype of the function that can be used as a callback when a bitmap allocation request fails. More...
 

Functions

void IlvAddHandleToResPath (HINSTANCE hInstance, int index)
 Adds an HINSTANCE into the list of access paths. More...
 
void IlvRemoveHandleFromResPath (HINSTANCE hInstance)
 Removes an HINSTANCE from the list of access paths. More...
 

Variables

const IlvBitmapAllocationResult IlvBitmapAllocationAlternative
 Return this value from an IlvBitmapAllocationFailedCallback if you want Views to retry a bitmap allocation that failed. More...
 
const IlvBitmapAllocationResult IlvBitmapAllocationFail
 Return this value from an IlvBitmapAllocationFailedCallback if you want Views not to try again a bitmap allocation that failed. More...
 
const IlvBitmapAllocationResult IlvBitmapAllocationRetry
 Return this value from an IlvBitmapAllocationFailedCallback if you want Views to retry a bitmap allocation that failed. More...
 

Detailed Description

Library: winviews
This file contains declarations of functions and classes specific to the Windows version of Rogue Wave Views.

Typedef Documentation

◆ IlvBitmapAllocationFailedCallback

typedef IlvBitmapAllocationResult(* IlvBitmapAllocationFailedCallback) (IlvDisplay *display, IlvDim width, IlvDim height, IlUShort depth, IlvBitmap::MemoryType memoryType, IlUInt attemptCounter)

This type defines the prototype of the function that can be used as a callback when a bitmap allocation request fails.

Parameters
displayThe display instance that requested the bitmap allocation.
widthThe width in pixels of the requested bitmap
heightThe height in pixels of the requested bitmap
depthThe depth in bits-per-pixel of the requested bitmap
memoryTypeThe type of allocation that failed.
attemptCounterIndicates how many time the same bitmap allocation was tried already, starting with 0.
Returns
A bitmap handle if the application implements an alternative way of allocating the bitmap, with a direct access to the Windows API. The function can also return:
  • IlvBitmapAllocationRetry if the callback implements a cleanup of the memory (such as a bitmap cache) therefore potentially making the allocation a success this time.
    The application can use the attemptCounter value in order not to enter an infinite loop.
  • IlvBitmapAllocationAlternative (or 0) so that Views can try to allocated the bitmap in another memory area (that is, if memoryType is IlvBitmap::VideoMemoryType, Views will try the allocation again, using IlvBitmap::SystemMemoryType, and vice-versa.
    If the alternative technique fails, the callback is called again, with attemptCounter starting from zero again.
    If the callback returns IlvBitmapAllocAlternative again, it is treated like IlvBitmapAllocFail.
  • IlvBitmapAllocationFail so that Views does not try to allocate the bitmap anymore. This is useful if your application needs an optional feature that depends on the available memory on the video card or in the system.
See also
IlvWindowsDisplayConfig::setBitmapAllocationFailedCallback(IlvBitmapAllocationFailedCallback).

Function Documentation

◆ IlvAddHandleToResPath()

IlvAddHandleToResPath ( HINSTANCE  hInstance,
int  index 
)

Adds an HINSTANCE into the list of access paths.

The list of access paths specifies where the data may be read from resources that are bound to the application.

This function is declared as extern "C".

Parameters
hInstanceAn HINSTANCE to be inserted into the list of access
paths.
indexAn int that is the position where the handle is inserted in the list (-1 means that it is appended to the list).
See also
IlvRemoveHandleFromResPath.

◆ IlvRemoveHandleFromResPath()

IlvRemoveHandleFromResPath ( HINSTANCE  hInstance)

Removes an HINSTANCE from the list of access paths.

The list of access paths specifies where the data may be read from resources that are bound to the application.

This function is declared as extern "C".

Parameters
hInstanceThe HINSTANCE to be removed from the list of access paths.
See also
IlvAddHandleToResPath.

Variable Documentation

◆ IlvBitmapAllocationAlternative

const IlvBitmapAllocationResult IlvBitmapAllocationAlternative
extern

Return this value from an IlvBitmapAllocationFailedCallback if you want Views to retry a bitmap allocation that failed.

After the callback has returned this value, the bitmap allocation will be performed with the alternative memory allocation setting that the one that just failed, invoking the callback. Note that if the callback was invoked in the context of the alternative memory setting, the returned value is equivalent to IlvBitmapAllocationFail.

See also
IlvBitmapAllocationFailedCallback.

◆ IlvBitmapAllocationFail

const IlvBitmapAllocationResult IlvBitmapAllocationFail
extern

Return this value from an IlvBitmapAllocationFailedCallback if you want Views not to try again a bitmap allocation that failed.

After the callback has returned this value, Views will not try any alternative technique to allocate the bitmap. The created IlvBitmap is therefore not a valid object (IlvBitmap::isBad() returns IlTrue).

See also
IlvBitmapAllocationFailedCallback.

◆ IlvBitmapAllocationRetry

const IlvBitmapAllocationResult IlvBitmapAllocationRetry
extern

Return this value from an IlvBitmapAllocationFailedCallback if you want Views to retry a bitmap allocation that failed.

After the callback has returned this value, the bitmap allocation will be performed with the same memory allocation setting that the one that just failed, invoking the callback.

See also
IlvBitmapAllocationFailedCallback.