Syntax

PXL_RETURN_CODE PxLSetPreviewStateEx (
 IN HANDLE hCamera,
 IN U32    previewState,
 OUT HWND*  phWnd, 
 IN LPVOID pContext,
 IN U32 (PXL_APICALL * ChangeFunction)(
     IN HANDLE    hCamera,
     IN U32       changeCode,
     IN LPVOID    pContext));


Description


Performs a similar function as PxLSetPreviewState, but accommodates a user supplied callback function that will be called when certain windows based operations are performed to the preview window.  The changeCode field will identify the ‘reason’ for the callback.  For Windows based systems, the callback function will only be called if the user closes the preview window (a changeCode of PREVIEW_CLOSED is returned).  However, for Linux based systems, the callback will not only be called for PREVIEW_CLOSED reasons, but also for other reasons (such as PREVIEW_MOVED, PREVIEW_RESIZED, PREVIEW_MINIMIZED, and PREVIEW_RESTORED).


Set Preview StateEx Types


Value


Description


PREVIEW_CLOSED

The user closed the window (by an action such as clicking the 'red x'

PREVIEW_MINIMIZED

The user minimized the preview window

PREVIEW_RESTORED

The user restored (un-minimized) the preview window

PREVIEW_ACTIVATED

The preview window has become the active window (in focus)

PREVIEW_DEACTIVATED

The preview window was deactivated (some other window now has the focus)

PREVIEW_RESIZED

The preview window has been resized

PREVIEW_MOVED

The preview window was moved


Comments, Restrictions and Limitations


See PxLSetStreamState.


On Windows systems, the callback will only be called when the preview window is closed.