FSPDF_ICONPROVIDER Struct Reference

Structure for the provider of alternate icons. More...

#include <fpdf_annot_w.h>

Public Attributes

FS_DWORD lStructSize
 The size of the data structure. It must be set to sizeof(FSPDF_ICONPROVIDER).
 
FS_LPVOID clientData
 A user pointer, used by the application.
 
FS_RESULT(* Release )(FS_LPVOID clientData)
 A callback function can be called when to release everything. More...
 
FS_RESULT(* GetProviderID )(FS_LPVOID clientData, FSCRT_BSTR *str, FS_DWORD *ver)
 A callback function retrieves identity info of icon provider. More...
 
FS_RESULT(* HasIcon )(FS_LPVOID clientData, const FSCRT_BSTR *iconType, const FSCRT_BSTR *iconID, FS_BOOL *hasIcon)
 A callback function determines whether icon provider supports an icon. More...
 
FS_RESULT(* CanChangeColor )(FS_LPVOID clientData, const FSCRT_BSTR *iconType, const FSCRT_BSTR *iconID, FS_BOOL *canChange)
 A callback function determines whether supports to change icon color. More...
 
FS_RESULT(* GetIcon )(FS_LPVOID clientData, const FSCRT_BSTR *iconType, const FSCRT_BSTR *iconID, FS_ARGB color, FSCRT_PAGE *page)
 A callback function retrieves icon as PDF page contents. More...
 
FS_RESULT(* SetShadingColor )(FS_LPVOID clientData, const FSCRT_BSTR *iconType, const FSCRT_BSTR *iconID, FS_ARGB refColor, FS_INT32 shadingIndex, FS_ARGB *c1, FS_ARGB *c2)
 A callback function sets shading colors if an icon supports shading. Currently, we support only Type-2 shading settings with two color values. More...
 
FS_RESULT(* GetDisplaySize )(FS_LPVOID clientData, const FSCRT_BSTR *iconType, const FSCRT_BSTR *iconID, FS_FLOAT *width, FS_FLOAT *height)
 A callback function retrieves icon size when display, in device size(pixel normally). More...
 

Detailed Description

Structure for the provider of alternate icons.

Member Data Documentation

FS_RESULT(* FSPDF_ICONPROVIDER::CanChangeColor) (FS_LPVOID clientData, const FSCRT_BSTR *iconType, const FSCRT_BSTR *iconID, FS_BOOL *canChange)

A callback function determines whether supports to change icon color.

Parameters
[in]clientDataThe user-supplied data.
[in]iconTypePointer to a FSCRT_BSTR structure that specifies a UTF-8 string which indicates the type string of icon. Support types: "Text", "FileAttachment", and "Stamp".
[in]iconIDPointer to a FSCRT_BSTR structure that specifies a UTF-8 string which indicates the identity string of icon. Please refer to "note" description part in callback function FSPDF_ICONPROVIDER::HasIcon for more information.
[out]canChangePointer to a FS_BOOL object that receives a boolean value which indicates whether the color of icon could be changed or not.
Returns
FSCRT_ERRCODE_SUCCESS if application supports to change color.
FSCRT_ERRCODE_ERROR if application cannot support to change color.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally. For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
FS_RESULT(* FSPDF_ICONPROVIDER::GetDisplaySize) (FS_LPVOID clientData, const FSCRT_BSTR *iconType, const FSCRT_BSTR *iconID, FS_FLOAT *width, FS_FLOAT *height)

A callback function retrieves icon size when display, in device size(pixel normally).

Parameters
[in]clientDataThe user-supplied data.
[in]iconTypePointer to a FSCRT_BSTR structure that specifies a UTF-8 string which indicates the type string of icon. Support types: "Text", "FileAttachment", and "Stamp".
[in]iconIDPointer to a FSCRT_BSTR structure that specifies a UTF-8 string which indicates the identity string of icon. Please refer to "note" description part in callback function FSPDF_ICONPROVIDER::HasIcon for more information.
[out]widthPointer to a FS_FLOAT object that receives the width of icon.
[out]heightPointer to a FS_FLOAT object that receives the height of icon.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_ERROR if any error occurs.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
FS_RESULT(* FSPDF_ICONPROVIDER::GetIcon) (FS_LPVOID clientData, const FSCRT_BSTR *iconType, const FSCRT_BSTR *iconID, FS_ARGB color, FSCRT_PAGE *page)

A callback function retrieves icon as PDF page contents.

Parameters
[in]clientDataThe user-supplied data.
[in]iconTypePointer to a FSCRT_BSTR structure that specifies a UTF-8 string which indicates the type string of icon. Support types: "Text", "FileAttachment", and "Stamp".
[in]iconIDPointer to a FSCRT_BSTR structure that specifies a UTF-8 string which indicates the identity string of icon. Please refer to "note" description part in callback function FSPDF_ICONPROVIDER::HasIcon for more information.
[in]colorColor if icon needs. Format: 0xAARRGGBB and alpha value is ignored.
[out]pagePointer to a FSCRT_PAGE handle that receives a page object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
FS_RESULT(* FSPDF_ICONPROVIDER::GetProviderID) (FS_LPVOID clientData, FSCRT_BSTR *str, FS_DWORD *ver)

A callback function retrieves identity info of icon provider.

Parameters
[in]clientDataThe user-supplied data.
[out]strPointer to a FSCRT_BSTR structure that receives a UTF-8 string which indicates the identity name string of icon provider.
[out]verPointer to a FS_DWORD object that receives the version number of icon provider.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
This callback function should return valid identity name string and version number.
FS_RESULT(* FSPDF_ICONPROVIDER::HasIcon) (FS_LPVOID clientData, const FSCRT_BSTR *iconType, const FSCRT_BSTR *iconID, FS_BOOL *hasIcon)

A callback function determines whether icon provider supports an icon.

Parameters
[in]clientDataThe user-supplied data.
[in]iconTypePointer to a FSCRT_BSTR structure that specifies a UTF-8 string which indicates the type string of icon. Support types: "Text", "FileAttachment", and "Stamp".
[in]iconIDPointer to a FSCRT_BSTR structure that specifies a UTF-8 string which indicates the identity string of icon. Please refer to note part for more information.
[out]hasIconWhether an icon is provided.
Returns
FSCRT_ERRCODE_SUCCESS if application supports this icon.
FSCRT_ERRCODE_ERROR if application cannot support this icon.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For Text annotation, valid icon identity strings should be one of macro definitions FSPDF_ANNOT_ICONNAME_TEXT_XXX.
For FileAttachment annotation, valid icon identity strings should be one of macro definitions FSPDF_ANNOT_ICONNAME_FILEATTACH_XXX.
For Stamp annotation, valid icon identity strings should be one of macro definitions FSPDF_ANNOT_ICONNAME_STAMP_XXX.
FS_RESULT(* FSPDF_ICONPROVIDER::Release) (FS_LPVOID clientData)

A callback function can be called when to release everything.

Parameters
[in]clientDataThe user-supplied data.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
FS_RESULT(* FSPDF_ICONPROVIDER::SetShadingColor) (FS_LPVOID clientData, const FSCRT_BSTR *iconType, const FSCRT_BSTR *iconID, FS_ARGB refColor, FS_INT32 shadingIndex, FS_ARGB *c1, FS_ARGB *c2)

A callback function sets shading colors if an icon supports shading. Currently, we support only Type-2 shading settings with two color values.

Parameters
[in]clientDataThe user-supplied data.
[in]iconTypePointer to a FSCRT_BSTR structure that specifies a UTF-8 string which indicates the type string of icon. Support types: "Text", "FileAttachment", and "Stamp".
[in]iconIDPointer to a FSCRT_BSTR structure that specifies a UTF-8 string which indicates the identity string of icon. Please refer to "note" description part in callback function FSPDF_ICONPROVIDER::HasIcon for more information.
[in]refColorReferenced color to set, alpha component is ignored.
[in]shadingIndexIndex color of shading. If shading colors are more than one, this function will be called multiple times.
[out]c1Pointer to a FS_ARGB object that receives the first color value of shading.
[out]c2Pointer to a FS_ARGB object that receives the second color value of shading.
Returns
FSCRT_ERRCODE_SUCCESS if runs well.
FSCRT_ERRCODE_ERROR if any error occurs.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.

The documentation for this struct was generated from the following file:

Foxit Corporation