API Guide Home
(Online version only)

CameraLib.h File Reference


Detailed Description

Public 68K include file for camera support for Treo 600 devices.

Notes: The calling application should always load this library with SysLibLoad() before use, even if it is already open by another application(ie, SysLibFind() returns a valid refnum). When the application is done with the library, it should be unloaded with SysLibRemove(). We do this because there is no good way to synchronize loading and unloading of libraries among multiple applications. It also greatly simplifies internal synchronization.

Definition in file CameraLib.h.

Include dependency graph for CameraLib.h:

Go to the source code of this file.

Functions


Function Documentation

Err CameraLibCapture ( UInt16  refnum,
void *  buffer,
UInt16  format 
)

Returns a full image (640X480) in the specified color space. This function is not really necessary, since CameraLibPreview could be used instead. This function might be deprecated in the future.

Parameters:
refnum,: IN: Library reference number.
buffer,: IN: Buffer to hold the image.
format,: IN: Format of the image you want returned.
Return values:
Err Error code.

Err CameraLibClose ( UInt16  refnum  ) 

Closes the Camera library. Library should always be unloaded with SysLibRemove() after CameraLibClose() is called. See note at top of file.

Parameters:
refnum,: IN: Library reference number.
Return values:
Err Error code.

Err CameraLibOpen ( UInt16  refnum  ) 

Standard library open routine. Library should always be loaded with SysLibLoad()(not SysLibFind()) before calling CameraLibOpen(). See note at top of file.

Parameters:
refnum,: IN: Library reference number.
Return values:
Err Error code.

Err CameraLibPreview ( UInt16  refnum,
void *  buffer,
UInt16  format,
UInt32  width,
UInt32  height 
)

Returns an image using the window width and height (pixels) you specify. If the width and height are less the dimensions of a full camera image (640x480) a simple pixel sub-sampling algorithm is used to decimate the image.

Parameters:
refnum,: IN: Library reference number.
buffer,: IN: Buffer to hold the image.
format,: IN: Format of the image you want returned.
width,: IN: The width in pixels of the image you want captured.
height,: IN: The height in pixels of the image you want captured.
Return values:
Err Error code.

Err CameraLibPreviewStart ( UInt16  refnum,
WinHandle  windowH,
UInt32  x,
UInt32  y 
)

Puts the camera library in preview mode and establishes a preview window. While in this mode, QQVGA images are continuously copied to the LCD screen of the device. Call CameraLibPreviewStop to exit preview mode.

Parameters:
refnum,: IN: Library reference number.
windowH,: IN: Window handle of the PalmOS window that the image is to be displayed in.
x,: IN: Window-relative coordinate of the left edge of the image.
y,: IN: Window-relative coordinate of the top edge of the image.
Return values:
Err Error code.

Err CameraLibPreviewStop ( UInt16  refnum  ) 

Stops preview mode.

See also:
CameraLibPreviewStart.
Parameters:
refnum,: IN: Library reference number.
Return values:
Err Error code.

Err CameraLibRegisterGet ( UInt16  refnum,
UInt32  reg,
UInt32 valueP 
)

Gets the current setting of the camera register.

Parameters:
refnum,: IN: Library reference number.
reg,: IN: Register number.
valueP,: OUT: Pointer to where register data will be stored.
Return values:
Err Error code.

Err CameraLibRegisterSet ( UInt16  refnum,
UInt32  reg,
UInt32  value 
)

Sets the value of the camera register.

Parameters:
refnum,: IN: Library reference number.
reg,: IN: Register number.
value,: IN: The data value you want to set the register to.
Return values:
Err Error code.

Err CameraLibSleep ( UInt16  refnum  ) 

Standard library sleep function.

Parameters:
refnum,: IN: Library reference number.
Return values:
Err Error code.

Err CameraLibWake ( UInt16  refnum  ) 

Standard library wake function.

Parameters:
refnum,: IN: Library reference number.
Return values:
Err Error code.


Top Palm Developer Network
© 2004-2008, Palm, Inc. All rights reserved.
Generated on Fri Jun 13 10:06:55 2008 for Palm API Guide