fpdf_layer_r.h
Go to the documentation of this file.
1 
27 #ifndef _FSPDF_LAYER_R_H_
28 #define _FSPDF_LAYER_R_H_
29 
83 #ifdef __cplusplus
84 extern "C" {
85 #endif
86 
87 #ifndef _FSPDF_DEF_HANDLE_LAYER_
88 #define _FSPDF_DEF_HANDLE_LAYER_
89 
90 FSCRT_DEFINEHANDLE(FSPDF_LAYER);
91 #endif // _FSPDF_DEF_HANDLE_LAYER_
92 
93 /*******************************************************************************/
94 /* PDF Layer's properties definitions */
95 /*******************************************************************************/
96 
97 #ifndef _FSPDF_DEF_MACRO_LAYERUSAGETYPE_
98 #define _FSPDF_DEF_MACRO_LAYERUSAGETYPE_
99 
104 #define FSPDF_LAYERUSAGETYPE_VIEW 0
105 
106 #define FSPDF_LAYERUSAGETYPE_DESIGN 1
107 
108 #define FSPDF_LAYERUSAGETYPE_PRINT 2
109 
110 #define FSPDF_LAYERUSAGETYPE_EXPORT 3
111 
112 #define FSPDF_LAYERUSAGETYPE_ZOOM 4
113 
114 #endif //_FSPDF_DEF_MACRO_LAYERUSAGETYPE_
115 
116 #ifndef _FSPDF_DEF_MACRO_LAYERBASESTATE_
117 #define _FSPDF_DEF_MACRO_LAYERBASESTATE_
118 
123 #define FSPDF_LAYER_BASESTATE_ON 0
124 
125 #define FSPDF_LAYER_BASESTATE_OFF 1
126 
127 #define FSPDF_LAYER_BASESTATE_UNCHANGED 2
128 
130 #endif //_FSPDF_DEF_MACRO_LAYERBASESTATE_
131 
132 /*******************************************************************************/
133 /* PDF Layer Node for enumerate the layers. */
134 /*******************************************************************************/
135 #ifndef _FSCRT_DEF_STRUCTURE_LAYERNODE_
136 #define _FSCRT_DEF_STRUCTURE_LAYERNODE_
137 
143 typedef struct _FSPDF_LAYERNODE
144 {
152  FSPDF_LAYER layer;
158  struct _FSPDF_LAYERNODE* children;
165 #endif //_FSCRT_DEF_STRUCTURE_LAYERNODE_
166 
167 
168 #ifndef _FSCRT_DEF_STRUCTURE_LAYE_USAGE_PARAM_
169 #define _FSCRT_DEF_STRUCTURE_LAYE_USAGE_PARAM_
170 
174 typedef struct _FSPDF_LAYERUSAGE_ZOOMDATA
175 {
181 
186 typedef struct _FSPDF_LAYERUSAGE_PRINTDATA
187 {
193 
194 #endif //_FSCRT_DEF_STRUCTURE_LAYE_USAGE_PARAM_
195 
219 
242 
271 FS_RESULT FSPDF_Doc_EnumLayers(FSCRT_DOCUMENT document, FSPDF_LAYERNODE* layers);
272 
273 /*******************************************************************************/
274 /* Access PDF Layer Properties */
275 /*******************************************************************************/
300 FS_RESULT FSPDF_Layer_GetName(FSPDF_LAYER layer, FSCRT_BSTR* name);
301 
327 FS_RESULT FSPDF_Layer_IsInPage(FSCRT_PAGE page, FSPDF_LAYER layer, FS_BOOL* isInPage);
328 
353 FS_RESULT FSPDF_Layer_HasIntent(FSPDF_LAYER layer,const FSCRT_BSTR* intent, FS_BOOL* hasIntent);
354 
392 FS_RESULT FSPDF_Layer_GetApplicationUsage(FSPDF_LAYER layer, FS_INT32 usageType, FS_LPVOID param);
393 
394 
432 FS_RESULT FSPDF_Layer_EnumeratePageObject(FSPDF_LAYER layer, FSCRT_PAGE page, FSCRT_POSITION* position, FSPDF_PAGEOBJECT* pageObj);
433 
434 
435 /*******************************************************************************/
436 /* Definition and Functions for PDF Layer Context */
437 /*******************************************************************************/
438 
473 FS_RESULT FSPDF_LayerContext_Create(FSCRT_DOCUMENT document, FS_INT32 usType, FSPDF_LAYERCONTEXT* context);
474 
495 FS_RESULT FSPDF_LayerContext_Release(FSPDF_LAYERCONTEXT context);
496 
517 FS_RESULT FSPDF_LayerContext_GetDocument(FSPDF_LAYERCONTEXT context, FSCRT_DOCUMENT* document);
518 
546 FS_RESULT FSPDF_LayerContext_GetUsageType(FSPDF_LAYERCONTEXT context, FS_INT32* usType);
547 
568 FS_RESULT FSPDF_LayerContext_Reset(FSPDF_LAYERCONTEXT context);
569 
594 FS_RESULT FSPDF_LayerContext_CopyStates(FSPDF_LAYERCONTEXT destContext, FSPDF_LAYERCONTEXT srcContext);
595 
622 FS_RESULT FSPDF_LayerContext_MergeStates(FSPDF_LAYERCONTEXT destContext, FSPDF_LAYERCONTEXT srcContext);
623 
648 FS_RESULT FSPDF_LayerContext_IsVisible(FSPDF_LAYERCONTEXT context, FSPDF_LAYER layer, FS_BOOL* visible);
649 
674 FS_RESULT FSPDF_LayerContext_SetVisible(FSPDF_LAYERCONTEXT context, FSPDF_LAYER layer, FS_BOOL visible);
675 
676 #ifdef __cplusplus
677 };
678 #endif
679  /* group FPDLAYER */
681 
682 #endif /* _FSPDF_LAYER_R_H_ */
FS_RESULT FSPDF_Layer_HasIntent(FSPDF_LAYER layer, const FSCRT_BSTR *intent, FS_BOOL *hasIntent)
Check whether a PDF layer has a specific intent.
FSPDF_LAYER layer
Handle to a FSPDF_LAYER object.
Definition: fpdf_layer_r.h:152
struct _FSPDF_LAYERNODE * children
Pointer to children.
Definition: fpdf_layer_r.h:158
FS_RESULT FSPDF_LayerContext_Create(FSCRT_DOCUMENT document, FS_INT32 usType, FSPDF_LAYERCONTEXT *context)
Create a PDF layer context with a given type.
FS_RESULT FSPDF_Layer_GetApplicationUsage(FSPDF_LAYER layer, FS_INT32 usageType, FS_LPVOID param)
Get the application usage and its parameter of a PDF layer.
float FS_FLOAT
32-bit floating-point number, single precision.
Definition: fs_base_r.h:148
FSCRT_BSTR subtype
A name object specifying the kind of content controlled by the group.
Definition: fpdf_layer_r.h:189
FS_FLOAT minFactor
The minimum recommended magnification factor at which the group should be ON. -1 means not to set the...
Definition: fpdf_layer_r.h:177
FS_RESULT FSPDF_Layer_EnumeratePageObject(FSPDF_LAYER layer, FSCRT_PAGE page, FSCRT_POSITION *position, FSPDF_PAGEOBJECT *pageObj)
Enumerate page objects and retrieve a page object which is related with a specific layer...
FS_FLOAT maxFactor
The magnification factor below which the group should be ON. -1 means not to set the zoom upper...
Definition: fpdf_layer_r.h:179
FS_RESULT FSPDF_LayerContext_MergeStates(FSPDF_LAYERCONTEXT destContext, FSPDF_LAYERCONTEXT srcContext)
Merge state from source PDF layer context to destination.
FS_RESULT FSPDF_LayerContext_GetUsageType(FSPDF_LAYERCONTEXT context, FS_INT32 *usType)
Get usage type of a PDF layer context.
FS_RESULT FSPDF_Doc_EnumLayers(FSCRT_DOCUMENT document, FSPDF_LAYERNODE *layers)
Enum all PDF Layers.
FS_RESULT FSPDF_Layer_IsInPage(FSCRT_PAGE page, FSPDF_LAYER layer, FS_BOOL *isInPage)
Check whether a PDF layer is in a given page or not.
FS_RESULT FSPDF_LayerContext_Reset(FSPDF_LAYERCONTEXT context)
Reset a PDF layer context.
FS_BOOL printState
A name that may be ON or OFF, indicating that the group should be set to that state when the document...
Definition: fpdf_layer_r.h:191
int FS_INT32
32-bit signed integer.
Definition: fs_base_r.h:175
FS_RESULT FSPDF_LayerContext_IsVisible(FSPDF_LAYERCONTEXT context, FSPDF_LAYER layer, FS_BOOL *visible)
Check whether a PDF layer is visible or not.
FS_RESULT FSPDF_LayerNode_Init(FSPDF_LAYERNODE *layers)
Helper function to initialize a PDF layer node.
Structure for PDF layer nodes.
Definition: fpdf_layer_r.h:143
FS_RESULT FSPDF_LayerContext_CopyStates(FSPDF_LAYERCONTEXT destContext, FSPDF_LAYERCONTEXT srcContext)
Copy a PDF layer context state from another PDF layer context.
FSCRT_BSTR name
Layer name or layer group name, a UTF-8 string object.
Definition: fpdf_layer_r.h:146
int FS_BOOL
Boolean type (This should be TRUE or FALSE).
Definition: fs_base_r.h:133
FS_RESULT FSPDF_LayerNode_Clear(FSPDF_LAYERNODE *layers)
Helper function to clear a PDF layer node.
void * FS_LPVOID
A pointer to any types.
Definition: fs_base_r.h:127
FS_RESULT FSPDF_LayerContext_GetDocument(FSPDF_LAYERCONTEXT context, FSCRT_DOCUMENT *document)
Retrieve a PDF document which owns a PDF layer context.
FS_RESULT FSPDF_LayerContext_SetVisible(FSPDF_LAYERCONTEXT context, FSPDF_LAYER layer, FS_BOOL visible)
Change the visibility state of a PDF layer.
Param structure for PDF layer print usage.
Definition: fpdf_layer_r.h:186
FS_INT32 count
Count of children.
Definition: fpdf_layer_r.h:163
Structure for byte string.
Definition: fs_base_r.h:611
FS_RESULT FSPDF_LayerContext_Release(FSPDF_LAYERCONTEXT context)
Release a PDF layer context.
Param structure for PDF layer zoom usage.
Definition: fpdf_layer_r.h:174
FS_RESULT FSPDF_Layer_GetName(FSPDF_LAYER layer, FSCRT_BSTR *name)
Get the name of a PDF layer.
int FS_RESULT
Result code for functions in Foxit PDF SDK.
Definition: fs_base_r.h:160

Foxit Corporation