SignDoc SDK (C)  5.0.2.22
SIGNDOC_CaptureParameters Class Reference

Parameters for SIGNDOC_Capture_startCapture(). More...

#include <SignDocSDK-c.h>

Public Member Functions

struct SIGNDOC_CaptureParametersSIGNDOC_CaptureParameters_new (struct SIGNDOC_Exception **aEx)
 SIGNDOC_CaptureParameters constructor. More...
 
void SIGNDOC_CaptureParameters_delete (struct SIGNDOC_CaptureParameters *aObj)
 SIGNDOC_CaptureParameters destructor. More...
 
struct SIGNDOC_CaptureParametersSIGNDOC_CaptureParameters_clone (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj)
 Clone a SIGNDOC_CaptureParameters object. More...
 
void SIGNDOC_CaptureParameters_assign (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, const struct SIGNDOC_CaptureParameters *aSource)
 SIGNDOC_CaptureParameters assignment operator. More...
 
void SIGNDOC_CaptureParameters_clear (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj)
 Reset all parameters to their default values. More...
 
int SIGNDOC_CaptureParameters_loadFromMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, const unsigned char *aPtr, size_t aSize, unsigned aFlags)
 Load a SIGNDOC_CaptureParameters object from a blob (deserialize). More...
 
int SIGNDOC_CaptureParameters_saveToMemory (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj, struct SIGNDOC_ByteArray *aOutput, unsigned aFlags)
 Serialize a SIGNDOC_CaptureParameters object to a blob. More...
 
int SIGNDOC_CaptureParameters_getType (struct SIGNDOC_Exception **aEx, const char *aName)
 Get the type of a parameter. More...
 
int SIGNDOC_CaptureParameters_setBoolean (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, const char *aName, SIGNDOC_Boolean aValue)
 Set a boolean parameter. More...
 
int SIGNDOC_CaptureParameters_setInteger (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, const char *aName, int aValue)
 Set an integer parameter. More...
 
int SIGNDOC_CaptureParameters_setNumber (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, const char *aName, double aValue)
 Set a floating-point number parameter. More...
 
int SIGNDOC_CaptureParameters_setString (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, int aEncoding, const char *aName, const char *aValue)
 Set a string parameter. More...
 
int SIGNDOC_CaptureParameters_setColor (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, const char *aName, const struct SIGNDOC_Color *aValue)
 Set a color parameter. More...
 
int SIGNDOC_CaptureParameters_setBlob (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, const char *aName, const unsigned char *aData, size_t aSize)
 Set a blob parameter. More...
 
void SIGNDOC_CaptureParameters_clearVirtualButtons (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj)
 Remove all virtual buttons. More...
 
int SIGNDOC_CaptureParameters_addVirtualButton (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, int aCoordinateSystem, const struct SIGNDOC_ImageRect *aRect, int aButtonId)
 Add a virtual button. More...
 
int SIGNDOC_CaptureParameters_addVirtualButton1 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, const struct SIGNDOC_CaptureVirtualButton *aButton)
 Add a virtual button. More...
 
int SIGNDOC_CaptureParameters_getNumberOfVirtualButtons (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj)
 Get the number of virtual buttons. More...
 
int SIGNDOC_CaptureParameters_replaceVirtualButton (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, int aIndex, int aCoordinateSystem, const struct SIGNDOC_ImageRect *aRect, int aButtonId)
 Replace a virtual button. More...
 
int SIGNDOC_CaptureParameters_getVirtualButton (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj, int aIndex, struct SIGNDOC_CaptureVirtualButton *aOutput)
 Get a virtual button. More...
 
int SIGNDOC_CaptureParameters_replaceVirtualButton1 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, int aIndex, const struct SIGNDOC_CaptureVirtualButton *aButton)
 Replace a virtual button. More...
 
int SIGNDOC_CaptureParameters_removeVirtualButton (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CaptureParameters *aObj, int aIndex)
 Remove one virtual button. More...
 
const SIGNDOC_BooleanSIGNDOC_CaptureParameters_getBoolean (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj, const char *aName)
 Get the value of a boolean parameter. More...
 
const int * SIGNDOC_CaptureParameters_getInteger (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj, const char *aName)
 Get the value of an integer parameter. More...
 
const double * SIGNDOC_CaptureParameters_getNumber (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj, const char *aName)
 Get the value of a floating-point number parameter. More...
 
const char * SIGNDOC_CaptureParameters_getString (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj, const char *aName)
 Get the value of a string parameter. More...
 
struct SIGNDOC_ColorSIGNDOC_CaptureParameters_getColor (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj, const char *aName)
 Get the value of a color parameter. More...
 
const unsigned char * SIGNDOC_CaptureParameters_getBlob (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj, const char *aName, size_t *aSize)
 Get the value of a blob parameter. More...
 
const char * SIGNDOC_CaptureParameters_getErrorMessage (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj, int aEncoding)
 Get an error message for the last function call. More...
 
const wchar_t * SIGNDOC_CaptureParameters_getErrorMessageW (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CaptureParameters *aObj)
 Get an error message for the last function call. More...
 

Detailed Description

Member Function Documentation

int SIGNDOC_CaptureParameters_addVirtualButton ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
int  aCoordinateSystem,
const struct SIGNDOC_ImageRect aRect,
int  aButtonId 
)

Add a virtual button.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aCoordinateSystemThe coordinate system for aRect, see SIGNDOC_CAPTURE_COORDINATESYSTEM_DIGITIZER, SIGNDOC_CAPTURE_COORDINATESYSTEM_CAPTURE, SIGNDOC_CAPTURE_COORDINATESYSTEM_IMAGE, and SIGNDOC_CAPTURE_COORDINATESYSTEM_PER_1000. Note that SIGNDOC_CAPTURE_COORDINATESYSTEM_WINDOW cannot be used.
[in]aRectThe button rectangle. Must not be NULL.
[in]aButtonIdThe butten identifier that will be returned in mButtonId of SIGNDOC_CaptureOutput.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_CaptureParameters_addVirtualButton1(), SIGNDOC_CaptureParameters_removeVirtualButton(), SIGNDOC_CaptureParameters_replaceVirtualButton()
int SIGNDOC_CaptureParameters_addVirtualButton1 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
const struct SIGNDOC_CaptureVirtualButton aButton 
)

Add a virtual button.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aButtonThe virtual button to be added. Must not be NULL.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_CaptureParameters_addVirtualButton(), SIGNDOC_CaptureParameters_removeVirtualButton(), SIGNDOC_CaptureParameters_replaceVirtualButton()
void SIGNDOC_CaptureParameters_assign ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
const struct SIGNDOC_CaptureParameters aSource 
)

SIGNDOC_CaptureParameters assignment operator.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aSourceThe source object.
void SIGNDOC_CaptureParameters_clear ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj 
)

Reset all parameters to their default values.

Only the following parameters will be set:

  • ButtonClickMode (string): "tap-release"
  • ButtonPressureDown (integer): 1
  • ButtonPressureUp (integer): 0
  • EncryptSamples (boolean): SIGNDOC_FALSE
  • ImageMarginColor (color): white
  • PaintStrokes (boolean): SIGNDOC_TRUE
  • PreferDeviceLoop (boolean): SIGNDOC_FALSE
  • ReportAllSamples (boolean): SIGNDOC_FALSE
  • StrokeColor (color): black
  • StrokeThicknessPixels (integer): 3
  • Timeout (integer): -1
  • WindowMarginColor (color): white
void SIGNDOC_CaptureParameters_clearVirtualButtons ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj 
)

Remove all virtual buttons.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
See also
SIGNDOC_CaptureParameters_clear()
struct SIGNDOC_CaptureParameters * SIGNDOC_CaptureParameters_clone ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj 
)

Clone a SIGNDOC_CaptureParameters object.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjThe object to be copied.
Returns
A pointer to the new SIGNDOC_CaptureParameters object.
See also
SIGNDOC_CaptureParameters_delete()
void SIGNDOC_CaptureParameters_delete ( struct SIGNDOC_CaptureParameters aObj)

SIGNDOC_CaptureParameters destructor.

Parameters
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
See also
SIGNDOC_CaptureParameters_new()
const unsigned char * SIGNDOC_CaptureParameters_getBlob ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj,
const char *  aName,
size_t *  aSize 
)

Get the value of a blob parameter.

This function does not set an error message.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[out]aSizeThe size of the blob will be stored in the object pointed to by this argument.
Returns
A pointer to the value of the specified parameter or NULL if the parameter is not set or is not a blob parameter. The pointer is valid until the parameter is set again or this SIGNDOC_CaptureParameters object is destroyed.
See also
SIGNDOC_CaptureParameters_setBlob()
const SIGNDOC_Boolean * SIGNDOC_CaptureParameters_getBoolean ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj,
const char *  aName 
)

Get the value of a boolean parameter.

This function does not set an error message.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
Returns
A pointer to the value of the specified parameter or NULL if the parameter is not set or is not a boolean parameter. The pointer is valid until the parameter is set again or this SIGNDOC_CaptureParameters object is destroyed.
See also
SIGNDOC_CaptureParameters_setBoolean()
struct SIGNDOC_Color * SIGNDOC_CaptureParameters_getColor ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj,
const char *  aName 
)

Get the value of a color parameter.

This function does not set an error message.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
Returns
A pointer to the value of the specified parameter or NULL if the parameter is not set. The caller is responsible for destroying the object with SIGNDOC_Color_delete().
See also
SIGNDOC_CaptureParameters_setColor(), SIGNDOC_Color_delete()
const char * SIGNDOC_CaptureParameters_getErrorMessage ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj,
int  aEncoding 
)

Get an error message for the last function call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aEncodingThe encoding to be used for the error message (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_CaptureParameters_getErrorMessageW()
const wchar_t * SIGNDOC_CaptureParameters_getErrorMessageW ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj 
)

Get an error message for the last function call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_CaptureParameters_getErrorMessage()
const int * SIGNDOC_CaptureParameters_getInteger ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj,
const char *  aName 
)

Get the value of an integer parameter.

This function does not set an error message.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
Returns
A pointer to the value of the specified parameter or NULL if the parameter is not set or is not an integer parameter. The pointer is valid until the parameter is set again or this SIGNDOC_CaptureParameters object is destroyed.
See also
SIGNDOC_CaptureParameters_setInteger()
const double * SIGNDOC_CaptureParameters_getNumber ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj,
const char *  aName 
)

Get the value of a floating-point number parameter.

The following read-only floating-point number parameters are available:

This function does not set an error message.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
Returns
A pointer to the value of the specified parameter or NULL if the parameter is not set or is not a floating-point number parameter. The pointer is valid until the parameter is set again or this SIGNDOC_CaptureParameters object is destroyed.
See also
SIGNDOC_CaptureParameters_setNumber()
int SIGNDOC_CaptureParameters_getNumberOfVirtualButtons ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj 
)

Get the number of virtual buttons.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
Returns
The number of virtual buttons.
See also
SIGNDOC_CaptureParameters_getVirtualButton(), SIGNDOC_CaptureParameters_removeVirtualButton(), SIGNDOC_CaptureParameters_replaceVirtualButton()
const char * SIGNDOC_CaptureParameters_getString ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj,
const char *  aName 
)

Get the value of a string parameter.

This function does not set an error message.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
Returns
A pointer to the value of the specified parameter (UTF-8) or NULL if the parameter is not set. The pointer is valid until the parameter is set again or this SIGNDOC_CaptureParameters object is destroyed.
See also
SIGNDOC_CaptureParameters_setString()
int SIGNDOC_CaptureParameters_getType ( struct SIGNDOC_Exception **  aEx,
const char *  aName 
)

Get the type of a parameter.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aNameThe name of the parameter (case-sensitive).
Returns
The type of the parameter: SIGNDOC_PARAMETERS_TYPE_UNDEFINED, SIGNDOC_PARAMETERS_TYPE_BOOLEAN, SIGNDOC_PARAMETERS_TYPE_INTEGER, SIGNDOC_PARAMETERS_TYPE_NUMBER, SIGNDOC_PARAMETERS_TYPE_STRING, SIGNDOC_PARAMETERS_TYPE_COLOR, or SIGNDOC_PARAMETERS_TYPE_BLOB.
int SIGNDOC_CaptureParameters_getVirtualButton ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj,
int  aIndex,
struct SIGNDOC_CaptureVirtualButton aOutput 
)

Get a virtual button.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aIndexThe 0-based index of the virtual button.
[out]aOutputThe virtual button will be stored in the object pointed to by this argument. Must not be NULL.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_CaptureParameters_addVirtualButton(), SIGNDOC_CaptureParameters_getNumberOfVirtualButtons(), SIGNDOC_CaptureParameters_replaceVirtualButton1()
int SIGNDOC_CaptureParameters_loadFromMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
const unsigned char *  aPtr,
size_t  aSize,
unsigned  aFlags 
)

Load a SIGNDOC_CaptureParameters object from a blob (deserialize).

Parameters set in this object but not set in the blob won't be overwritten.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aPtrA pointer to the first octet of a serialized SIGNDOC_CaptureParameters object, see SIGNDOC_CaptureParameters_saveToMemory(). If the blob contains an XML document, it must conform to SignDocParameters.dtd, which see for details.
[in]aSizeSize in octets of the blob pointed to by aPtr.
[in]aFlagsMust be zero.
Returns
SIGNDOC_RETURNCODE_OK if successful, SIGNDOC_RETURNCODE_INVALID_ARGUMENT if an argument is invalid or if the blob is invalid.
See also
SIGNDOC_CaptureParameters_clear(), SIGNDOC_CaptureParameters_saveToMemory()
struct SIGNDOC_CaptureParameters * SIGNDOC_CaptureParameters_new ( struct SIGNDOC_Exception **  aEx)

SIGNDOC_CaptureParameters constructor.

See SIGNDOC_CaptureParameters_clear() for the default values.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
Returns
A pointer to the new SIGNDOC_CaptureParameters object.
See also
SIGNDOC_CaptureParameters_clone(), SIGNDOC_CaptureParameters_delete()
int SIGNDOC_CaptureParameters_removeVirtualButton ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
int  aIndex 
)

Remove one virtual button.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aIndexThe 0-based index of the virtual button.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_CaptureParameters_clearVirtualButtons(), SIGNDOC_CaptureParameters_getNumberOfVirtualButtons()
int SIGNDOC_CaptureParameters_replaceVirtualButton ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
int  aIndex,
int  aCoordinateSystem,
const struct SIGNDOC_ImageRect aRect,
int  aButtonId 
)

Replace a virtual button.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aIndexThe 0-based index of the virtual button.
[in]aCoordinateSystemThe coordinate system for aRect, see SIGNDOC_CAPTURE_COORDINATESYSTEM_DIGITIZER, SIGNDOC_CAPTURE_COORDINATESYSTEM_CAPTURE, SIGNDOC_CAPTURE_COORDINATESYSTEM_IMAGE, and SIGNDOC_CAPTURE_COORDINATESYSTEM_PER_1000. Note that SIGNDOC_CAPTURE_COORDINATESYSTEM_WINDOW cannot be used.
[in]aRectThe button rectangle. Must not be NULL.
[in]aButtonIdThe butten identifier that will be returned in mButtonId of SIGNDOC_CaptureOutput.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_CaptureParameters_replaceVirtualButton1()
int SIGNDOC_CaptureParameters_replaceVirtualButton1 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
int  aIndex,
const struct SIGNDOC_CaptureVirtualButton aButton 
)

Replace a virtual button.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aIndexThe 0-based index of the virtual button.
[in]aButtonThe new virtual button. Must not be NULL.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_CaptureParameters_addVirtualButton1(), SIGNDOC_CaptureParameters_getNumberOfVirtualButtons, SIGNDOC_CaptureParameters_replaceVirtualButton()
int SIGNDOC_CaptureParameters_saveToMemory ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CaptureParameters aObj,
struct SIGNDOC_ByteArray aOutput,
unsigned  aFlags 
)

Serialize a SIGNDOC_CaptureParameters object to a blob.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in,out]aOutputThe serialized data will be stored here. If the output is an XML document, it will conform SignDocParameters.dtd, which see for details.
[in]aFlagsSet of flags:
  • SIGNDOC_PARAMETERS_SAVEFLAG_XML
  • SIGNDOC_PARAMETERS_SAVEFLAG_SYMBOLIC
Pass zero for no flags (binary format).
Returns
SIGNDOC_RETURNCODE_OK if successful, SIGNDOC_RETURNCODE_INVALID_ARGUMENT if aFlags is invalid.
See also
SIGNDOC_CaptureParameters_loadFromMemory()
int SIGNDOC_CaptureParameters_setBlob ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
const char *  aName,
const unsigned char *  aData,
size_t  aSize 
)

Set a blob parameter.

Available blob parameters are:

  • IdleImage The image to be displayed after capture by a capture device with dedicated display. The blob must contain an image in a standard format such as PNG. If this parameter is not set, the display will be cleared.
  • Image The image to be displayed during capture by a capture device with dedicated display. The blob must contain an image in a standard format such as PNG. If this parameter is not set, the display will be cleared.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aDataA pointer to the first octet of the value.
[in]aSizeSize of the blob (number of octets).
Returns
SIGNDOC_RETURNCODE_OK if successful, SIGNDOC_RETURNCODE_UNKNOWN_PARAMETER if aName is not the name of a blob parameter, SIGNDOC_RETURNCODE_INVALID_VALUE if aValue is invalid.
See also
SIGNDOC_CaptureParameters_getBlob(), SIGNDOC_CaptureParameters_setBoolean(), SIGNDOC_CaptureParameters_setColor(), SIGNDOC_CaptureParameters_setInteger(), SIGNDOC_CaptureParameters_setNumber(), SIGNDOC_CaptureParameters_setString()
int SIGNDOC_CaptureParameters_setBoolean ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
const char *  aName,
SIGNDOC_Boolean  aValue 
)

Set a boolean parameter.

The following boolean parameters are available:

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK if successful, SIGNDOC_RETURNCODE_UNKNOWN_PARAMETER if aName is not the name of a boolean parameter, SIGNDOC_RETURNCODE_INVALID_VALUE if aValue is invalid.
See also
SIGNDOC_CaptureParameters_getBoolean(), SIGNDOC_CaptureParameters_setColor(), SIGNDOC_CaptureParameters_setInteger(), SIGNDOC_CaptureParameters_setNumber(), SIGNDOC_CaptureParameters_setString()
int SIGNDOC_CaptureParameters_setColor ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
const char *  aName,
const struct SIGNDOC_Color aValue 
)

Set a color parameter.

The following color parameters are available:

  • ImageMarginColor: The color used for filling the margins left by centering an image on a capture device with dedicated display, see blob parameters "Image" and "IdleImage". Default value: White.
  • StrokeColor: The color used for painting strokes on the capture device. Some devices may ignore this parameter. Default value: black. See color parameter "SignatureColor" of SIGNDOC_ImageParameters for the color to be used for painting strokes in the GUI.
  • WindowMarginColor: The color used for filling the area outside the capture area in the capture window. This parameter is used only for SIGNDOC_CaptureDisplay objects created by SIGNDOC_Capture_createDisplayForGtk3(), SIGNDOC_Capture_createDisplayForHwnd(), and SIGNDOC_Capture_createDisplayForXlib(). It takes effect only if the display type of the capture device is SIGNDOC_CAPTUREDEVICE_DISPLAYTYPE_NONE or SIGNDOC_CAPTUREDEVICE_DISPLAYTYPE_DEDICATED and only if the aspect ratio of the digitizer does not equal the aspect ratio of the capture window. See also color parameter "BackgroundColor" of SIGNDOC_ImageParameters which is used for the capture area in the capture window. Default value: White.

See SIGNDOC_ImageParameters_setColor() for "BackgroundColor" and "SignatureColor".

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK if successful, SIGNDOC_RETURNCODE_UNKNOWN_PARAMETER if aName is not the name of a color parameter, SIGNDOC_RETURNCODE_INVALID_VALUE if aValue is invalid.
See also
SIGNDOC_CaptureParameters_getColor(), SIGNDOC_CaptureParameters_setBlob(), SIGNDOC_CaptureParameters_setBoolean(), SIGNDOC_CaptureParameters_setInteger(), SIGNDOC_CaptureParameters_setNumber(), SIGNDOC_CaptureParameters_setString()
int SIGNDOC_CaptureParameters_setInteger ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
const char *  aName,
int  aValue 
)

Set an integer parameter.

The following integer parameters are available:

  • ButtonPressureDown: For virtual button detection, the pen is considered to be down (active) if the pressure value (normalized to 0 through 1023) is greater than or equal to the value of this parameter. The default value is 1. The value of "ButtonPressureDown" must be greater than the the value of "ButtonPressureUp". See also string parameter "ButtonClickMode".
  • ButtonPressureUp: For virtual button detection, the pen is considered to be up (inactive) if the pressure value (normalized to 0 through 1023) is less than or equal to the value of this parameter. The default value is 0. The value of "ButtonPressureUp" must be less than the the value of "ButtonPressureDown". See also string parameter "ButtonClickMode".
  • ClipBottom: The bottom coordinate (inclusive) of the rectangle to which echoing strokes is restricted on a capture device with dedicated display. For capture devices that don't support clipping, the clipping rectangle is ignored. If one of "ClipBottom", "ClipLeft", "ClipRight", or "ClipTop" is set, all four, as well as "ClipCoordinateSystem", must be set.
  • ClipCoordinateSystem: The coordinate system for integer parameters "ClipButtom", "ClipLeft", "ClipRight", and "ClipTop", see SIGNDOC_CAPTURE_COORDINATESYSTEM_DIGITIZER, SIGNDOC_CAPTURE_COORDINATESYSTEM_CAPTURE, SIGNDOC_CAPTURE_COORDINATESYSTEM_IMAGE, and SIGNDOC_CAPTURE_COORDINATESYSTEM_PER_1000. Note that SIGNDOC_CAPTURE_COORDINATESYSTEM_WINDOW cannot be used. There is no default value, that is, this parameter must be set if a clip rectangle is set.
  • ClipLeft: The left coordinate (inclusive) of the rectangle to which echoing strokes is restricted on a capture device with dedicated display. See integer parameter "ClipBottom" for details.
  • ClipRight: The right coordinate (inclusive) of the rectangle to which echoing strokes is restricted on a capture device with dedicated display. See integer parameter "ClipBottom" for details.
  • ClipTop: The top coordinate (inclusive) of the rectangle to which echoing strokes is restricted on a capture device with dedicated display. See integer parameter "ClipBottom" for details.
  • InkingThresholdOff: Inking (painting strokes on the capture device) stops when the pressure (force) level falls below this value. This parameter has no effect on the data captured. The value must greater than or equal to zero and lower than or equal to the value of InkingThresholdOn. If InkingThresholdOff is set, InkingThresholdOn must also be set. The default value is device-dependent. Currently implemented for Wacom STU devices only. Interpretation of this parameter by the device may differ from the desscription above.
  • InkingThresholdOn: Inking (painting strokes on the capture device) begins when the pressure (force) level becomes greater than or equal to this value. This parameter has no effect on the data captured. The value must be greater than or equal to the value of InkingThresholdOff and smaller than 1024. If InkingThresholdOn is set, InkingThresholdOff must also be set. The default value is device-dependent. Currently implemented for Wacom STU devices only. Interpretation of this parameter by the device may differ from the desscription above.
  • RequestSampleRate: If non-zero, tell the capture device to capture with the specified sample rate (samples per seconds). The capture device may or may not honor that request. SIGNDOC_SignatureData_getDeviceSampleRate() for the object returned by SIGNDOC_CaptureResult_getSignatureData(), SIGNDOC_CaptureResult_takeSignatureData() or SIGNDOC_Capture_waitCapture() will report the sample rate actually used.
  • StrokeThicknessPixels: The thickness of strokes painted by the capture device. Some devices may ignore this parameter. The default value is 3. See floating-point number parameters "PenWidth", "PenWidthPixels", and "PenWidthSource" of SIGNDOC_ImageParameters for the pen width to be used for painting strokes in the GUI.
  • Timeout: The timeout in milliseconds or -1 for no timeout. The default value is -1.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK if successful, SIGNDOC_RETURNCODE_UNKNOWN_PARAMETER if aName is not the name of an integer parameter, SIGNDOC_RETURNCODE_INVALID_VALUE if aValue is invalid.
See also
SIGNDOC_CaptureParameters_getInteger(), SIGNDOC_CaptureParameters_setBoolean(), SIGNDOC_CaptureParameters_setColor(), SIGNDOC_CaptureParameters_setNumber(), SIGNDOC_CaptureParameters_setString()
int SIGNDOC_CaptureParameters_setNumber ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
const char *  aName,
double  aValue 
)

Set a floating-point number parameter.

Currently, there are no floating-point number parameters available.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK if successful, SIGNDOC_RETURNCODE_UNKNOWN_PARAMETER if aName is not the name of a floating-point number parameter, SIGNDOC_RETURNCODE_INVALID_VALUE if aValue is invalid.
See also
SIGNDOC_CaptureParameters_getNumber(), SIGNDOC_CaptureParameters_setBoolean(), SIGNDOC_CaptureParameters_setColor(), SIGNDOC_CaptureParameters_setInteger(), SIGNDOC_CaptureParameters_setString()
int SIGNDOC_CaptureParameters_setString ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CaptureParameters aObj,
int  aEncoding,
const char *  aName,
const char *  aValue 
)

Set a string parameter.

Available string parameters are:

  • ButtonClickMode: Select the actions required for a virtual button to register a click:
    • "tap-release": the capture device must report a non-zero pressure level inside the virtual button rectangle (tap) followed by arbitrary samples, followed by a zero pressure level inside the virtual button (release).
    • "tap": the capture device must report a non-zero pressure level inside the fvirtual button rectangle (tap).
    The default value is "tap-release". See also integer parameters "ButtonPressureDown" and "ButtonPressureDown".
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CaptureParameters object.
[in]aEncodingThe encoding used for aValue (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter. The encoding is specified by aEncoding.
Returns
SIGNDOC_RETURNCODE_OK if successful, SIGNDOC_RETURNCODE_UNKNOWN_PARAMETER if aName is not the name of a string parameter, SIGNDOC_RETURNCODE_INVALID_VALUE if aValue is invalid.
See also
SIGNDOC_CaptureParameters_getString(), SIGNDOC_CaptureParameters_setBlob(), SIGNDOC_CaptureParameters_setBoolean(), SIGNDOC_CaptureParameters_setColor(), SIGNDOC_CaptureParameters_setInteger(), SIGNDOC_CaptureParameters_setNumber()